Computing resource management method and device, electronic equipment, medium and program product

By automatically determining and copying the data of computing resources in the OpenStack platform, the problem of the distribution of computing nodes of the same type in different cells needs to be manually migrated, and the automatic migration of computing resources is realized, reducing risks and costs, and improving management efficiency.

CN119987951APending Publication Date: 2025-05-13CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510149390.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the OpenStack platform, when the same type of computing nodes are distributed in different cells, computing resources need to be manually migrated, and the migration process requires manual query of the database, which leads to high costs, high risks and is unfavorable to actual operation and maintenance.

Method used

By determining the source cell and target cell of the computing node to be migrated, after verification, obtaining the virtual machine list, determining the data to be migrated, and automatically copying the data from the source cell to the target cell, realizing the automatic migration of computing resources in different cells.

Benefits of technology

Automatic migration of computing resources in different cells is realized, which reduces migration risks, avoids high costs and potential problems caused by manual operations, and improves the efficiency and security of resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987951A_ABST
    Figure CN119987951A_ABST
Patent Text Reader

Abstract

The invention discloses a computing resource management method and device, electronic equipment, a medium and a program product, and the method comprises the steps: determining a source cell and a target cell corresponding to a to-be-migrated computing node; acquiring a virtual machine list corresponding to the to-be-migrated computing node under the condition of determining that the to-be-migrated computing node, the source cell and the target cell pass the verification; according to the virtual machine list, determining to-be-migrated data corresponding to the to-be-migrated computing node; and copying the data to be migrated from the source cell to the target cell. Through the method and the device, the migration of the computing resources in different cells can be realized, the problem that the types of the corresponding computing nodes in the same cell in the resource construction stage are inconsistent is solved, convenience is brought to resource construction, manual operation is not needed, and the migration risk can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of cloud computing technology, and in particular to a computing resource management method, device, electronic device, medium, and program product. Background Art

[0002] With the continuous development of computer technology, enterprises and individuals have an increasingly urgent need to migrate to the cloud. The demand for computing resources in the cloud accounts for a large proportion and has a wide range of application scenarios. How to manage the continuously increasing computing resources is currently a difficult problem.

[0003] In the related technology, in the OpenStack platform, a multi-cell architecture is proposed to achieve the management of large-scale computing resources. However, when computing nodes of the same type are distributed in different cells, if the computing nodes need to be migrated to the same cell, the computing resources can only be migrated manually. During migration, it is necessary to manually query the database to obtain the computing resource status, and operate the database in the online environment to copy and delete data, which requires manual verification. This is not only costly but also risky, and can easily have an adverse impact on actual operation and maintenance. Summary of the invention

[0004] In view of this, the present application provides a computing resource management method, device, electronic device, medium and program product, which can realize the migration of computing resources in different cells without manual operation and can reduce the migration risk.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, the present application provides a computing resource management method, including: determining a source cell and a target cell corresponding to a computing node to be migrated; obtaining a list of virtual machines corresponding to the computing node to be migrated when the computing node to be migrated, the source cell, and the target cell have passed verification; determining data to be migrated corresponding to the computing node to be migrated based on the list of virtual machines; and copying the data to be migrated from the source cell to the target cell.

[0007] In some embodiments, copying the data to be migrated from the source cell to the target cell includes: determining whether a first primary key corresponding to the primary key identifier in the target cell is occupied based on the primary key identifier corresponding to the data to be migrated; and copying the data to be migrated from the source cell to the target cell if the first primary key is not occupied.

[0008] In some embodiments, the computing resource management method further includes: generating a second primary key for the data to be migrated that is different from the identifier of the first primary key when the first primary key is occupied; and copying the data to be migrated from the source cell to the target cell based on the second primary key.

[0009] In some embodiments, determining whether the computing node to be migrated, the source cell, and the target cell have passed verification includes: determining whether the computing node to be migrated and the target cell exist; if the computing node to be migrated and the target cell exist, determining whether the source cell and the target cell are the same cell; if the source cell and the target cell are not the same cell, determining whether the computing node to be migrated, the source cell, and the target cell have passed verification.

[0010] In some embodiments, after copying the data to be migrated from the source cell to the target cell, the computing resource management method further includes: copying the data to be migrated to the shadow table of the original cell, and deleting the data to be migrated in the target data table; wherein the target data table is a data table storing the data to be migrated in the source cell.

[0011] In some embodiments, before determining the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list, the computing resource management method further includes: when the virtual machine list is empty, migrating the computing node to be migrated from the source cell to the target cell.

[0012] In some embodiments, after copying the data to be migrated from the source cell to the target cell, the computing resource management method also includes: determining a first computing node corresponding to the computing node to be migrated in the target cell, and a second computing node corresponding to the virtual machine to be migrated in the data to be migrated in the target cell, wherein the second computing node is different from the first computing node; and migrating the virtual machine to be migrated from the first computing node to the second computing node.

[0013] In some embodiments, determining a source cell corresponding to a computing node to be migrated includes: accessing an interface database through a configuration file; and determining a source cell corresponding to the computing node to be migrated according to a computing node table and a cell table stored in the interface database.

[0014] In some embodiments, the computing resource management method further includes: updating the cell identifier corresponding to the computing node to be migrated to the identifier of the target cell.

[0015] In the second aspect, the present application provides a computing resource management device, including: a first determination module, used to determine the source cell and target cell corresponding to the computing node to be migrated; an acquisition module, used to obtain a list of virtual machines corresponding to the computing node to be migrated when the computing node to be migrated, the source cell and the target cell are verified; a second determination module, used to determine the data to be migrated corresponding to the computing node to be migrated based on the virtual machine list; a copy module, used to copy the data to be migrated from the source cell to the target cell.

[0016] In some embodiments, the replication module is used to perform the following steps: determine whether the first primary key corresponding to the primary key identifier in the target cell is occupied according to the primary key identifier corresponding to the data to be migrated; if the first primary key is not occupied, copy the data to be migrated from the source cell to the target cell.

[0017] In some embodiments, the computing resource management device also includes: a generation module, which is used to generate a second primary key that is different from the identifier of the first primary key for the data to be migrated when the first primary key is occupied; and a copy module, which is used to copy the data to be migrated from the source cell to the target cell based on the second primary key.

