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

By detecting the termination of tasks on cloud servers during cloud server hot migration testing and utilizing the min-heap algorithm for the transfer and recycling of cloud servers, the problem of excessive cloud server count in cloud server hot migration performance testing is solved, thus improving the accuracy and efficiency of the test.

CN119520342BActive Publication Date: 2026-01-09CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411720484.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2026-01-09
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Existing technologies require a large number of cloud servers for hot migration performance testing, which affects the accuracy and efficiency of the test results.

Method used

By detecting when a cloud host stops its network connectivity detection task after the test is completed during the cloud host hot migration test, the cloud host is removed and redistributed using the min-heap algorithm, thereby realizing the flow and recycling of cloud hosts between the test group and the tested group, and achieving precise task allocation.

Benefits of technology

By reducing the number of cloud servers, the accuracy and efficiency of cloud server hot migration performance testing have been improved, achieving efficient utilization of cloud servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520342B_ABST
    Figure CN119520342B_ABST
Patent Text Reader

Abstract

The application 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 hot migration test process of multiple tested cloud hosts in a tested group in parallel, if it is detected that the hot migration test of a first cloud host in the multiple tested cloud hosts is completed, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; the first cloud host is removed from the tested group, a test cloud host corresponding to a root node in a minimum heap is taken as a new tested cloud host, the new tested cloud host is transferred from a test group to the tested group, and a new test group is obtained; from the new test group, a third cloud host corresponding to the new tested cloud host is determined, and the third cloud host is allocated a network connectivity detection task for the new tested cloud host. The method can realize accurate testing of the hot migration performance of the cloud host under the condition of a small number of cloud hosts.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and in particular to a task allocation method and device, a computer device, a storage medium and a program product. BACKGROUND

[0002] Cloud host live migration is an important means for IaaS (Infrastructure as a Service) level to guarantee customer business through secondary scheduling, and to improve resource utilization efficiency.

[0003] Cloud host live migration performance testing is mainly divided into control plane and data plane two parts, but the performance test of the control plane and the data plane at the same time needs more pre-set cloud hosts, and more pre-set resources will also affect the test result of live migration. SUMMARY

[0004] Therefore, it is necessary to provide a task allocation method, device, computer device, storage medium and program product to realize accurate testing of cloud host live migration performance with fewer cloud hosts.

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

[0006] In the process of concurrently performing live migration testing on multiple measured cloud hosts in the measured group, if it is detected that live migration testing of a first cloud host in the multiple measured cloud hosts is completed, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; wherein each measured cloud host corresponds to a test cloud host in a test group, and each test cloud host corresponding to a measured cloud host is used for network connectivity detection of the measured cloud host, and the second cloud host is a test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks of at least one test cloud host in the test group is 0.

[0007] The first cloud host is removed from the measured group, a test cloud host corresponding to a root node in a minimum heap is taken as a new measured cloud host, and the new measured cloud host is transferred from the test group to the measured 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] From the new test group, a third cloud host corresponding to the new measured cloud host is determined, and the third cloud host is allocated a network connectivity detection task for the new measured cloud host.

[0009] In one of the embodiments, after the second cloud host is controlled to stop the network connectivity detection task for the first cloud host, the method further comprises:

[0010] updating the number of network connectivity detection tasks of the second cloud host, and updating the minimum heap 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; and correspondingly, taking the test cloud host corresponding to the root node in the minimum heap as the new measured cloud host, including: taking the test cloud host corresponding to the root node in the updated minimum heap as the new measured cloud host.

[0011] In one of the embodiments, determining the third cloud host corresponding to the new measured cloud host from the new test group includes:

[0012] determining the node position based on the hash function, the upper limit 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 measured cloud host; and taking 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 measured cloud host.

[0013] In one of the embodiments, after the third cloud host is allocated the network connectivity detection task for the new measured cloud host, the method further includes:

