Method and device for starting algorithm software, storage medium, and electronic device

By dynamically loading heterogeneous hardware coupling models and software tools, containerized deployment and hardware decoupling of intelligent algorithm software are realized, which solves the complexity problem of the development and deployment of intelligent algorithm software for multiple heterogeneous hardware in the existing technology, and improves the efficiency Development and deployment efficiency improves hardware versatility and resource scheduling efficiency.

CN113721944BActive Publication Date: 2024-09-17ZHEJIANG HUAQI INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111040582.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-06
Publication Date
2024-09-17
Estimated Expiration
2041-09-06

AI Technical Summary

Technical Problem

In the existing technology, intelligent algorithm software requires the development of different algorithm codes for different heterogeneous computing hardware, which increases the complexity of development and deployment, and cannot achieve unified deployment and scheduling, which limits the flexibility of algorithm application and resource scheduling efficiency.

Method used

Obtain environment configuration information through the proxy service of the basic image, dynamically load algorithm models and software tool development kits for heterogeneous hardware coupling, realize containerized deployment and hardware decoupling of algorithm software, use unified interfaces to encapsulate heterogeneous software tool development kits, and support multiple Intelligent algorithm software development and deployment for heterogeneous platforms.

Benefits of technology

It greatly improves the efficiency of development, testing, release, deployment and operation and maintenance of intelligent algorithm software, reduces development and maintenance costs, and achieves the versatility and resource scheduling balance of heterogeneous hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113721944B
    Figure CN113721944B
Patent Text Reader

Abstract

The present invention discloses a method and device for starting algorithm software, a storage medium, and an electronic device, wherein the method includes: obtaining the environment configuration information of the basic image through the proxy service of the basic image, wherein the environment configuration information includes at least one of the following: the address of the algorithm warehouse, the type of algorithm software, the type of heterogeneous hardware, and the type of heterogeneous driver; determining the algorithm model, the heterogeneous software tool development kit, and the algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; loading the algorithm model, the heterogeneous software tool development kit, and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package. The above scheme solves the problem in the related art that if the algorithm software of the same algorithm business needs to be deployed and use a variety of different heterogeneous computing hardware, it is necessary to develop and publish multiple different image packages, and they need to be deployed and scheduled separately and independently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a method and device for starting algorithm software, a storage medium, and an electronic device. Background Art

[0002] In the field of AI intelligent computing, heterogeneous computing platforms have taken advantage of the computing characteristics of different acceleration hardware. With the advancement of chip localization, the series and types of heterogeneous computing chips have become more diversified. At present, in scenarios such as public cloud, private cloud, hybrid cloud and even edge cloud of operators, container cloud has become a standardized general infrastructure under the cloud native system. The main control CPU of the cloud platform is generally of the same architecture, such as x86 or arm64, so the algorithm software can be compiled once and run on all physical nodes. Container cloud platforms other than the main control CPU (k8s, etc.) have gradually begun to support a variety of heterogeneous computing hardware, such as various NPU / general GPU / FPGA, etc., and hope to build a general computing power resource pool on this basis. The general computing power pool generally meets the following two conditions:

[0003] (1) On-demand allocation: allows the allocation of computing power resources less than one computing card or greater than the maximum number of computing cards in the actual physical node to the algorithm software program;

[0004] (2) Decoupling of software and hardware: The development, deployment, and scheduling of intelligent algorithm software do not rely on specific computing hardware, and any computing hardware can be used on the physical nodes of the cloud platform.

[0005] For condition (1), it is generally necessary to perform various virtualization and remote call management on the underlying hardware in the container cloud platform infrastructure. There are many different solutions for this. For condition (2), the current computing platform of cloud vendors' container clouds only focuses on the management and scheduling of heterogeneous computing resources, and does not provide a true heterogeneous computing software and hardware decoupling solution. Therefore, there are the following problems, such as Figure 3 As shown:

[0006] (1) Intelligent algorithm software requires the development of different algorithm codes for different heterogeneous computing hardware, which increases the workload of heterogeneous deployment and development. At the same time, there are many types of heterogeneous hardware such as GPU / NPU / FPGA, and there are also problems such as various version matching, which leads to high development and maintenance costs;

