DevOps development methods for AI algorithm services

By employing DevOps development methods for AI algorithm services, combined with compilation and testing processes, the problem of isolation between R&D and operations was solved, improving the efficiency of algorithm development and enabling rapid deployment and large-scale application.

CN116301876BActive Publication Date: 2026-05-26SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2022-09-08
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The existing algorithm development and operation and maintenance model isolates development and operation and maintenance, resulting in a longer algorithm launch cycle, low development efficiency, and high operation and maintenance difficulty for algorithm version iteration, making it difficult to achieve rapid deployment and large-scale application of algorithms.

Method used

By using the DevOps development approach of AI algorithm services, we can obtain compilation configuration files to generate compilation tasks, select target nodes from the Kubernetes cluster based on a preset scheduler to create containers, import program code for compilation and testing, and process the target algorithm based on the test results, thus realizing a closed loop of R&D and operation.

Benefits of technology

It improved the efficiency of algorithm development, reduced the difficulty of operation and maintenance, and enabled the rapid deployment and large-scale application of algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116301876B_ABST
    Figure CN116301876B_ABST
Patent Text Reader

Abstract

This application provides a DevOps development method for AI algorithm services. By obtaining a compilation configuration file, generating a compilation task based on the configuration file, selecting a first target node from multiple nodes in a Kubernetes cluster based on a preset scheduler, creating a first container on the first target node, obtaining the program code of the target algorithm, importing the program code into the first container, executing the compilation task to compile the program code in the first container, obtaining the compilation result, testing the compilation result, obtaining the test result, and processing the target algorithm based on the test result, this method avoids the isolation between R&D and operation and maintenance, realizing a closed loop of algorithm R&D and operation and maintenance. By combining R&D and operation and maintenance, it can improve the efficiency of algorithm R&D, reduce the difficulty of operation and maintenance, and realize the rapid deployment and large-scale application of algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a DevOps development method and apparatus, electronic device and storage medium for AI algorithm services. Background Technology

[0002] Currently, algorithms are developed and maintained using an algorithm development and operation model. However, the separation of development and operation in this model leads to a longer deployment cycle, lower development efficiency, and greater operational difficulty in algorithm version iterations, making it difficult to achieve rapid deployment and large-scale application of algorithms. Summary of the Invention

[0003] The main objective of this application is to propose a DevOps development method, apparatus, electronic device, and storage medium for AI algorithm services, aiming to improve algorithm development efficiency and enable rapid deployment and large-scale application of algorithms.

[0004] To achieve the above objectives, a first aspect of this application proposes a DevOps development method for AI algorithm services, the method comprising:

[0005] Obtain the compilation configuration file and generate a compilation task based on the compilation configuration file;

[0006] Based on a preset scheduler, the compilation task selects the first target node from multiple nodes in the Kubernetes cluster and creates the first container on the first target node;

[0007] Obtain the program code of the target algorithm and import the program code into the first container;

[0008] The compilation task is executed to compile the program code in the first container to obtain the compilation result;

[0009] The compilation results were tested to obtain the test results;

[0010] The target algorithm is processed based on the test results.

[0011] In some embodiments, the compilation task includes computing resource configuration information and algorithm identifiers. The step of selecting a first target node from multiple nodes in a Kubernetes cluster based on a preset scheduler and creating a first container on the first target node includes:

[0012] Based on the preset scheduler and the computing resource configuration information, the first target node is selected from multiple nodes in the Kubernetes cluster for the compilation task.

[0013] The target image is obtained based on the algorithm identifier;

[0014] The first container is created on the first target node based on the target image.

[0015] In some embodiments, obtaining the target image based on the algorithm identifier includes:

[0016] The algorithm information corresponding to the target algorithm is obtained from the algorithm repository based on the algorithm identifier.

[0017] Based on the algorithm information, determine the base image, runtime environment, and configuration parameters corresponding to the target algorithm;

[0018] The preset image building engine is invoked to encapsulate the base image, the runtime environment, and the configuration parameters to obtain the target image;

[0019] The target image is stored in an image repository, and the target image is retrieved from the image repository.

[0020] In some embodiments, the program code for obtaining the target algorithm includes:

[0021] The address of the program code corresponding to the target algorithm is obtained based on the algorithm information;

[0022] The program code is retrieved from the code repository based on the address.

[0023] In some embodiments, testing the compilation result to obtain the test result includes:

[0024] Obtain the test script file and generate test tasks based on the test script file;

[0025] The test task is executed to test the compilation result, and the test result is obtained.

[0026] In some embodiments, the compilation result includes an executable file, and the execution of the test task tests the compilation result to obtain test results, including:

[0027] Based on the scheduler, a second target node is selected from multiple nodes in the Kubernetes cluster for the test task, and a second container is created on the second target node;

[0028] Import the executable file into the second container;

[0029] The test task is executed to test the executable file in the second container and the test results are obtained.

[0030] In some embodiments, processing the target algorithm based on the test results includes:

[0031] If the test results match the expected results, an algorithm release task is generated, and the target algorithm is stored in the algorithm repository.

[0032] If the test result does not match the expected result, the updated program code is obtained, and the algorithm is reprocessed on the updated program code.