[0018] In some embodiments, the acquisition module is used to perform the following steps: determine whether the computing node to be migrated and the target cell exist; if the computing node to be migrated and the target cell exist, determine whether the source cell and the target cell are the same cell; if the source cell and the target cell are not the same cell, determine that the computing node to be migrated, the source cell and the target cell have passed the verification.

[0019] In some embodiments, the computing resource management device also includes: a deletion module, which is used to copy the data to be migrated from the source cell to the target cell, copy the data to be migrated to the shadow table of the original cell, and delete the data to be migrated in the target data table; wherein the target data table is a data table storing the data to be migrated in the source cell.

[0020] In some embodiments, the computing resource management device further includes: a first migration module, which is used to migrate the computing node to be migrated from the source cell to the target cell when the virtual machine list is empty before determining the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list.

[0021] In some embodiments, the computing resource management device also includes: a third determination module, used to determine the first computing node corresponding to the computing node to be migrated in the target cell, and the second computing node corresponding to the virtual machine to be migrated in the data to be migrated in the target cell after copying the data to be migrated from the source cell to the target cell, wherein the second computing node is different from the first computing node; and a second migration module, used to migrate the virtual machine to be migrated from the first computing node to the second computing node.

[0022] In some embodiments, the first determination module is further used to perform the following steps: accessing the interface database through the configuration file; and determining the source cell corresponding to the computing node to be migrated according to the computing node table and the cell table stored in the interface database.

[0023] In some embodiments, the computing resource management device further includes: an updating module, configured to update the cell identifier corresponding to the computing node to be migrated to the identifier of the target cell.

[0024] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, some or all of the steps in the above method are implemented.

[0025] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements some or all of the steps in the above method when the computer program is executed by a processor.

[0026] In a fifth aspect, the present application provides a computer program product, including a computer program or instructions, which implement some or all of the steps in the above method when executed by a processor.

[0027] In a sixth aspect, the present application provides a computer program, comprising a computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes some or all of the steps for implementing the above method.

[0028] In the present application, by determining the source cell and target cell corresponding to the computing node to be migrated, the computing node to be migrated, the source cell and the target cell are verified. If the verification passes, the virtual machine list corresponding to the computing node to be migrated is obtained, and the data to be migrated corresponding to the computing node to be migrated is determined according to the virtual machine list, and the data to be migrated is copied from the source cell to the target cell. In this way, the above scheme can realize the migration of computing resources in different cells, solve the problem of inconsistent types of computing nodes corresponding to the same cell in the resource construction stage, bring convenience to resource construction, and no manual operation is required, which can reduce the risk of migration.

[0029] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0031] Figure 1 It is a structural schematic diagram of a multi-cell architecture provided in an embodiment of the present application;

[0032] Figure 2is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0033] Figure 3 It is a structural diagram of a computing resource management device provided in an embodiment of the present application;

[0034] Figure 4 This is a schematic diagram of an implementation process of the computing resource management method provided in an embodiment of the present application;

[0035] Figure 5 This is another implementation flow diagram of the computing resource management method provided in the embodiment of the present application. DETAILED DESCRIPTION