[0014] adding the first cloud host to the new test group, and adding the number of network connectivity detection tasks corresponding to the first cloud host to the end of the updated minimum heap, and updating the minimum heap after the first cloud host is added 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.

[0015] In one of the embodiments, taking the test cloud host corresponding to the root node in the updated minimum heap as the new measured cloud host includes:

[0016] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not been tested by the hot migration, taking the test cloud host corresponding to the root node in the updated minimum heap as the new measured cloud host.

[0017] In one of the embodiments, transferring the new measured cloud host from the test group to the measured group includes:

[0018] removing the new measured cloud host from the test group, and adding the new measured cloud host to the position of the first cloud host in the measured group.

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

[0020] The task stopping module is configured to, in the process of concurrently performing live migration tests on the multiple tested cloud hosts in the tested group, if it is detected that the live migration test of a first cloud host in the multiple tested cloud hosts ends, control a second cloud host to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in the test group, the test cloud host corresponding to each tested cloud host is configured to perform network connectivity detection on the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host is 0;

[0021] The host transfer module is configured to remove the first cloud host from the tested group, take 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; 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 configured to determine a third cloud host corresponding to the new tested cloud host from the new test group, and allocate a network connectivity detection task for the new tested cloud host to the third cloud host.

[0023] In a third aspect, the present application also provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0024] In the process of concurrently performing live migration tests on the multiple tested cloud hosts in the tested group, if it is detected that the live migration test of a first cloud host in the multiple tested cloud hosts ends, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in the test group, the test cloud host corresponding to each tested cloud host is configured to perform network connectivity detection on the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host is 0;

[0025] The host transfer module is configured to remove the first cloud host from the tested group, take 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; the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

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

[0027] In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0028] In the process of concurrently performing live migration tests on multiple tested cloud hosts in a tested group, if it is detected that the live migration test of a first cloud host among the multiple tested cloud hosts ends, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in a test group, and each test cloud host corresponding to a tested cloud host is used to perform network connectivity detection on the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host is 0;

[0029] The first cloud host is removed from the tested group, a test cloud host corresponding to a root node in a minimum heap is taken 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; 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 tested cloud host is determined from the new test group, and the third cloud host is assigned a network connectivity detection task for the new tested cloud host.

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

[0032] In the process of concurrently performing live migration tests on multiple tested cloud hosts in a tested group, if it is detected that the live migration test of a first cloud host among the multiple tested cloud hosts ends, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in a test group, and each test cloud host corresponding to a tested cloud host is used to perform network connectivity detection on the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host is 0;

[0033] The first cloud host is removed from the tested group, a test cloud host corresponding to a root node in a minimum heap is taken 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; 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 tested cloud host is determined from the new test group, and the third cloud host is assigned a network connectivity detection task for the new tested cloud host.

[0035] The task allocation method, device, computer device, storage medium, and program product described above detect the live migration state of the multiple tested cloud hosts during concurrent live migration testing of the multiple tested cloud hosts in the tested group. If it is detected that the live migration testing of the first cloud host ends among the multiple tested cloud hosts, 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 tested group, a test cloud host corresponding to a root node in the minimum heap is taken 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, so as to realize the circulation of the cloud host between the test group and the tested group. Then, a third cloud host corresponding to the new tested cloud host is determined from the new test group, and the third cloud host is allocated the network connectivity detection task for the new tested cloud host, so as to accurately complete task allocation. The present scheme provides a train of thought for rationalization of task allocation by introducing the minimum heap. Furthermore, the tested cloud host (i.e., the first cloud host) that ends the live migration testing is removed from the tested group, and a suitable test cloud host is selected from the test group and transferred to the tested group, so as to realize the recycling of the cloud host between the test group and the tested group. Finally, the utilization rate of the cloud host in the live migration testing is improved, and the live migration performance of the cloud host is accurately tested. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0037] Figure 1 An application environment diagram of a task allocation method provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of task allocation provided in an embodiment of the present application;