[0033] To achieve the above objectives, a second aspect of this application proposes a DevOps development apparatus for AI algorithm services, the apparatus comprising:

[0034] The first acquisition module is used to acquire the compilation configuration file and generate a compilation task based on the compilation configuration file.

[0035] The container creation module selects the first target node from multiple nodes in the Kubernetes cluster for the compilation task based on a preset scheduler, and creates the first container on the first target node;

[0036] The second acquisition module is used to acquire the program code of the target algorithm and import the program code into the first container;

[0037] A compilation module is used to execute the compilation task to compile the program code in the first container and obtain the compilation result;

[0038] The testing module is used to test the compilation results and obtain the test results;

[0039] The algorithm processing module is used to process the target algorithm based on the test results.

[0040] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the method described in the first aspect above.

[0041] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs that can be executed by one or more processors to implement the method described in the first aspect.

[0042] The DevOps development method, apparatus, electronic device, and storage medium for AI algorithm services proposed in this application obtain a compilation configuration file, generate a compilation task based on the configuration file, and select a first target node from multiple nodes in the Kubernetes cluster to execute the compilation task based on a preset scheduler. A first container is created on the first target node. To test the correctness of the algorithm, the program code of the target algorithm is obtained, the program code is imported into the first container, and the compilation task is executed to compile the program code in the first container to obtain the compilation result. The compilation result is then tested to obtain the test result, and the target algorithm is processed based on the test result. Since the compilation operation belongs to the R&D process and the testing operation belongs to the operation and maintenance process, the embodiments of this application combine compilation and testing to combine R&D and operation and maintenance, which can avoid the isolation between R&D and operation and maintenance, realize the closed loop of algorithm R&D and operation and maintenance, improve the efficiency of algorithm R&D, reduce the difficulty of operation and maintenance, and realize the rapid deployment and large-scale application of the algorithm. Attached Figure Description

[0043] Figure 1 This is a flowchart of the DevOps development method for AI algorithm services provided in the embodiments of this application;

[0044] Figure 2 yes Figure 1 The flowchart of step S120 in the middle;

[0045] Figure 3 yes Figure 2 The flowchart of step S220 in the text;

[0046] Figure 4 yes Figure 1 The flowchart of step S130 in the process;

[0047] Figure 5 yes Figure 1 The flowchart of step S150 in the middle;

[0048] Figure 6 yes Figure 5 The flowchart of step S520 in the text;

[0049] Figure 7 yes Figure 1 The flowchart of step S160 in the middle;

[0050] Figure 8 This is a schematic diagram of the structure of the DevOps development device for the AI ​​algorithm service provided in this application embodiment. Detailed Implementation

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

[0052] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0054] Currently, AI algorithm services are widely used, and many fields have a need for rapid deployment and large-scale application of AI algorithm services. However, the traditional R&D and operation and maintenance model isolates R&D and operation and maintenance, which leads to a longer algorithm launch cycle, low algorithm R&D efficiency, and high difficulty in operation and maintenance of algorithm version iteration, making it difficult to achieve rapid deployment and large-scale application of algorithms.

[0055] Based on this, embodiments of this application provide a DevOps development method and apparatus, electronic device and storage medium for AI algorithm services, aiming to improve the R&D efficiency of algorithms, reduce the operation and maintenance difficulty of algorithms, and realize the rapid deployment and large-scale application of algorithms.

[0056] The DevOps development method, apparatus, electronic device, and storage medium for AI algorithm services provided in this application are specifically described through the following embodiments. First, the DevOps development method for AI algorithm services in this application embodiment is described.

[0057] The DevOps development method for AI algorithm services provided in this application relates to the field of Internet technology. This method can be applied to terminals, servers, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the DevOps development method for AI algorithm services, but is not limited to the above forms.

[0058] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0059] Figure 1 This is an optional flowchart of the DevOps development method for AI algorithm services provided in this application embodiment. Figure 1 The method may include, but is not limited to, steps S110 to S160.

[0060] Step S110: Obtain the compilation configuration file and generate a compilation task based on the compilation configuration file;

[0061] Step S120: Based on the preset scheduler, the first target node is selected from multiple nodes in the Kubernetes cluster for the compilation task, and the first container is created on the first target node;

[0062] Step S130: Obtain the program code of the target algorithm and import the program code into the first container;

[0063] Step S140: Execute the compilation task to compile the program code in the first container and obtain the compilation result;

[0064] Step S150: Test the compilation result to obtain the test result;

[0065] Step S160: Process the target algorithm based on the test results.

[0066] In step S110 of some embodiments, the user uploads a compilation configuration file on the front-end webpage, the back-end server receives the compilation configuration file, stores the compilation configuration file in the configuration repository, retrieves the compilation configuration file from the configuration repository, and creates a compilation task based on the compilation configuration file. The compilation configuration file is an executable program, which is a compilation script written for the target algorithm.

[0067] In step S120 of some embodiments, Kubernetes is a container cluster management system that can realize functions such as automated deployment, automatic scaling up, automatic scaling down, and maintenance of container clusters. It is difficult for a single physical server to support the operation and maintenance of algorithms. By deploying Kubernetes clusters on multiple physical servers, containers can be scheduled according to the running status of the algorithm, making it easier to select appropriate containers to run and maintain algorithms in the container cluster.