[0007] (2) When deploying intelligent algorithm software, it is not compatible with different heterogeneous computing hardware at the same time. It needs to be bound to specific computing nodes, and the container cloud platform (K8s) cannot perform unified deployment scheduling. In other words, the same intelligent algorithm software needs to have many image versions to deploy, which is almost impossible to manage, or an algorithm software image can only use one type of heterogeneous hardware, which is not convenient for global elastic scaling and expansion, and also limits the flexibility of algorithm application. In private cloud scenarios, it is difficult to have a reasonable ratio of multiple heterogeneous acceleration hardware, which may cause scheduling bottlenecks.

[0008] In the existing technical solutions, on the container cloud platform, for the same algorithm business, if the algorithm software needs to be deployed using a variety of different heterogeneous computing hardware, it is necessary to develop and release multiple different image packages, and they need to be deployed and scheduled separately. This method greatly increases the workload and complexity of development testing, deployment operation and maintenance, and scheduling. In many cases, models converted by different versions of model tools on the same heterogeneous computing hardware need to be used in conjunction with heterogeneous software SDKs and heterogeneous hardware drivers, resulting in the need to develop and release different image packages for algorithm software on the container cloud platform using the same heterogeneous computing hardware, and unified resource scheduling cannot be performed.

[0009] Regarding the related technologies, for the same algorithm business, if the algorithm software needs to be deployed using a variety of different heterogeneous computing hardware, multiple different image packages need to be developed and released, and they need to be deployed and scheduled separately and independently. No effective solution has yet been proposed. Summary of the invention

[0010] The embodiments of the present invention provide a method and device for starting an algorithm software, a storage medium, and an electronic device, so as to at least solve the problem in the related art that, for the same algorithm business, if the algorithm software needs to be deployed using a variety of different heterogeneous computing hardware, it is necessary to develop and release a plurality of different image packages, and they need to be deployed and scheduled separately and independently.

[0011] According to one embodiment of the present invention, a method for starting an algorithm software is provided, comprising: obtaining environment configuration information of a basic image through a proxy service of the basic image, wherein the environment configuration information comprises at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous driver type; determining an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in an algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; and loading the algorithm model, the heterogeneous software tool development kit, and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package.

[0012] In an exemplary embodiment, an algorithm model, a heterogeneous software tool development kit and an algorithm software package are obtained in a corresponding algorithm warehouse according to the environment configuration information, including: determining the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm type.

[0013] In an exemplary embodiment, before obtaining the environmental configuration information of the base image through the proxy service of the base image, the method also includes: scheduling the base image to the physical node corresponding to the algorithm warehouse address according to the resource configuration information of the base image, wherein the base image includes: a proxy service, and the resource configuration information includes at least one of the following: algorithm software type, resource limitation, number of instances; starting the proxy service of the base image.

[0014] In an exemplary embodiment, a heterogeneous software tool development kit is determined in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information, including: encapsulating the interface of the heterogeneous software tool development kit and determining the interface corresponding to the heterogeneous software tool development kit; and obtaining the heterogeneous software tool development kit in the algorithm warehouse through the interface.

[0015] In an exemplary embodiment, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the base image includes: determining whether the proxy service obtains the first location path of the algorithm model, the second location path of the heterogeneous software tool development kit and the third location path of the algorithm software package; when the proxy service obtains the first location path, the second location path and the third location path, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the base image according to the first location path, the second location path and the third location path.

[0016] In an exemplary embodiment, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic image to start the algorithm software corresponding to the algorithm software package, including: determining whether the algorithm model and the heterogeneous software tool development kit are complete, wherein the integrity is used to indicate whether the algorithm model and the heterogeneous software tool development kit are missing some data; if the algorithm model and the heterogeneous software tool development kit are complete, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic model, and the algorithm software corresponding to the algorithm software package is started.

[0017] According to another embodiment of the present invention, there is also provided a device for starting an algorithm software, comprising: an acquisition module, used to acquire environment configuration information of a basic image through a proxy service of the basic image, wherein the environment configuration information comprises at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type and a heterogeneous driver type; a determination module, used to determine an algorithm model, a heterogeneous software tool development kit and an algorithm software package in an algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; and a startup module, used to load the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package.

[0018] In an exemplary embodiment, the determination module is also used to determine the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm type.