[0039] Figure 3 A flowchart of live migration testing provided in an embodiment of the present application;

[0040] Figure 4 A flowchart of live migration testing provided in an embodiment of the present application;

[0041] Figure 5 A flowchart of live migration testing provided in another embodiment of the present application;

[0042] Figure 6This is a schematic diagram of another thermal migration test provided in an embodiment of this application;

[0043] Figure 7 This is a schematic diagram of a process for determining a third cloud host provided in an embodiment of this application;

[0044] Figure 8 This is a schematic diagram of another thermal migration test provided in the embodiments of this application;

[0045] Figure 9 This is a structural block diagram of a task allocation device provided in the embodiments of this application;

[0046] Figure 10 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] The task allocation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. During the concurrent hot migration test of multiple cloud hosts in the test group, server 104 monitors the status of each cloud host and issues commands to each cloud host to adjust the hot migration test in real time. It can also display the progress and status of the hot migration test through terminal 102. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.

[0049] In one exemplary embodiment, such as Figure 2 As shown, a task allocation method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation may include the following steps:

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

[0051] The tested group includes multiple cloud hosts (cloud hosts that need to undergo hot migration testing); the first cloud host can refer to any cloud host in the tested group that has completed the hot migration test; the second cloud host can refer to the cloud host in the test group (which can be used to perform network connectivity testing on each cloud host in the tested group) that performs the network connectivity testing 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 downtime; the network connectivity testing task can be used to ensure that network devices can communicate normally, such as adding a network probe 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 one 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 testing on the cloud host under test. The second cloud host is the test cloud host corresponding to the first cloud host. At least one test cloud host in the test group has 0 network connectivity testing tasks. Here, the cloud host under test can refer to the cloud host in the test group that performs network connectivity testing tasks. The test cloud host can refer to the cloud host in the test group that can establish network connectivity testing tasks with the cloud hosts in the test group.

[0053] All cloud hosts (including the cloud hosts under test and the test cloud hosts) are identified by host number.

[0054] For example, such as Figure 3 As shown, server 104 detects the hot migration test status of each cloud host in the test group (such as analyzing the status of resources such as CPU (Central Processing Unit), memory, disk and network through monitoring or log analysis). If the hot migration test of the first cloud host (i.e., the cloud host with host number 0) in the test group is detected to be completed, the second cloud host (i.e., the cloud host with host number 12) in the test group that is performing network connectivity test tasks with the first cloud host (i.e., the cloud host with host number 0) can be further identified. Then, a stop command 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 test task for the first cloud host (i.e., the cloud host with host number 0).

[0055] S202, removing the first cloud host from the measured group, taking the test cloud host corresponding to the root node in the minimum heap as a new measured cloud host, and transferring the new measured cloud host from the test group to the measured group to obtain a new test group.

[0056] wherein 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 a unique test cloud host in the test group, or is a certain ordering of each test cloud host in the test group according to the number of network connectivity detection tasks of each test cloud host; the minimum heap is a sorted complete binary tree, wherein 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] For example, as shown in FIG. 12, 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 (i.e., the cloud host with host number 0), the number of network connectivity detection tasks responsible for the second cloud host (i.e., the cloud host with host number 12) 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 measured group; further, a test cloud host (i.e., the test cloud host corresponding to the root node in the minimum heap with host number 10) can be selected from the test group as a new measured cloud host, that is, the new measured cloud host (i.e., the cloud host with host number 10) is removed from the test group and transferred to the measured group. Figure 4 Figure 3 For example, as shown in FIG. 12, 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 (i.e., the cloud host with host number 0), the number of network connectivity detection tasks responsible for the second cloud host (i.e., the cloud host with host number 12) 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 measured group; further, a test cloud host (i.e., the test cloud host corresponding to the root node in the minimum heap with host number 10) can be selected from the test group as a new measured cloud host, that is, the new measured cloud host (i.e., the cloud host with host number 10) is removed from the test group and transferred to the measured group.