[0068] The scheduler is used to manage cloud environments and edge devices. It's a global state information sharing scheduling model based on Kubernetes' scheduling extension mechanism and Ray-Project. This model's scheduling process is divided into two phases: resource scheduling and task scheduling. In the resource scheduling phase, the scheduler allocates workloads (workers) to physical nodes in the Kubernetes cluster with suitable computing resources. In the task scheduling phase, the scheduler distributes the assigned tasks to workloads with processing capabilities. Specifically, in the resource scheduling phase, the first target node is selected from multiple nodes in the Kubernetes cluster based on the matching degree between the target algorithm's algorithm description and node labels. For example, if algorithm A requires a GTX 4070 graphics card, nodes with GTX 4070 resources will be selected. If algorithm A also needs 800 millicores of CPU time and 3 Gi of memory, nodes will be allocated to algorithm A based on their availability. Task scheduling is implemented based on Ray-Project's distributed computing interface. In the task scheduling phase, the algorithm's internal definition determines whether multiple workloads are needed and what tasks each workload will perform. If it's a single process, only one workload is needed to complete the task.

[0069] The first target node is selected from multiple nodes in the Kubernetes cluster based on the preset resource scheduler. The first target node is a node in the Kubernetes cluster whose computing resources can meet the requirements of the compilation task, that is, the compilation task can be executed on the node. The first container is created on the first target node, and the first container is a workload with the ability to handle the compilation task.

[0070] In steps S130 to S140 of some embodiments, a compilation task is sent to the first container based on a preset task scheduler. In order to test the correctness of the program code corresponding to the target algorithm, the target algorithm program code corresponding to the compilation task is obtained, the program code is imported into the first container, the compilation task is executed to compile the program code, the compilation result is obtained, and the compilation result is output to the specified storage path.

[0071] In some embodiments, steps S150 to S160, the algorithm test is performed based on the compilation result. The purpose is to detect whether the compilation result of the algorithm meets expectations. By testing the compilation result, a test result is obtained. The test result is used to characterize the correctness of the target algorithm program code. Based on the correctness of the program code, the target algorithm is further developed, maintained, and processed.

[0072] Steps S110 to S160 as illustrated in this embodiment involve obtaining a compilation configuration file, generating a compilation task based on the configuration file, selecting a first target node from multiple nodes in the Kubernetes cluster based on a preset scheduler to execute the compilation task, creating a first container on the first target node, obtaining the program code of the target algorithm to test the correctness of the algorithm, importing the program code into the first container, executing the compilation task to compile the program code in the first container, obtaining the compilation result, testing the compilation result, obtaining the test result, and further developing and maintaining the target algorithm based on the test result. This allows the program code to be processed based on its correctness, avoiding the isolation between development and operation, and realizing a closed loop for algorithm development and operation. By combining development and operation, the efficiency of algorithm development can be improved, the difficulty of operation and maintenance can be reduced, and the rapid deployment and large-scale application of the algorithm can be achieved.

[0073] Please see Figure 2 In some embodiments, the compilation task includes computing resource configuration information and algorithm identifier, and step S120 may include, but is not limited to, steps S210 to S230:

[0074] Step S210: Based on the preset scheduler and the computing resource configuration information, the first target node is selected from multiple nodes in the Kubernetes cluster for the compilation task.

[0075] Step S220: Obtain the target image based on the algorithm identifier;

[0076] Step S230: Create the first container on the first target node based on the target image.

[0077] In step S210 of some embodiments, since the compilation configuration file includes computing resource configuration information and algorithm identifier, the compilation task generated based on the compilation configuration file also carries computing resource configuration information and algorithm identifier. Based on the computing resource configuration information, the resource task scheduler selects a first target node with the computing resources from multiple nodes in the Kubernetes cluster, so as to execute the compilation task on the first target node.

[0078] In steps S220 to S230 of some embodiments, the image is a description of the process's runtime environment, and the container is a running instance of the image. That is, the image is a static file, and the container is a process that runs in a runtime environment built based on the image and is isolated from other processes on the physical server. To provide a suitable runtime environment for the target algorithm, the target image corresponding to the target algorithm is obtained according to the algorithm identifier. The target image is instantiated to create a first container on the first target node. The algorithm identifier is used to distinguish various algorithms and can be an algorithm type, algorithm number, algorithm name, etc. The target image is used to provide the runtime environment for the target algorithm, and the first container is a compilation container capable of handling compilation tasks. It is understood that content in the Linux operating system is represented in the form of files; therefore, the presentation of an image in the Linux system is a layered file system.

[0079] Please see Figure 3 In some embodiments, step S220 may include, but is not limited to, steps S310 to S340:

[0080] Step S310: Obtain the algorithm information corresponding to the target algorithm from the algorithm repository based on the algorithm identifier;

[0081] Step S320: Determine the base image, runtime environment, and configuration parameters corresponding to the target algorithm based on the algorithm information;

[0082] Step S330: Call the preset image building engine to encapsulate the base image, runtime environment and configuration parameters to obtain the target image;

[0083] Step S340: Store the target image in the image repository and retrieve the target image from the image repository.