[0036] The following is a description of the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. In the following description, reference is made to the drawings that form a part of the present application and show the specific aspects of the embodiments of the present application or the specific aspects of the embodiments of the present application in an illustrative manner. It should be understood that the embodiments of the present application can be used in other aspects and may include structural or logical changes not depicted in the drawings. Therefore, the following detailed description should not be understood in a restrictive sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure of the described method can be equally applicable to the corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units such as functional units to perform the one or more method steps described (for example, one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific device is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units, or multiple steps, each of which performs the functionality of one or more of the multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Further, it should be understood that, unless otherwise explicitly stated, the features of the various exemplary embodiments and / or aspects described herein may be combined with each other.

[0037] In recent years, enterprises and individuals have an increasingly urgent need to migrate to the cloud. The demand for migrating to the cloud involves computing, storage, and network resources, among which computing resources account for a large proportion and have a wide range of application scenarios. How to manage the continuously increasing computing resources is a difficult problem faced by all cloud vendors.

[0038] In cloud computing management platforms, such as the OpenStack platform, the nova component is used to manage virtual machines (VMs), and different services communicate through messages. Among them, the performance bottlenecks of the database and message queue limit the scale of the cluster formed by the computing nodes. Based on this, a multi-cell architecture, such as the cellv2 architecture, is proposed. When the number of computing nodes (hosts) in a single cluster reaches a certain level, since the cell to which the computing node belongs includes a set of databases (DB) and a set of message queues (MQ), and different computing nodes communicate through MQ, the pressure on the database and message queue is relatively large, and it is impossible to support large-scale deployment of computing nodes. At this time, one or more cells can be added, each cell includes a set of databases and a set of message queues, and a set of management services, such as the conduction module (nova-conductor), are added for unified management. This method solves the problem of computing cluster scale limitation caused by database and message queue performance bottlenecks, and can achieve large-scale computing resource management.

[0039] Here, the OpenStack platform is an open source cloud computing management platform that provides scalable and elastic cloud computing services for private and public clouds. Cell (also called domain) is a deployment optimization for large-scale clusters in the OpenStack platform. Each cell generally has independent database services and message queue services. Through cell-based deployment, the load of database services and message queue services in each cell can be reduced, and the scalability of the system can be enhanced. Cells can support large-scale deployment of computing nodes and high availability and scalability of distributed systems.

[0040] The multi-cell architecture is described below.

[0041] See also Figure 1 , Figure 1 is a structural diagram of a multi-cell architecture provided in an embodiment of the present application, Figure 1 The single availability zone multi-cell architecture shown includes: nova control service 101, cell 102 and cell 103. Among them, cell 102 may include nove-conductor 1021, MQ 1022, DB 1023, host 1024, host 1025, ..., vm 1026, vm 1027, ...; cell 103 may include nove-conductor 1031, MQ 1032, DB 1033, host 1034, host 1035, ..., vm 1036, vm 1037, ....

[0042] In some embodiments, the nova component is one of the core components of the OpenStack platform, which can be used to manage the life cycle and computing resources of virtual machines, and is responsible for maintaining and managing the computing resources of the cloud environment, including operations such as creating, starting, stopping, restarting, and destroying virtual machines.

[0043] In some embodiments, the nova component includes a control node (e.g. Figure 1 Nova control service 101) and computing nodes (such as Figure 1 Different computing nodes belonging to the same cell can communicate with each other through MQ, and the control node and computing nodes of different cells can also communicate with each other through MQ in each cell. For example, Figure 1 The nova control service 101 can communicate with hosts 1024 and 1025 through MQ1022.

[0044] In some embodiments, the nova control service 101 may communicate with nova-conductor 1021 and nova-conductor 1031; the nova control service 101 may also communicate directly with the host (such as Figure 1 Nova control service 101 can also communicate directly with the host (such as host 1024, host 1025) included in cell 103; nova control service 101 can also communicate directly with the host (such as host 1024, host 1025) included in cell 103 Figure 1 host 1034, host 1035) communication.

[0045] In some embodiments, one nova-conductor corresponds to one MQ and DB. For example, Figure 1 In the example, nova-conductor 1021 corresponds to MQ 1022 and DB 1023; Figure 1 The nova-conductor 1031 in corresponds to MQ 1032 and DB 1033.

[0046] In some embodiments, one or more hosts may be deployed in each cell, and the MQ in each cell may interact with one or more hosts deployed in the current cell. Figure 1 MQ 1022 in corresponds to host 1024 and host 1025; for example, Figure 1 MQ 1032 in corresponds to host 1034 and host 1035.

[0047] In some embodiments, a host can correspond to one or more VMs, but a VM can only run on one host. Figure 1 In the example, host 1024 corresponds to vm 1026; Figure 1 The host 1034 in the table corresponds to the vm 1036.

[0048] In some embodiments, MQ messages between different cells are not interoperable.

[0049] It should be noted that: Figure 1 The number of cells, the number of hosts, and the number of VMs shown in the figure are only for illustrative purposes and are not intended to limit them.

[0050] Although Figure 1 The multi-cell architecture shown solves the scale problem of computing nodes, but it also brings great challenges to computing resource management (including computing node management and virtual machine lifecycle management) and operation and maintenance.

[0051] In the related art, there are the following solutions to solve the problem of multi-cell virtual machine management:

[0052] Solution 1: A cell node scheduling method and system for an OpenStack cloud computing management platform are proposed. After the scheduler receives the request information for establishing a virtual machine instance sent by the client, the scheduler obtains the filter parameter dictionary of each cell node in the tree structure according to the filter index parameter of the filter of the specified application; starting from the root cell node of the tree structure, the scheduler compares the value of the filter index parameter with the filter parameter dictionary of each cell node, and records the cell nodes that pass the comparison as a candidate cell node list; the cell nodes in the candidate cell node list are weighted according to a preset weight calculation formula, and the cell node with the highest weight is determined as the target cell node for establishing the virtual machine instance.

[0053] Solution 2: A method for OpenStack to migrate virtual machines across cells is proposed. According to different migration types of virtual machines, corresponding migration tasks are constructed to determine whether the virtual machine is to be hot migrated or cold migrated. If the virtual machine is to be cold migrated, preparation operations are performed in the destination cell to update the status of the virtual machine. By determining whether the original virtual machine and the current virtual machine are in the same cell, it is determined whether to update or operate the database of the source cell and the destination cell. If the virtual machine is to be hot migrated, operations are performed on nova-compute of the destination cell. By determining whether the original virtual machine and the current virtual machine are in the same cell, it is determined whether to update or operate the database of the source cell and the destination cell.

[0054] Both of the above solutions are based on virtual machine resource management. Solution 1 solves the scheduling problem when creating multi-cell virtual machines, and Solution 2 solves the problem of virtual machine migration across cells. Among them, Solution 2 mainly implements the migration of virtual machines from computing node A to computing node B across cells. The host where the virtual machine is located changes. During the implementation process, this solution needs to solve the problem of cross-cell message queue disconnection, which is easily affected by MQ communication, increasing the possibility of virtual machine business being affected.

[0055] In addition, in order to facilitate unified management of computing resources, computing nodes of the same type need to be deployed in the same cell. However, during the resource construction process, computing nodes of the same type may be distributed in different cells. If computing nodes distributed in different cells are to be migrated to the same cell, computing resources can only be migrated manually. During migration, it is necessary to manually query the database to obtain resource information, copy data across databases, delete original data, operate the database in an online environment, and rely on manual verification, which is not only costly but also risky.

[0056] In some embodiments, during the resource construction process, due to message queue limitations, when the number of computing resources reaches a preset number, such as more than 3,000, computing resources need to be expanded. Computing resources (such as cells, hosts, and VMs) can usually be expanded by creating a new cluster and expanding computing nodes within the cluster. The former can be called vertical expansion, and the latter can be called horizontal expansion. In order to control construction costs, horizontal expansion is more appropriate, but due to the limitations of the database and message queues, when the number of computing nodes reaches a certain number, it needs to be achieved by adding cells. Each additional cell may require at least 6 servers to provide support, which increases costs.

[0057] In some embodiments, horizontal expansion can be: adding cells in a single available zone, each cell has an independent database (such as nova library) and message queue, and each available zone has a management database (such as nova_api library and nova_cell0 library) to record the information of all cells. When there are n cells in an available zone, there are n+2 databases, namely: n nova libraries, 1 nova_api library and 1 nova_cell0 library.

[0058] In some embodiments, the nova_api library, the nova_cell0 library, and the nova library of cell 1 may be placed in one database cluster.

[0059] In some embodiments, the nova library can record the virtual machine information in the current cell; the nova_api library can record the association between each cell and the database, MQ (such as the cell table, cell_mappings table), the correspondence between each cell and the computing node (such as the host table, host_mappings table), and the correspondence between each cell and the virtual machine (such as the virtual machine table, instance_mappings table); the nova_cell0 library can store instance data that failed during the scheduling process and could not be allocated to a specific cell.

[0060] As the number of cells continues to increase, there is an urgent need for a tool to facilitate the operation and maintenance of all computing resources, including computing node management and virtual machine management.

[0061] Based on the above problems, the present application proposes a computing resource management method, which verifies the computing node to be migrated, the source cell and the target cell by determining the source cell and the target cell corresponding to the computing node to be migrated. If the verification passes, the virtual machine list corresponding to the computing node to be migrated is obtained, and the data to be migrated corresponding to the computing node to be migrated is determined according to the virtual machine list, and the data to be migrated is copied from the source cell to the target cell. In this way, the above scheme can realize the migration of computing resources in different cells, solve the problem of inconsistent types of computing nodes corresponding to the same cell in the resource construction stage, bring convenience to resource construction, and no manual operation is required, which can reduce the risk of migration.

[0062] In some embodiments, the method described in the embodiments of the present application can be applied to the computing resource management scenario of the OpenStack platform. In some embodiments, the method described in the embodiments of the present application can also be applied to the field of cloud computing. In some embodiments, the method described in the embodiments of the present application can also be applied to many cloud computing related management application systems such as public cloud resource construction platform, public cloud operation and maintenance management platform. In some embodiments, the method described in the embodiments of the present application can also be applied to infrastructure service construction and operation and maintenance management system.

[0063] The following describes an exemplary application of the electronic device provided in the embodiment of the present application. The electronic device provided in the embodiment of the present application can be a laptop, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a wearable smart watch, a dedicated messaging device), an electric car, an electric bicycle, and other rechargeable devices, but is not limited thereto. Alternatively, the electronic device can also be implemented as a server.

[0064] In some embodiments, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms, but is not limited thereto. In some embodiments, the server and the electronic device may be directly or indirectly connected via wired or wireless communication, and this is not specifically limited in the embodiments of the present application.

[0065] See also Figure 2 , Figure 2 is a structural schematic diagram of an electronic device provided in an embodiment of the present application, Figure 2 The electronic device 200 shown includes: at least one processor 210, a memory 250, at least one network interface 220 and a user interface 230. The various components in the electronic device 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 2 Various buses are labeled as bus system 240 .

[0066] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0067] The user interface 230 includes one or more output devices 231 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0068] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.