[0058] S203, determining a third cloud host corresponding to the new measured cloud host from the new test group, and assigning the third cloud host a network connectivity detection task for the new measured cloud host.

[0059] wherein the third cloud host can represent a cloud host that performs a network connectivity detection task with the new measured cloud host.

[0060] For example, as shown in FIG. 12, a host number (e.g., host number 15) that performs a network connectivity detection task with the new measured cloud host can be determined based on the host number of the new measured cloud host and the node number of the node in the minimum heap; or the minimum heap and the host number of the new measured cloud host can be directly input into the cloud host allocation model, and the cloud host allocation model can be calculated and analyzed to finally determine the host number that performs a network connectivity detection task with the new measured cloud host. Figure 5

[0061] ​​The above task allocation method detects the hot migration status of multiple cloud hosts under test during concurrent hot migration testing in the test group. If the hot migration test of the first cloud host is detected to have ended, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host. Furthermore, the first cloud host is removed from the test group, and the test cloud host corresponding to the root node in the min-heap is taken as the new test cloud host. The new test cloud host is transferred from the test group to the test group to obtain a new test group, realizing the flow of cloud hosts between the test group and the test group. Then, from the new test group, the third cloud host corresponding to the new test cloud host is determined, and the network connectivity detection task for the new test cloud host is assigned to the third cloud host, thus accurately completing the task allocation. This solution introduces a min-heap, providing a rational approach to task allocation. Furthermore, by removing the tested cloud host (i.e., the first cloud host) from the tested group after the hot migration test has ended, and by selecting a suitable test cloud host from the test group and transferring it to the tested group, the solution enables the recycling of cloud hosts between the test group and the tested group. Ultimately, this improves the utilization rate of cloud hosts in the hot migration test and achieves accurate testing of the hot migration performance of cloud hosts.

[0062] Based on the above embodiments, this application provides a detailed explanation of embodiment S201. Specifically, the process involving controlling the second cloud host to stop the network connectivity detection task for the first cloud host in this application includes:

[0063] The number of network connectivity detection tasks for the second cloud host is updated, and the min-heap is updated 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.