[0084] In steps S310 to S340 of some embodiments, based on the mapping relationship between algorithm identifiers and algorithm records, the algorithm record of the target algorithm is obtained from the algorithm repository. The algorithm record, i.e., algorithm information, includes information required for algorithm operation, such as the base image, runtime environment, configuration parameters, and the address of the corresponding program code in the program repository. Based on the algorithm record, the base image, runtime environment, and configuration parameters corresponding to the target algorithm are determined. The base image, runtime environment, and configuration parameters are then encapsulated using the Docker image building engine to obtain the target image. Specifically, in a Linux system, Docker can be used to encapsulate the operating system kernel functionality to obtain the target image. To solidify the algorithm's runtime environment and facilitate the reuse of the target image, the target image is stored in an image repository, which can then be directly retrieved from the image repository based on the algorithm identifier.

[0085] It's important to note that algorithm execution relies on underlying software environment configurations, such as the underlying framework and external dependency libraries. Since different algorithms have different requirements for software environment configurations, these underlying software environment configurations will vary depending on the specific needs of the AI ​​algorithm. Different software environments may conflict with each other, so the base image is usually a clean operating system image and does not include the relevant runtime environment configurations. Therefore, it is necessary to build the runtime environment according to different AI algorithms, creating different development images, i.e., target images.

[0086] Please see Figure 4 In some embodiments, step S130 may also include, but is not limited to, steps S410 to S420:

[0087] Step S410: Obtain the address of the program code corresponding to the target algorithm based on the algorithm information;

[0088] Step S420: Obtain program code from the code repository according to the address.

[0089] In steps S410 to S420 of some embodiments, the algorithm is hosted in a remote code repository. When testing the algorithm, the address of the program code is obtained according to the algorithm record. The program code can be automatically downloaded from the code repository according to the address to realize the automated testing process.

[0090] Please see Figure 5 In some embodiments, step S150 includes, but is not limited to, steps S510 to S520:

[0091] Step S510: Obtain the test script file and generate a test task based on the test script file;

[0092] Step S520: Execute the test task to test the compilation results and obtain the test results.

[0093] In steps S510 to S520 of some embodiments, in order to test the correctness of the program code corresponding to the target algorithm, the user uploads a test script file on the front-end page. The test script file includes multiple test cases. The compilation result is checked according to the test cases. The back-end server stores the test script file in the algorithm repository, tests the test script file from the algorithm repository, generates a test task according to the test script file, adds the test task to the scheduling queue, and schedules the test task in the scheduling queue to the target container based on the preset task scheduler. The test task is executed on the target container to test the compilation result and obtain the test result.

[0094] Please see Figure 6 In some embodiments, the compilation result includes an executable file, and step S520 may include, but is not limited to, steps S610 to S630:

[0095] Step S610: Based on the scheduler, a second target node is selected from multiple nodes in the Kubernetes cluster for the test task, and a second container is created on the second target node;

[0096] Step S620: Import the executable file into the second container;

[0097] Step S630: Execute the test task to test the executable file in the second container and obtain the test results.

[0098] In steps S610 to S630 of some embodiments, a second target node capable of executing test tasks is selected from multiple nodes in the Kubernetes cluster based on a preset resource scheduler. The target image is instantiated to create a second container on the second target node. The test task is distributed to the second container based on a preset task scheduler. The second container is a test container capable of handling test tasks. The executable file generated by the compilation operation is imported into the second container, and the test task is executed to test the executable file, obtaining test results. The executable file is a functional demonstration program or an algorithm SDK. The algorithm SDK is an algorithm development toolkit. The test results are the running results of the executable file, used to characterize the correctness of the target algorithm program code. In addition to the executable file, the compilation results also include compilation logs and an algorithm usage instruction README. It is understood that the compilation results can be stored in a specified location for easy download and viewing by users.

[0099] Please see Figure 7 In some embodiments, step S160 includes, but is not limited to, steps S710 to S720:

[0100] Step S710: If the test result matches the expected result, generate an algorithm release task and store the target algorithm in the algorithm repository;

[0101] Step S720: If the test result does not match the expected result, obtain the updated program code and reprocess the algorithm on the updated program code.

[0102] In step S710 of some embodiments, if the test result matches the expected result, an algorithm publishing task is generated, and the algorithm publishing task is scheduled to a container capable of handling algorithm publishing tasks based on the task scheduler, so as to deploy the algorithm as a service to the cloud environment and upload the target algorithm to the algorithm repository.

[0103] In step S720 of some embodiments, if the test result does not match the expected result, the user locates the error in the program code according to the compilation log and modifies the program code. The modified program code is still managed by the program repository. The modified program code is retrieved from the program repository, and the program code is recompiled and tested to obtain the test result. The modified program code is processed according to the test result. By integrating R&D and operation and maintenance, the iteration efficiency of the algorithm is greatly improved.

[0104] Please see Figure 8 This application also provides a DevOps development apparatus for AI algorithm services, which can implement the above-mentioned DevOps development method for AI algorithm services. The apparatus includes:

[0105] The first acquisition module 810 is used to acquire the compilation configuration file and generate compilation tasks based on the compilation configuration file.

