Algorithm deployment method and device, electronic equipment and computer program product
Patent Information
- Application Number
- CN202611139159.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-20
AI Technical Summary
[0006]本申请的主要目的在于提供一种算法的部署方法、装置、电子设备以及计算机程序产品,以解决相关技术中在分布式节点中部署算法时存在部署效率低的技术问题
[0019]在本申请实施例中,采用算法的部署的方式,通过接收算法部署请求,并根据算法部署请求确定算法部署任务,其中,算法部署任务包括新增算法部署任务和存量算法部署任务,新增算法部署任务是指向业务系统的分布式节点部署新增算法的任务,存量算法部署任务是指为业务系统的历史算法更新版本的任务;从算法部署请求中提取部署元数据和待部署算法数据,在算法部署任务为新增算法部署任务的情况下,根据部署元数据和待部署算法数据执行新增算法部署操作;在算法部署任务为存量算法部署任务的情况下,根据部署元数据和待部署算法数据执行存量算法部署操作;获取算法部署结果,根据算法部署结果更新节点资源,解决了相关技术中在分布式节点中部署算法时存在部署效率低的技术问题,通过从算法部署请求中提取部署元数据和待部署算法数据,根据算法部署任务、部署元数据和待部署算法数据执行不同类型的部署任务,进而根据算法部署结果更新节点资源,进而达到了提高在分布式节点上部署算法时的部署效率的技术效果。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically, to a method, apparatus, electronic device, and computer program product for deploying an algorithm. Background Technology
[0002] With the deep integration of artificial intelligence technology and edge computing, distributing and deploying algorithm models to distributed nodes for local inference and analysis has become a standard architecture for handling massive amounts of data and reducing transmission latency. In this architecture, the central side is responsible for managing and distributing the algorithm models, while the distributed nodes at the edge are responsible for carrying out the specific inference tasks. The deployment scheme relies on container orchestration tools to centrally distribute image files and directly launch corresponding service instances on the target compute nodes to handle business requests.
[0003] However, the aforementioned distributed algorithm deployment schemes have several limitations. First, when existing algorithm services undergo version iterations, the update mechanism often employs a blanket deployment strategy that directly destroys the old container and launches a new one. This approach can lead to interruptions in the currently processing business flow. Even if some systems introduce a dual-container parallel round-robin update mechanism, it can still cause these real-time inference tasks to be directly discarded or fail to process, failing to meet the zero-interruption requirements of high-availability services. For the initial deployment of new algorithms, due to the large size of various algorithm image files, a single transmission method can easily lead to excessively long deployment times for a single node in complex network environments, thus affecting the overall service launch efficiency. At the same time, existing resource scheduling logic mostly remains at the basic memory capacity verification level. This coarse-grained scheduling leads to inaccurate resource matching, and target nodes often experience memory overflow crashes during the algorithm process startup phase due to insufficient underlying GPU memory.
[0004] Furthermore, if operational anomalies occur due to incompatible underlying driver versions, missing environment variable configurations, or missing model dependencies, the system cannot identify the specific root cause of the error, let alone roll back the service or trigger image recompilation. This black-box deployment model makes troubleshooting highly dependent on manual login to nodes for log analysis, reducing the deployment success rate and operational reliability of distributed clusters under large-scale task collaboration, and making it impossible to achieve rapid degradation and automatic recovery in the face of sudden failures. In scenarios of concurrent deployment of large-scale algorithm images, existing technologies lack effective dynamic concurrency control strategies, which can easily lead to network storms or node avalanches.
[0005] There is currently no effective solution to the technical problem of low deployment efficiency when deploying algorithms on distributed nodes in related technologies. Summary of the Invention
[0006] The main objective of this application is to provide an algorithm deployment method, apparatus, electronic device, and computer program product to solve the technical problem of low deployment efficiency when deploying algorithms in distributed nodes in related technologies.
[0007] To achieve the above objectives, according to one aspect of this application, a method for deploying an algorithm is provided. The method includes: receiving an algorithm deployment request and determining an algorithm deployment task based on the request, wherein the algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task; the new algorithm deployment task refers to a task that deploys a new algorithm to distributed nodes of a business system, and the existing algorithm deployment task refers to a task that updates a historical algorithm version for the business system; extracting deployment metadata and algorithm data to be deployed from the algorithm deployment request; if the algorithm deployment task is a new algorithm deployment task, performing a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; if the algorithm deployment task is an existing algorithm deployment task, performing an existing algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; obtaining an algorithm deployment result; and updating node resources based on the algorithm deployment result.
[0008] Optionally, the process of deploying a new algorithm based on deployment metadata and algorithm data to be deployed includes: determining the task execution mode based on the algorithm data to be deployed, wherein the task execution mode includes serial execution mode and parallel execution mode; determining M candidate distributed nodes in the business system based on the deployment metadata, and obtaining the node resource information of the M candidate distributed nodes to obtain M sets of node resource information, wherein M is a positive integer; obtaining weighting coefficients, and calculating the computing power health score of each candidate distributed node based on the weighting coefficients and each set of node resource information to obtain M computing power health scores; selecting N target nodes from the M candidate distributed nodes based on the M computing power health scores, wherein N target nodes refer to distributed nodes used to execute the algorithm deployment task, N is less than or equal to M, and N is a positive integer; and controlling the N target nodes to obtain algorithm image data based on the task execution mode, and controlling the N target nodes to execute the algorithm deployment operation based on the algorithm image data.
[0009] Optionally, determining the task execution mode based on the algorithm data to be deployed includes: if the algorithm data to be deployed is less than a preset threshold, the task execution mode is determined to be a serial execution mode, wherein the serial execution mode refers to sending deployment instructions to N target nodes sequentially; if the algorithm data to be deployed is greater than or equal to the preset threshold, the task execution mode is determined to be a parallel execution mode, wherein the parallel execution mode refers to sending deployment instructions to N target nodes simultaneously.
[0010] Optionally, performing the existing algorithm deployment operation based on deployment metadata and algorithm data to be deployed includes: if the algorithm data to be deployed is less than a preset threshold, obtaining Y target nodes, sending deployment tasks to the Y target nodes based on the deployment metadata, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system, and Y is a positive integer; if the Y target nodes receive the deployment tasks, sequentially controlling the Y target nodes to obtain algorithm image data based on the deployment tasks; controlling the Y target nodes to start a new version container, and performing algorithm deployment operations in the new version container based on the algorithm image data.
[0011] Optionally, before sending the deployment task to the Y target nodes based on the deployment metadata, the method further includes: extracting the description identifier corresponding to the historical algorithm from the algorithm deployment request, and sending a suspension instruction to the Y target nodes based on the description identifier, wherein the suspension instruction is an instruction to suspend the destruction operation of the historical version container running the historical algorithm in the Y target nodes.
[0012] Optionally, performing the existing algorithm deployment operation based on deployment metadata and algorithm data to be deployed includes: when the algorithm data to be deployed is greater than or equal to a preset threshold, using an orchestration program to simultaneously send deployment tasks to Y target nodes, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system; when the Y target nodes receive the deployment tasks, controlling the Y target nodes to start a new version container, and performing the algorithm deployment operation in the new version container based on the algorithm image data, wherein the algorithm image data is obtained by the Y target nodes based on the deployment tasks.
[0013] Optionally, after performing the deployment operation of the existing algorithm based on the deployment metadata and the algorithm data to be deployed, the method further includes: obtaining the new version container for performing the deployment operation of the existing algorithm, sending a verification instruction to the new version container, and receiving a verification status code, wherein the verification status code is generated based on the verification instruction returned by the new version container; if the verification status code indicates that the verification failed, sending a deletion instruction to the new version container, destroying the new version container, and activating the historical version container running the historical algorithm; if the verification status code indicates that the verification passed, detecting the new version container and generating a detection data stream, wherein the detection data stream refers to the container data during the runtime of the new version container.
[0014] Optionally, updating node resources based on the algorithm deployment result includes: if the algorithm deployment result indicates deployment failure, determining the deployment failure type based on the algorithm deployment result, and repairing the distributed nodes of the business system according to the deployment failure type; if the algorithm deployment result indicates deployment success, cleaning up the resources of the distributed nodes of the business system and generating a version iteration report.
[0015] To achieve the above objectives, according to another aspect of this application, an algorithm deployment apparatus is provided. The apparatus includes: a receiving unit, configured to receive an algorithm deployment request and determine an algorithm deployment task based on the request, wherein the algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task; a new algorithm deployment task refers to a task that deploys a new algorithm to distributed nodes of a business system, and an existing algorithm deployment task refers to a task that updates a historical algorithm version for the business system; a first extraction unit, configured to extract deployment metadata and algorithm data to be deployed from the algorithm deployment request, and, if the algorithm deployment task is a new algorithm deployment task, execute a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; an execution unit, configured to execute an existing algorithm deployment operation based on the deployment metadata and algorithm data to be deployed if the algorithm deployment task is an existing algorithm deployment task; and a first acquisition unit, configured to acquire an algorithm deployment result and update node resources based on the algorithm deployment result.
[0016] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein a deployment method for controlling the device where the computer-readable storage medium is located to execute any of the above-described algorithms is provided when the executable program is running.
[0017] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory storing an executable program, and the processor for running the program, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the deployment method of any of the above-described algorithms.
[0018] According to another aspect of the present invention, a computer program product is also provided, the computer program product including a computer program, wherein the computer program, when executed by a processor, implements a deployment method of any of the above-described algorithms.
[0019] In this embodiment, an algorithm deployment method is adopted. An algorithm deployment request is received, and an algorithm deployment task is determined based on the request. The algorithm deployment task includes new algorithm deployment tasks and existing algorithm deployment tasks. New algorithm deployment tasks refer to deploying new algorithms to distributed nodes of the business system, while existing algorithm deployment tasks refer to updating versions of historical algorithms in the business system. Deployment metadata and data of the algorithm to be deployed are extracted from the algorithm deployment request. If the algorithm deployment task is a new algorithm deployment task, the new algorithm deployment operation is performed based on the deployment metadata and data of the algorithm to be deployed. If the algorithm deployment task is an existing algorithm deployment task, the existing algorithm deployment operation is performed based on the deployment metadata and data of the algorithm to be deployed. The algorithm deployment result is obtained, and node resources are updated based on the algorithm deployment result. This solves the technical problem of low deployment efficiency when deploying algorithms on distributed nodes in related technologies. By extracting deployment metadata and data of the algorithm to be deployed from the algorithm deployment request, executing different types of deployment tasks based on the algorithm deployment task, deployment metadata, and data of the algorithm to be deployed, and then updating node resources based on the algorithm deployment result, the technical effect of improving the deployment efficiency of algorithms on distributed nodes is achieved. Attached Figure Description
[0020] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0021] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) used to implement a deployment method for an algorithm;
[0022] Figure 2 This is a flowchart of a deployment method for the algorithm provided in the embodiments of this application;
[0023] Figure 3 This is a schematic diagram of a deployment method for a new algorithm provided in an embodiment of this application;
[0024] Figure 4 This is a schematic diagram of the deployment method of the stock algorithm provided in the embodiments of this application;
[0025] Figure 5 This is a schematic diagram of a node resource update method provided according to an embodiment of this application;
[0026] Figure 6 This is a schematic diagram of a deployment system for a new algorithm provided in an embodiment of this application;
[0027] Figure 7 This is a schematic diagram of a deployment method for an optional algorithm provided according to an embodiment of this application;
[0028] Figure 8 This is a schematic diagram of a deployment apparatus for the algorithm provided in the embodiments of this application;
[0029] Figure 9 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, 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.
[0032] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties. For example, this system has interfaces with relevant users or organizations to provide users with corresponding operation data for them to choose to agree to or refuse automated decision-making results. Before obtaining relevant information, a request for obtaining the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained after receiving consent from the aforementioned user or organization; if the user chooses to refuse, the expert decision-making process is initiated. Users can view the purpose of data use in real time through authorization decoding and have the right to withdraw authorization or delete data at any time. After the authorization is withdrawn, the system will terminate the relevant data processing within 24 hours.
[0033] It should be noted that the information collected in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize use or refuse use.
[0034] Example 1
[0035] According to an embodiment of this application, a method embodiment for deploying an algorithm is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0036] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) used to implement a deployment method for an algorithm, such as... Figure 1 As shown, computer terminal 10 (or mobile device) may include one or more ( Figure 1 The processor 102 (which may include, but is not limited to, a microprocessor MCU (Microcontroller Unit) or a programmable gate array (FPGA)) is shown as 102a, 102b, ..., 102n. It also includes a memory 104 for storing data and a transmission device 106 for communication functions. In addition, it may include: a display, an input / output interface, a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a keyboard, a cursor control device, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the algorithm deployment method in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned algorithm deployment method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network interface controller (NIC) and a network interface, which can be connected to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.
[0040] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0041] Under the aforementioned operating environment, this application provides the following: Figure 2 The deployment method of the algorithm is shown. Figure 2 This is a flowchart of the deployment method of the algorithm provided in the embodiments of this application, such as... Figure 2 As shown, the method includes the following steps:
[0042] Step S201: Receive an algorithm deployment request and determine the algorithm deployment task based on the algorithm deployment request. The algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. The new algorithm deployment task refers to the task of deploying a new algorithm to the distributed nodes of the business system, and the existing algorithm deployment task refers to the task of updating the version of the historical algorithm of the business system.
[0043] Specifically, an algorithm deployment request refers to a stream of instructions initiated by the business side, instructing the execution of a specific algorithm service on distributed nodes. An algorithm deployment task is an internal executable unit generated after parsing the algorithm deployment request; it is the basic object processed by the scheduling engine and carries complete context information. It should be noted that new algorithm deployment tasks refer to scenarios where no instance of the algorithm service exists in the cluster, i.e., the business side is requesting the deployment of an algorithm for the first time, and there is no historical running status of that algorithm in the cluster; this is an initialization deployment from scratch. Existing algorithm deployment tasks refer to scenarios where an instance of the algorithm service already exists in the cluster, i.e., the business side is iterating on an already running algorithm, and an old version instance exists in the cluster; this is an update deployment.
[0044] When the business side initiates an algorithm deployment request, it can receive a data packet containing parameters such as the business requirement type, algorithm unique identifier, image version number, and target deployment scope. The algorithm deployment request is then parsed to determine the algorithm deployment task. It should be noted that the parsing method can be to query the active service registry or the active status database of the central cluster. If the query result is empty, the current task type is determined to be a new algorithm deployment task; if the query result is not empty (i.e., an instance exists in the Running state), the current task type is determined to be an existing algorithm deployment task. Based on the determination result, the original request is then parsed and encapsulated into a standard algorithm deployment task object, assigned a unique identifier, for subsequent end-to-end tracing.
[0045] Step S202: Extract deployment metadata and algorithm data to be deployed from the algorithm deployment request. If the algorithm deployment task is a new algorithm deployment task, perform the new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed.
[0046] Specifically, deployment metadata refers to structured information describing the deployment behavior itself, which may include the algorithm's unique identifier, the target image's version number, the image repository address, the expected resource quota (CPU (Central Processing Unit) cores, memory size, etc.), the list of environment variable configurations, and the target node topology set, etc. Algorithm data to be deployed refers to the core binary files or model files required for the algorithm to run. It can be represented as a container image, containing the algorithm code, dependent libraries, runtime environment, etc., and is the specific object pulled by the container.
[0047] If the algorithm deployment task is a new algorithm deployment task, this operation does not involve stopping or rolling back the old service. The focus is on accurate resource matching, efficient image distribution, and rapid startup of the new service. At this time, the deployment method can be determined based on the algorithm data to be deployed, and then the new algorithm deployment operation is executed based on the deployment method. That is, the target node receives the instruction, pulls the algorithm data (image) to be deployed, creates a container instance, and starts it.
[0048] It should be noted that the above deployment process can be verified in three stages: pre-check: verifying whether the node resources meet the requirements; mid-monitoring: capturing container state changes in real time; and post-verification: sending test tensors to verify inference latency and success rate.
[0049] Step S203: If the algorithm deployment task is a pre-existing algorithm deployment task, perform the pre-existing algorithm deployment operation based on the deployment metadata and the algorithm data to be deployed.
[0050] Specifically, if the algorithm deployment task is an existing algorithm deployment task, version iteration can be performed on the already running algorithm service: First, resource descriptors can be locked to prevent the destruction of old containers, keeping them alive and creating an environment where old and new versions coexist. Then, the control plane instructs the bi-state traffic gateway to adjust the weight of the route it points to to 0, stopping the reception of new real-time analysis requests. An asynchronous buffer queue is opened on the gateway side to serialize newly arriving analysis tasks by timestamp and push them into the queue for waiting. A serial or parallel strategy is determined based on the deployment volume, and then the algorithm image is pulled on the target node, starting a new container. The algorithm is then verified; if verification fails, a rollback mechanism is triggered; if verification succeeds, the gateway route is switched, and the asynchronous buffer queue is awakened to distribute the backlogged tasks.
[0051] Step S204: Obtain the algorithm deployment results and update the node resources based on the algorithm deployment results.
[0052] Specifically, after the deployment of the different algorithm deployment tasks mentioned above is completed, the algorithm deployment results can be obtained. These results refer to the comprehensive status information obtained through monitoring and verification mechanisms after the deployment tasks are completed. This information may include: deployment success / failure flags, container current status (Running / Crashed), actual resource occupancy, health check metrics (latency, success rate), and abnormal log snapshots. Based on the deployment results, the central resource view and local node resource pool status are dynamically adjusted to update node resources. This includes releasing resource quotas for destroyed containers, recording resource occupancy of new containers, updating node computing power health scores, and cleaning or updating the status in the task queue. If deployment fails and triggers self-healing (e.g., instance migration), the resource release status of the original node is updated, and the resource occupancy status is updated on the newly migrated node. If self-healing fails, the abnormal resource status of the faulty node is recorded (e.g., marked as resource fragmentation or driver incompatibility), and the priority score of that node in subsequent scheduling is reduced.
[0053] For successfully deployed instances, a four-dimensional monitoring matrix is activated to continuously collect container status, configuration status, heartbeat, and task status, forming a closed-loop feedback of resource usage.
[0054] The algorithm deployment method provided in this application embodiment receives an algorithm deployment request and determines an algorithm deployment task based on the request. The algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. A new algorithm deployment task refers to deploying a new algorithm to a distributed node of a business system, while an existing algorithm deployment task refers to updating a historical algorithm version for the business system. Deployment metadata and data of the algorithm to be deployed are extracted from the algorithm deployment request. If the algorithm deployment task is a new algorithm deployment task, a new algorithm deployment operation is performed based on the deployment metadata and the data of the algorithm to be deployed. If the algorithm deployment task is an existing algorithm deployment task, an existing algorithm deployment operation is performed based on the deployment metadata and the data of the algorithm to be deployed. The algorithm deployment result is obtained, and node resources are updated based on the algorithm deployment result. This method solves the technical problem of low deployment efficiency when deploying algorithms on distributed nodes in related technologies. By extracting deployment metadata and data of the algorithm to be deployed from the algorithm deployment request, performing different types of deployment tasks based on the algorithm deployment task, deployment metadata, and data of the algorithm to be deployed, and then updating node resources based on the algorithm deployment result, the method achieves the technical effect of improving the deployment efficiency when deploying algorithms on distributed nodes.
[0055] Optionally, in the algorithm deployment method provided in this application embodiment, the new algorithm deployment operation based on deployment metadata and algorithm data to be deployed includes: determining a task execution mode based on the algorithm data to be deployed, wherein the task execution mode includes a serial execution mode and a parallel execution mode; determining M candidate distributed nodes in the business system based on the deployment metadata, and obtaining node resource information of the M candidate distributed nodes to obtain M sets of node resource information, wherein M is a positive integer; obtaining weighting coefficients, and calculating the computing power health score of each candidate distributed node based on the weighting coefficients and each set of node resource information to obtain M computing power health scores; selecting N target nodes from the M candidate distributed nodes based on the M computing power health scores, wherein N target nodes refer to distributed nodes used to execute algorithm deployment tasks, N is less than or equal to M, and N is a positive integer; controlling the N target nodes to obtain algorithm image data according to the task execution mode, and controlling the N target nodes to execute algorithm deployment operations based on the algorithm image data.
[0056] It should be noted that, Figure 3 This is a schematic diagram of the deployment method of the newly added algorithm provided in the embodiments of this application, such as... Figure 3 As shown, when an algorithm deployment task is a newly added algorithm deployment task, the sub-process engine receives the parsed deployment metadata from the routing node of the main process. This deployment metadata includes algorithm metadata specified by the task initiator, including the algorithm model file path, basic runtime environment, environment variable configuration list, and expected target node topology range. Then, the globally unique identifier for the algorithm can be extracted from the context and matched against the active service registry in the central cluster. If the state record of the globally unique identifier for the algorithm is confirmed to be empty, the task can be marked as TYPE=NEW_DEPLOY (new deployment), a completely new deployment state machine can be initialized, and a unique identifier can be assigned to the task.
[0057] Furthermore, the task execution mode can be determined based on the algorithm data to be deployed. The task execution mode refers to the concurrent strategy of the system control node in executing the deployment task. Serial execution mode refers to the scheduling engine issuing deployment instructions to individual target nodes sequentially, and issuing instructions to the next node only after the previous node's task is completed (successfully or unsuccessfully). Parallel execution mode refers to the scheduling engine simultaneously pushing multiple deployment subtasks into a message queue, where multiple worker threads simultaneously consume the messages and concurrently issue deployment instructions to different target nodes. Then, candidate distributed nodes in the business system and the node resource information of each candidate distributed node are determined based on the deployment metadata. Candidate distributed nodes refer to the set of nodes with the potential to execute the algorithm deployment task, selected based on the region, network connectivity, or preliminary resource filtering conditions in the deployment metadata. Node resource information refers to multi-dimensional real-time data reflecting the current hardware status of the target node, specifically including indicators such as CPU utilization, free memory, GPU (Graphics Processing Unit) physical memory availability, memory fragmentation rate, and network uplink and downlink latency for the central node to push images to the node.
[0058] After obtaining the weighted coefficients, a computing power health score is calculated for each candidate distributed node based on these weighted coefficients and the resource information of each group of nodes. The weighted coefficients are numerical parameters used to measure the importance of different resource indicators in the overall score, and may include GPU memory weight, RAM weight, and network latency weight, used to balance the contribution of different hardware indicators to the deployment success rate. The score can be calculated using the following formula:
[0059] ;
[0060] in, and This represents the node's GPU idle and total video memory. and For free and total memory, The network latency weights of the image are pushed to this node from the center. These are weighting coefficients. These are used to obtain the computing power health score. Next, the instances can be sorted in reverse order, allocating them to the resource pool of the candidate distributed nodes with the highest computing power health scores, generating the final bound resource description files. Finally, the container engine on the target node pulls the algorithm container image file from the image repository according to the instructions, obtaining the algorithm image data, and controls the target node to execute the algorithm deployment operation based on the algorithm image data. That is, after receiving the deployment instruction with resource priority binding, the server on the target node triggers the physical execution action. The underlying container engine of the target node pulls the corresponding algorithm image according to the instructions, mounts the specified GPU computing power channel and host directory, officially starts the algorithm service process, and performs health checks until the service enters the running state. It should be noted that the container's lifecycle state changes to Starting and is re-integrated into the main process's deployment monitoring and post-deployment verification mechanism.
[0061] This embodiment, through the selection of serial or parallel task execution modes based on multi-dimensional resource indicators, not only achieves accurate resource matching for algorithm deployment tasks and effectively prevents container startup failures due to insufficient video memory, but also balances deployment efficiency through flexible concurrency strategies, significantly improving the success rate of algorithm deployment and overall operational performance in distributed heterogeneous clusters.
[0062] Optionally, in the algorithm deployment method provided in this application embodiment, determining the task execution mode based on the algorithm data to be deployed includes: when the algorithm data to be deployed is less than a preset threshold, determining the task execution mode as a serial execution mode, wherein the serial execution mode refers to sending deployment instructions to N target nodes sequentially; when the algorithm data to be deployed is greater than or equal to the preset threshold, determining the task execution mode as a parallel execution mode, wherein the parallel execution mode refers to sending deployment instructions to N target nodes simultaneously.
[0063] It should be noted that, as Figure 3As shown, to determine the task execution mode, the algorithm data to be deployed can first be quantified into integer variables, and then the currently set preset threshold can be obtained through the central configuration dictionary. When the algorithm data to be deployed is less than the preset threshold, a highly reliable synchronous blocking scheduling strategy can be adopted, that is, the task execution mode is determined to be serial execution mode. In serial execution mode, the scheduling engine reads the algorithm image address, version number, and specified single node resource pool information in a fixed order to build a single instance deployment list. The scheduler sends instructions to the target node serially, establishes long connections, and polls the container's pull, creation, and running status in real time. The scheduling thread lock is not released before a single deployment task returns its final status (success or failure). If an abnormal status code is captured, an independent single-point fault investigation log is generated based on the unique identifier to investigate resource or network problems, thus completing the closed loop of the deployment logic of a single node. Only after the current node receives the deployment instruction, completes the image pull and container startup, and returns the final status (success or failure) to the scheduler will the scheduler send the deployment instruction to the next node.
[0064] When the algorithm data to be deployed is greater than or equal to a preset threshold, the task execution mode can be set to parallel execution mode. Parallel execution mode encapsulates common parameters such as algorithm image, version, and target resource pool, splits the task to be deployed into multiple subtasks, and pushes them into the partitioned queue of a high-throughput message middleware. Then, multiple worker threads are started to consume the tasks in the queue in parallel, issuing deployment instructions to the corresponding target nodes. This means that multiple deployment instructions are sent to different target nodes almost simultaneously, rather than queuing and waiting for the previous task to complete. After the entire batch of concurrent deployments is completed, the system builds a barrier synchronization primitive and waits for all subtasks to return status. Subsequently, a unified aggregation check function is executed, and subtasks that returned abnormal statuses are collectively collected into a failure list for subsequent centralized processing. Each node independently performs image pulling and container startup without blocking each other.
[0065] This embodiment dynamically selects between serial and parallel execution modes by comparing the algorithm data to be deployed with a preset threshold. This enables highly reliable serial synchronous control for small-scale deployments, avoiding unnecessary concurrent resource contention and complex state management overhead. For large-scale deployments, it can switch to an efficient parallel asynchronous execution mode, significantly improving deployment speed. This effectively balances execution efficiency and system stability in distributed deployment, enhancing the overall flexibility and resource utilization of algorithm deployment.
[0066] Optionally, in the algorithm deployment method provided in this application embodiment, performing the existing algorithm deployment operation based on deployment metadata and algorithm data to be deployed includes: when the algorithm data to be deployed is less than a preset threshold, obtaining Y target nodes, and sending deployment tasks to the Y target nodes based on the deployment metadata, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system, and Y is a positive integer; when the Y target nodes receive the deployment tasks, sequentially controlling the Y target nodes to obtain algorithm image data based on the deployment tasks; controlling the Y target nodes to start a new version container, and performing algorithm deployment operations in the new version container based on the algorithm image data.
[0067] It should be noted that, Figure 4 This is a schematic diagram of the deployment method of the stock algorithm provided in the embodiments of this application, such as... Figure 4 As shown, if the algorithm deployment task is a deployment of existing algorithms, the deployment operation first compares the data of the algorithm to be deployed with a preset threshold to determine the task execution mode. It should be noted that after determining the deployment task as an existing algorithm, the original algorithm service version needs to be retained to implement a fallback mechanism for the algorithm service version. The current algorithm analysis task is then stopped, and the algorithm analysis tasks issued during the stop phase are recorded.
[0068] Furthermore, the algorithm data to be deployed is compared with a preset threshold. If the algorithm data is less than the preset threshold, multiple filtered target nodes can be obtained. Deployment tasks are sent to these target nodes based on deployment metadata to achieve a single service version update. That is, a single new version service deployment task is created, its deployment configuration file is updated, and the image version label is changed from... Replace with Then, the new image is pulled in serial blocking mode and a new container is started on that node. It should be noted that since the old version still occupies some resources, the availability of computing power on the distributed nodes can be checked at this point, i.e., using a node scoring formula (e.g., calculating the available idle GPU resources). Find nodes that meet the requirements for running the new version, allocate resource pool nodes according to priority, and execute the new version service deployment task. For example, find... The nodes, among which, The amount of voice recognition memory required to start the new version of the algorithm. This represents the total physical video memory of the target node's GPU. The amount of GPU memory continuously used to serve the older version of the algorithm, which is currently in a suspended and reserved state.
[0069] When the target node receives the deployment task, it can be controlled to sequentially obtain algorithm image data based on the deployment task. That is, the target node pulls the corresponding new version algorithm container image file from the image repository according to the image address and version number in the deployment task, which is essentially a physical startup carrying... The algorithm service process of the image avoids network bandwidth congestion and node disk pressure caused by large-scale concurrent downloads, and reduces the risk of pull failure due to network jitter. Then, the target node is controlled to start the new version container, and the algorithm deployment operation is performed in the new version container based on the algorithm image data. That is, the algorithm process is started, the model is loaded, resources are mounted, and it is put into listening state in the new version container. Here, the new version container refers to the container instance created based on the pulled new version algorithm image, which is used to run the new version of the algorithm to be upgraded. At this time, the old version container is still in a suspended or reserved state on the node. That is, the node is in a dual occupation state of old version suspended and new version started.
[0070] This embodiment achieves fine-grained control and stability of the update process by serializing existing updates based on deployment scale thresholds, avoiding resource contention or deployment failures caused by blind concurrency. Thus, it improves the reliability and success rate of small-scale existing algorithm version iterations while ensuring lossless business upgrades.
[0071] Optionally, in the algorithm deployment method provided in this application embodiment, before sending deployment tasks to Y target nodes according to deployment metadata, the method further includes: extracting the description identifier corresponding to the historical algorithm from the algorithm deployment request, and sending a suspension instruction to the Y target nodes according to the description identifier, wherein the suspension instruction refers to an instruction to suspend the destruction operation of the historical version container running the historical algorithm in the Y target nodes.
[0072] Specifically, before sending the deployment task to the target node, such as Figure 4 As shown, the global active state database can be compared to identify instances in the Running state. Then, the task's lifecycle type is marked as TYPE=UPDATE_DEPLOY (existing update deployment), triggering a smooth version iteration (lossless upgrade) state machine. Finally, the current old version algorithm service is locked. The resource descriptor is then used to extract the description identifier corresponding to the historical algorithm from the algorithm deployment request. Based on the description identifier, a suspension command is sent to the target node to suspend the destruction operation of the old version container, maintaining its occupation of host resources and network endpoint survival. This creates a dual-track operating environment where old and new versions coexist on the physical node, providing a basis for triggering subsequent rollback operations. Here, the historical version container refers to the container instance currently running on the node that carries the logic of the old version algorithm; the description identifier corresponding to the historical algorithm refers to the characteristic information carried in the algorithm deployment request that uniquely identifies the old version algorithm service that is currently running and needs to be updated, such as the algorithm unique identifier and the old version number; the suspension command locks the currently running old version container instance, preventing the underlying resource manager from terminating or deleting it, thereby forcibly maintaining the container's survival and resource occupation status on the node.
[0073] It should be noted that after receiving the suspension instruction, the routing weight pointing to the old version algorithm instance can be adjusted to 0, stopping the forwarding of new real-time inference / analysis requests to it, and a dedicated asynchronous buffer queue can be opened in memory or persistent message middleware.
[0074] This embodiment introduces a suspension instruction based on a description identifier, which enables the old version service to remain online and continue processing business or serve as a backup instance for failure rollback during the process of pulling a new image and starting a new version container. This achieves safe coexistence of the old and new versions at the node level, thus laying a key foundation for building a smooth upgrade pipeline that is lossless and highly available.
[0075] Optionally, in the algorithm deployment method provided in this application embodiment, performing the existing algorithm deployment operation based on deployment metadata and algorithm data to be deployed includes: when the algorithm data to be deployed is greater than or equal to a preset threshold, using an orchestration program to simultaneously send deployment tasks to Y target nodes, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system; when the Y target nodes receive the deployment tasks, controlling the Y target nodes to start a new version container, and performing the algorithm deployment operation in the new version container based on the algorithm image data, wherein the algorithm image data is obtained by the Y target nodes based on the deployment tasks.
[0076] Specifically, such as Figure 4As shown, if the data of the algorithm to be deployed is greater than or equal to a preset threshold, batch parallel processing can be performed. This involves retrieving the set of service instances to be updated, creating new version service deployment tasks in batches, selecting the service information to be updated, and modifying the image version and mount configuration information in the metadata in batches, thereby updating multiple service versions. Subsequently, leveraging the concurrency features of the underlying orchestration engine, the orchestrator concurrently sends new version image pull and launch instructions to multiple nodes, i.e., simultaneously sending deployment tasks to the target nodes. The orchestrator is responsible for parsing the deployment tasks and coordinating the execution of corresponding instructions by multiple nodes.
[0077] When the aforementioned target nodes receive the deployment task, they can be controlled to start container instances created based on the pulled new version algorithm image, that is, to start the new version container. Based on the algorithm image data, the algorithm process is started, model dependencies are loaded, resources are mounted and it is put into listening state to realize the algorithm deployment operation. At this time, the old version container is usually in a suspended or reserved state on the node.
[0078] This embodiment solves the problem of low efficiency in large-scale algorithm version iteration in the prior art by parallelizing the existing update. It uses an orchestrator to distribute tasks to the selected target nodes in parallel and drives each node to concurrently execute image pulling and container startup, which significantly improves the throughput of batch updates and effectively shortens the overall cycle of algorithm upgrades in large-scale clusters. At the same time, combined with the previous resource screening, it improves the resource availability and execution efficiency of the upgrade process, and realizes efficient and lossless iteration of large-scale existing algorithms.
[0079] Optionally, in the algorithm deployment method provided in this application embodiment, after performing the existing algorithm deployment operation based on the deployment metadata and the algorithm data to be deployed, the method further includes: obtaining a new version container for performing the existing algorithm deployment operation, sending a verification instruction to the new version container, and receiving a verification status code, wherein the verification status code is generated based on the verification instruction returned by the new version container; if the verification status code indicates that the verification failed, sending a deletion instruction to the new version container, destroying the new version container, and activating the historical version container running the historical algorithm; if the verification status code indicates that the verification passed, detecting the new version container and generating a detection data stream, wherein the detection data stream refers to the container data during the operation of the new version container.
[0080] Specifically, after the deployment operation is completed, it is also possible to determine whether the new version deployment was successful. At this time, after the new version container enters the listening state, the post-verification mechanism in the main process can be called. A verification tensor is sent to the new version service to obtain the return status code and latency data, and the judgment result matrix is output. That is, the new version container that performs the existing algorithm deployment operation is obtained. A verification instruction is sent to the new version container and the verification status code is received. The verification instruction is a test data packet sent by the control plane or scheduler to the new version container to trigger the container to execute a complete algorithm inference or computation task to verify its functional integrity. The verification status code is the response signal returned by the new version container to the sender after executing the verification instruction. This signal contains key indicators such as whether the container started successfully, whether the inference latency met the standard, and whether the accuracy of the output result met expectations. It is used to quantitatively evaluate the availability of the new version.
[0081] If the verification status code indicates that the verification failed, the original old version service can be rolled back and restarted. Based on the algorithm service version fallback mechanism, the original service version state is restored. This means sending a deletion command to the new version container, forcibly stopping and removing the resources occupied by the new version container, destroying the new version container, thoroughly cleaning up the processes, mounted volumes, and temporary files of the new version container, releasing the memory resources it occupies, restoring the traffic rules, reactivating the access endpoints of the old version service that were previously in a suspended or reserved state, re-including them in the traffic routing, restoring their ability to provide algorithm services, and turning them from a standby state to an active working state. In other words, it activates the historical version container running the historical algorithm. It should be noted that after the old version endpoint is restored, algorithm analysis tasks can be started, waking up the asynchronous buffer queue, re-dequeuing the backlog of tasks waiting to be analyzed during the stopped phase according to the first-in-first-out principle, and sending them to the restored old version algorithm service for processing, restoring normal business operation.
[0082] If the verification status code indicates that the verification is successful, the algorithm analysis task can be started and the analysis tasks retained in the stop phase can be reissued to verify that the new version service is running normally. This means that the newly added version container is tested and a test data stream is generated, which means that the route is directed to the network endpoint of the new version service. Then, the asynchronous buffer queue is woken up, and the analysis requests retained in the stop phase are dequeued one by one and sent to the new version algorithm for processing. The processing status of the retained tasks is monitored to confirm that the new service is stable and running normally when taking on real historical loads. The test data stream refers to the real-time running data continuously generated by the newly added version container during the testing process, including but not limited to the container's heartbeat information, standard output logs, resource monitoring indicators, and input and output records when processing actual business tasks.
[0083] It should be noted that after the new version smoothly digests the buffer queue and takes over real-time traffic, the old version service is deleted, completing the version iteration of the existing algorithm service. This means issuing a safe shutdown command for the old version service to the corresponding nodes, and the underlying daemon process reclaims the resources occupied by the old version service, cleans up historical container instances, and completes the transition from a dual-track to a single-track system. Regardless of whether it involves a smooth upgrade through a successful branch or a fallback rollback through a failed branch, the status of the deployment task is ultimately synchronized to the global monitoring center database.
[0084] This embodiment utilizes the verification status code as a key judgment criterion. When verification fails, it automatically executes the destruction of the new container and activates the rollback operation of the old container, achieving lossless business operation. When verification succeeds, it continuously monitors the new version by detecting the data stream, achieving the stability of the new version before taking over traffic. This significantly improves the security and reliability of algorithm version iteration in a distributed environment and ensures the continuous operation of core businesses.
[0085] Optionally, in the algorithm deployment method provided in this application embodiment, updating node resources according to the algorithm deployment result includes: if the algorithm deployment result indicates deployment failure, determining the deployment failure type according to the algorithm deployment result, and repairing the distributed nodes of the business system according to the deployment failure type; if the algorithm deployment result indicates deployment success, cleaning up the resources of the distributed nodes of the business system, and generating a version iteration report.
[0086] Specifically, after the algorithm deployment operation is completed, if the deployment result indicates a deployment failure, the type of deployment failure can be determined based on the deployment result. Then, the distributed nodes of the business system can be repaired according to the deployment failure type. That is, during the container startup and runtime phase, the edge node daemon captures the underlying system call status codes and container engine event streams. When a deployment failure or runtime anomaly is detected, the classification rule engine is triggered, categorizing the captured error characteristics into specific abnormal state categories.
[0087] Figure 5 This is a schematic diagram of a node resource update method provided according to an embodiment of this application, such as... Figure 5As shown, based on the identified specific anomaly type, the process can be redirected to the corresponding self-healing branch to execute differentiated resolution strategies: When the deployment failure type is insufficient resource pool resources, this type manifests as node physical memory overflow, etc. In this case, a self-healing strategy can be executed, i.e., triggering expansion, vertically increasing container quotas, or updating the resource pool; if the current node's resources have reached their limit, the resource pool is changed, and the algorithm task is rescheduled to other idle nodes in the cluster. When the deployment failure type is image adaptation failure, this type manifests as incompatibility of heterogeneous hardware architecture or mismatch of underlying drivers, a self-healing strategy can be executed, feeding back architecture parameters to the control plane, triggering recompilation to generate a new image adapted to the node's hardware architecture, and retrying the deployment. When the deployment failure type is service startup failure, this type manifests as missing configuration or port conflicts causing the process to fail to start, a self-healing strategy can be executed, attempting to perform repair or version rollback. If the retry fails, a version rollback is immediately executed (routing back to the old version), and an alarm is generated requesting manual intervention. When the deployment failure type is algorithm execution error, this type manifests as container crash during operation or model inference failure. A self-healing strategy can be implemented, immediately performing a version rollback to prevent business damage, while freezing the abnormal instance and retaining on-site logs, and having staff analyze the underlying algorithm logic problems.
[0088] It should be noted that after the corresponding self-healing strategy is executed, the verification function is called to evaluate the current service status. This is done by sending a health probe for verification. If the response is normal, the verification is successful, meaning the algorithm deployment result indicates successful deployment, and the system enters the normal operation phase. At this point, the four-dimensional monitoring matrix is activated. ,in, Represents service container status monitoring. The representative issued the configuration status monitoring. This represents the heartbeat reporting status monitoring. This represents the monitoring of task deployment status. Through a routine monitoring loop, the operational health of each algorithm service on distributed nodes is continuously ensured. Resource cleanup is performed on the distributed nodes of the business system, and version iteration reports are generated. Resource cleanup refers to releasing and reclaiming the computing and storage resources occupied by the old version's containers after the new version successfully takes over the business in the case of upgrading existing algorithms; or updating the resource pool status and marking allocated resources in the case of new deployments. The version iteration report is a structured document recording the audit information of the entire algorithm deployment process, including timestamps, time consumption, final version form, health check data, and any anomaly handling records, used for subsequent traceability analysis and operational auditing. If the response is abnormal, verification fails, requiring an alarm to be issued for manual intervention. Operations personnel optimize the deployment strategy based on the retained logs and re-initiate the deployment command.
[0089] This embodiment distinguishes between successful and failed deployment scenarios, performing targeted resource updates and closed-loop processing respectively to ensure high availability of services, improve resource utilization and the standardization of operation and maintenance management, realize full-link control from anomaly recovery to resource optimization, and enhance the stability and maintainability of the distributed cluster in long-term operation.
[0090] This application also provides an algorithm deployment system. Figure 6 This is a schematic diagram of a deployment system for a newly added algorithm provided in an embodiment of this application, such as... Figure 6 As shown, the system includes a central cluster server and distributed node cluster servers (such as Node A cluster server and Node N cluster server). The central cluster server is deployed at the center and serves as the global hub, responsible for managing the overall algorithm infrastructure information and the full algorithm image library. The central node is responsible for pushing algorithms from multiple containers to various distributed nodes and centrally receiving service deployment reports from each node for global monitoring and backup. The central cluster server is connected to a central GPU resource pool, which can include multiple GPU nodes (i.e., GPUnode1). Distributed nodes are deployed on the distributed cluster server. Each distributed node can manage and deploy local algorithm services according to the actual business needs of different regions. Each distributed node cluster server is connected to a node GPU resource pool, which can include multiple GPU nodes (i.e., GPUnode1). It should be noted that the central node does not directly interfere with the underlying physical processes, but completes the on-demand push and caching of algorithm images through the downlink. After each distributed local node initiates algorithm deployment and completes service startup locally, it reports the deployment results and state machine data to the center through the uplink, forming a two-way data flow closed loop of central image management and monitoring, and local on-demand deployment management.
[0091] Figure 7 This is a schematic diagram of an optional algorithm deployment method provided according to an embodiment of this application, such as... Figure 7 As shown, the method includes:
[0092] Step 1: Accept Algorithm Service Deployment Tasks: Receive algorithm deployment requests from the business side and trigger the corresponding algorithm deployment task. The deployment request is parsed into a data packet containing task metadata, extracting the business requirement type, algorithm unique identifier, image version number, target deployment node topology set, and required hardware and software configuration parameters. The task data packet is then pushed into a persistent message queue, either locally on the node or centrally managed, to await allocation.
[0093] Step 2: Determine the overall deployment strategy: Based on the explicitly provided requirement type from the business side, execute the rule routing of the deployment strategy. The determination logic is as follows: If the business side requirement is the deployment of a new algorithm service, i.e., it is determined to be an initialization deployment scenario, it is directly routed to the new algorithm service deployment task strategy branch (i.e., the new algorithm deployment task); if the business side requirement is an iteration of an existing algorithm service version, i.e., it is determined to be a version update scenario, it is routed to the existing algorithm service deployment task strategy branch (i.e., the existing algorithm deployment task).
[0094] Step 3: Execute the deployment strategy sub-process for new or existing algorithms: Based on the above judgment results, dispatch the task execution context to the corresponding sub-process engine: For new algorithm deployment tasks, initialize a brand new container instance and allocate basic resources. For existing algorithm deployment tasks, start the anti-interruption mechanism to handle the smooth replacement of old and new versions and the migration of task states.
[0095] Step 4: Implement a service deployment success guarantee mechanism: During the lifecycle of physically delivering images to edge nodes and launching containers in the above branch execution, a three-stage verification guarantee is performed: Pre-check: Before issuing deployment instructions, verify the node resource availability, image driver compatibility, and the dependency integrity of the underlying libraries; Mid-monitoring: During the container instance launch process, capture real-time logs from standard output through a daemon process and extract changes in the service startup state machine of the underlying engine; Post-verification: After the service is launched and in a listening state, perform availability verification. The system sends standard test tensor data to the node algorithm, measures the latency response time from sending a request to receiving a result, and records the algorithm execution success rate of the test set. The verification results and underlying running status of this stage will be serialized and reported in real time to the deployment status receiving service module of the central node.
[0096] Step 5: Determine if service deployment was successful: Based on the monitoring and verification data above, construct a deployment status determination function. For example, setting the maximum tolerable response latency. and minimum success rate threshold Only when And if the service has no Fatal-level error logs, then determine (Deployment successful) Perform routine monitoring; otherwise, determine... (Deployment Failure). Upon successful deployment, routine monitoring is executed. The central node's global monitoring center binds and registers the corresponding node with the algorithm instance. The central node initiates multi-dimensional status collection and global monitoring: this primarily includes extracting service container status (monitoring whether the algorithm container itself is continuously running normally), configuration distribution status (verifying whether the business configuration items distributed by the system are successfully applied and effective on the node side), heartbeat reporting status (real-time monitoring of the network connection and survival status between edge nodes and the system), and task distribution status monitoring (monitoring whether actual business task data can be smoothly distributed to the algorithm instance and processed normally). When deployment fails, the node's algorithm access to the business layer routing is intercepted and blocked. Failure status codes, exception stack logs, and resource snapshots collected during the deployment lifecycle are obtained. The specific exception type is identified based on the fault context parameters, triggering autonomous closed-loop processing and repair for different failure root causes.
[0097] Step 6: Algorithm service deployment completed: After the algorithm service is running smoothly under normal monitoring, or after successful remediation and secondary verification, the central state machine updates the global lifecycle state of the deployment task to Completed, releases the exclusive lock and intermediate cache queue occupied during execution, and completes the full-link deployment process of the distributed node algorithm.
[0098] This embodiment extracts deployment metadata and algorithm data to be deployed from the algorithm deployment request, executes different types of deployment tasks based on the algorithm deployment task, deployment metadata, and algorithm data to be deployed, and then updates node resources based on the algorithm deployment results, thereby achieving the technical effect of improving the deployment efficiency when deploying algorithms on distributed nodes.
[0099] It should be noted that the steps shown in the flowchart in 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 a different order than that shown here.
[0100] Example 2
[0101] This application also provides an algorithm deployment apparatus. It should be noted that the algorithm deployment apparatus of this application can be used to execute the algorithm deployment method provided in this application. The algorithm deployment apparatus provided in this application will be described below.
[0102] According to an embodiment of this application, an apparatus for implementing the deployment method of the above-described algorithm is also provided. Figure 8 This is a schematic diagram of a deployment apparatus for the algorithm provided in the embodiments of this application, such as... Figure 8 As shown, the device includes: a receiving unit 80, a first extraction unit 81, an execution unit 82, and a first acquisition unit 83.
[0103] The receiving unit 80 is used to receive algorithm deployment requests and determine algorithm deployment tasks based on the algorithm deployment requests. The algorithm deployment tasks include new algorithm deployment tasks and existing algorithm deployment tasks. New algorithm deployment tasks refer to the task of deploying new algorithms to the distributed nodes of the business system, while existing algorithm deployment tasks refer to the task of updating the version of historical algorithms of the business system.
[0104] The first extraction unit 81 is used to extract deployment metadata and algorithm data to be deployed from the algorithm deployment request. When the algorithm deployment task is a new algorithm deployment task, it performs a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed.
[0105] Execution unit 82 is used to perform existing algorithm deployment operations based on deployment metadata and data of the algorithm to be deployed when the algorithm deployment task is an existing algorithm deployment task.
[0106] The first acquisition unit 83 is used to acquire the algorithm deployment results and update node resources based on the algorithm deployment results.
[0107] The algorithm deployment apparatus provided in this application embodiment receives an algorithm deployment request through a receiving unit 80 and determines an algorithm deployment task based on the request. The algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. A new algorithm deployment task refers to the task of deploying a new algorithm to a distributed node of a business system, while an existing algorithm deployment task refers to the task of updating a historical algorithm version for the business system. A first extraction unit 81 extracts deployment metadata and algorithm data to be deployed from the algorithm deployment request. When the algorithm deployment task is a new algorithm deployment task, it performs a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed. An execution unit 82 performs an existing algorithm deployment operation based on the deployment metadata and algorithm data to be deployed when the algorithm deployment task is an existing algorithm deployment task. A first acquisition unit 83 acquires the algorithm deployment result and updates node resources based on the result. This solves the technical problem of low deployment efficiency when deploying algorithms on distributed nodes in related technologies. By extracting deployment metadata and algorithm data to be deployed from the algorithm deployment request, executing different types of deployment tasks based on the algorithm deployment task, deployment metadata, and algorithm data to be deployed, and then updating node resources based on the deployment result, the technical effect of improving the deployment efficiency of algorithms on distributed nodes is achieved.
[0108] Optionally, in the algorithm deployment apparatus provided in this application embodiment, the first extraction unit 81 includes: a first determining module, configured to determine a task execution mode based on the algorithm data to be deployed, wherein the task execution mode includes a serial execution mode and a parallel execution mode; a second determining module, configured to determine M candidate distributed nodes in the business system based on deployment metadata, and obtain node resource information of the M candidate distributed nodes to obtain M sets of node resource information, wherein M is a positive integer; a first obtaining module, configured to obtain weighting coefficients, and calculate the computing power health score of each candidate distributed node based on the weighting coefficients and each set of node resource information to obtain M computing power health scores; a filtering module, configured to filter N target nodes from the M candidate distributed nodes based on the M computing power health scores, wherein the N target nodes refer to distributed nodes used to execute the algorithm deployment task, N is less than or equal to M, and N is a positive integer; and a first control module, configured to control the N target nodes to obtain algorithm image data according to the task execution mode, and control the N target nodes to execute algorithm deployment operations based on the algorithm image data.
[0109] Optionally, in the algorithm deployment apparatus provided in this application embodiment, the first extraction unit 81 includes: a third determining module, used to determine the task execution mode as a serial execution mode when the data of the algorithm to be deployed is less than a preset threshold, wherein the serial execution mode refers to sending deployment instructions to N target nodes in sequence; and a fourth determining module, used to determine the task execution mode as a parallel execution mode when the data of the algorithm to be deployed is greater than or equal to the preset threshold, wherein the parallel execution mode refers to sending deployment instructions to N target nodes simultaneously.
[0110] Optionally, in the algorithm deployment apparatus provided in this application embodiment, the execution unit 82 includes: a first acquisition module, configured to acquire Y target nodes when the algorithm data to be deployed is less than a preset threshold, and send deployment tasks to the Y target nodes according to deployment metadata, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system, and Y is a positive integer; a second control module, configured to sequentially control the Y target nodes to acquire algorithm image data based on the deployment tasks when the Y target nodes receive the deployment tasks; and a third control module, configured to control the Y target nodes to start a new version container and perform algorithm deployment operations in the new version container based on the algorithm image data.
[0111] Optionally, in the algorithm deployment apparatus provided in the embodiments of this application, the apparatus further includes: a second extraction unit, configured to extract the description identifier corresponding to the historical algorithm from the algorithm deployment request before sending the deployment task to Y target nodes according to the deployment metadata, and send a suspension instruction to the Y target nodes according to the description identifier, wherein the suspension instruction refers to an instruction to suspend the destruction operation of the historical version container running the historical algorithm in the Y target nodes.
[0112] Optionally, in the algorithm deployment apparatus provided in this application embodiment, the execution unit 82 includes: a sending module, used to simultaneously send deployment tasks to Y target nodes using an orchestration program when the algorithm data to be deployed is greater than or equal to a preset threshold, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system; and a fourth control module, used to control the Y target nodes to start a new version container when the Y target nodes receive the deployment tasks, and to perform algorithm deployment operations in the new version container based on the algorithm image data, wherein the algorithm image data is obtained by the Y target nodes based on the deployment tasks.
[0113] Optionally, in the algorithm deployment apparatus provided in this application embodiment, the apparatus further includes: a second acquisition unit, configured to acquire a new version container that performs the existing algorithm deployment operation after performing the existing algorithm deployment operation based on deployment metadata and algorithm data to be deployed, send a verification instruction to the new version container, and receive a verification status code, wherein the verification status code is generated based on the verification instruction returned by the new version container; a sending unit, configured to send a deletion instruction to the new version container, destroy the new version container, and activate the historical version container running the historical algorithm when the verification status code indicates that the verification has failed; and a detection unit, configured to detect the new version container and generate a detection data stream when the verification status code indicates that the verification has passed, wherein the detection data stream refers to the container data during the operation of the new version container.
[0114] Optionally, in the algorithm deployment apparatus provided in the embodiments of this application, the first acquisition unit 83 includes: a fifth determination module, used to determine the deployment failure type according to the algorithm deployment result when the algorithm deployment result indicates deployment failure, and repair the distributed nodes of the business system according to the deployment failure type; and a cleanup module, used to clean up the resources of the distributed nodes of the business system and generate a version iteration report when the algorithm deployment result indicates deployment success.
[0115] It should be noted that the receiving unit 80, the first extraction unit 81, the execution unit 82, and the first acquisition unit 83 mentioned above correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the above units and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.
[0116] Example 3
[0117] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced with a mobile terminal or an electronic device, etc.
[0118] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0119] In this embodiment, the computer terminal described above can execute the program code for the following steps in the algorithm deployment method: receiving an algorithm deployment request and determining an algorithm deployment task based on the algorithm deployment request, wherein the algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. A new algorithm deployment task refers to a task that deploys a new algorithm to the distributed nodes of the business system, and an existing algorithm deployment task refers to a task that updates the version of a historical algorithm of the business system; extracting deployment metadata and algorithm data to be deployed from the algorithm deployment request; if the algorithm deployment task is a new algorithm deployment task, performing a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; if the algorithm deployment task is an existing algorithm deployment task, performing an existing algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; obtaining the algorithm deployment result and updating the node resources based on the algorithm deployment result.
[0120] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the algorithm deployment method: determining the task execution mode based on the algorithm data to be deployed, wherein the task execution mode includes a serial execution mode and a parallel execution mode; determining M candidate distributed nodes in the business system based on deployment metadata, and obtaining the node resource information of the M candidate distributed nodes to obtain M sets of node resource information, wherein M is a positive integer; obtaining weighting coefficients, and calculating the computing power health score of each candidate distributed node based on the weighting coefficients and each set of node resource information to obtain M computing power health scores; selecting N target nodes from the M candidate distributed nodes based on the M computing power health scores, wherein the N target nodes refer to the distributed nodes used to execute the algorithm deployment task, N is less than or equal to M, and N is a positive integer; controlling the N target nodes to obtain algorithm image data according to the task execution mode, and controlling the N target nodes to execute algorithm deployment operations based on the algorithm image data.
[0121] Optionally, the computer terminal described above can execute the program code for the following steps in the algorithm deployment method: when the data of the algorithm to be deployed is less than a preset threshold, the task execution mode is determined to be a serial execution mode, wherein the serial execution mode refers to sending deployment instructions to N target nodes in sequence; when the data of the algorithm to be deployed is greater than or equal to the preset threshold, the task execution mode is determined to be a parallel execution mode, wherein the parallel execution mode refers to sending deployment instructions to N target nodes simultaneously.
[0122] Optionally, the computer terminal described above can execute the following steps in the algorithm deployment method: when the algorithm data to be deployed is less than a preset threshold, obtain Y target nodes, and send deployment tasks to the Y target nodes according to the deployment metadata, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system, and Y is a positive integer; when the Y target nodes receive the deployment tasks, control the Y target nodes to obtain algorithm image data based on the deployment tasks in sequence; control the Y target nodes to start the new version container, and perform algorithm deployment operations in the new version container based on the algorithm image data.
[0123] Optionally, the computer terminal described above can execute the program code for the following steps in the algorithm deployment method: extracting the description identifier corresponding to the historical algorithm from the algorithm deployment request, and sending a suspension instruction to Y target nodes according to the description identifier, wherein the suspension instruction refers to the instruction to suspend the destruction operation of the historical version container running the historical algorithm in the Y target nodes.
[0124] Optionally, the computer terminal described above can execute the program code for the following steps in the algorithm deployment method: when the algorithm data to be deployed is greater than or equal to a preset threshold, a deployment task is simultaneously sent to Y target nodes using an orchestration program, wherein the Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system; when the Y target nodes receive the deployment task, the Y target nodes are controlled to start a new version container, and the algorithm deployment operation is performed in the new version container based on the algorithm image data, wherein the algorithm image data is obtained by the Y target nodes based on the deployment task.
[0125] Optionally, the aforementioned computer terminal may execute the program code for the following steps in the algorithm deployment method: obtaining a new version container for performing the existing algorithm deployment operation, sending a verification command to the new version container, and receiving a verification status code, wherein the verification status code is generated based on the verification command and returned by the new version container; if the verification status code indicates that the verification failed, sending a deletion command to the new version container, destroying the new version container, and activating the historical version container running the historical algorithm; if the verification status code indicates that the verification passed, detecting the new version container and generating a detection data stream, wherein the detection data stream refers to the container data during the runtime of the new version container.
[0126] Optionally, the computer terminal described above can execute program code for the following steps in the algorithm deployment method: updating node resources based on the algorithm deployment result includes: if the algorithm deployment result indicates deployment failure, determining the deployment failure type based on the algorithm deployment result, and repairing the distributed nodes of the business system based on the deployment failure type; if the algorithm deployment result indicates deployment success, cleaning up the resources of the distributed nodes of the business system, and generating a version iteration report.
[0127] Optionally, Figure 9 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 9 As shown, the electronic device may include: one or more ( Figure 9 (Only one is shown) processor 902, memory 904, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0128] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the algorithm deployment method and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the aforementioned algorithm deployment method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0129] The processor can access the information and application programs stored in the memory via the transmission device to execute the steps described above in the deployment method of the algorithm.
[0130] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 9 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 9 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 9 The different configurations shown.
[0131] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0132] Example 4
[0133] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the deployment method of the algorithm provided in Embodiment 1.
[0134] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0135] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: receiving an algorithm deployment request and determining an algorithm deployment task based on the algorithm deployment request, wherein the algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. A new algorithm deployment task refers to a task that deploys a new algorithm to the distributed nodes of the business system, and an existing algorithm deployment task refers to a task that updates the version of a historical algorithm of the business system; extracting deployment metadata and algorithm data to be deployed from the algorithm deployment request; if the algorithm deployment task is a new algorithm deployment task, performing a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; if the algorithm deployment task is an existing algorithm deployment task, performing an existing algorithm deployment operation based on the deployment metadata and algorithm data to be deployed; obtaining the algorithm deployment result and updating the node resources based on the algorithm deployment result.
[0136] This application also provides a computer program product, which, when executed on a data processing device, is a program suitable for performing the deployment method steps of an algorithm.
[0137] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0138] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units 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 of units or modules may be electrical or other forms.
[0140] The units described 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.
[0141] 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.
[0142] 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 several 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 described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0143] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for deploying an algorithm, characterized in that, include: Receive an algorithm deployment request and determine an algorithm deployment task based on the algorithm deployment request. The algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. The new algorithm deployment task is a task to deploy a new algorithm to the distributed nodes of the business system. The existing algorithm deployment task is a task to update the version of the historical algorithm of the business system. Extract deployment metadata and algorithm data to be deployed from the algorithm deployment request. If the algorithm deployment task is the new algorithm deployment task, perform the new algorithm deployment operation according to the deployment metadata and algorithm data to be deployed. When the algorithm deployment task is the existing algorithm deployment task, the existing algorithm deployment operation is performed according to the deployment metadata and the algorithm data to be deployed; Obtain the algorithm deployment results and update the node resources based on the algorithm deployment results.
2. The method according to claim 1, characterized in that, The process of deploying a new algorithm based on the deployment metadata and the algorithm data to be deployed includes: The task execution mode is determined based on the algorithm data to be deployed, wherein the task execution mode includes a serial execution mode and a parallel execution mode; Based on the deployment metadata, M candidate distributed nodes in the business system are determined, and the node resource information of the M candidate distributed nodes is obtained to obtain M sets of node resource information, where M is a positive integer; Obtain weighting coefficients, and calculate the computing power health score of each candidate distributed node based on the weighting coefficients and the resource information of each group of nodes, to obtain M computing power health scores; Based on the M computing power health scores, N target nodes are selected from the M candidate distributed nodes, where the N target nodes refer to distributed nodes used to execute the algorithm deployment task, N is less than or equal to M, and N is a positive integer; According to the task execution mode, control the N target nodes to acquire algorithm image data, and control the N target nodes to perform algorithm deployment operations based on the algorithm image data.
3. The method according to claim 2, characterized in that, Determining the task execution mode based on the algorithm data to be deployed includes: If the data of the algorithm to be deployed is less than a preset threshold, the task execution mode is determined to be the serial execution mode, wherein the serial execution mode refers to sending deployment instructions to the N target nodes in sequence; If the data of the algorithm to be deployed is greater than or equal to the preset threshold, the task execution mode is determined to be the parallel execution mode, wherein the parallel execution mode refers to sending the deployment instruction to the N target nodes simultaneously.
4. The method according to claim 1, characterized in that, The process of deploying existing algorithms based on the deployment metadata and the algorithm data to be deployed includes: If the data of the algorithm to be deployed is less than a preset threshold, Y target nodes are obtained, and deployment tasks are sent to the Y target nodes according to the deployment metadata. The Y target nodes are selected based on the node resource information of the candidate distributed nodes in the business system, and Y is a positive integer. When the Y target nodes receive the deployment task, the Y target nodes are sequentially controlled to obtain algorithm image data based on the deployment task; Control the Y target nodes to start the new version container, and perform algorithm deployment operations in the new version container based on the algorithm image data.
5. The method according to claim 4, characterized in that, Before sending deployment tasks to the Y target nodes based on the deployment metadata, the method further includes: Extract the description identifier corresponding to the historical algorithm from the algorithm deployment request, and send a suspension instruction to the Y target nodes according to the description identifier. The suspension instruction refers to the instruction to suspend the destruction operation of the historical version container running the historical algorithm in the Y target nodes.
6. The method according to claim 1, characterized in that, The process of deploying existing algorithms based on the deployment metadata and the algorithm data to be deployed includes: When the data of the algorithm to be deployed is greater than or equal to a preset threshold, the deployment task is sent simultaneously to Y target nodes using an orchestration program. The Y target nodes are selected based on the node resource information of candidate distributed nodes in the business system. When the Y target nodes receive the deployment task, the system controls the Y target nodes to start a new version container and perform an algorithm deployment operation in the new version container based on the algorithm image data. The algorithm image data is obtained by the Y target nodes based on the deployment task.
7. The method according to claim 1, characterized in that, After performing the deployment of existing algorithms based on the deployment metadata and the algorithm data to be deployed, the method further includes: Obtain a new version container for executing the deployment operation of the existing algorithm, send a verification instruction to the new version container, and receive a verification status code, wherein the verification status code is generated based on the verification instruction and returned by the new version container; If the verification status code indicates that the verification failed, a deletion command is sent to the new version container to destroy the new version container and activate the historical version container running the historical algorithm. If the verification status code indicates that the verification is successful, the newly added version container is detected and a detection data stream is generated, wherein the detection data stream refers to the container data during the runtime of the newly added version container.
8. The method according to claim 1, characterized in that, Updating node resources based on the deployment results of the algorithm includes: If the algorithm deployment result indicates deployment failure, the deployment failure type is determined based on the algorithm deployment result, and the distributed nodes of the business system are repaired according to the deployment failure type; If the algorithm deployment result indicates successful deployment, perform resource cleanup on the distributed nodes of the business system and generate a version iteration report.
9. An algorithm deployment apparatus, characterized in that, include: A receiving unit is configured to receive an algorithm deployment request and determine an algorithm deployment task based on the algorithm deployment request. The algorithm deployment task includes a new algorithm deployment task and an existing algorithm deployment task. The new algorithm deployment task refers to the task of deploying a new algorithm to the distributed nodes of the business system, and the existing algorithm deployment task refers to the task of updating the version of the historical algorithm of the business system. The first extraction unit is used to extract deployment metadata and algorithm data to be deployed from the algorithm deployment request, and when the algorithm deployment task is the new algorithm deployment task, to perform a new algorithm deployment operation based on the deployment metadata and algorithm data to be deployed. An execution unit is configured to perform an existing algorithm deployment operation based on the deployment metadata and the algorithm data to be deployed, when the algorithm deployment task is the existing algorithm deployment task. The first acquisition unit is used to acquire the algorithm deployment result and update the node resources according to the algorithm deployment result.
10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, executes a deployment method of the algorithm according to any one of claims 1 to 8.
11. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the deployment method of the algorithm according to any one of claims 1 to 8.