Artificial intelligence training platform activation method, computer equipment and storage medium
By obtaining configuration information before the server cluster of the artificial intelligence training platform is migrated and updating the IP address after the migration, the problem of the inability to quickly enable the artificial intelligence training platform in a larger scope and complex environment in the existing technology is solved, and the need for rapid recovery and adaptation to a larger scope and complex environment is achieved.
Patent Information
- Application Number
- CN202510053902.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The prior art cannot quickly enable AI training platforms in larger and more complex environments, especially when server clusters are migrated or factory-preinstalled, and IP address adjustments across network segments cannot be achieved.
Before migrating the server cluster from the source environment to the target environment, obtain and save the configuration information of the artificial intelligence training platform to be migrated, update the IP addresses of the server node and underlying files after migration, update it to the Internet protocol address of the target environment, start the service and restore the platform, and complete the activation of the target environment.
The rapid recovery of the normal enablement of the AI training platform in a new environment has been achieved, reducing the time for redeployment, and allowing the platform to better adapt to larger scope and more complex environmental needs.
Smart Images

Figure CN119476534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence training platform activation method, a computer device and a storage medium. Background Art
[0002] With the rise of large models and deep learning, their images and corresponding applications often take up a lot of storage space, which makes it time-consuming to install these applications.
[0003] In related technologies, large models and deep learning images and applications are usually deployed on artificial intelligence training platforms to carry out deep learning, large model training and other operations on artificial intelligence training platforms. When the server cluster of an already deployed artificial intelligence training platform faces machine relocation or wants to achieve factory pre-installation, in order to quickly enable the artificial intelligence training platform in the new environment, the IP address used in the artificial intelligence training platform needs to be modified to an Internet Protocol (IP) address that can be used in the new environment.
[0004] However, the relevant technology can only realize IP address adjustment within the same computer room, and cannot realize IP adjustment when the server cluster is relocated to a new environment or when the server cluster is pre-installed at the factory, which limits the rapid activation of the artificial intelligence training platform in a larger scale and more complex environment. Summary of the invention
[0005] In view of this, the present invention provides an artificial intelligence training platform activation method, computer device and storage medium to solve the problem that related technologies limit the rapid activation of artificial intelligence training platforms in a larger range and more complex environment.
[0006] In a first aspect, the present invention provides a method for enabling an artificial intelligence training platform, the method comprising:
[0007] Determine an artificial intelligence training platform to be migrated, where the artificial intelligence training platform to be migrated is deployed on a server cluster;
[0008] Obtaining and saving the configuration information of the artificial intelligence training platform to be migrated;
[0009] After migrating the server cluster from the source environment to the target environment, obtaining the Internet Protocol address of the target environment, updating the network addresses of the server nodes in the server cluster to the Internet Protocol address of the target environment, and updating the source Internet Protocol addresses in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments;
[0010] Start the service of the artificial intelligence training platform to be migrated, restore the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and complete the activation of the artificial intelligence training platform to be migrated in the target environment.
[0011] The method for enabling an artificial intelligence training platform provided in this embodiment obtains and saves the configuration information of the artificial intelligence training platform to be migrated before migrating the server cluster from the source environment to the target environment, obtains the Internet Protocol address of the target environment after migrating the server cluster from the source environment to the target environment, updates the network address of the server node in the server cluster to the Internet Protocol address of the target environment, updates the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, starts the service of the artificial intelligence training platform to be migrated, restores the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and completes the activation of the artificial intelligence training platform to be migrated in the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments. When the server cluster of the deployed artificial intelligence training platform faces machine relocation or wants to achieve factory pre-installation, the normal activation of the artificial intelligence training platform can be quickly restored in the new environment, which reduces the time of redeploying the artificial intelligence training platform in the new environment, so that the artificial intelligence training platform can better adapt to the needs of a larger range and more complex environment.
[0012] In an optional implementation, before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the method further includes:
[0013] Detecting whether there is a running task in the artificial intelligence training platform to be migrated;
[0014] If there are any running tasks in the artificial intelligence training platform to be migrated, stop and delete the running tasks.
[0015] The artificial intelligence training platform activation method provided in this embodiment prevents data inconsistency or corruption from occurring due to running tasks when the artificial intelligence training platform to be migrated is migrated, thereby improving the reliability of the migration of the artificial intelligence training platform to be migrated.
[0016] In an optional implementation, the server cluster includes multiple server nodes, and before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the method further includes:
[0017] Get the status information and firewall opening information of each server node;
[0018] When the status information of all server nodes is in the ready state and the firewall opening information of all server nodes is in the opening state, it is determined that the server cluster is in a normal state;
[0019] When the server cluster is in a normal state, the configuration information of the artificial intelligence training platform to be migrated is obtained and saved.
[0020] The method for enabling the artificial intelligence training platform provided in this embodiment avoids the failure of the migration of the artificial intelligence training platform to be migrated due to the failure or unpreparedness of some server nodes by ensuring that the status information of all server nodes is in a ready state. By ensuring that the firewall opening information of all server nodes is in an open state, the security of the server cluster is guaranteed, external attacks or unauthorized access are prevented, and the migration process of the artificial intelligence training platform to be migrated is ensured to proceed smoothly.
[0021] In an optional embodiment, the method further includes:
[0022] In a case where the status information of at least one server node is not in a ready state, or the firewall opening information of at least one server node is not in an open state, determining that the server cluster is in an abnormal state;
[0023] When the server cluster is in an abnormal state, a state recovery process is performed on the server cluster to restore the server cluster to a normal state.
[0024] The artificial intelligence training platform activation method provided in this embodiment improves the reliability and stability of the server cluster by performing state recovery processing on the server cluster when the server cluster is in an abnormal state, thereby ensuring the reliability of the migration of the artificial intelligence training platform to be migrated.
[0025] In an optional embodiment, the method further includes:
[0026] If the configuration information of the artificial intelligence training platform to be migrated is not obtained, it is determined that an abnormality occurs in the artificial intelligence training platform to be migrated, and abnormality information is obtained, so that the user can perform abnormal recovery on the artificial intelligence training platform to be migrated based on the abnormality information;
[0027] After the artificial intelligence training platform to be migrated returns to normal, return to the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated.
[0028] The artificial intelligence training platform activation method provided in this embodiment determines that an abnormality occurs in the artificial intelligence training platform to be migrated without obtaining the configuration information of the artificial intelligence training platform to be migrated, obtains the abnormality information, performs abnormal recovery on the artificial intelligence training platform to be migrated based on the abnormal information, and returns to execute the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, thereby ensuring the subsequent rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0029] In an optional implementation, the obtaining and saving the configuration information of the artificial intelligence training platform to be migrated includes:
[0030] Obtain a status file of a container orchestration engine of a management node of a server cluster corresponding to the artificial intelligence training platform to be migrated;
[0031] Save the state file of the container orchestration engine according to a preset data serialization format;
[0032] Performing snapshot processing on the data in the distributed key-value storage system of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated, and obtaining snapshot data of the distributed key-value storage system;
[0033] Saving snapshot data of the distributed key-value storage system;
[0034] The configuration information includes a state file of the container orchestration engine and snapshot data of the distributed key-value storage system.
[0035] The method for enabling an artificial intelligence training platform provided in this embodiment saves the state files of the container orchestration engine and the snapshot data of the distributed key-value storage system, thereby ensuring that the artificial intelligence training platform to be migrated performs service recovery in the target environment based on the state files of the container orchestration engine and the snapshot data of the distributed key-value storage system, thereby achieving rapid activation of the artificial intelligence training platform to be migrated in the target environment.
[0036] In an optional implementation, before migrating the server cluster from the source environment to the target environment, the method further includes:
[0037] The service switching configuration file of any server node of the artificial intelligence training platform to be migrated is modified to avoid abnormal access to the server node.
[0038] The artificial intelligence training platform activation method provided in this embodiment avoids abnormal access to server nodes by modifying the service switching configuration file of the server nodes in the server cluster before migrating the server cluster from the source environment to the target environment, thereby ensuring smooth migration of the artificial intelligence training platform to be migrated.
[0039] In an optional implementation, the modifying of the service switching configuration file of any server node of the artificial intelligence training platform to be migrated includes:
[0040] For any server node, determining directory access protocol configuration item information from a service switching configuration file of the server node;
[0041] Delete the directory access protocol configuration item information in the service switching configuration file.
[0042] The artificial intelligence training platform activation method provided in this embodiment avoids abnormal access to server nodes by deleting the directory access protocol configuration item information in the service switching configuration file, thereby ensuring the smooth migration of the artificial intelligence training platform to be migrated.
[0043] In an optional implementation, before updating the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, the method further includes:
[0044] The source Internet Protocol address in the firewall whitelist of the server nodes in the server cluster is updated to the Internet Protocol address of the target environment.
[0045] The artificial intelligence training platform activation method provided in this embodiment realizes the rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment by updating the source Internet Protocol address in the firewall whitelist of the server node in the server cluster to the Internet Protocol address of the target environment.
[0046] In an optional implementation, the updating of the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment includes:
[0047] For any server node in the server cluster, assign an Internet Protocol address of a corresponding target environment to the server node;
[0048] Generate a template file based on the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment;
[0049] Based on the template file, the source Internet Protocol address in the bottom layer file of the server node of the server cluster corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment, and the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment;
[0050] Wherein, the server node includes a management node.
[0051] The method for enabling an artificial intelligence training platform provided in this embodiment updates the source Internet Protocol address in the underlying files of the server nodes of the server cluster corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and updates the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, thereby achieving rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0052] In an optional implementation, the restoring the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information includes:
[0053] Update the source Internet Protocol address in the distributed key-value storage system certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and generate a new distributed key-value storage system certificate;
[0054] Stop the service of the distributed key-value storage system;
[0055] Deleting data in the distributed key-value storage system;
[0056] Based on the saved snapshot data of the distributed key-value storage system and the new distributed key-value storage system certificate, the service of the distributed key-value storage system in the artificial intelligence training platform to be migrated is restored;
[0057] The configuration information includes snapshot data of the distributed key-value storage system.
[0058] The artificial intelligence training platform activation method provided in this embodiment generates a new distributed key-value storage system certificate, and based on the saved snapshot data of the distributed key-value storage system and the new distributed key-value storage system certificate, restores the services of the distributed key-value storage system in the artificial intelligence training platform to be migrated, thereby realizing rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0059] In an optional implementation, the restoring the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information includes:
[0060] Update the source Internet Protocol address in the container orchestration engine certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and generate a new container orchestration engine certificate;
[0061] Based on the saved state file of the container orchestration engine and the new container orchestration engine certificate, the service of the container orchestration engine in the artificial intelligence training platform to be migrated is restored;
[0062] The configuration information includes a status file of the container orchestration engine.
[0063] The artificial intelligence training platform activation method provided in this embodiment generates a new container orchestration engine certificate, and based on the saved container orchestration engine status file and the new container orchestration engine certificate, restores the service of the container orchestration engine in the artificial intelligence training platform to be migrated, thereby realizing rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0064] In a second aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the artificial intelligence training platform activation method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0065] In a third aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for enabling an artificial intelligence training platform according to the first aspect or any corresponding embodiment thereof.
[0066] In a fourth aspect, the present invention provides a computer program product, comprising computer instructions, which are used to enable a computer to execute the artificial intelligence training platform activation method of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 It is a structural diagram of an artificial intelligence training platform in related technology;
[0069] Figure 2 is a flowchart of a method for enabling an artificial intelligence training platform according to an embodiment of the present invention;
[0070] Figure 3 is a flowchart of another method for enabling an artificial intelligence training platform according to an embodiment of the present invention;
[0071] Figure 4 is an execution flow chart of a task script according to an embodiment of the present invention;
[0072] Figure 5 is a flowchart of pre-migration preparation according to an embodiment of the present invention;
[0073] Figure 6 is a flowchart of another artificial intelligence training platform activation method according to an embodiment of the present invention;
[0074] Figure 7 is a schematic diagram of a process for modifying the IP address of a physical machine according to an embodiment of the present invention;
[0075] Figure 8 is a structural schematic diagram of an artificial intelligence training platform activation system according to an embodiment of the present invention;
[0076] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0078] With the rise of big models and deep learning, the deployment of images and applications used by big models and deep learning often takes up a lot of storage space, which makes it time-consuming to install images and applications used by big models and deep learning. Among them, the big model, namely the Large Language Model (LLM), refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. The large language model can handle a variety of natural language functions, such as text classification, question answering, dialogue, etc.
[0079] In related technologies, large models and images and applications used for deep learning are deployed on artificial intelligence training platforms, so that users can carry out deep learning, large model training and other operations on the artificial intelligence training platform. Among them, the artificial intelligence training platform is a server management platform for artificial intelligence training. The entire platform manages dozens to hundreds of servers containing graphics processing units (GPUs). The platform distributes artificial intelligence training tasks to servers by calling algorithms.
[0080] Figure 1 It is a schematic diagram of the structure of the artificial intelligence training platform in the related technology. Figure 1 As shown, the artificial intelligence training platform includes a server cluster, that is, the artificial intelligence training platform is deployed on a server cluster, and the server cluster includes multiple server nodes (also called physical machines). The multiple server nodes can be management nodes or computing nodes. Generally, the server cluster includes one or an odd number of management nodes, and the rest are computing nodes. Figure 1 In the figure, a server cluster including one management node and four computing nodes is taken as an example for illustration.
[0081] Among them, management nodes are used to deploy management resources, databases, cluster monitoring, user management, platform services and other services. Computing nodes are used to deploy node services, etc. Computing nodes usually run development environments, which are the infrastructure provided to users for artificial intelligence training.
[0082] The main functions of platform services and node services are to ensure the smooth operation of the development environment and provide services to users.
[0083] When a server cluster of an artificial intelligence training platform that has deployed various large models and deep learning images and applications faces machine relocation or wants to achieve factory pre-installation, in order to quickly enable the artificial intelligence training platform in the new environment, it is necessary to modify the IP address used in the artificial intelligence training platform to an IP address that can be used in the new environment when the server cluster is migrated to the new environment, so as to enable the artificial intelligence training platform to be quickly enabled in the new environment.
[0084] However, the relevant technology can only realize the IP address adjustment of the server cluster within the same computer room, that is, it does not involve the physical migration of the server cluster, and the IP address adjustment of the server cluster within the same computer room is often limited to the same network segment, or the network segment planned by the computer room. It is impossible to realize the IP adjustment when the server is relocated to a new environment or the server cluster is pre-installed at the factory, that is, the IP adjustment across network segments, which limits the rapid activation of the artificial intelligence training platform in a larger range and more complex environment.
[0085] An embodiment of the present invention provides an artificial intelligence training platform activation method, which obtains and saves the configuration information of the artificial intelligence training platform to be migrated before migrating the server cluster from the source environment to the target environment, obtains the Internet Protocol address of the target environment after migrating the server cluster from the source environment to the target environment, updates the network address of the server node in the server cluster to the Internet Protocol address of the target environment, updates the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, starts the service of the artificial intelligence training platform to be migrated, restores the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and completes the activation of the artificial intelligence training platform to be migrated in the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments so that when the server cluster of the deployed artificial intelligence training platform faces machine relocation or wants to achieve factory pre-installation, the normal activation of the artificial intelligence training platform can be quickly restored in the new environment, reducing the time for redeploying the artificial intelligence training platform in the new environment, so that the artificial intelligence training platform can better adapt to the needs of a larger range and more complex environment.
[0086] According to an embodiment of the present invention, an embodiment of a method for enabling an artificial intelligence training platform is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0087] In this embodiment, a method for enabling an artificial intelligence training platform is provided, which can be used in a mobile terminal, such as a server, a central processing unit, etc. Figure 2 is a flow chart of a method for enabling an artificial intelligence training platform according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0088] Step S201, determine the artificial intelligence training platform to be migrated, and the artificial intelligence training platform to be migrated is deployed on a server cluster.
[0089] Among them, the artificial intelligence training platform to be migrated is an artificial intelligence training platform that has been deployed on the server cluster and is normally available.
[0090] Step S202, obtaining and saving the configuration information of the artificial intelligence training platform to be migrated.
[0091] Among them, after the artificial intelligence training platform to be migrated is determined, the configuration information of the artificial intelligence training platform to be migrated is obtained, and the obtained configuration information of the artificial intelligence training platform to be migrated is saved.
[0092] Step S203, after migrating the server cluster from the source environment to the target environment, obtain the Internet Protocol address of the target environment, update the network address of the server node in the server cluster to the Internet Protocol address of the target environment, and update the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments.
[0093] Among them, after obtaining and saving the configuration information in the artificial intelligence training platform to be migrated, the server cluster can be migrated, that is, the artificial intelligence training platform to be migrated can be migrated.
[0094] It can be understood that migrating the server cluster from the source environment to the target environment means migrating the artificial intelligence training platform to be migrated deployed on the server cluster from the source environment to the target environment.
[0095] It should be noted that the migration of the server cluster from the source environment to the target environment can be the physical movement of the server cluster. It can also be the change of the network segment used by the server cluster. In this case, the migration of the server cluster from the source environment to the target environment means that the server cluster has not been physically moved, but the network segment used by the server cluster has changed.
[0096] The physical movement of the server cluster can also be understood as the update of the IP address across network segments. The physical movement of the server cluster can be the relocation of the server cluster from one physical location to another, that is, the scenario is the relocation of the server cluster or the factory delivery of the server cluster.
[0097] It is understandable that after the server cluster is migrated from the source environment to the target environment, it is necessary to complete the rapid activation of the AI training platform to be migrated in the target environment. First, the network address of the server node in the server cluster needs to be updated to the Internet Protocol address of the target environment, and the source Internet Protocol address in the underlying files and database data of the AI training platform to be migrated needs to be updated to the Internet Protocol address of the target environment.
[0098] Step S204, start the service of the artificial intelligence training platform to be migrated, restore the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and complete the activation of the artificial intelligence training platform to be migrated in the target environment.
[0099] Among them, after completing the content of the above-mentioned step S203, the service of the artificial intelligence training platform to be migrated is started, and the service of the artificial intelligence training platform to be migrated is restored based on the Internet Protocol address of the target environment and the saved configuration information, thereby completing the activation of the artificial intelligence training platform to be migrated in the target environment.
[0100] It is understandable that what is started at this time is the basic services of the AI training platform to be migrated, such as executing the systemctl start docker command to start the Docker service.
[0101] Among them, Docker is an application container engine and can be used as the underlying container engine of k8s.
[0102] The method for enabling an artificial intelligence training platform provided in this embodiment obtains and saves the configuration information of the artificial intelligence training platform to be migrated before migrating the server cluster from the source environment to the target environment, obtains the Internet Protocol address of the target environment after migrating the server cluster from the source environment to the target environment, updates the network address of the server node in the server cluster to the Internet Protocol address of the target environment, updates the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, starts the service of the artificial intelligence training platform to be migrated, restores the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and completes the activation of the artificial intelligence training platform to be migrated in the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments. When the server cluster of the deployed artificial intelligence training platform faces machine relocation or wants to achieve factory pre-installation, the normal activation of the artificial intelligence training platform can be quickly restored in the new environment, which reduces the time of redeploying the artificial intelligence training platform in the new environment, so that the artificial intelligence training platform can better adapt to the needs of a larger range and more complex environment.
[0103] In this embodiment, a method for enabling an artificial intelligence training platform is provided, which can be used in a mobile terminal, such as a server, a central processing unit, etc. Figure 3 is a flow chart of a method for enabling an artificial intelligence training platform according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0104] Step S301: Determine the AI training platform to be migrated, and deploy the AI training platform to be migrated on the server cluster. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0105] Step S302, obtaining and saving the configuration information of the artificial intelligence training platform to be migrated.
[0106] Specifically, the above step S302 includes:
[0107] Step S3021, obtain the status file of the container orchestration engine of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated.
[0108] in, Figure 4 FIG. 1 is a flowchart of executing a task script according to an embodiment of the present invention. Figure 4 As shown, by executing the task script, the state file of the container orchestration engine is first obtained and saved. The task script is implemented by Ansible, which is an automated operation and maintenance tool used to publish, manage and orchestrate computer systems. It can realize batch processing of remote control nodes based on resource lists and script tasks.
[0109] Specifically, the kubectl command is used to obtain the status file of the container orchestration engine of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated.
[0110] It should be noted that the kubectl command is a k8s control command. The container orchestration engine (Kubernetes, k8s for short) is used to manage containerized applications on multiple hosts in a cloud platform. Its goal is to make the deployment of containerized applications simple and efficient. The container orchestration engine provides a mechanism for application deployment, planning, updating, and maintenance. The AI training platform to be migrated uses the container orchestration engine as the underlying basic service component.
[0111] Step S3022: Save the state file of the container orchestration engine according to a preset data serialization format.
[0112] The preset data serialization format is the YAML format, which is a highly readable format used to express data serialization.
[0113] Step S3023, snapshot processing is performed on the data in the distributed key-value storage system of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated, and snapshot data of the distributed key-value storage system is obtained.
[0114] Among them, by executing the task script, the snapshot data of the distributed key-value storage system is obtained and saved.
[0115] Use the etcdctl snapshot save command to create a snapshot of the data in the distributed key-value storage system of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated, and obtain the snapshot data of the distributed key-value storage system.
[0116] Step S3024, save the snapshot data of the distributed key-value storage system.
[0117] Use the etcdctl snapshot save command to save snapshot data of the distributed key-value storage system.
[0118] The etcdctl snapshot save command saves snapshot data of the distributed key-value storage system as a data file.
[0119] It should be noted that the distributed key-value storage system (etcd) is used for shared configuration, service discovery, and service coordination of distributed systems or computer clusters. It helps promote safer automatic updates, coordinate the scheduling of work to the host, and help set up overlay networks for containers.
[0120] The configuration information includes the status file of the container orchestration engine and the snapshot data of the distributed key-value storage system.
[0121] Step S303, after migrating the server cluster from the source environment to the target environment, obtain the Internet Protocol address of the target environment, update the network address of the server node in the server cluster to the Internet Protocol address of the target environment, and update the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments. For details, please refer to Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0122] It should be noted that after obtaining and saving the configuration information of the AI training platform to be migrated, the server cluster can be migrated. At this time, if the server cluster is migrated in the physical sense, it is necessary to stop the server cluster service first, that is, shut down the services of all server nodes in the server cluster, and shut down the server cluster before migrating the server cluster. If the server cluster is not migrated in the physical sense, there is no need to stop the server cluster service or shut down the server cluster.
[0123] Step S304: Start the service of the AI training platform to be migrated, restore the service of the AI training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and complete the activation of the AI training platform to be migrated in the target environment. Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0124] The method for enabling an artificial intelligence training platform provided in this embodiment saves the state files of the container orchestration engine and the snapshot data of the distributed key-value storage system, thereby ensuring that the artificial intelligence training platform to be migrated performs service recovery in the target environment based on the state files of the container orchestration engine and the snapshot data of the distributed key-value storage system, thereby achieving rapid activation of the artificial intelligence training platform to be migrated in the target environment.
[0125] In some optional implementations, before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the artificial intelligence training platform activation method further includes:
[0126] Step a1: Check whether there are any running tasks in the artificial intelligence training platform to be migrated.
[0127] in, Figure 5 FIG. 1 is a flowchart of performing pre-migration preparation according to an embodiment of the present invention. Figure 5 As shown, the administrator logs in to the management page of the artificial intelligence training platform to be migrated, and in response to the login operation of the administrator's management page, detects whether there are any running tasks in the artificial intelligence training platform to be migrated, that is, detects whether there are any running tasks.
[0128] Step a2: If there are any running tasks in the artificial intelligence training platform to be migrated, stop and delete the running tasks.
[0129] Among them, if there are running tasks in the artificial intelligence training platform to be migrated, that is, if it is detected that there are running tasks, all running tasks are stopped and deleted.
[0130] The artificial intelligence training platform activation method provided in this embodiment prevents data inconsistency or corruption from occurring due to running tasks when the artificial intelligence training platform to be migrated is migrated, thereby improving the reliability of the migration of the artificial intelligence training platform to be migrated.
[0131] In some optional implementations, the server cluster includes multiple server nodes. Before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the artificial intelligence training platform activation method further includes:
[0132] Step b1, obtaining status information and firewall opening information of each server node.
[0133] Among them, Figure 5As shown, when there is no running task in the AI training platform to be migrated, that is, when it is detected that there is no running task, the underlying check script is executed to check the status of the server cluster and determine whether the server cluster is in a normal state. The underlying check script is implemented by ansible.
[0134] Specifically, firstly, the status information of each server node is obtained by executing the kubectl get node command, where get node means obtaining the status information of the server node.
[0135] By executing the systemctl status firewalld command, you can obtain the firewall information of each server node. systemctl is the system control command on the server.
[0136] Step b2: when the status information of all server nodes is in the ready state and the firewall opening information of all server nodes is in the opening state, it is determined that the server cluster is in a normal state.
[0137] After obtaining the status information of each server node and the firewall opening information, it is determined whether there are abnormal nodes, that is, whether the server cluster is in a normal state.
[0138] Specifically, for any server node, it is determined whether the status information of the server node is in a ready state, and it is determined whether the firewall opening information of the server node is in an opening state.
[0139] If the status information of the server node is in a ready state, and the firewall opening information of the server node is in an open state, it is determined that the server node is normal.
[0140] If the status information of the server node is not in the ready state, or the firewall opening information of the server node is not in the opening state, it is determined that the server node is abnormal.
[0141] If the status information of all server nodes is in the ready state, and the firewall opening information of all server nodes is in the open state, it is determined that there is no abnormal node and the server cluster is in a normal state.
[0142] Step b3, when the server cluster is in a normal state, obtain and save the configuration information of the artificial intelligence training platform to be migrated.
[0143] It is understandable that when the server cluster is in a normal state, continuing to execute the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated is to execute the task script to obtain and save the configuration information of the artificial intelligence training platform to be migrated.
[0144] The method for enabling the artificial intelligence training platform provided in this embodiment avoids the failure of the migration of the artificial intelligence training platform to be migrated due to the failure or unpreparedness of some server nodes by ensuring that the status information of all server nodes is in a ready state. By ensuring that the firewall opening information of all server nodes is in an open state, the security of the server cluster is guaranteed, external attacks or unauthorized access are prevented, and the migration process of the artificial intelligence training platform to be migrated is ensured to proceed smoothly.
[0145] In some optional implementations, the above-mentioned artificial intelligence training platform activation method further includes:
[0146] Step c1: when the status information of at least one server node is not in the ready state, or the firewall opening information of at least one server node is not in the opening state, it is determined that the server cluster is in an abnormal state.
[0147] If the status information of at least one server node in the server cluster is not in the ready state, or the firewall opening information of at least one server node is not in the open state, that is, there is an abnormal node, it is determined that the server cluster is in an abnormal state.
[0148] Step c2: when the server cluster is in an abnormal state, perform state recovery processing on the server cluster to restore the server cluster to a normal state.
[0149] Among them, the server cluster is processed for state recovery, that is, the abnormal node is processed, and the abnormal node is processed for state recovery, so that its state information is restored to the ready state, and the firewall opening information is restored to the open state, thereby restoring the server cluster to a normal state.
[0150] The artificial intelligence training platform activation method provided in this embodiment improves the reliability and stability of the server cluster by performing state recovery processing on the server cluster when the server cluster is in an abnormal state, thereby ensuring the reliability of the migration of the artificial intelligence training platform to be migrated.
[0151] In some optional implementations, the above-mentioned artificial intelligence training platform activation method further includes:
[0152] Step d1: If the configuration information of the artificial intelligence training platform to be migrated is not obtained, it is determined that an abnormality occurs in the artificial intelligence training platform to be migrated, and the abnormality information is obtained so that the user can perform abnormal recovery on the artificial intelligence training platform to be migrated based on the abnormality information.
[0153] Among them, Figure 5As shown, the configuration information in the AI training platform to be migrated is obtained by executing the task script, and when executing the task script, it is determined whether the task script is executed normally. If the configuration information of the AI training platform to be migrated is not obtained when executing the task script, it means that the task script is not executed normally, then it is determined that an abnormality occurs in the AI training platform to be migrated, and the abnormality information of the AI training platform to be migrated is obtained, so that the user can perform abnormal recovery on the AI training platform to be migrated based on the abnormality information, that is, handle the abnormality.
[0154] Step d2, after the artificial intelligence training platform to be migrated returns to normal, return to the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated.
[0155] Among them, returning to the step of executing obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, that is, returning to execute the task script.
[0156] It should be noted that if the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated is returned and the configuration information of the artificial intelligence training platform to be migrated is still not obtained, step d1 and step d2 are re-executed until the task script is executed normally, that is, until the configuration information of the artificial intelligence training platform to be migrated is obtained.
[0157] The artificial intelligence training platform activation method provided in this embodiment determines that an abnormality occurs in the artificial intelligence training platform to be migrated without obtaining the configuration information of the artificial intelligence training platform to be migrated, obtains the abnormality information, performs abnormal recovery on the artificial intelligence training platform to be migrated based on the abnormal information, and returns to execute the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, thereby ensuring the subsequent rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0158] In some optional implementations, before migrating the server cluster from the source environment to the target environment, the artificial intelligence training platform activation method further includes:
[0159] Step e1, modify the service switching configuration file of any server node of the artificial intelligence training platform to be migrated to avoid abnormal access to the server node.
[0160] like Figure 4 As shown in the figure, before migrating the server cluster from the source environment to the target environment, it is also necessary to modify the service switching configuration file nsswitch.conf of any server node of the artificial intelligence training platform to be migrated so that the system does not access the directory access protocol (Lightweight Directory Access Protocol, abbreviated as: Ldap) to prevent abnormal access to the server node.
[0161] The artificial intelligence training platform activation method provided in this embodiment avoids abnormal access to server nodes by modifying the service switching configuration file of the server nodes in the server cluster before migrating the server cluster from the source environment to the target environment, thereby ensuring smooth migration of the artificial intelligence training platform to be migrated.
[0162] In some optional implementations, the above step e1 includes:
[0163] Step e11: for any server node, determine directory access protocol configuration item information from the service switching configuration file of the server node.
[0164] The target access protocol configuration item information is Ldap configuration item information. Ldap provides access control and maintains directory information of distributed information through IP protocol.
[0165] Step e12: deleting the directory access protocol configuration item information in the service switching configuration file.
[0166] After the directory access protocol configuration item information is determined, the directory access protocol configuration item information in the service switching configuration file of each server node is deleted.
[0167] It should be noted that the directory access protocol configuration item information in the service switching configuration file can be deleted using the sed tool, which is a file modification tool of the server.
[0168] The method for enabling an artificial intelligence training platform provided in this embodiment avoids abnormal access to server nodes by deleting the directory access protocol configuration item information in the service switching configuration file, thereby ensuring smooth migration of the artificial intelligence training platform to be migrated.
[0169] In some optional implementations, before updating the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, the artificial intelligence training platform activation method further includes:
[0170] Step f1, updating the source Internet Protocol address in the firewall whitelist of the server node in the server cluster to the Internet Protocol address of the target environment.
[0171] Among them, the source Internet Protocol address in the firewall whitelist of the server node in the server cluster is updated to the Internet Protocol address of the target environment. That is, the firewall rules are modified through the firewall command firewall-cmd to remove the source Internet Protocol address in the firewall whitelist and add the Internet Protocol address of the target environment to the firewall whitelist, so that the firewall can pass the Internet Protocol address of the target environment in the whitelist.
[0172] The artificial intelligence training platform activation method provided in this embodiment realizes the rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment by updating the source Internet Protocol address in the firewall whitelist of the server node in the server cluster to the Internet Protocol address of the target environment.
[0173] In some optional implementations, the above step S303 includes:
[0174] Step g1, for any server node in the server cluster, allocate an Internet Protocol address of a corresponding target environment to the server node.
[0175] After the server cluster is migrated to the target environment, each server node is assigned an Internet Protocol address available in the target environment.
[0176] Step g2, generating a template file based on the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment.
[0177] The source Internet Protocol address is an Internet Protocol address corresponding to the server node of the server cluster in the source environment.
[0178] A correspondence between a source Internet Protocol address of a server node and an Internet Protocol address of a target environment allocated to the server node is obtained.
[0179] The configuration file is updated according to the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment assigned to the server node. In other words, the configuration file is used to record the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment assigned to the server node.
[0180] Generate a template file based on the configuration file. Specifically, there are many placeholders with empty values in the template file. When generating the template file based on the configuration file, these placeholders with empty values are replaced with the corresponding source Internet Protocol addresses and the Internet Protocol addresses of the target environment, so as to modify the database and underlying files of the artificial intelligence training platform to be migrated based on the template file.
[0181] Step g3, based on the template file, updates the source Internet Protocol address in the underlying file of the server node of the server cluster corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and updates the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment.
[0182] Among them, the server node includes a management node.
[0183] It should be noted that the modification of the database is for the management node corresponding to the artificial intelligence training platform. The modification of the underlying file is for all server nodes corresponding to the artificial intelligence training platform.
[0184] The template file determines the source Internet Protocol address in the bottom layer file of the server node, and updates the source Internet Protocol address in the bottom layer file to the Internet Protocol address of the corresponding target environment.
[0185] It should be further explained that after starting the service of the artificial intelligence training platform to be migrated, the step of updating the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment can be performed to restore the database service.
[0186] The method for enabling an artificial intelligence training platform provided in this embodiment updates the source Internet Protocol address in the underlying files of the server nodes of the server cluster corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and updates the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, thereby achieving rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0187] In some optional implementations, the above step S304 includes:
[0188] Step h1, update the source Internet Protocol address in the distributed key-value storage system certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and generate a new distributed key-value storage system certificate.
[0189] Among them, after starting the service of the artificial intelligence training platform to be migrated, the source Internet Protocol address in the distributed key-value storage system certificate in the management node corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment, and a new distributed key-value storage system certificate is generated using the openssl command.
[0190] Step h2, stop the service of the distributed key-value storage system.
[0191] Step h3, delete the data in the distributed key-value storage system.
[0192] It is understandable that the data generated by the distributed key-value storage system after the artificial intelligence training platform to be migrated is migrated to the target environment is deleted.
[0193] Step h4, based on the saved snapshot data of the distributed key-value storage system and the new distributed key-value storage system certificate, restore the services of the distributed key-value storage system in the artificial intelligence training platform to be migrated.
[0194] The configuration information includes snapshot data of the distributed key-value storage system.
[0195] Use the data recovery command etcdctl snapstore restore to copy the saved snapshot data of the distributed key-value storage system to the distributed key-value storage system, and based on the new distributed key-value storage system certificate, restore the service of the distributed key-value storage system in the AI training platform to be migrated.
[0196] The artificial intelligence training platform activation method provided in this embodiment generates a new distributed key-value storage system certificate, and based on the saved snapshot data of the distributed key-value storage system and the new distributed key-value storage system certificate, restores the services of the distributed key-value storage system in the artificial intelligence training platform to be migrated, thereby realizing rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0197] In some optional implementations, the above step S304 includes:
[0198] Step i1: Update the source Internet Protocol address in the container orchestration engine certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment to generate a new container orchestration engine certificate.
[0199] Among them, after starting the service of the artificial intelligence training platform to be migrated, the source Internet Protocol address in the container orchestration engine certificate in the management node corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment, and a new container orchestration engine certificate is generated using the openssl command.
[0200] Step i2: Based on the saved state file of the container orchestration engine and the new container orchestration engine certificate, the service of the container orchestration engine in the artificial intelligence training platform to be migrated is restored.
[0201] The configuration information includes the status file of the container orchestration engine.
[0202] The saved state file of the container orchestration engine is copied to the container orchestration engine, and based on the new container orchestration engine certificate, the service of the container orchestration engine in the artificial intelligence training platform to be migrated is restored.
[0203] The artificial intelligence training platform activation method provided in this embodiment generates a new container orchestration engine certificate, and based on the saved container orchestration engine status file and the new container orchestration engine certificate, restores the service of the container orchestration engine in the artificial intelligence training platform to be migrated, thereby realizing rapid and accurate activation of the artificial intelligence training platform to be migrated in the target environment.
[0204] In some optional implementations, the above-mentioned artificial intelligence training platform activation method further includes:
[0205] Step j1, after restoring the services of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, if the artificial intelligence training platform to be migrated fails to be successfully enabled in the target environment, then return to execute the steps of obtaining the Internet Protocol address of the target environment, updating the network addresses of the server nodes in the server cluster to the Internet Protocol addresses of the target environment, and updating the source Internet Protocol addresses in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, as well as subsequent steps, until the artificial intelligence training platform to be migrated is successfully enabled in the target environment.
[0206] Among them, if the number of steps of returning to execute obtaining the Internet Protocol address of the target environment, updating the network address of the server node in the server cluster to the Internet Protocol address of the target environment, and updating the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment reaches a preset number, and the artificial intelligence training platform to be migrated still fails to be successfully enabled in the target environment, an alarm is issued so that the technical staff can handle the problem based on the alarm.
[0207] The preset number of times is set by the technician and is not specifically limited here.
[0208] The method for enabling an artificial intelligence training platform provided in this embodiment reduces the failure of enabling due to operational errors and improves the efficiency of enabling the artificial intelligence training platform to be migrated by returning to execute corresponding steps until the artificial intelligence training platform to be migrated is successfully enabled in the target environment when the artificial intelligence training platform to be migrated fails to be successfully enabled in the target environment.
[0209] In this embodiment, a method for enabling an artificial intelligence training platform is provided, which can be used in a mobile terminal, such as a server, a central processing unit, etc. Figure 6is a flow chart of a method for enabling an artificial intelligence training platform according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0210] The first step is preparatory work before modification. For details on the preparatory work before modification, please refer to Figure 5 For the flowchart of the preparatory work before modification, please refer to the description of the corresponding part above and will not be repeated here.
[0211] The second step is to modify the physical machine IP. Modifying the physical machine IP means updating the network address of the server node in the server cluster to the Internet Protocol address of the target environment.
[0212] Specifically, Figure 7 FIG. 1 is a flow chart of modifying the IP address of a physical machine according to an embodiment of the present invention. Figure 7 As shown, after migrating the server cluster from the source environment to the target environment, if the migration of the server cluster is a physical migration, the server cluster needs to be powered on; if the migration of the server cluster is not a physical migration, the server cluster does not need to be powered on.
[0213] Then, configure the network, which means updating the network addresses of the server nodes in the server cluster to the Internet Protocol addresses of the target environment.
[0214] It should be noted that after the network addresses of the server nodes in the server cluster are updated to the Internet Protocol addresses of the target environment, it is still necessary to check the network, that is, check whether each server node in the server cluster can connect to the network normally.
[0215] The third step is to modify the cluster IP to restore the cluster availability.
[0216] Among them, this step corresponds to the aforementioned step S303 of updating the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment and step S304. For details, please refer to the relevant descriptions of the aforementioned steps S303 and S304, which will not be repeated here.
[0217] The artificial intelligence training platform activation method provided in this embodiment solves the time-consuming problem of redeploying to the target environment when the server cluster of the already deployed artificial intelligence training platform faces machine relocation or wants to achieve factory pre-installation or wants to modify the network segment. By modifying the IP address in the server cluster deployed by the artificial intelligence training platform, the artificial intelligence training platform can be quickly restored and activated in the target environment, so that the artificial intelligence training platform can be used out of the box, enriching the product form.
[0218] In this embodiment, an artificial intelligence training platform activation system is provided. Figure 8 is a schematic diagram of the structure of an artificial intelligence training platform activation system according to an embodiment of the present invention. Figure 8 As shown, the artificial intelligence training platform enabling system includes a pre-modification preparation module, a configuration file module, and a cluster IP modification module.
[0219] Among them, the pre-modification preparation module and the cluster IP modification module act on the physical cluster, that is, the server cluster where the artificial intelligence training platform to be migrated is deployed.
[0220] The pre-modification preparation module is used to execute the pre-modification preparation process.
[0221] The configuration file module is used as an input of the cluster IP modification module, and records the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment allocated to the server node.
[0222] The cluster IP modification module is used to execute the process of modifying the cluster IP and restoring the cluster availability, that is, to execute the aforementioned steps S303 and S304.
[0223] The artificial intelligence training platform activation system provided in this embodiment realizes the rapid recovery and rapid activation of the artificial intelligence training platform's services in the target environment by modifying the IP address in the server cluster deployed by the artificial intelligence training platform, so that the artificial intelligence training platform can be used out of the box, enriching the product form and reducing the time spent on activation of the artificial intelligence training platform in the target environment.
[0224] The embodiment of the present invention also provides a computer device, see Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 901, memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9A processor 901 is taken as an example.
[0225] The processor 901 may be a central processing unit, a network processor or a combination thereof. The processor 901 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0226] The memory 902 stores instructions executable by at least one processor 901 so as to enable at least one processor 901 to implement the method shown in the above embodiment.
[0227] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0228] The memory 902 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 902 may also include a combination of the above types of memory.
[0229] The computer device also includes a communication interface 903, which is used for the computer device to communicate with other devices or a communication network.
[0230] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0231] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0232] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for enabling an artificial intelligence training platform, characterized in that: The method comprises: Determine an artificial intelligence training platform to be migrated, where the artificial intelligence training platform to be migrated is deployed on a server cluster; Obtain and save configuration information of the artificial intelligence training platform to be migrated, wherein the configuration information includes a state file of a container orchestration engine and snapshot data of a distributed key-value storage system; After migrating the server cluster from the source environment to the target environment, obtaining the Internet Protocol address of the target environment, updating the network addresses of the server nodes in the server cluster to the Internet Protocol address of the target environment, and updating the source Internet Protocol addresses in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, wherein the source Internet Protocol address of the source environment and the Internet Protocol address of the target environment belong to different network segments; Starting the service of the artificial intelligence training platform to be migrated, restoring the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information, and completing the activation of the artificial intelligence training platform to be migrated in the target environment; If the server cluster is to be migrated in a physical sense, it is necessary to stop the server cluster service and shut down the server cluster before migrating the server cluster.
2. The method according to claim 1, characterized in that Before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the method further includes: Detecting whether there is a running task in the artificial intelligence training platform to be migrated; If there are any running tasks in the artificial intelligence training platform to be migrated, the running tasks are stopped and deleted.
3. The method according to claim 1, characterized in that The server cluster includes a plurality of server nodes. Before obtaining and saving the configuration information of the artificial intelligence training platform to be migrated, the method further includes: Get the status information and firewall opening information of each server node; When the status information of all server nodes is in the ready state and the firewall opening information of all server nodes is in the opening state, it is determined that the server cluster is in a normal state; When the server cluster is in a normal state, the configuration information of the artificial intelligence training platform to be migrated is obtained and saved.
4. The method according to claim 3, characterized in that: The method further comprises: In a case where the status information of at least one server node is not in a ready state, or the firewall opening information of at least one server node is not in an open state, determining that the server cluster is in an abnormal state; When the server cluster is in an abnormal state, a state recovery process is performed on the server cluster to restore the server cluster to a normal state.
5. The method according to claim 1, characterized in that The method further comprises: If the configuration information of the artificial intelligence training platform to be migrated is not obtained, it is determined that an abnormality occurs in the artificial intelligence training platform to be migrated, and abnormality information is obtained, so that the user can perform abnormal recovery on the artificial intelligence training platform to be migrated based on the abnormality information; After the artificial intelligence training platform to be migrated returns to normal, return to the step of obtaining and saving the configuration information of the artificial intelligence training platform to be migrated.
6. The method according to claim 1, characterized in that The obtaining and saving the configuration information of the artificial intelligence training platform to be migrated includes: Obtain a status file of a container orchestration engine of a management node of a server cluster corresponding to the artificial intelligence training platform to be migrated; Save the state file of the container orchestration engine according to a preset data serialization format; Performing snapshot processing on the data in the distributed key-value storage system of the management node of the server cluster corresponding to the artificial intelligence training platform to be migrated, and obtaining snapshot data of the distributed key-value storage system; The snapshot data of the distributed key-value storage system is saved.
7. The method according to claim 1, characterized in that Before migrating the server cluster from the source environment to the target environment, the method further includes: The service switching configuration file of any server node of the artificial intelligence training platform to be migrated is modified to avoid abnormal access to the server node.
8. The method according to claim 7, characterized in that The modifying of the service switching configuration file of any server node of the artificial intelligence training platform to be migrated includes: For any server node, determining directory access protocol configuration item information from a service switching configuration file of the server node; Delete the directory access protocol configuration item information in the service switching configuration file.
9. The method according to claim 1, characterized in that: Before updating the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment, the method further includes: The source Internet Protocol address in the firewall whitelist of the server nodes in the server cluster is updated to the Internet Protocol address of the target environment.
10. The method according to claim 1, characterized in that The updating of the source Internet Protocol address in the underlying files and database data of the artificial intelligence training platform to be migrated to the Internet Protocol address of the target environment includes: For any server node in the server cluster, assign an Internet Protocol address of a corresponding target environment to the server node; Generate a template file based on the correspondence between the source Internet Protocol address of the server node and the Internet Protocol address of the target environment; Based on the template file, the source Internet Protocol address in the bottom layer file of the server node of the server cluster corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment, and the source Internet Protocol address in the database data of the management node corresponding to the artificial intelligence training platform to be migrated is updated to the Internet Protocol address of the corresponding target environment; Wherein, the server node includes a management node.
11. The method according to claim 1, characterized in that: The recovering of the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information includes: Update the source Internet Protocol address in the distributed key-value storage system certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and generate a new distributed key-value storage system certificate; Stop the service of the distributed key-value storage system; Deleting data in the distributed key-value storage system; Based on the saved snapshot data of the distributed key-value storage system and the new distributed key-value storage system certificate, the service of the distributed key-value storage system in the artificial intelligence training platform to be migrated is restored; The configuration information includes snapshot data of the distributed key-value storage system.
12. The method according to claim 1, characterized in that The recovering of the service of the artificial intelligence training platform to be migrated based on the Internet Protocol address of the target environment and the saved configuration information includes: Update the source Internet Protocol address in the container orchestration engine certificate in the management node corresponding to the artificial intelligence training platform to be migrated to the Internet Protocol address of the corresponding target environment, and generate a new container orchestration engine certificate; Based on the saved state file of the container orchestration engine and the new container orchestration engine certificate, the service of the container orchestration engine in the artificial intelligence training platform to be migrated is restored; The configuration information includes a status file of the container orchestration engine.
13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the artificial intelligence training platform activation method according to any one of claims 1 to 12 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the artificial intelligence training platform activation method described in any one of claims 1 to 12.
15. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the artificial intelligence training platform enabling method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Container IP address configuration method and device, storage medium and electronic equipment
CN114371914A
Cluster migration method, related device and storage medium
CN115878269A