[0106] The container creation module 820 selects the first target node from multiple nodes in the Kubernetes cluster for the compilation task based on a preset scheduler, and creates the first container on the first target node;

[0107] The second acquisition module 830 is used to acquire the program code of the target algorithm and import the program code into the first container;

[0108] Compiler module 840 is used to perform compilation tasks to compile the program code in the first container and obtain the compilation result;

[0109] Test module 850 is used to test the compilation results and obtain the test results;

[0110] The algorithm processing module 860 is used to process the target algorithm based on the test results.

[0111] The specific implementation of the DevOps development device for the AI ​​algorithm service is basically the same as the specific implementation of the DevOps development method for the AI ​​algorithm service described above, and will not be repeated here.

[0112] Another embodiment of this application, based on a cloud-native scenario, deploys the DevOps development method for AI algorithm services as an AI algorithm service DevOps R&D system. AI algorithm development is implemented based on this DevOps R&D system. This system, based on a cloud-native scenario, combines the development and operation of AI algorithm services, solving the problems of long algorithm service deployment cycles, low algorithm iteration efficiency, and high maintenance costs caused by the isolation between R&D and operation in traditional R&D and operation models, thus accelerating the speed of AI algorithm development. Based on this AI algorithm-oriented DevOps R&D system, users can conduct online algorithm development work by logging into the system page. By declaring the configuration of algorithms, the system automates the algorithm compilation and testing processes. The entire process is provided by the system's underlying encapsulation capabilities; users do not need to be aware of the specific implementation process of the underlying infrastructure. The system endows the AI ​​algorithm development process with agile development capabilities for rapid execution and operational capabilities for continuous iteration monitoring of existing algorithms, improving the efficiency and quality of AI algorithm development.

[0113] Because DevOps development system architectures are large and require numerous functional components to collaborate, traditional monolithic application architectures are insufficient to implement such systems. In other words, a single physical server is inadequate for running and maintaining a DevOps development system. This application employs a heterogeneous cluster composed of multiple computing nodes as the system's underlying layer. Cluster management and container orchestration are achieved through Docker and Kubernetes, enabling all microservices to run as containers on various nodes within the cluster. Microservices communicate with each other via the HTTP network protocol. By running and maintaining the system through multiple nodes in the cluster, the problem of a single-point server being unable to support the operation and maintenance of a DevOps development system is solved.

[0114] The top layer of the DevOps development system architecture consists of web page services and development tools. From top to bottom, these are the AI ​​algorithm library, development framework, infrastructure layer, container engine and container orchestration engine, and operating system. The bottom layer is a heterogeneous cluster composed of servers and other computing nodes. The top layer of the system provides services to the outside world through web pages and other means. Web page services and development tools are provided to users. Users can access the developer system and user system through web pages. The developer system provides algorithm DevOps development capabilities, and developers can use development tools to develop algorithms. The user system allows users to use products developed and launched by the developer system. The AI ​​algorithm library is an algorithm library based on the development framework. It is used to store various algorithms developed using the DevOps development system. Algorithms already in the library can be reused using the same configuration file. The development framework integrates most of the service components in the core architecture of the development system. It uses the Spring Boot framework to complete the development of the backend system and provides multiple RESTful API interfaces for the core functions of the platform. Each API corresponds to a business capability, such as algorithm compilation, algorithm query, and image upload. The specific API format adopts the RESTful style. In the infrastructure layer, system capabilities that are not closely related to the algorithms and business themselves are abstracted and sink to easy-to-use infrastructure to provide common services such as databases, data storage, and message queues for the upper-layer development framework and AI algorithm library. The bottom layer of the development system is a server cluster composed of multiple physical machines, built on the container engine Docker and the container orchestration engine Kubernetes. Docker is installed on each node of the server cluster to provide container operation support. The Kubernetes cluster is deployed through kubeadm, and each node in the cluster is divided into master nodes and worker nodes. Initially, a Kubernetes cluster only contains a master node. When worker nodes are added to the cluster, kubeadm installs kubelet on those worker nodes and uses kubelet as a proxy component for Kubernetes on that node. This proxy component interacts with the API server on the master node to collect cluster information and manage it uniformly. It's worth noting that some nodes in the cluster can be used as dedicated servers such as file servers or web servers, depending on system functional requirements.

[0115] Built on the underlying Kubernetes cluster, DevOps development systems can provide elastic and agile infrastructure and a large number of common basic services, abstracting the general requirements of upper-layer microservices. Users can directly generate the software needed for algorithm compilation and encapsulate external dependencies into containers through simple configuration, package them into images, and deploy the images directly in the production environment. This enables these infrastructures to scale rapidly and provide standardized deployment capabilities. Based on the container orchestration capabilities provided by Kubernetes, a large number of common basic services can be provided running in containers, including common code repository management services, unified image management services, convenient storage management services, monitoring services for various system metrics, log collection systems, and distributed publish-subscribe messaging systems.