[0064] For example, such as Figure 3 As shown, before the second cloud host (i.e., cloud host with host number 12) stops its network connectivity detection tasks targeting the first cloud host (i.e., cloud host with host number 0), the number of network connectivity detection tasks corresponding to the second cloud host (i.e., cloud host with host number 12) is 2 (respectively, the network connectivity detection tasks between the second cloud host and the first cloud host with host number 0, and the network connectivity detection tasks between the second cloud host and the first cloud host with host number 5). Furthermore, after the second cloud host stops its network connectivity detection tasks targeting the first cloud host, the number of network connectivity detection tasks corresponding to the second cloud host (i.e., cloud host with host number 12) is updated to 1 (i.e., the network connectivity detection task between the second cloud host and the first cloud host with 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 min-heap can be updated to obtain... Figure 6 .

[0065] Correspondingly, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host, including: taking the test cloud host corresponding to the root node in the updated minimum heap as the new tested cloud host.

[0066] Exemplarily, as shown in Figure 6 , the test cloud host (the cloud host with host number 10) corresponding to the root node in the updated minimum heap can be taken as the new tested cloud host, that is, after the first cloud host is removed from the tested group, the new tested cloud host is added to the tested group, as shown in Figure 4 .

[0067] In one implementation manner, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host in a case where the test cloud host corresponding to the root node in the updated minimum heap has not undergone the live migration 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 the live migration test, so as to avoid repeated live migration test on the cloud host, that is, the test cloud host as the new tested cloud host needs to meet two conditions, that is, the test cloud host is located at the root node position in the updated minimum heap, and the test cloud host has not undergone the live migration test.

[0069] In another implementation manner, the test cloud host corresponding to the root node in the updated minimum heap can also not be detected, that is, the test cloud host corresponding to the root node in the updated minimum heap is directly taken as the new tested cloud host.

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

[0071] On the basis of the above-mentioned embodiments, the embodiment of the present application explains and describes the above-mentioned embodiment S203 in detail. Specifically, the process of determining the third cloud host in the embodiment of the present application includes the following steps, as shown in Figure 7 .

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

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

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

[0075]

[0076] wherein h(k) can represent the position of the test cloud host in the new test group that performs network connectivity detection with the new test cloud host in the min-heap, such as the slot; heapsize can represent the current host number of the test cloud host in the new test group; P can represent the host upper limit number; and k can represent the host number of the new test cloud host.

[0077] Further, the calculation process of the new test cloud host with host number 10 determining the position of the test cloud host in the new test group that performs network connectivity detection with the new test cloud host in the min-heap can be represented as: h(10) = 6-5+(10 2 mod 5) = 1, i.e., the test cloud host corresponding to the node at slot 1 in the min-heap, i.e., the test cloud host with host number 15.

[0078] S702, the test cloud host corresponding to the node at the position of the node in the updated min-heap is taken as the third cloud host corresponding to the new test cloud host.

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

[0080] In the embodiment of the present application, the introduction of the hash function provides a new idea for determining the corresponding test cloud host for the new measured cloud host, and realizes the convenience of task allocation.

[0081] On the basis of the above embodiment, the embodiment of the present application explains and describes the above embodiment S203 in detail. Specifically, the process after the third cloud host is allocated the network connectivity detection task for the new measured cloud host in the embodiment of the present application, specifically includes:

[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 the minimum heap after adding the first cloud host is updated 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.

[0083] For example, as shown in Figure 5 , the first cloud host can be added to the end of the new test group, i.e. behind the test cloud host with host number 16, and the number of network connectivity detection tasks corresponding to the first cloud host (i.e. 0) can be added to the end of the updated minimum heap, i.e. the child node of the slot 2 node (corresponding to the host number 13) and the right side of the slot 5 node (corresponding to the host number 16); further, the minimum heap after adding the first cloud host can be updated 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, and Figure 8 .

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

[0085] On the basis of the above embodiment, the embodiment of the present application explains and describes the above embodiment S202 in detail. Specifically, the process of transferring the new measured cloud host from the test group to the measured group in the embodiment of the present application, specifically includes: removing the new measured cloud host from the test group, and adding the new measured cloud host to the position of the first cloud host in the measured group.

[0086] For example, as shown in Figure 3 and Figure 4 , after the first cloud host (the cloud host with host number 0) is removed from the measured 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 measured group.

[0087] In the embodiments of the present application, the adding position of the new to-be-tested cloud host in the to-be-tested group is specified in detail, thereby providing details for the specific implementation process of the task allocation method.

[0088] It should be understood that, although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least some of the other steps or the steps or stages in the other steps.

[0089] Based on the same inventive concept, the embodiments of the present application also provide a task allocation device for implementing the above-mentioned task allocation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more task allocation device embodiments provided below can refer to the limitations of the task allocation method described above, which will not be described here again.

[0090] In one exemplary embodiment, as shown in Figure 9 A task allocation device 1 is provided, which includes a task stopping module 10, a host transfer module 20, and a task allocation module 30, wherein:

[0091] The task stopping module 10 is configured to, in a process of concurrently performing live migration tests on a plurality of to-be-tested cloud hosts in a to-be-tested group, if it is detected that a live migration test of a first cloud host among the plurality of to-be-tested cloud hosts ends, control a second cloud host to stop a network connectivity detection task for the first cloud host; wherein each to-be-tested cloud host corresponds to a test cloud host in a test group, and each to-be-tested cloud host corresponds to a test cloud host for performing network connectivity detection on the to-be-tested cloud host, and the second cloud host is the test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks of at least one test cloud host in the test group is 0.

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

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

[0094] In one embodiment, the task allocation apparatus 1 further comprises:

[0095] The first updating module is configured to update the number of network connectivity detection tasks of the second cloud host, and update the min-heap based on the principle that the number of network connectivity detection tasks of the parent node is less than that of the child node; and take the test cloud host corresponding to the root node in the updated min-heap as the new cloud host to be tested.

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

[0097] The node position is determined based on the hash function, the upper limit number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host to be tested; and the test cloud host corresponding to the node at the node position in the updated min-heap is taken as the third cloud host corresponding to the new cloud host to be tested.

[0098] In one embodiment, the task allocation apparatus 1 further comprises:

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

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

[0101] In the case that the test cloud host corresponding to the root node in the updated min-heap has not been tested by hot migration, the test cloud host corresponding to the root node in the updated min-heap is taken as the new cloud host to be tested.

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

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

[0104] The modules in the task allocation apparatus can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so as to be invoked by the processor to perform operations corresponding to the modules.

[0105] In an example embodiment, a computer device, which can be a server, has an internal structure as shown in Figure 10 The computer device includes a processor, a memory, an input / output interface, and a communication interface. The processor, the memory, and the input / output interface are connected by a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store test data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a task allocation method.

[0106] Those skilled in the art can understand that Figure 10 The structure shown in the above description is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0107] In an example embodiment, a computer device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the following steps:

[0108] In the process of concurrently performing live migration tests on multiple tested cloud hosts in a tested group, if it is detected that a live migration test on a first cloud host in the multiple tested cloud hosts is completed, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host. Each tested cloud host corresponds to a test cloud host in a test group, and each tested cloud host is detected for network connectivity by the test cloud host corresponding to the tested cloud host. The second cloud host is the test cloud host corresponding to the first cloud host. In the test group, at least one test cloud host has a network connectivity detection task quantity of 0.

[0109] remove the first cloud host from the test group, take the test cloud host corresponding to the root node in the updated min-heap as a new test cloud host, and transfer the new test cloud host from the test group to the test group to obtain a new test group; the min-heap is constructed according to the network connectivity detection task quantity of each test cloud host;

[0110] From the new test group, determine a third cloud host corresponding to the new test cloud host, and allocate a network connectivity detection task for the new test cloud host to the third cloud host.

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

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

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

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

[0115] In one embodiment, the processor, when executing the computer program, also 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 min-heap, and the min-heap after adding the first cloud host is updated based on the principle that the network connectivity detection task quantity corresponding to the parent node is less than the network connectivity detection task corresponding to the child node.

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

[0118] In the case where the test cloud host corresponding to the root node in the updated min-heap has not undergone hot migration test, the test cloud host corresponding to the root node in the updated min-heap is taken as a new test cloud host.

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

[0120] The new test cloud host is removed from the test group, and the new test cloud host 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, having stored thereon a computer program, the computer program being executed by a processor to implement the following steps:

[0122] In the process of concurrently performing live migration test on multiple tested cloud hosts in a tested group, if it is detected that the live migration test of a first cloud host in the multiple tested cloud hosts is ended, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in a test group, and each test cloud host corresponding to a tested cloud host is used to perform network connectivity detection on the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host is 0;

[0123] The first cloud host is removed from the tested group, a test cloud host corresponding to a root node in a minimum heap is taken 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; the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

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

[0125] In one embodiment, the computer program is executed by the processor to further implement the following steps:

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

[0127] In one embodiment, the computer program is executed by the processor to further implement the following steps:

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

[0129] In one embodiment, the computer program is executed by the processor to further implement the following steps:

[0130] add the first cloud host to a 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 update the minimum heap after adding the first cloud host 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.

[0131] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0132] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the live migration test, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host.