[0019] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0020] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0021] Through the present invention, a method for starting algorithm software is provided, comprising: obtaining the environment configuration information of the basic image through the proxy service of the basic image, wherein the environment configuration information includes at least one of the following: the address of the algorithm warehouse, the type of algorithm software, the type of heterogeneous hardware and the type of heterogeneous driver; determining the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package. The above scheme solves the problems in the related art that if the algorithm software of the same algorithm business needs to be deployed and use a variety of different heterogeneous computing hardware, it is necessary to develop and release a plurality of different image packages, and it is necessary to deploy and schedule them separately and independently. Then, in the deployment and scheduling stage, the algorithm warehouse is used to cooperate, and the heterogeneous models and heterogeneous software tool development kits coupled with heterogeneous hardware are dynamically loaded, so that the containerized deployment of the algorithm software is decoupled from the heterogeneous computing hardware, greatly improving the efficiency of development, testing, release, deployment and maintenance of intelligent algorithm software supporting multiple heterogeneous platforms, and fundamentally improving the versatility of the underlying heterogeneous hardware. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0023] Figure 1 It is a hardware structure block diagram of a heterogeneous computing server of a method for starting an algorithm software according to an embodiment of the present invention;

[0024] Figure 2 is a flow chart of a method for starting algorithm software according to an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a method for starting algorithm software according to the prior art;

[0026] Figure 4 A schematic diagram of the development and release process of a method for starting algorithm software according to an optional embodiment of the present invention;

[0027] Figure 5 A structural diagram of a deployment scheduling system for a method for starting algorithm software according to an optional embodiment of the present invention;

[0028] Figure 6 A schematic diagram of a deployment scheduling process of a startup method of an algorithm software according to an optional embodiment of the present invention;

[0029] Figure 7 A schematic diagram of a method for starting algorithm software according to an optional embodiment of the present invention;

[0030] Figure 8 It is a structural block diagram of a device for starting algorithm software according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0032] It should be noted that the terms "historical", "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0033] The method embodiments provided in the embodiments of the present application can be executed in a heterogeneous computing server or a similar computing device. Taking running on a heterogeneous computing server as an example, Figure 1 FIG. 1 is a hardware structure diagram of a heterogeneous computing server of a method for starting an algorithm software according to an embodiment of the present invention. Figure 1 As shown, the heterogeneous computing server may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU) and a memory 104 for storing data. The processor is composed of a general-purpose processor CPU and a heterogeneous computing coprocessor, wherein the heterogeneous computing coprocessor includes: embedded neural network processor NPU, programmable logic device FPGA, graphics processor GPU and other types of processors. In an exemplary embodiment, the above-mentioned heterogeneous computing server may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by ordinary technicians in this field that Figure 1 The structure shown is only for illustration and does not limit the structure of the above heterogeneous computing server. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.

[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the startup method of the algorithm software of the heterogeneous computing server in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a 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 a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the heterogeneous computing server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a heterogeneous computing server. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] In this embodiment, a method for starting algorithm software is provided, which is applied to the above-mentioned heterogeneous computing server. Figure 2 : is a flowchart of a method for starting algorithm software according to an embodiment of the present invention, the process includes the following steps:

[0037] Step S202, obtaining environment configuration information of the base image through the proxy service of the base image, wherein the environment configuration information includes at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous drive type;

[0038] Step S204, determining an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information;

[0039] Step S206, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package into the basic image to start the algorithm software corresponding to the algorithm software package.

[0040] Through the above steps, the environment configuration information of the basic image is obtained through the proxy service of the basic image, wherein the environment configuration information includes at least one of the following: algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type; according to the environment configuration information, the algorithm model, heterogeneous software tool development kit and algorithm software package are determined in the algorithm warehouse corresponding to the algorithm warehouse address; the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic image to start the algorithm software corresponding to the algorithm software package. The above scheme solves the problems in the related technology that if the algorithm software of the same algorithm business needs to be deployed and use a variety of different heterogeneous computing hardware, it is necessary to develop and release a plurality of different image packages, and it is necessary to deploy and schedule them separately. Then, in the deployment and scheduling stage, the algorithm warehouse is used to cooperate, and the heterogeneous models and heterogeneous software tool development kits coupled with heterogeneous hardware are dynamically loaded, so that the containerized deployment of the algorithm software is decoupled from the heterogeneous computing hardware, which greatly improves the efficiency of development, testing, release, deployment and maintenance of intelligent algorithm software supporting multiple heterogeneous platforms, and fundamentally improves the versatility of the underlying heterogeneous hardware.