[0069] The memory 250 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory.

[0070] In some embodiments, memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0071] The operating system 251 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.

[0072] The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220. Exemplary network interfaces 220 include: Bluetooth, wireless compatibility certification (WiFi), and universal serial bus (USB).

[0073] The presentation module 253 is used to enable presentation of information (eg, a user interface for operating peripheral devices and displaying content and information) via one or more output devices 231 (eg, a display screen, a speaker, etc.) associated with the user interface 230 .

[0074] The input processing module 254 is used to detect one or more user inputs or interactions from one of the one or more input devices 232 and translate the detected inputs or interactions.

[0075] In some embodiments, the computing resource management method provided in the embodiments of the present application can be implemented in software and stored in the memory 250. Figure 3 , Figure 3 25 is a schematic diagram of a computing resource management device provided in an embodiment of the present application, which may be software in the form of a program or a plug-in, and the computing resource management device 255 includes the following software modules: a first determination module 2551, an acquisition module 2552, a second determination module 2553, and a copy module 2554. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0076] In other embodiments, the computing resource management device 255 provided in the embodiment of the present application can be implemented in hardware. As an example, the computing resource management device 255 provided in the embodiment of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the computing resource management method provided in the embodiment of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA) or other electronic components.

[0077] The computing resource management method provided in the embodiment of the present application will be described below in conjunction with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.

[0078] In some embodiments, the computing resource management method provided in the embodiments of the present application can be applied to the above-mentioned multi-cell architecture. The computing resource management method provided in the embodiments of the present application is described below in conjunction with the above-mentioned multi-cell architecture.

[0079] Figure 4 This is a schematic diagram of an implementation flow of the computing resource management method provided in the embodiment of the present application. Figure 4 As shown, the computing resource management method of the embodiment of the present application may include steps S410 to S440.

[0080] In step S410, a source cell and a target cell corresponding to the computing node to be migrated are determined.

[0081] Here, the computing node to be migrated may be a computing node that needs to be migrated. The source cell may be the original location of the computing node to be migrated before migration, and the target cell may be the location of the computing node to be migrated after migration.

[0082] In some embodiments, computing nodes of the same type may be distributed in different cells. For example, computing nodes of the same type may be deployed incorrectly during resource construction. In another example, as time goes by, computing nodes can no longer be deployed in the original cell and need to be deployed in other cells. There may also be other situations, which are not specifically limited in the embodiments of the present application.

[0083] It can be understood that when computing nodes of the same type are distributed in different cells, these computing nodes need to be migrated to the same cell, and these nodes that need to be migrated are the computing nodes to be migrated. After determining the computing nodes to be migrated, it is necessary to determine the original location corresponding to the computing nodes to be migrated: that is, the source cell, and the location after migration, that is, the target cell.

[0084] In some embodiments, since the nova_api library records the correspondence between each cell and the computing node (such as host_mappings), the source cell corresponding to the computing node to be migrated can be determined by accessing the host_mappings in the nova_api library through an interface.

[0085] In step S420, when it is determined that the computing node to be migrated, the source cell, and the target cell have passed verification, a list of virtual machines corresponding to the computing node to be migrated is obtained.

[0086] Here, the virtual machine list may be a table recording relevant information of virtual machines included in the computing node to be migrated in the source cell.

[0087] It is understandable that after determining the source cell and target cell corresponding to the computing node to be migrated, it is necessary to verify the parameters of the computing node to be migrated, the source cell and the target cell to determine whether these parameters are correct. If they are correct, it means that the verification has passed. If the verification passes, it is necessary to determine the data to be migrated corresponding to the computing node to be migrated. Since each cell has an independent database, it is necessary to migrate the virtual machine data on the computing node to be migrated in the source cell to the database of the target cell.

[0088] In some embodiments, since the virtual machine list corresponding to the computing node to be migrated records the relevant information of the virtual machines included in the computing node to be migrated in the source cell, in order to obtain the data to be migrated, it is necessary to obtain the virtual machine list corresponding to the computing node to be migrated.