[0116] It's worth noting that the code repository management service is implemented through GitLab, which centrally hosts code in a cloud repository, meeting the needs for cloud-based code storage, management, and integration. The image management service is implemented through Harbor, which solidifies the development and deployment environments into highly isolated image resources, enabling rapid algorithm testing and deployment within the DevOps system. The storage management service is implemented through NFS, which encapsulates persistent storage capabilities across boundaries, achieving separation of business logic and data in a microservice architecture. The monitoring service is implemented through Prometheus and Grafana, which can monitor multiple metrics such as resource usage, microservice runtime status, and user-defined metrics, enabling rapid detection and location of faults when microservices malfunction. A log collection system based on ELK (Elasticsearch, Logstash, and Kibana) is built to collect, process, and visualize logs, automating the processing of large amounts of logs generated by real-time microservice operation. A high-throughput distributed publish-subscribe messaging system is implemented using Kafka, whose data integration capabilities ensure real-time and reliable communication between microservices.

[0117] After establishing the underlying infrastructure, numerous microservices were designed for the AI ​​algorithm's DevOps process. This process is led by a RESTful server. At each step of the AI ​​algorithm's overall monitoring and maintenance process, from code writing to testing to deployment, necessary resources are retrieved from the image management service, code repository, and storage management service based on the algorithm's description to build and run compilation and testing containers. These sub-services and the RESTful server are implemented as corresponding microservices and are integrated into the development framework, communicating with each other via HTTP. It's worth noting that these microservices encapsulate the underlying infrastructure capabilities while also implementing the business logic functionalities within the DevOps process, primarily through Spring Boot development. The monitoring service serves as a common infrastructure for monitoring and managing the entire system's container services, providing visual analysis based on the information reported from the RESTful server.

[0118] Regular users, developers, and administrators send requests to the RESTful server through a front-end interface. Developers can also send requests via command-line tools. The RESTful server receives and responds to these requests. The RESTful server includes a REST controller, multiple microservices, and numerous interfaces to underlying infrastructure. The REST controller accepts external requests and forwards them to the corresponding microservices. These microservices connect to the database via a Database Connector or process the requests using integration tools. The microservices include Algorithm Manager, Development Manager, Deployment Manager, User Manager, and Monitor Manager. The Algorithm Manager handles algorithm compilation and testing; the Development Manager handles tasks related to development containers; the Deployment Manager deploys AI algorithms as application services; the User Manager manages system users; and the Monitor Manager monitors and alerts on system performance. The RESTful server integrates numerous interfaces to underlying infrastructure, including network-based Git repository management tools (GitLab), private image repositories (Harbor), continuous integration tools (Jenkins), and container orchestration tools (Docker and Kubernetes). GitLab integrates code, testing, and deployment. Its page offers functional modules such as creating projects, creating groups, browsing public projects, and learning more about GitLab. The project creation module is used to store code and access issues. The group creation module is used to create groups to manage projects and members. The public project browsing module showcases public projects and allows read-only access to all public projects. The learn more about GitLab module provides help documentation to help users understand all of GitLab's features.

[0119] Specifically, ordinary users, developers, and administrators send requests to the RESTful server through the front-end page. Developers send requests to the RESTful server through command-line tools. After receiving the request, the RESTful controller sends the request to the corresponding microservice. The microservice calls Kubernetes cluster modules such as ClusterModule, DockerModule, ImageModule, and StorageModule to process the algorithms in the database.

[0120] Through underlying infrastructure and microservices, users can log in to the GitLab code repository in the developer system to upload local algorithm code, or pull or create images from the Harbor repository using Docker commands and upload them. Alternatively, they can access the algorithm compilation and testing processes through the algorithm repository in the developer system. In the algorithm compilation process, users can configure relevant settings to initiate the compilation. In the algorithm testing process, users can select compiled algorithms for testing and, based on the test results, choose to add or remove algorithms. Users can log in to the user system to add added algorithms and download the provided SDK and usage instructions. Understandably, multiple users can test the same algorithm.

[0121] DevOps development systems utilize container technology to encapsulate AI algorithms into containers that run on the development system. Container orchestration manages the lifecycle of AI algorithms on a container-by-container basis; therefore, managing the algorithm lifecycle primarily manifests as managing the container lifecycle. A development container carrying an AI algorithm mainly consists of a runtime image, environment context, algorithm code, and configuration files. The environment context includes software, development framework, and runtime. Algorithm compilation and storage are collaboratively accomplished by building image repositories, code repositories, algorithm repositories, and configuration stores. This algorithm compilation and storage functionality allows for the rapid creation of algorithm compilation and testing tasks, enabling more efficient algorithm iteration. This achieves a seamless DevOps workflow integrating AI algorithm development and operations, significantly improving the efficiency of algorithm development.

[0122] The algorithm compilation and library integration function comprises three steps: algorithm runtime environment preparation, algorithm compilation and library integration, and algorithm testing and execution. The algorithm runtime environment preparation and algorithm compilation and library integration describe the algorithm's development process, while the algorithm testing and execution describe the algorithm's testing and maintenance process. Because the entire development and maintenance process is automated by the DevOps system, the efficiency of algorithm iteration is significantly improved.

[0123] In the algorithm runtime environment preparation process, users first download the base image from the image repository and run it as a container in an offline or system environment. Then, they complete the environment configuration by installing the software environment that the AI ​​algorithm depends on online. This process can also be manually configured using offline installation packages. After successful configuration, the configured R&D image is uploaded to the image repository provided by the system, thereby solidifying the runtime environment of a certain AI algorithm for download and use when actually compiling and running the AI ​​algorithm.