[0041] In an exemplary embodiment, an algorithm model, a heterogeneous software tool development kit and an algorithm software package are obtained in a corresponding algorithm warehouse according to the environment configuration information, including: determining the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm type.

[0042] Specifically, after the basic image is started, the proxy service autonomously identifies or obtains through configuration the environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type in the basic image, and the proxy service reports the obtained environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type to the algorithm warehouse, and determines to load the algorithm model, heterogeneous software tool development kit and algorithm software package from the algorithm warehouse according to the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type; specifically, the algorithm warehouse searches for the corresponding algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type reported by the proxy service, and searches for the corresponding heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, etc.; and searches for the algorithm software package in the algorithm software package warehouse according to the algorithm type, wherein the algorithm software package can also be released together with the basic image, or the algorithm software package can be searched in the algorithm software package warehouse, and then dynamically loaded from the algorithm warehouse together with the algorithm model and the heterogeneous software tool development kit.

[0043] In an exemplary embodiment, before obtaining the environmental configuration information of the base image through the proxy service of the base image, the method also includes: scheduling the base image to the physical node corresponding to the algorithm warehouse address according to the resource configuration information of the base image, wherein the base image includes: a proxy service, and the resource configuration information includes at least one of the following: algorithm software type, resource limitation, number of instances; starting the proxy service of the base image.

[0044] It should be noted that the basic image does not contain the algorithm model and heterogeneous software tool development kit that the algorithm software depends on, but only includes: proxy service and algorithm software package (optional). The proxy service is started as the first process of the basic image. Before the basic image is started, the algorithm software type, resource restrictions, resource restrictions (CPU, memory and heterogeneous computing hardware quantity), container instance quantity and other resource configuration information will be configured according to the overall business needs; the container cloud platform will schedule the basic image to different physical nodes according to the resource configuration information of the basic image, and pass the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type and other environmental configuration information.

[0045] In an exemplary embodiment, a heterogeneous software tool development kit is determined in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information, including: encapsulating the interface of the heterogeneous software tool development kit and determining the interface corresponding to the heterogeneous software tool development kit; and obtaining the heterogeneous software tool development kit in the algorithm warehouse through the interface.

[0046] That is to say, in the algorithm software development stage, the various heterogeneous software tool development packages are encapsulated with unified interfaces, and a unified heterogeneous software tool development package interface is provided to the outside world, decoupling the development and release of the algorithm software from the underlying hardware, underlying software stack, and model. Among them, the unified heterogeneous software tool development package needs to consider the differences in input and output of different heterogeneous hardware, model network support, etc., and provide a unified heterogeneous software tool development package interface entry according to the actual situation. Therefore, an algorithm software only needs to be developed and released once for multiple different heterogeneous computing hardware platforms. The algorithm model used by each algorithm software still has multiple models corresponding to different heterogeneous hardware. In other words, after the development of the unified heterogeneous software tool development package, an algorithm software only needs to release two results in the end: 1) a unique algorithm software package; 2) multiple algorithm models for different heterogeneous platforms, and there is no need to release multiple different complete algorithm image packages.

[0047] In an exemplary embodiment, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the base image includes: determining whether the proxy service obtains the first location path of the algorithm model, the second location path of the heterogeneous software tool development kit and the third location path of the algorithm software package; when the proxy service obtains the first location path, the second location path and the third location path, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the base image according to the first location path, the second location path and the third location path.

[0048] That is to say, the algorithm warehouse notifies the proxy service to download and update the algorithm model, the heterogeneous software tool development kit and the algorithm software package to the relevant location paths in the basic image according to the corresponding first location path, second location path and third location path; at this point, the runtime dependencies of the algorithm software package have been loaded into the basic image, and the proxy service starts to pull up the algorithm software service and runs normally.

[0049] In an exemplary embodiment, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic image to start the algorithm software corresponding to the algorithm software package, including: determining whether the algorithm model and the heterogeneous software tool development kit are complete, wherein the integrity is used to indicate whether the algorithm model and the heterogeneous software tool development kit are missing some data; if the algorithm model and the heterogeneous software tool development kit are complete, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic model, and the algorithm software corresponding to the algorithm software package is started.

[0050] The proxy service checks and verifies the integrity of the algorithm software package, algorithm model and the heterogeneous software tool development kit. After the verification is successful, the algorithm software package is installed and the algorithm software is started. In a container cloud environment, the base image may be subject to abnormal restart, dynamic migration, etc. After restart, the heterogeneous algorithm model and the heterogeneous software tool development kit in the base image may not exist. In this case, the above process needs to be repeated.