[0133] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

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

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

[0136] In the process of concurrently performing the live migration test on the plurality of tested cloud hosts in the tested group, if it is detected that the live migration test of the first cloud host among the plurality of tested cloud hosts is completed, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each tested cloud host corresponds to a test cloud host in a test group, the test cloud host corresponding to each tested cloud host is used for network connectivity detection of the tested cloud host, and 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, and the number of network connectivity detection tasks of the test cloud host 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 taken as the 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] From the new test group, a third cloud host corresponding to the new tested cloud host is determined, and the third cloud host is assigned a network connectivity detection task for the new tested cloud host.

[0139] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0140] The number of network connectivity detection tasks of the second cloud host is updated, and the minimum heap is updated 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; and the test cloud host corresponding to the root node in the updated minimum heap is taken as the new measured cloud host.

[0141] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

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

[0143] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[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 the minimum heap after adding the first cloud host is updated 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.

[0145] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0146] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not passed the live migration test, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new measured cloud host.

[0147] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0148] The new measured cloud host is removed from the test group, and the new measured cloud host is added to the position of the first cloud host in the measured 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by all parties, and the collection, use and processing of related data need to 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. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present 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 storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric 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 but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0151] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0152] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method of task allocation, characterized by, The method comprises: In a process of concurrently performing live migration tests on a plurality of tested cloud hosts in a test group, if it is detected that a live migration test of a first cloud host in the plurality of tested cloud hosts is completed, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host; each tested cloud host corresponds to a test cloud host in a test group, the test cloud host corresponding to each tested cloud host is used to perform network connectivity detection on the tested cloud host, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks of at least one test cloud host in the test group is 0; The first cloud host is removed from the test group, a test cloud host corresponding to a root node in a minimum heap is taken as a new tested cloud host, and the new tested cloud host is transferred from the test group to the test group to obtain a new test group; the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host; From the new test group, a third cloud host corresponding to the new tested cloud host is determined, and the third cloud host is allocated a network connectivity detection task for the new tested cloud host.