[0124] The AI ​​algorithm code is hosted in a remote code repository provided by the system. During the algorithm compilation and library entry process, a compilation script written by the developers is retrieved and used as the entry point for algorithm compilation. When the compilation script is invoked to automatically execute the algorithm compilation operation, the algorithm code is automatically downloaded from the code repository and imported into a compilation container created based on a development image (the image created during the algorithm runtime environment preparation process). The algorithm code in the compilation container is compiled, generating compilation results, including compilation logs, an algorithm SDK, an algorithm usage manual (README), and a functional demonstration program. The compilation results are saved to a designated location for users to download and view on a visualization page. Simultaneously, users can view the status of the algorithm being compiled and libraryed on the visualization page and view specific algorithm information through the monitoring and log collection system.

[0125] In the algorithm testing and execution process, similar to the algorithm compilation and library entry process, the system first pulls a development image that meets the requirements of the algorithm's runtime environment from the image repository as the container image for algorithm testing and execution. This development image is the same as the development image used when compiling and library entry of the algorithm by default. A test container is created based on the development image, and the functional demonstration demo program or algorithm SDK is imported into the test container. The test script is executed to test the demo program or algorithm SDK, and the test results are obtained. Based on the test results, the algorithm code is iterated or the algorithm's application service is deployed to the cloud environment. It should be noted that the test script can be obtained from a specified location in the system, which can be the configuration repository. This test script is used to automate the testing and execution of the algorithm's compilation results. Furthermore, developers can log into the test container through the system's provided interface to view the test results. If the test result is successful, the algorithm compilation and library entry are confirmed to be successful. If the test result differs from the expected result, the cause is investigated based on the log information output during the algorithm testing and execution process. The algorithm code is then modified, and the modified code is recompiled and tested until the test result is successful.

[0126] In some embodiments, users upload compilation configuration files and test script files through a front-end web server. A back-end RESTful server receives these files, generates a compilation task based on the configuration file, and the scheduler selects a first target node from multiple nodes in the Kubernetes cluster for the compilation task. The compilation task is executed on the first target node to obtain the compilation result, which is then sent to the RESTful server. The RESTful server generates a test task based on the test script file, and the scheduler selects a second target node from multiple nodes in the Kubernetes cluster for the test task. The test task is executed on the second target node to test the compilation result and obtain the test result. The RESTful server determines whether the test result is passed. If the test result is passed, the target algorithm is stored in the algorithm repository, and the scheduler executes the algorithm release task. If the test result is failed, log information from the test task execution is sent to the front-end page so that the user on the front-end page can use the log information to troubleshoot the algorithm test anomaly and modify the algorithm code.

[0127] When creating a compilation task, you need to configure information such as algorithm category, Chinese name of algorithm, English name of algorithm, cover image, algorithm performance, algorithm description, compilation script, command line parameters, algorithm runtime environment, and algorithm compilation computing package on the algorithm compilation page. The algorithm compilation computing package information includes the computing package name, the CPU, GPU and memory specifications required to compile the algorithm, and the algorithm runtime environment information includes the image name, etc.

[0128] Users can access the algorithm testing process through the algorithm repository in the DevOps development system, select pre-compiled algorithms for testing, and choose to upload or remove algorithms based on the test results. Multiple users can test the same algorithm. It should be noted that the algorithm repository includes the algorithm ID, category, algorithm name, SDK package size, recommended configuration information, algorithm publisher, release time, modification time, and algorithm status for each compiled algorithm. Download and operation interfaces are provided. The recommended configuration information can include the CPU, GPU, and memory specifications required for the algorithm to run. The download interface is for developers to download the SDK, Demo, and readme. The operation interface is for performing operations on the algorithm, such as removing or testing it. Algorithm status includes uploaded, removed, and not running.

[0129] Understandably, on the algorithm compilation page, users can search for algorithms in the algorithm repository based on information such as algorithm category, algorithm name, and publisher. They can also add other algorithms to the algorithm repository or perform a reset operation to cancel the corresponding operation on an algorithm.

[0130] Regular users can log in to the user system to add the algorithms that have been uploaded, and download the SDK and usage instructions provided with the algorithms for use.

[0131] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the DevOps development method for the aforementioned AI algorithm service. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0132] This application also provides an electronic device, including:

[0133] The processor can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solutions provided in the embodiments of this application.

[0134] The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory, and the processor calls and executes the DevOps development method for the AI ​​algorithm service of the embodiments of this application.

[0135] Input / output interfaces are used to implement information input and output;

[0136] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0137] A bus is used to transfer information between various components of a device, such as processors, memory, input / output interfaces, and communication interfaces.

[0138] The processor, memory, input / output interfaces, and communication interfaces communicate with each other within the device via a bus.

[0139] This application embodiment also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the DevOps development method of the above-mentioned AI algorithm service.