[0089] In some embodiments, since the nova_api library records the correspondence between cells and virtual machines (such as the instance_mappings table), the virtual machine information corresponding to the computing node to be migrated can be determined by accessing the instance_mappings table in the nova_api library through the interface. Through this virtual machine information, the list of virtual machines corresponding to the computing node to be migrated can be determined through the database of the source cell.

[0090] In some embodiments, the virtual machine list may record identification information of the virtual machine corresponding to the computing node to be migrated, such as the identity document (ID) of the virtual machine.

[0091] In one example, the virtual machine ID recorded in the virtual machine list of a computing node to be migrated may be: vm = [ID1, ID2, ... ID n ], where n is the number of virtual machines corresponding to the computing node to be migrated, and n is a positive integer greater than 2.

[0092] In step S430, the data to be migrated corresponding to the computing node to be migrated is determined according to the virtual machine list.

[0093] Here, the data to be migrated may include data of the computing node to be migrated and the virtual machine corresponding to the computing node to be migrated.

[0094] It can be understood that after obtaining the virtual machine list, at least one table recording relevant information of the virtual machine can be obtained according to the virtual machine ID recorded in the virtual machine list, and the data to be migrated corresponding to the computing node to be migrated can be obtained through these tables.

[0095] In step S440, the data to be migrated is copied from the source cell to the target cell.

[0096] It can be understood that after determining the data to be migrated corresponding to the computing node to be migrated, the computing node to be migrated can be migrated from the source cell to the target cell, and the data of the virtual machine corresponding to the computing node to be migrated can be copied from the source cell to the target cell through data insertion technology, data copy technology, etc. In this way, the migration of computing resources (i.e., computing nodes and virtual machines) in different cells is realized.

[0097] In some embodiments, the above-mentioned data insertion technology may be the structured query language (SQL) technology of SQLAlchemy, or may be single entry insertion, multi-value insertion, etc., which is not specifically limited in the embodiments of the present application.

[0098] Here, SQLAlchemy can be an open source database toolkit and object-relational mapping library for the Python programming language.

[0099] In the embodiment of the present application, through the above steps S410 to S440, the migration of computing resources in different cells can be realized, and the problem of inconsistent types of computing nodes corresponding to the same cell in the resource construction stage can be solved, which brings convenience to resource construction, and no manual operation is required, which can reduce the risk of migration. At the same time, since computing resources can be migrated in different cells, there is no need to estimate the scale of computing resources and pre-build multiple cells in the resource construction stage. In this solution, cells can be built according to actual conditions, thereby reducing the cost of building multiple cells.

[0100] In some embodiments, the above step S440 may include: step a, determining whether the first primary key corresponding to the primary key identifier in the target cell is occupied according to the primary key identifier corresponding to the data to be migrated; step b, copying the data to be migrated from the source cell to the target cell if the first primary key is not occupied.

[0101] Here, the primary key can be a field in the database used to identify each row of data in the table. One table corresponds to one primary key, but the primary key can be composed of multiple columns, and the location of the data can be determined by the primary key.

[0102] It can be understood that at least one table recording relevant information of the virtual machine can be obtained according to the virtual machine ID recorded in the virtual machine list, and the primary key of each table can be determined through these tables, and the data corresponding to each primary key can be obtained according to the primary key, and the data corresponding to all primary keys are the data to be migrated corresponding to the computing node to be migrated. Since the data to be migrated corresponds to the primary key, according to the primary key identifier corresponding to the data to be migrated, the first primary key corresponding to the primary key identifier in the database of the target cell can be determined, and then it is determined whether the first primary key is occupied, that is, whether data is stored in the first primary key. In the case where the first primary key is not occupied, it means that there is no abnormal situation of duplicate primary keys. At this time, the data to be migrated can be directly copied from the source cell to the target cell. In this way, through the above method, the cross-cell migration of computing resources can be quickly realized, and the computing node to be migrated can be quickly migrated from the source cell to the target cell, and the data recorded in the virtual machine corresponding to the computing node to be migrated is copied from the source cell to the database corresponding to the target cell, and only the database changes are involved in the process, which has no impact on the virtual machine business.

[0103] In some embodiments, after step a, the computing resource management method may further include: generating a second primary key for the data to be migrated that is different from the identifier of the first primary key when the first primary key is occupied; and copying the data to be migrated from the source cell to the target cell based on the second primary key.

[0104] It can be understood that when the first primary key is occupied, it means that an abnormal situation of duplicate primary key has occurred. When this abnormal situation occurs, it is necessary to generate a second primary key that is different from the identifier of the first primary key for the data to be migrated. Then, according to the identifier corresponding to the second primary key, the data to be migrated is copied from the source cell to the location of the primary key corresponding to the second primary key identifier in the target cell. In this way, through the above method, when an abnormal situation of duplicate primary key occurs (that is, a conflict occurs in data replication), the abnormal situation can be resolved to ensure that the data to be migrated can be successfully replicated.

[0105] In one example, if the primary key ID of a table in the source cell is 10, and the position of the primary key ID 10 in the target cell is already occupied, the primary key ID of the table in the source cell is modified to 11, and 11 is used as the identifier of the new primary key generated for the table (i.e., the identifier of the second primary key). If the primary key corresponding to 11 in the target cell is not occupied, the data to be migrated corresponding to the identifier 11 is migrated to the position of the primary key ID 11 in the target cell.

[0106] In some embodiments, determining whether the computing node to be migrated, the source cell, and the target cell have passed verification in the above-mentioned step S420 may include: step 1, determining whether the computing node to be migrated and the target cell exist; step 2, if the computing node to be migrated and the target cell exist, determining whether the source cell and the target cell are the same cell; step 3, if the source cell and the target cell are not the same cell, determining whether the computing node to be migrated, the source cell, and the target cell have passed verification.

[0107] It can be understood that in the process of verifying the computing node to be migrated, the source cell, and the target cell, it is determined whether the computing node to be migrated exists. If the computing node to be migrated exists, it is determined whether the target cell exists. If the target cell exists, it is determined whether the source cell and the target cell are the same cell. If the source cell and the target cell are not the same cell, it is determined that the computing node to be migrated, the source cell, and the target cell have passed the verification. In this way, it is simple and efficient to determine whether the computing node to be migrated, the source cell, and the target cell have passed the verification through the above process, which is conducive to the subsequent data replication process.