[0051] In order to better understand the process of the startup method of the above algorithm software, the startup method process of the above algorithm software is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present invention.

[0052] Intelligent algorithm software refers to software services that use AI and other intelligent algorithms as the core, input various audio and video or other data, obtain various structured data after algorithm processing, and finally perform related business processing based on the structured data structure. Usually, intelligent algorithm software services include one or more sub-algorithms, such as face detection, face attributes, face features and comparison, and vehicle analysis. In the container cloud platform, each intelligent algorithm software is released in the form of a container image, which includes: the system environment on which the intelligent algorithm software depends, the algorithm software package, the algorithm model of each algorithm corresponding to a certain heterogeneous computing hardware, and the heterogeneous software tool development kit for a certain heterogeneous hardware.

[0053] The algorithm processing process is mainly based on the deep learning inference (CNN Inference) process. Each sub-algorithm can be accelerated by deep learning inference through various heterogeneous computing hardware (NPU / general GPU / FPGA, etc.), and each sub-algorithm consists of algorithm software (independently developed according to different heterogeneous hardware SDKs, and released as dynamic libraries or static libraries) and inference model files (dynamically loaded and used when the program is running). Among them, when the same original algorithm model is deployed on different heterogeneous hardware, the original algorithm model needs to be converted into inference model files on different heterogeneous hardware. These algorithm models can only be deployed on specific hardware and cannot be universal.

[0054] An optional embodiment of the present invention provides a method for starting algorithm software, which is divided into two stages: development and release, and deployment and scheduling. Figure 4The schematic diagram of the development and release process of the startup method of the algorithm software according to the optional embodiment of the present invention is as follows. In the algorithm software development and release stage, the CNN computing acceleration SDK of each heterogeneous hardware is encapsulated with a unified interface, and a unified heterogeneous SDK interface (SDK API) is provided to the outside, and the development and release of the algorithm software is decoupled from the underlying hardware, the underlying software stack and the model. Among them, the unified heterogeneous SDK API needs to consider the differences in the input and output of different heterogeneous hardware, the model network support, etc., and a unified normalization design is performed according to the actual situation to provide a unified SDK API entry. On this basis, an algorithm software only needs to be developed and released once for multiple different heterogeneous computing hardware platforms. The algorithm model used by each algorithm software still has multiple models corresponding to different heterogeneous hardware. Therefore, an algorithm software only needs to be developed and released once for multiple different heterogeneous computing hardware platforms. The algorithm model used by each algorithm software still has multiple models corresponding to different heterogeneous hardware. In other words, after the development of the unified heterogeneous software tool development package, a certain algorithm software only needs to release two results in the end: 1) a unique algorithm software package; 2) multiple algorithm models of different heterogeneous platforms, and there is no need to release multiple different complete algorithm image packages.

[0055] The structure of the system in the deployment and scheduling stage of the optional embodiment of the present invention is as follows: Figure 5 As shown, Figure 5 This is a deployment scheduling system structure diagram of the startup method of the algorithm software according to an optional embodiment of the present invention. The entire system consists of three parts: a container cloud platform, a basic image, and an algorithm warehouse. The container cloud platform is responsible for configuring and pulling up the basic image, and the algorithm warehouse is responsible for dynamically loading and updating the algorithm software package (optional), algorithm model, and SDK in the basic image. The algorithm warehouse includes a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse.

[0056] like Figure 6 As shown, Figure 6The schematic diagram of the deployment scheduling process of the startup method of the algorithm software according to the optional embodiment of the present invention is that the algorithm software needs to run in the basic image, which does not contain the algorithm model and SDK on which the algorithm software depends, but only includes the proxy service and the algorithm software package file (optional). The proxy service is started as the first process of the basic image. Before the basic image is started, the algorithm type (environmental variables, etc.), resource restrictions (CPU, memory and heterogeneous computing hardware quantity), number of container instances, etc. will be configured according to the overall business needs. After the basic image is started, the proxy service autonomously identifies or obtains the information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type in the current basic image through configuration, and loads different algorithm models, heterogeneous software tool development kits and algorithm software packages from the algorithm warehouse according to the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type. At this point, the runtime dependent information of the algorithm software package has been loaded into the basic image, and the proxy service starts to pull up the algorithm software service and runs normally. Among them, the algorithm software package may not be released with the basic image, but dynamically loaded from the algorithm warehouse together with the algorithm model and heterogeneous software tool development kit.