[0140] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0141] The DevOps development method, apparatus, electronic device, and storage medium for AI algorithm services provided in this application embodiment obtain a compilation configuration file, generate a compilation task based on the configuration file, and select a first target node from multiple nodes in the Kubernetes cluster to execute the compilation task based on a preset scheduler. A first container is created on the first target node. To test the correctness of the algorithm, the program code of the target algorithm is obtained, the program code is imported into the first container, and the compilation task is executed to compile the program code in the first container to obtain an executable file. The executable file is tested to obtain test results, and the target algorithm is further developed and maintained based on the test results. This allows the program code to be processed based on its correctness, avoiding the isolation between development and operation and maintenance, and realizing a closed loop of algorithm development and operation and maintenance. By combining development and operation and maintenance, the efficiency of algorithm development can be improved, the difficulty of operation and maintenance can be reduced, and the rapid deployment and large-scale application of the algorithm can be realized.

[0142] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0143] It will be understood by those skilled in the art that Figure 1-7 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0144] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0145] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0146] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0147] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0149] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0150] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A DevOps development method for AI algorithm services, characterized in that, The method includes: Obtain the compilation configuration file and generate a compilation task based on the compilation configuration file; Based on a preset scheduler, the compilation task selects the first target node from multiple nodes in the Kubernetes cluster and creates the first container on the first target node; Obtain the program code of the target algorithm and import the program code into the first container; The compilation task is executed to compile the program code in the first container to obtain the compilation result; The compilation results were tested to obtain the test results; The target algorithm is processed based on the test results; The compilation task includes computing resource configuration information and algorithm identifier. The preset scheduler selects a first target node from multiple nodes in the Kubernetes cluster for the compilation task and creates a first container on the first target node, including: Based on the preset scheduler and the computing resource configuration information, the compiler selects a first target node from multiple nodes in the Kubernetes cluster for the compilation task; obtains a target image based on the algorithm identifier; and creates the first container on the first target node based on the target image. The step of obtaining the target image based on the algorithm identifier includes: The algorithm information corresponding to the target algorithm is obtained from the algorithm repository based on the algorithm identifier; the base image, runtime environment, and configuration parameters corresponding to the target algorithm are determined based on the algorithm information; a preset image building engine is called to encapsulate the base image, runtime environment, and configuration parameters to obtain the target image; the target image is stored in the image repository, and the target image is obtained from the image repository. The process of testing the compilation result to obtain the test result includes: Obtain a test script file, generate a test task based on the test script file, execute the test task to test the compilation result, and obtain the test result. The compilation result includes an executable file. The test task is executed to test the compilation result, and the test results are obtained, including: The scheduler selects a second target node from multiple nodes in the Kubernetes cluster for the test task, and creates a second container on the second target node; the executable file is imported into the second container; the test task is executed, and the executable file in the second container is tested to obtain test results.

2. The DevOps development method for AI algorithm services according to claim 1, characterized in that, The program code for obtaining the target algorithm includes: The address of the program code corresponding to the target algorithm is obtained based on the algorithm information; The program code is retrieved from the code repository based on the address.

3. The DevOps development method for AI algorithm services according to any one of claims 1 to 2, characterized in that, The step of processing the target algorithm based on the test results includes: If the test results match the expected results, an algorithm release task is generated, and the target algorithm is stored in the algorithm repository. If the test result does not match the expected result, the updated program code is obtained, and the algorithm is reprocessed on the updated program code.

4. A DevOps development apparatus for AI algorithm services, characterized in that, The device includes: The first acquisition module is used to acquire the compilation configuration file and generate a compilation task based on the compilation configuration file. The container creation module selects the first target node from multiple nodes in the Kubernetes cluster for the compilation task based on a preset scheduler, and creates the first container on the first target node; The second acquisition module is used to acquire the program code of the target algorithm and import the program code into the first container; A compilation module is used to execute the compilation task to compile the program code in the first container and obtain the compilation result; The testing module is used to test the compilation results and obtain the test results; An algorithm processing module is used to process the target algorithm based on the test results; The compilation task includes computing resource configuration information and algorithm identifier. The preset scheduler selects a first target node from multiple nodes in the Kubernetes cluster for the compilation task and creates a first container on the first target node, including: Based on the preset scheduler and the computing resource configuration information, the compiler selects a first target node from multiple nodes in the Kubernetes cluster for the compilation task; obtains a target image based on the algorithm identifier; and creates the first container on the first target node based on the target image. The step of obtaining the target image based on the algorithm identifier includes: The algorithm information corresponding to the target algorithm is obtained from the algorithm repository based on the algorithm identifier; the base image, runtime environment, and configuration parameters corresponding to the target algorithm are determined based on the algorithm information; a preset image building engine is called to encapsulate the base image, runtime environment, and configuration parameters to obtain the target image; the target image is stored in the image repository, and the target image is obtained from the image repository. The process of testing the compilation result to obtain the test result includes: Obtain a test script file, generate a test task based on the test script file, execute the test task to test the compilation result, and obtain the test result. The compilation result includes an executable file. The test task is executed to test the compilation result, and the test results are obtained, including: The scheduler selects a second target node from multiple nodes in the Kubernetes cluster for the test task, and creates a second container on the second target node; the executable file is imported into the second container; the test task is executed, and the executable file in the second container is tested to obtain test results.

5. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 3.

6. A storage medium, wherein the storage medium is a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the method according to any one of claims 1 to 3.