[0108] In some embodiments, after step 1 above, the computing resource management method may further include: when the computing node to be migrated or the target cell does not exist, prompting through prompt information, and at the same time, the migration process of the computing node to be migrated ends.

[0109] In one example, if the computing node to be migrated does not exist, it means that the verification of the computing node to be migrated has failed. The prompt information at this time can be a text message or a voice message: the computing node to be migrated does not exist. The embodiment of the present application does not specifically limit the prompt method.

[0110] In one example, if the target cell does not exist, it means that the verification of the target cell has failed. The prompt information at this time may be a text message or a voice message: the target cell does not exist. The embodiment of the present application does not specifically limit the prompt method.

[0111] In some embodiments, after the above step 2, the computing resource management method may further include: when the source cell and the target cell are the same cell, determining that the source cell and the target cell verification have not passed, and prompting through prompt information, and at the same time, the migration process of the computing node to be migrated ends.

[0112] In one example, if the computing node to be migrated and the target cell exist, but the source cell and the target cell are the same cell, it means that the verification of the source cell and the target cell has failed. The prompt message at this time can be a text message or a voice message: the source cell and the target cell cannot be the same cell. The embodiment of the present application does not specifically limit the prompt method.

[0113] In some embodiments, after step S440, the computing resource management method may further include: copying the data to be migrated to the shadow table of the original cell, and deleting the data to be migrated in the target data table.

[0114] Here, the target data table is the data table in the source cell that stores the data to be migrated. This data table is not the same as the shadow table. The shadow table can be a table starting with shadow_. The shadow table can be a database object used to store shadow data. It is mainly used in data warehouses and big data processing to achieve real-time data updates and historical data retention. By creating a shadow table based on the original table, the difference between each data change can be stored, so that data updates and maintenance can be performed without interrupting services.

[0115] It can be understood that the nova library of each cell records the relevant information of the virtual machine of the current cell, and each table recording the relevant information of the virtual machine can have a shadow table starting with shadow_ corresponding to it. The shadow table can be used to record some expired data, such as the shadow table corresponding to the instances table recording the virtual machine can be shadow_instances.

[0116] It is understandable that after the data to be migrated is copied from the source cell to the target cell, the data to be migrated in the source cell does not need to be retained, and the data to be migrated in the source cell needs to be deleted. Before deleting the data to be migrated in the source cell, first copy the data to be migrated to the shadow table of the original cell, and then after the copy is successful, delete the data to be migrated in the target data table, that is, the data table storing the data to be migrated in the source cell. In this way, the data to be migrated in the target data table can be deleted, and it can be retained in the shadow table, so that when there is a problem with the data to be migrated later, the problem can be tracked.

[0117] In some embodiments, before step S430, the computing resource management method may further include: step c, when the virtual machine list is empty, migrating the computing node to be migrated from the source cell to the target cell.

[0118] Understandably, when the virtual machine list is empty, it means that the computing node to be migrated does not have virtual machine data. In this case, the computing node to be migrated can be directly migrated from the source cell to the target cell. In this way, the cross-cell migration of the computing node to be migrated can be directly achieved.

[0119] In some embodiments, the above step S430 implicitly indicates that the virtual machine list is not empty, so that the data to be migrated corresponding to the computing node to be migrated can be determined.

[0120] In some embodiments, after step S440, the computing resource management method may further include: step d, determining the first computing node corresponding to the computing node to be migrated in the target cell, and the second computing node corresponding to the virtual machine to be migrated in the data to be migrated in the target cell; step e, migrating the virtual machine to be migrated from the first computing node to the second computing node.

[0121] Here, the second computing node is different from the first computing node;

[0122] It can be understood that after the data to be migrated is copied from the source cell to the target cell, if the virtual machine to be migrated in the data to be migrated needs to be migrated in the target cell, then the first computing node corresponding to the computing node to be migrated in the target cell is determined, that is, the computing node where the data to be migrated is located after being copied to the target cell, and the second computing node corresponding to the virtual machine to be migrated in the target cell, that is, the computing node to which the virtual machine to be migrated wants to migrate in the target cell. Then, the virtual machine to be migrated is migrated from the first computing node to the second computing node. In this way, the computing node migration of the virtual machine in the same cell can be quickly realized.

[0123] In some embodiments, when a virtual machine needs to be hot migrated between two cells, the virtual machine to be migrated and the computing node corresponding to the virtual machine to be migrated can be migrated to the target cell through the above steps S410 to S440, and then the computing node migration of the virtual machine to be migrated in the target cell can be realized through the above steps d and e. In this way, compared with the hot migration of virtual machines across cells in the related art, which needs to solve the cross-MQ communication problem and is easily affected by two MQ clusters, the above hot migration belongs to the same cell migration, and the migration process only involves database changes, does not involve changes in user resources themselves, has no impact on user services, and does not involve cross-MQ communication problems, which can reduce the risk of virtual machine migration.

[0124] Here, hot migration, also known as dynamic migration or real-time migration, refers to the process of migrating a virtual machine from one physical server (computing node) to another without interrupting business services. Hot migration technology allows the virtual machine to continue running during the migration process, and users will hardly notice any difference.

[0125] In some embodiments, determining the source cell corresponding to the computing node to be migrated in the above step S410 may include: accessing an interface database through a configuration file; and determining the source cell corresponding to the computing node to be migrated according to a computing node table and a cell table stored in the interface database.

[0126] Here, the configuration file can be a file pre-configured by the developer that can access the interface database, which can contain the access address of the nova_api library.

[0127] It can be understood that the interface database, i.e., the nova_api library, can be directly accessed through the access address provided in the configuration file, and then the source cell corresponding to the computing node to be migrated can be determined according to the computing node table (e.g., host_mappings table) and cell table (e.g., cell_mappings table) stored in the interface database. In this way, the source cell corresponding to the computing node to be migrated can be quickly determined.

[0128] In some embodiments, the access address of the nova_api library included in the above configuration file may support the following interfaces:

[0129] (1) cells-api list_cells: Access the nova_api library through the configuration file and query the cell information recorded in the cell_mappings table.

[0130] (2)cells-api list_hosts--cell_uuid<cell_uuid> : Access the nova_api library through the configuration file, and query the computing node information corresponding to the specified cell through the host_mappings table.