[0057] In an optional embodiment of the present invention, a method for starting algorithm software is provided, which is applied to the above-mentioned computer terminal. Figure 7 This is a schematic diagram of a method for starting algorithm software according to an optional embodiment of the present invention, and the specific steps are as follows:

[0058] Step S701: The container cloud platform schedules different basic images to different physical nodes according to their resource configuration information, and transmits environment configuration information, wherein the resource configuration information includes: algorithm software type, resource limit, and number of instances; the environment configuration information includes at least one of the following: algorithm warehouse address, algorithm software type, heterogeneous hardware type, and heterogeneous drive type;

[0059] Step S702: the proxy service in the base image is started as the first process when the image is pulled up;

[0060] Step S703: The proxy service obtains environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type, and heterogeneous driver type used in the current basic image through environment configuration or autonomous identification;

[0061] Step S704: The proxy service reports environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type, and heterogeneous drive type to the algorithm warehouse;

[0062] Step S705: the algorithm warehouse searches for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type, searches for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, and searches for the algorithm software package in the algorithm software package warehouse according to the algorithm type;

[0063] Step S706: the algorithm warehouse notifies the proxy service to download, update and load the algorithm model, the heterogeneous software tool development kit and the algorithm software package into the basic image according to the relevant location path;

[0064] Step S707: The proxy service checks the integrity of the verification algorithm software and its dependencies, and installs the algorithm software package and starts the algorithm software after the verification is successful.

[0065] It should be noted that in a container cloud environment, the base image may be restarted abnormally, dynamically migrated, etc. After restarting, the algorithm model and SDK in the algorithm base image may not exist. In this case, the above process needs to be repeated.

[0066] First, starting from the development and release of algorithms, the results of algorithm software development and release are decoupled from the hardware; secondly, in the deployment and scheduling stage, the algorithm warehouse is used to dynamically load the algorithm model and SDK coupled with heterogeneous hardware, so that the containerized deployment of the algorithm software is decoupled from the heterogeneous computing hardware. The development, testing, release and deployment of various intelligent algorithm software services can be independent of the software stack of heterogeneous hardware, truly achieving software and hardware decoupling, which can greatly improve the efficiency of intelligent algorithm software development, testing, release, deployment and maintenance that supports multiple heterogeneous platforms, and fundamentally improve the versatility of the underlying heterogeneous hardware. Moreover, through the optional embodiments of the present invention, resource scheduling and allocation are balanced.

[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0068] In the present embodiment, a starting device for algorithm software is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0069] Figure 8 is a structural block diagram of a device for starting algorithm software according to an embodiment of the present invention; Figure 8 As shown, including:

[0070] An acquisition module 72 is used to acquire environment configuration information of the base image through a proxy service of the base image, wherein the environment configuration information includes at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous drive type;

[0071] A determination module 74, configured to determine an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information;

[0072] The determination module 76 is used to load the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package.

[0073] Through the above module, the environment configuration information of the basic image is obtained through the proxy service of the basic image, wherein the environment configuration information includes at least one of the following: algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type; according to the environment configuration information, the algorithm model, heterogeneous software tool development kit and algorithm software package are determined in the algorithm warehouse corresponding to the algorithm warehouse address; the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic image to start the algorithm software corresponding to the algorithm software package. The above scheme solves the problems in the related technology that if the algorithm software of the same algorithm business needs to be deployed and use a variety of different heterogeneous computing hardware, it is necessary to develop and release a plurality of different image packages, and it is necessary to deploy and schedule them separately and independently. Then, in the deployment and scheduling stage, the algorithm warehouse is used to cooperate, and the heterogeneous models and heterogeneous software tool development kits coupled with heterogeneous hardware are dynamically loaded, so that the containerized deployment of the algorithm software is decoupled from the heterogeneous computing hardware, which greatly improves the efficiency of development, testing, release, deployment and maintenance of intelligent algorithm software supporting multiple heterogeneous platforms, and fundamentally improves the versatility of the underlying heterogeneous hardware.

[0074] In an exemplary embodiment, the determination module is also used to determine the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm type.