2. The method of claim 1, wherein, After the second cloud host is controlled to stop the network connectivity detection task for the first cloud host, the method further comprises: The number of network connectivity detection tasks of the second cloud host is updated, and the minimum heap is updated based on the principle that the number of network connectivity detection tasks of a parent node is less than that of a child node; Correspondingly, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host. The third cloud host corresponding to the new tested cloud host is determined from the new test group, which comprises:

3. The method of claim 2, wherein, Based on a hash function, a node position is determined according to an upper limit number of hosts, a current number of hosts of test cloud hosts in the new test group, and a 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 taken as the third cloud host corresponding to the new tested cloud host. After the third cloud host is allocated the network connectivity detection task for the new tested cloud host, the method further comprises:

4. The method of claim 2, wherein, 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 the minimum heap after the first cloud host is added is updated based on the principle that the number of network connectivity detection tasks of a parent node is less than that of a child node. The test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host, which comprises:

5. The method of claim 4, wherein, In a case where the test cloud host corresponding to the root node in the updated minimum heap has not undergone a live migration test, the test cloud host corresponding to the root node in the updated minimum heap is taken as the new tested cloud host. ​ 6. The method of claim 1, wherein, The transferring the new tested cloud host from the test group to the tested group comprises: removing the new tested cloud host from the test group, and adding the new tested cloud host to a position of the first cloud host in the tested group.

7. A task allocation apparatus characterized by comprising: The device comprises: The task stopping module is configured to, in a process of concurrently performing live migration tests on a plurality of tested cloud hosts in a tested group, control a second cloud host to stop a network connectivity detection task for a first cloud host in the plurality of tested cloud hosts if it is detected that the live migration test of the first cloud host ends; each tested cloud host corresponds to a test cloud host in a test group, and the test cloud host corresponding to each tested cloud host is configured to perform a network connectivity detection on the tested cloud host; 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, and the number of network connectivity detection tasks of the test cloud host is 0; The host transferring module is configured to remove the first cloud host from the tested group, take a test cloud host corresponding to a root node in a 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; the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host; The task allocation module is configured to determine a third cloud host corresponding to the new tested cloud host from the new test group, and allocate a 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, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

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

Citation Information

Patent Citations

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

    CN114520778A

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

    CN117640451A