[0131] (3)cells-api node_map_show--host <host>: Access the nova_api library through the configuration file, and query the cell information corresponding to the specified computing node through the host_mappings table and cell_mappings table connection.

[0132] (4)cells-apiinstance_map_show--instance_uuid<vm_uuid> : Access the nova_api library through the configuration file, and query the cell information corresponding to the specified virtual machine through the instance_mappings table and the cell_mappings table.

[0133] (5)cells-api get-connections--cell_uuid<cell_uuid> : Access the nova_api library through the configuration file, and call the corresponding database interface and MQ interface according to the cell information recorded in cell_mappings to obtain the number of database connections and message connections.

[0134] Thus, through the interfaces shown in (1) to (5) above, cluster status can be checked, that is, the corresponding relationship between cells, computing nodes and virtual machines can be queried. These interfaces facilitate the checking of the corresponding relationship between cells, computing nodes and virtual machines during the resource construction and operation and maintenance phases, and can monitor the online operation of computing resources at any time, so as to serve as a basis for resource expansion assessment and rapid location of existing network faults, providing great convenience for developers and operation and maintenance personnel.

[0135] It should be noted that the interfaces shown in (1) to (5) above are only for illustrative purposes and may also include other interfaces, which are not specifically limited in the embodiments of the present application.

[0136] In some embodiments, after the above step S440 or step c, the computing resource management method may further include: updating the cell identifier corresponding to the computing node to be migrated to the identifier of the target cell.

[0137] It can be understood that after copying the data to be migrated from the source cell to the target cell, or when the virtual machine list is empty, migrating the computing node to be migrated from the source cell to the target cell, since the cell corresponding to the computing node to be migrated has changed, it is necessary to modify the mapping relationship between the computing node to be migrated and the cell, that is, update the host_mappings table in the nova_api library, and update the cell identifier corresponding to the computing node to be migrated to the identifier of the target cell. In this way, after completing the migration of the computing node to be migrated, by updating the cell identifier of the computing node to be migrated, it is convenient to query the location of the computing node to be migrated in the future to avoid errors.

[0138] In some embodiments, the above computing resource management method can be implemented through a preset interface, which can be pre-configured by the developer and has the logic to implement the above method deployed. The above method can be implemented by calling the preset interface on any node that can access the nova_api library. When using it, you need to specify the computing node to be migrated and the target cell. The interface can be: cells-api change_host_cell--host <host>--cell_uuid<cell_uuid> .

[0139] The migration process of the computing node to be migrated is described below through a specific example.

[0140] Assume that a certain type of computing nodes is distributed in two cells, cell1 and cell2, where cell1 = [host1, host2, ..., host n1 ],cell2=[host 1 ,host 2 ,...,host n2 ], n1 represents the number of computing nodes corresponding to cell1, which is a positive integer greater than 2; n2 represents the number of computing nodes corresponding to cell2, which is a positive integer greater than 2; the database corresponding to cell1 is db1; the database corresponding to cell2 is db2. The virtual machine on a computing node in cell1 is: vm1 = [vm1,vm2,...,vm n3 ], the virtual machine on a computing node in cell2 is: vm2 = [vm 1 ,vm 2 ,...,vm n4 ], vm1∈db1, vm2∈db2, n3 represents the number of virtual machines on a computing node in cell1, which is a positive integer greater than 2; n4 represents the number of virtual machines on a computing node in cell2, which is a positive integer greater than 2.

[0141] The migration of computing nodes can be achieved through the above preset interface, for example, migrating all computing nodes in cell1 to cell2; for another example, migrating specified computing nodes in cell1 to cell2. Since each cell has an independent database, when migrating all computing nodes in cell1 to cell2, the data of the virtual machines on all computing nodes in cell1 needs to be migrated to the database of cell2. Each virtual machine involves multiple tables in the database. During the migration of computing nodes, the data tables that need to be migrated can be determined in advance, such as tables = [t1, t2...tm], m represents the number of data tables that need to be migrated, and the data tables can change dynamically. In this way, when the computing node is migrated, the virtual machine data corresponding to the computing node is migrated from db1 to db2, and the virtual machine business is not affected in any way.

[0142] Figure 5 FIG. 1 is another implementation flow diagram of the computing resource management method provided in the embodiment of the present application. Figure 5 As shown, the embodiment of the present application mainly introduces the complete migration process of the computing node to be migrated, which may specifically include steps S5001 to S5012.

[0143] In step S5001, a source cell and a target cell corresponding to a computing node to be migrated are determined.

[0144] In step S5002, it is determined whether the computing node to be migrated exists.

[0145] If so, execute step S5003; if not, execute step S5012.

[0146] In step S5003, it is determined whether the target cell exists.

[0147] If so, execute step S5004; if not, execute step S5012.

[0148] In step S5004, it is determined whether the source cell and the target cell are the same cell.

[0149] If so, execute step S5005; if not, execute step S5012.

[0150] In step S5005, a list of virtual machines corresponding to the computing node to be migrated is obtained.

[0151] In step S5006, it is determined whether the virtual machine list is empty.

[0152] If so, execute step S5007; if not, execute step S5008.

[0153] In step S5007, the computing node to be migrated is migrated from the source cell to the target cell.

[0154] After step S5007, execute step S5011.

[0155] In step S5008, according to the primary key identifier corresponding to the data to be migrated, it is determined whether the first primary key corresponding to the primary key identifier in the target cell is occupied.

[0156] If so, execute step S5009; if not, execute step S5010.

[0157] In step S5009, a second primary key different from the identifier of the first primary key is generated for the data to be migrated.

[0158] In step S5010, the data to be migrated is copied from the source cell to the target cell.

[0159] In step S5011, the cell identifier corresponding to the computing node to be migrated is updated to the identifier of the target cell.

[0160] In step S5012, end.

[0161] Based on the same inventive concept, the present application embodiment also provides a computing resource management device, such as the computing resource management device 255 in the above embodiment. Figure 3 As shown, the computing resource management device 255 includes: a first determination module 2551, used to determine the source cell and target cell corresponding to the computing node to be migrated; an acquisition module 2552, used to obtain a list of virtual machines corresponding to the computing node to be migrated when the computing node to be migrated, the source cell and the target cell are verified; a second determination module 2553, used to determine the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list; and a copy module 2554, used to copy the data to be migrated from the source cell to the target cell.