[0075] Specifically, after the basic image is started, the proxy service autonomously identifies or obtains through configuration the environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type in the basic image, and the proxy service reports the obtained environment configuration information such as the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type to the algorithm warehouse, and determines to load the algorithm model, heterogeneous software tool development kit and algorithm software package from the algorithm warehouse according to the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type; specifically, the algorithm warehouse searches for the corresponding algorithm model in the heterogeneous algorithm model warehouse according to the algorithm type and the heterogeneous hardware type reported by the proxy service, and searches for the corresponding heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm type, the heterogeneous hardware type and the heterogeneous driver type, etc.; and searches for the algorithm software package in the algorithm software package warehouse according to the algorithm type, wherein the algorithm software package can also be released together with the basic image, or the algorithm software package can be searched in the algorithm software package warehouse, and then dynamically loaded from the algorithm warehouse together with the algorithm model and the heterogeneous software tool development kit.

[0076] In an exemplary embodiment, the startup module is also used to schedule the basic image to the physical node corresponding to the algorithm warehouse address according to the resource configuration information of the basic image, wherein the basic image includes: a proxy service, and the resource configuration information includes at least one of the following: algorithm software type, resource limitation, number of instances; and start the proxy service of the basic image.

[0077] It should be noted that the basic image does not contain the algorithm model and heterogeneous software tool development kit that the algorithm software depends on, but only includes: proxy service and algorithm software package (optional). The proxy service is started as the first process of the basic image. Before the basic image is started, the algorithm software type, resource restrictions, resource restrictions (CPU, memory and heterogeneous computing hardware quantity), container instance quantity and other resource configuration information will be configured according to the overall business needs; the container cloud platform will schedule the basic image to different physical nodes according to the resource configuration information of the basic image, and pass the algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous driver type and other environmental configuration information.

[0078] In an exemplary embodiment, the determination module is further used to perform interface encapsulation on the heterogeneous software tool development kit and determine the interface corresponding to the heterogeneous software tool development kit; and obtain the heterogeneous software tool development kit in the algorithm warehouse through the interface.

[0079] That is to say, in the algorithm software development stage, the various heterogeneous software tool development packages are encapsulated with unified interfaces, and a unified heterogeneous software tool development package interface is provided to the outside world, decoupling the development and release of the algorithm software from the underlying hardware, underlying software stack, and model. Among them, the unified heterogeneous software tool development package needs to consider the differences in input and output of different heterogeneous hardware, model network support, etc., and provide a unified heterogeneous software tool development package interface entry according to the actual situation. Therefore, an algorithm software only needs to be developed and released once for multiple different heterogeneous computing hardware platforms. The algorithm model used by each algorithm software still has multiple models corresponding to different heterogeneous hardware. In other words, after the development of the unified heterogeneous software tool development package, an algorithm software only needs to release two results in the end: 1) a unique algorithm software package; 2) multiple algorithm models for different heterogeneous platforms, and there is no need to release multiple different complete algorithm image packages.

[0080] In an exemplary embodiment, the startup module is also used to determine whether the proxy service has obtained the first location path of the algorithm model, the second location path of the heterogeneous software tool development kit, and the third location path of the algorithm software package; when the proxy service obtains the first location path, the second location path, and the third location path, the algorithm model, the heterogeneous software tool development kit, and the algorithm software package are loaded in the base image according to the first location path, the second location path, and the third location path.

[0081] That is to say, the algorithm warehouse notifies the proxy service to download and update the algorithm model, the heterogeneous software tool development kit and the algorithm software package to the relevant location paths in the basic image according to the corresponding first location path, second location path and third location path; at this point, the runtime dependencies of the algorithm software package have been loaded into the basic image, and the proxy service starts to pull up the algorithm software service and runs normally.

[0082] In an exemplary embodiment, the startup module is also used to determine whether the algorithm model and the heterogeneous software tool development kit are complete, wherein the integrity is used to indicate whether the algorithm model and the heterogeneous software tool development kit are missing some data; when the algorithm model and the heterogeneous software tool development kit are complete, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded into the basic model, and the algorithm software corresponding to the algorithm software package is started.

[0083] The proxy service checks and verifies the integrity of the algorithm software package, algorithm model and the heterogeneous software tool development kit. After the verification is successful, the algorithm software package is installed and the algorithm software is started. In a container cloud environment, the base image may be subject to abnormal restart, dynamic migration, etc. After restart, the heterogeneous algorithm model and the heterogeneous software tool development kit in the base image may not exist. In this case, the above process needs to be repeated.