[0162] In some embodiments, the copy module 2554 is used to perform the following steps: determine whether the first primary key corresponding to the primary key identifier in the target cell is occupied according to the primary key identifier corresponding to the data to be migrated; if the first primary key is not occupied, copy the data to be migrated from the source cell to the target cell.

[0163] In some embodiments, the computing resource management device also includes: a generation module, which is used to generate a second primary key that is different from the identifier of the first primary key for the data to be migrated when the first primary key is occupied; and a copy module 2554, which is used to copy the data to be migrated from the source cell to the target cell based on the second primary key.

[0164] In some embodiments, the acquisition module 2552 is used to perform the following steps: determine whether the computing node to be migrated and the target cell exist; if the computing node to be migrated and the target cell exist, determine whether the source cell and the target cell are the same cell; if the source cell and the target cell are not the same cell, determine whether the computing node to be migrated, the source cell and the target cell have passed the verification.

[0165] In some embodiments, the computing resource management device also includes: a deletion module, which is used to copy the data to be migrated from the source cell to the target cell, copy the data to be migrated to the shadow table of the original cell, and delete the data to be migrated in the target data table; wherein the target data table is a data table storing the data to be migrated in the source cell.

[0166] In some embodiments, the computing resource management device further includes: a first migration module, which is used to migrate the computing node to be migrated from the source cell to the target cell when the virtual machine list is empty before determining the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list.

[0167] In some embodiments, the computing resource management device also includes: a third determination module, used to determine the first computing node corresponding to the computing node to be migrated in the target cell, and the second computing node corresponding to the virtual machine to be migrated in the data to be migrated in the target cell after copying the data to be migrated from the source cell to the target cell, wherein the second computing node is different from the first computing node; and a second migration module, used to migrate the virtual machine to be migrated from the first computing node to the second computing node.

[0168] In some embodiments, the first determination module 2551 is further used to perform the following steps: access the interface database through the configuration file; determine the source cell corresponding to the computing node to be migrated according to the computing node table and cell table stored in the interface database.

[0169] In some embodiments, the computing resource management device further includes: an updating module, configured to update the cell identifier corresponding to the computing node to be migrated to the identifier of the target cell.

[0170] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0171] It should be noted that in the embodiment of the present application, if the above-mentioned computing resource management method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software and firmware.

[0172] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0173] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0174] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in an electronic device, a processor in the electronic device executes some or all of the steps for implementing the above method.

[0175] The present application embodiment provides a computer program product, including a computer program or an instruction, which implements some or all of the steps in the above method when the computer program or instruction is executed by a processor. The computer program product can be implemented specifically by hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0176] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0177] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial numbers of the above-mentioned steps / processes does not mean the order of execution. The execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0178] It should be noted that, in this article, the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0179] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0180] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0181] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0182] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0183] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0184] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.< / host> < / host>

Claims

1. A computing resource management method, characterized in that: include: Determine the source cell and target cell corresponding to the compute node to be migrated; When it is determined that the computing node to be migrated, the source cell, and the target cell have passed verification, obtaining a list of virtual machines corresponding to the computing node to be migrated; Determine the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list; The data to be migrated is copied from the source cell to the target cell.

2. The method according to claim 1, characterized in that: The step of copying the to-be-migrated data from the source cell to the target cell includes: Determining, according to the primary key identifier corresponding to the data to be migrated, whether the first primary key corresponding to the primary key identifier in the target cell is occupied; When the first primary key is not occupied, the data to be migrated is copied from the source cell to the target cell.

3. The method according to claim 2, characterized in that The method further comprises: In the case where the first primary key is occupied, generating a second primary key for the data to be migrated that is different from the identifier of the first primary key; Based on the second primary key, the data to be migrated is copied from the source cell to the target cell.

4. The method according to claim 1, characterized in that: The determining that the computing node to be migrated, the source cell, and the target cell have passed verification includes: Determine whether the computing node to be migrated and the target cell exist; In the case where the computing node to be migrated and the target cell exist, determining whether the source cell and the target cell are the same cell; In a case where the source cell and the target cell are not the same cell, it is determined that the computing node to be migrated, the source cell, and the target cell have passed verification.

5. The method according to claim 1, characterized in that After copying the data to be migrated from the source cell to the target cell, the method further includes: Copy the data to be migrated to the shadow table of the original cell, and delete the data to be migrated in the target data table; The target data table is a data table in the source cell that stores the data to be migrated.

6. The method according to claim 1, characterized in that Before determining the data to be migrated corresponding to the computing node to be migrated according to the virtual machine list, the method further includes: When the virtual machine list is empty, the computing node to be migrated is migrated from the source cell to the target cell.

7. The method according to any one of claims 1 to 6, characterized in that: After copying the data to be migrated from the source cell to the target cell, the method further includes: Determine a first computing node corresponding to the computing node to be migrated in the target cell, and a second computing node corresponding to the virtual machine to be migrated in the data to be migrated in the target cell, wherein the second computing node is different from the first computing node; Migrate the virtual machine to be migrated from the first computing node to the second computing node.

8. The method according to any one of claims 1 to 6, characterized in that: The determining of the source cell corresponding to the computing node to be migrated includes: Access the interface database through the configuration file; According to the computing node table and the cell table stored in the interface database, a source cell corresponding to the computing node to be migrated is determined.

9. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The cell identifier corresponding to the computing node to be migrated is updated to the identifier of the target cell.

10. A computing resource management device, characterized in that: include: A first determination module is used to determine a source cell and a target cell corresponding to a computing node to be migrated; An acquisition module, configured to acquire a list of virtual machines corresponding to the computing node to be migrated when it is determined that the computing node to be migrated, the source cell, and the target cell have passed verification; A second determination module is used to determine the to-be-migrated data corresponding to the to-be-migrated computing node according to the virtual machine list; A copy module is used to copy the data to be migrated from the source cell to the target cell.

11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.

12. 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 in the method according to any one of claims 1 to 9 are implemented.

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