[0084] An embodiment of the present invention further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0085] In an exemplary embodiment, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0086] S1, obtaining environment configuration information of the base image through a proxy service of the base image, wherein the environment configuration information includes at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous drive type;

[0087] S2, determining an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information;

[0088] S3, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package into the basic image to start the algorithm software corresponding to the algorithm software package.

[0089] In an exemplary embodiment, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0090] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0091] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0092] In an exemplary embodiment, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0093] S1, obtaining environment configuration information of the base image through a proxy service of the base image, wherein the environment configuration information includes at least one of the following: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous drive type;

[0094] S2, determining an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information;

[0095] S3, loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package into the basic image to start the algorithm software corresponding to the algorithm software package.

[0096] In an exemplary embodiment, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0097] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. In an exemplary embodiment, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for starting algorithm software, It is characterized in that include: Obtaining environment configuration information of the base image through a proxy service of the base image, wherein the environment configuration information includes: an algorithm warehouse address, an algorithm software type, a heterogeneous hardware type, and a heterogeneous drive type; Determine an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; Loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package; Wherein, determining the algorithm model, heterogeneous software tool development kit and algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information includes: determining the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm software type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm software type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm software type; Determine a heterogeneous software tool development kit in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information, including: encapsulating the interface of the heterogeneous software tool development kit and determining the interface corresponding to the heterogeneous software tool development kit; and obtaining the heterogeneous software tool development kit in the algorithm warehouse through the interface.

2. The method for starting the algorithm software according to claim 1, It is characterized in that Before obtaining the environment configuration information of the base image through the proxy service of the base image, the method further includes: Dispatching the base image to a physical node corresponding to the algorithm warehouse address according to resource configuration information of the base image, wherein the base image includes: a proxy service, and the resource configuration information includes at least one of the following: algorithm software type, resource limit, and number of instances; Start the proxy service of the base image.

3. The method for starting the algorithm software according to claim 1, It is characterized in that Loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image includes: Determine whether the proxy service has acquired the first location path of the algorithm model, the second location path of the heterogeneous software tool development kit, and the third location path of the algorithm software package; When the proxy service obtains the first location path, the second location path and the third location path, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the base image according to the first location path, the second location path and the third location path.

4. The method for starting the algorithm software according to claim 1, It is characterized in that Loading the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package includes: Determining whether the algorithm model and the heterogeneous software tool development kit are complete, wherein the completeness is used to indicate whether the algorithm model and the heterogeneous software tool development kit are missing some data; When the algorithm model and the heterogeneous software tool development kit are complete, the algorithm model, the heterogeneous software tool development kit and the algorithm software package are loaded in the basic image, and the algorithm software corresponding to the algorithm software package is started.

5. A device for starting algorithm software, It is characterized in that include: An acquisition module, used to acquire environment configuration information of the base image through the proxy service of the base image, wherein the environment configuration information includes: algorithm warehouse address, algorithm software type, heterogeneous hardware type and heterogeneous drive type; A determination module, configured to determine an algorithm model, a heterogeneous software tool development kit, and an algorithm software package in the algorithm warehouse corresponding to the algorithm warehouse address according to the environment configuration information; A startup module, used to load the algorithm model, the heterogeneous software tool development kit and the algorithm software package in the basic image to start the algorithm software corresponding to the algorithm software package; Wherein, the determination module is further used to determine the algorithm warehouse according to the algorithm warehouse address, wherein the algorithm warehouse includes: a heterogeneous algorithm model warehouse, a heterogeneous software tool development kit warehouse, and an algorithm software package warehouse; searching for the algorithm model in the heterogeneous algorithm model warehouse according to the algorithm software type and the heterogeneous hardware type, searching for the heterogeneous software tool development kit in the heterogeneous software tool development kit warehouse according to the algorithm software type, the heterogeneous hardware type and the heterogeneous driver type, and searching for the algorithm software package in the algorithm software package warehouse according to the algorithm software type; Among them, the determination module is also used to perform interface encapsulation on the heterogeneous software tool development kit and determine the interface corresponding to the heterogeneous software tool development kit; and obtain the heterogeneous software tool development kit in the algorithm warehouse through the interface.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 4 when executed.

7. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 4 through the computer program.