CN114003238B - Container deployment method, device, equipment and storage medium based on transcoding card - Google Patents

Container deployment method, device, equipment and storage medium based on transcoding card Download PDF

Info

Publication number
CN114003238B
CN114003238B CN202111165128.XA CN202111165128A CN114003238B CN 114003238 B CN114003238 B CN 114003238B CN 202111165128 A CN202111165128 A CN 202111165128A CN 114003238 B CN114003238 B CN 114003238B
Authority
CN
China
Prior art keywords
target
transcoding
hardware resource
card
transcoding card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111165128.XA
Other languages
Chinese (zh)
Other versions
CN114003238A (en
Inventor
胡江涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111165128.XA priority Critical patent/CN114003238B/en
Publication of CN114003238A publication Critical patent/CN114003238A/en
Application granted granted Critical
Publication of CN114003238B publication Critical patent/CN114003238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a container deployment method based on a transcoding card, which comprises the following steps: acquiring a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules; determining an available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units; and deploying the target container on the target transcoding card according to the target type, the target number and the available number. Therefore, in the application, a plurality of containers can be arranged in the same transcoding card in a mode of dividing the coding units in the transcoding card into different types of hardware resource modules, and each container can occupy different types of hardware resource modules, so that the utilization efficiency of hardware is improved; the application also discloses a container deployment device, equipment and a storage medium based on the transcoding card, and the technical effects can be realized.

Description

Container deployment method, device, equipment and storage medium based on transcoding card
Technical Field
The present application relates to the field of container deployment technologies, and in particular, to a container deployment method, device, equipment and storage medium based on a transcoding card.
Background
With the continuous development of network technologies such as optical fibers, the broadband household rate in China has reached 91% in 2020, and gigabit optical fibers have been put into every household. Meanwhile, with the continuous development and popularization of the 5G mobile communication technology (Generation Mobile Communication Technology, fifth generation mobile communication technology), the network speed of the mobile terminal in China can reach 100Mbit/s. The continuous development of network technology brings about continuous promotion of video services, video software such as fast hand, tremble sound, silently live broadcast and the like almost become necessary software for everyone, and the video reading quantity of 14 hundred million people in China also brings about huge transcoding pressure for the video software. Although the CPU (central processing unit ) can also perform video transcoding, the CPU also comprises a control unit and a cache (cache) besides a calculation unit, and also comprises complex control logic and a plurality of optimization circuits, wherein the calculation unit only occupies a small part of the CPU, so that the CPU is not suitable for completing large-scale simple transcoding tasks. The transcoding card is a chip and a board card which are specially designed for completing the transcoding task and contain a large number of encoding and decoding units, so that the transcoding card is more suitable for completing the video transcoding task. The transcoding card contains a large number of encoding and decoding units, so that multiple transcoding can be performed on one transcoding card.
At present, FFmpeg software is generally adopted to complete the transcoding task on a transcoding card, and when multi-path transcoding is carried out on the same transcoding card, different paths of transcoding processes can mutually influence each other due to sharing of hardware resources. In order to solve the problem that different FFmpeg commands affect each other when running on the same transcoding card, a Docker container can be deployed on the transcoding card by using kubernetes (container arrangement engine), and the resource isolation effect of the Docker container can avoid the mutual interference among different FFmpeg commands. At present, each container can automatically monopolize a transcoding card when the Docker container is deployed, so that errors are reported when other containers are deployed again after the first container is successfully deployed, and therefore, a plurality of Docker containers cannot be deployed at the same time by the transcoding card at present.
Disclosure of Invention
The application aims to provide a container deployment method, device, equipment and storage medium based on a transcoding card, so as to deploy a plurality of containers on the transcoding card and improve the utilization efficiency of hardware.
In order to achieve the above object, the present application provides a container deployment method based on a transcoding card, including:
acquiring a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
determining an available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
deploying a target container on a target transcoding card according to the target type, the target number and the available number; the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource modules is the target number.
Wherein before determining the available number of each type of hardware resource module in each transcoding card, the method further comprises:
obtaining module dividing parameters from the deployment file; the module dividing parameters include: the division types and the division numbers of the hardware resource modules;
and carrying out resource division on the coding units of each transcoding card according to the module division parameters to generate different types of hardware resource modules.
Wherein the determining the available number of each type of hardware resource module in each transcoding card comprises:
determining a total number of each type of hardware resource module in each transcoding card;
acquiring the utilization rate of all coding units in each transcoding card;
and calculating the available quantity of each type of hardware resource module in each transcoding card according to the total quantity and the utilization rate.
Wherein the calculating the available number of each type of hardware resource module in each transcoding card according to the total number and the utilization rate includes:
determining the available number of each type of hardware resource module in each transcoding card through an available number determination rule; wherein the available quantity determination rule is:
amount i =efficiency*total i (1-usage i /100);
where i represents the i-th transcoding card, amounts the available number, efficiency the variable parameter, total represents the total number, and usage the utilization.
Wherein said deploying a target container on a target transcoding card according to said target type, said target number, and said available number, comprises:
determining a target transcoding card with the target number of the target type of hardware resource modules according to the available number of each type of hardware resource modules in each transcoding card;
and deploying a target container on the target transcoding card according to the target type and the target number.
Wherein the determining, according to the available number of each type of hardware resource module in each transcoding card, a target transcoding card having the target number of the target type of hardware resource modules includes:
determining the number of the transcoding cards of the primary transcoding card according to the available number of each type of hardware resource module in each transcoding card; the primary selection transcoding card is a transcoding card with the target number of hardware resource modules of the target type;
if the number of the transcoding cards is greater than 1, determining the total available number of all types of hardware resource modules in each primary transcoding card, acquiring the operation mode information of the transcoding cards from the deployment file, and selecting a target transcoding card according to the operation mode information of the transcoding cards and the total available number of each primary transcoding card;
and if the number of the transcoding cards is 1, directly taking the primary transcoding card as a target transcoding card.
The selecting a target transcoding card according to the transcoding card operation mode information and the total available quantity of each primary transcoding card comprises the following steps:
if the operation mode information of the transcoding card is a performance mode, selecting the primary transcoding card with the minimum total available quantity as a target transcoding card;
and if the operation mode information of the transcoding card is a low-power consumption mode, selecting the primary transcoding card with the largest total available quantity as the target transcoding card.
To achieve the above object, the present application further provides a container deployment apparatus based on a transcoding card, comprising:
the first acquisition module is used for acquiring the deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
a determining module for determining the available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
the deployment module is used for deploying a target container on a target transcoding card according to the target type, the target quantity and the available quantity; the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource modules is the target number.
To achieve the above object, the present application further provides an electronic device including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the container deployment method based on the transcoding card when executing the computer program.
To achieve the above object, the present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described container deployment method based on a transcoding card.
As can be seen from the above solution, the container deployment method based on the transcoding card provided by the embodiment of the present application includes: acquiring a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules; determining an available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units; and deploying a target container on the target transcoding card according to the target type, the target number and the available number, wherein the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource module is the target number. Therefore, in the application, a plurality of containers can be arranged in the same transcoding card in a mode of dividing the coding units in the transcoding card into different types of hardware resource modules, and each container can occupy different types of hardware resource modules, so that the utilization efficiency of hardware is improved; the application also discloses a container deployment device, equipment and a storage medium based on the transcoding card, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a kubernetes cluster architecture according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a container deployment method based on a transcoding card according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a container deployment device based on a transcoding card according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, a schematic diagram of a kubernetes cluster architecture according to an embodiment of the present application is provided. As can be seen from fig. 1, kubernetes clusters are divided into Master nodes and Node nodes. The Master node is mainly responsible for cluster control, performs functions such as scheduling on Pod (basic building modules in kubernetes), and mainly has 4 modules, namely an API Server (Application Programming Interface Server, interface service), a Scheduler, contloller manager (controller manager), and etcd (storage system). The API Server is an API interface exposing kubernetes externally, is an entrance for external resource operation, and provides mechanisms such as authentication, authorization, access control, API registration, discovery and the like. The Scheduler is responsible for scheduling resources, scheduling Pod to the corresponding machine according to a predetermined scheduling policy, monitoring newly created Pod, and if no node is allocated, selecting a node for their operation, which is the scheduling of Pod. Controller manager is responsible for maintaining the state of the cluster, such as fault detection, auto-expansion, rolling updates, etc., which are background threads that handle regular tasks in the cluster. etcd is a backend database of kubernetes where all kubernetes cluster data is stored. The state of the entire cluster is saved.
The Node nodes are managed nodes, the Node nodes can be a physical host or a virtual host, the Node nodes are working responsible nodes in kubernetes clusters, and each Node is distributed with some workload by a Master. kuubernes mainly comprises four components, namely Kubelet, kube-proxy, fluentd and Pod. kubelet is responsible for maintaining the lifecycle of the container, as well as for the management of Volume and network, which is responsible for creating Pod. kube-proxy is responsible for providing Service with Service discovery and load balancing inside the cluster. Fluentd is a daemon that helps provide cluster-level journaling. Pod is the smallest scheduling unit in kubernetes, and Pod is the smallest unit for management, creation and planning. Each Pod contains at least one Docker container in which the user's commands ultimately run for each node. In this solution, each node is a physical host, as shown in fig. 1, each node may include a certain number of transcoding cards, and a certain number of decoding units and encoding units are located on each transcoding card.
In the embodiment, a container deployment method, device, equipment and storage medium based on a transcoding card are disclosed, and the scheme provides a hardware resource partitioning strategy for the software containerized deployment of the transcoding card, and the hardware resource of the transcoding card is partitioned by the strategy so as to deploy a plurality of containers on the same transcoding card.
Referring to fig. 2, a flowchart of a container deployment method based on a transcoding card provided by an embodiment of the present application, the method specifically includes the following steps:
s101, acquiring a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
in this embodiment, the deployment file mainly includes two kinds of information: module partitioning parameters and container deployment parameters; the module dividing parameters are used for dividing resources of the coding units in each transcoding card; the container deployment parameters comprise a target type of applying for the hardware resource modules, a target number req_nums and transcoding card operation Mode information Mode, wherein the target type is the type of the hardware resource modules occupied by the target container in operation, the target number is the number of a certain type of the hardware resource modules occupied by the target container in operation, and the transcoding card operation Mode information is used for selecting the target transcoding card for deploying the target container. When the container is deployed, firstly, inquiring whether the transcoding card currently has a target number of hardware resource modules meeting the target type, then selecting different transcoding cards according to different modes, and when the performance is selected to be prioritized, when the container is deployed, the container is deployed on the different transcoding cards as much as possible so as to achieve larger performance. When the low energy consumption mode is selected, the containers are deployed on the same transcoding card as much as possible to save energy.
S102, determining the available quantity of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
in this embodiment, first, module partition parameters need to be acquired from a deployment file, where the module partition parameters include: the division types and the division numbers of the hardware resource modules; and then, carrying out resource division on the coding unit of each transcoding card according to the module division parameters to generate different types of hardware resource modules.
Specifically, the scheme specifically divides resources through a hardware resource division plug-in, deploys the hardware resource division plug-in to each transcoding card through a deployment file of kubernetes, for example, the deployment file is delopyment. Yaml, and the deployment command is: kubecl apply-f release. It should be noted that, when the transcoding card performs transcoding, the encoding unit and the decoding unit complete the transcoding, and one transcoding card contains a large number of basic encoding units and decoding units. Because the calculation power of the transcoding card is limited by the coding unit and the decoding unit is not the bottleneck of calculation power when video transcoding is carried out, the scheme only divides the resources of the coding unit to form hardware resource modules according to the characteristics.
It should be noted that, as can be seen from the actual running situation, the amount of computation power required for processing different videos is different when the ffmpeg command is running, for example, the computation power required for processing videos of different durations, resolutions, and frame rates is different. Therefore, according to different demands of computational power, when dividing resources, the scheme divides the transcoding card into the following 4 types according to module dividing parameters: 480p, 720p, 1080p and 2160p, according to the actual computing power of the transcoding card chip, the computing power of the transcoding card can stably run the transcoding of 16 paths 1080p video, so in the scheme, the coding unit of one transcoding card can be divided into: 96 hardware resource modules of 480p type, 36 720p hardware resource modules, 16 1080p hardware resource modules, 4 2160p hardware resource modules, that is: the number of coding units of 1 2160p hardware resource module is 24 times the number of coding units of 480p hardware resource module. Multiple hardware resource modules of different types can be divided simultaneously on the same transcoding card, and when a container is deployed, different hardware resource module types are selected according to the requirements of transcoding tasks, for example, containers with 480p and 2160p hardware resource module types can be respectively operated on the same transcoding card, and the multiple-type concurrent hardware resource division method can realize more efficient hardware resource utilization.
Further, in the scheme, when the available number of each type of hardware resource module in each transcoding card is determined, the total number of each type of hardware resource module in each transcoding card can be determined first, then the utilization rate of all coding units in each transcoding card is obtained, and the available number of each type of hardware resource module in each transcoding card is calculated according to the total number and the utilization rate.
Specifically, when determining the available number, the scheme firstly traverses all transcoding cards of the host, and then calculates the number of available hardware resource modules of the current deployment container according to the total number of each type of hardware resource modules recorded in the deployment file, the utilization rate and other information. Such as: in the ith transcoding card, the total number of hardware resource modules of a certain type is total, the current utilization rate of the coding units is user, wherein the utilization rate is the ratio of the number of the coding units in the ith transcoding card to the total number of the coding units, and the available number of the hardware resource modules of a certain type on the transcoding card i is amount and can be calculated by using a formula 1:
amount i =total i (1-usage i /100) (1)
however, in actual ffmpeg transcoding calculation, since the calculation capacity fails to reach one hundred percent for many reasons such as task scheduling, a variable parameter efficiency needs to be introduced when the number of available hardware resource modules is calculated, and by controlling the variable parameter, each ffmpeg in the container can normally operate in practice, and the experience value of the variable parameter in the transcoding card is 0.7. Thus, in this scheme, the available number of each type of hardware resource module in each transcoding card may be determined by an available number determination rule; the available quantity determination rule is as follows equation 2:
amount i =efficiency*total i (1-usage i /100) (2)
where i represents the i-th transcoding card, amounts the available number, efficiency the variable parameter, total represents the total number, and usage the utilization. It should be noted that, the available number calculated in this scheme is the available number of a certain type of hardware resource module of a certain transcoding card, so the total available number of the transcoding card is the sum of the available numbers of all types of hardware resource modules.
S103, deploying a target container on the target transcoding card according to the target type, the target number and the available number; the type of the hardware resource module occupied by the target container in running is a target type, and the number of the occupied hardware resource modules is a target number.
When the target container is deployed, the target transcoding card with the target number of the target type hardware resource modules is determined according to the available number of each type hardware resource module in each transcoding card; and then deploying the target container on the target transcoding card according to the target type and the target number. When determining a target transcoding card, the scheme firstly needs to determine the number of transcoding cards of the primary selected transcoding card according to the available number of each type of hardware resource module in each transcoding card; the primary selection transcoding card is a transcoding card with a target number of hardware resource modules of target types; if the number of the transcoding cards is greater than 1, determining the total available number of all types of hardware resource modules in each primary transcoding card, acquiring the operation mode information of the transcoding cards from the deployment file, and selecting a target transcoding card according to the operation mode information of the transcoding cards and the total available number of each primary transcoding card; if the number of the transcoding cards is 1, the primary selected transcoding card is directly used as the target transcoding card.
Specifically, in this solution, when multiple containers containing ffmpeg commands are started on the same transcoding card through the kubernetes deployment file, if the deployment file name is ffmpeg-test. Yaml, the deployment command is: kubectl apply-f ffmpeg-test. Yaml. In addition, when the Docker containers for running the ffmpeg transcoding commands are deployed on the transcoding cards in batches through the kubernetes deployment file, running Mode information Mode can be transmitted into the deployment file, the running Mode information determines the running Mode of the transcoding cards, and if the running Mode information of the transcoding cards is a PERFORMANCE Mode PERFORMANCE, the primary transcoding cards with the minimum total available quantity are selected as target transcoding cards; and if the operation mode information of the transcoding card is a LOW-POWER mode low_power, selecting the primary transcoding card with the largest total available quantity as the target transcoding card. That is, when the per format mode is selected, for PERFORMANCE priority, the container is deployed on different transcoding cards as much as possible when the container is deployed, and when the low_power mode is selected, the container is deployed on the same transcoding card as much as possible when the container is deployed, so as to save energy, for example: when the transcoding card works with the priority of performance, selecting the transcoding card deployment of the most hardware resources remained on the host; when the energy conservation is selected to be preferential, the transcoding card with the least residual hardware resources is selected for deployment on the premise of meeting the number of application resource modules.
In summary, it can be seen that the scheme optimizes the containerized deployment of the transcoding card software, and compared with the existing scheme, the scheme has at least the following beneficial effects:
1. according to the scheme, through a hardware resource partitioning strategy, a plurality of containers can be deployed on the same transcoding card by transcoding card software.
2. According to the scheme, the transcoding card is divided into multiple hardware resource module types, a user can select the type required by the transcoding card according to the requirement, and the hardware utilization efficiency is improved through the collocation and use of different hardware resource module types.
3. According to the scheme, the Mode parameter of the operation Mode of the transcoding card is introduced, a user can select different transcoding card selection strategies according to performance priority or energy-saving priority, and the user can select according to requirements.
4. According to the scheme, according to the situation that the computing capacity of the transcoding card cannot reach one hundred percent due to the fact that the actual operation process of the transcoding card is subjected to task scheduling and the like, the efficiency parameter is introduced to avoid the problem of breakdown caused by the fact that the efficiency limit is reached when the ffmpeg transcoding command is operated.
The deployment device, the device and the storage medium provided by the embodiments of the present application are introduced below, and the deployment device, the device and the storage medium described below and the deployment method described above may be referred to each other.
Referring to fig. 3, a structural schematic diagram of a container deployment device based on a transcoding card according to an embodiment of the present application specifically includes:
a first obtaining module 11, configured to obtain a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
a determination module 12 for determining the available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
a deployment module 13, configured to deploy a target container on a target transcoding card according to the target type, the target number, and the available number; the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource modules is the target number.
Wherein the apparatus further comprises:
the second acquisition module is used for acquiring module dividing parameters from the deployment file; the module dividing parameters include: the division types and the division numbers of the hardware resource modules;
and the dividing module is used for carrying out resource division on the coding unit of each transcoding card according to the module dividing parameters to generate different types of hardware resource modules.
Wherein the determining module comprises:
a first determining unit configured to determine a total number of each type of hardware resource modules in each transcoding card;
the acquisition unit is used for acquiring the utilization rate of all the coding units in each transcoding card;
and the calculating unit is used for calculating the available quantity of each type of hardware resource module in each transcoding card according to the total quantity and the utilization rate.
Wherein, the computing unit is specifically configured to: determining the available number of each type of hardware resource module in each transcoding card through an available number determination rule; wherein the available quantity determination rule is:
amount i =efficiency*total i (1-uSage i /100);
where i represents the i-th transcoding card, amounts the available number, efficiency the variable parameter, total represents the total number, and usage the utilization.
Wherein the deployment module comprises:
a second determining unit, configured to determine, according to an available number of each type of hardware resource module in each transcoding card, a target transcoding card having the target number of the target type of hardware resource modules;
and the deployment unit is used for deploying the target container on the target transcoding card according to the target type and the target number.
Wherein the second determining unit includes:
the first determining subunit is used for determining the number of the transcoding cards of the primary transcoding card according to the available number of each type of hardware resource module in each transcoding card; the primary selection transcoding card is a transcoding card with the target number of hardware resource modules of the target type;
a second determining subunit, configured to determine, when the number of the transcoding cards is greater than 1, a total available number of all types of hardware resource modules in each primary transcoding card;
the acquisition subunit is used for acquiring the operation mode information of the transcoding card from the deployment file;
the selecting subunit is used for selecting a target transcoding card according to the transcoding card operation mode information and the total available quantity of each primary transcoding card;
and the third determining subunit is configured to directly use the initially selected transcoding card as a target transcoding card when the number of the transcoding cards is 1.
Wherein the selecting subunit is specifically configured to: if the operation mode information of the transcoding card is a performance mode, selecting the primary transcoding card with the minimum total available quantity as a target transcoding card; and if the operation mode information of the transcoding card is a low-power consumption mode, selecting the primary transcoding card with the largest total available quantity as the target transcoding card.
Referring to fig. 4, an electronic device structure schematic provided in an embodiment of the present application includes:
a memory 21 for storing a computer program;
and a processor 22, configured to implement the steps of the container deployment method based on the transcoding card according to any of the above-described method embodiments when executing the computer program.
In this embodiment, the device may be a PC (Personal Computer ), or may be a terminal device such as a smart phone, a tablet computer, a palm computer, or a portable computer.
The device may include a memory 21, a processor 22, and a bus 23.
The memory 21 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 21 may in some embodiments be an internal storage unit of the device, such as a hard disk of the device. The memory 21 may in other embodiments also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the device. Further, the memory 21 may also include both an internal storage unit of the device and an external storage device. The memory 21 may be used not only for storing application software installed in the device and various types of data, such as program codes for executing a deployment method, etc., but also for temporarily storing data that has been output or is to be output.
The processor 22 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in the memory 21, such as program code for performing deployment methods, etc.
The bus 23 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Further, the device may also include a network interface 24, and the network interface 24 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface 25, the user interface 25 may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 25 may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the device and for displaying a visual user interface.
Fig. 4 shows only a device having components 21-25, it will be understood by those skilled in the art that the configuration shown in fig. 4 is not limiting of the device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
The embodiment of the application also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the container deployment method based on the transcoding card in any of the method embodiments are realized.
Wherein the storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A method for deploying containers based on transcoding cards, comprising:
acquiring a deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
determining an available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
deploying a target container on a target transcoding card according to the target type, the target number and the available number; the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource modules is the target number;
before determining the available number of each type of hardware resource module in each transcoding card, the method further comprises:
obtaining module dividing parameters from the deployment file; the module dividing parameters include: the division types and the division numbers of the hardware resource modules;
performing resource division on the coding units of each transcoding card according to the module division parameters to generate hardware resource modules of different types;
the determining the available number of each type of hardware resource module in each transcoding card comprises:
determining a total number of each type of hardware resource module in each transcoding card;
acquiring the utilization rate of all coding units in each transcoding card;
calculating the available number of each type of hardware resource module in each transcoding card according to the total number and the utilization rate;
said deploying a target container on a target transcoding card according to said target type, said target number, and said available number, comprising:
determining a target transcoding card with the target number of the target type of hardware resource modules according to the available number of each type of hardware resource modules in each transcoding card;
and deploying a target container on the target transcoding card according to the target type and the target number.
2. The container deployment method of claim 1, wherein calculating the available number of each type of hardware resource module in each transcoding card based on the total number and the utilization comprises:
determining the available number of each type of hardware resource module in each transcoding card through an available number determination rule; wherein the available quantity determination rule is:
wherein ,indicate->A transcoding card->Indicating the available quantity +.>Representing variable parameters +.>Indicating total number->Indicating the utilization.
3. The container deployment method of claim 1, wherein said determining a target transcoding card having said target number of hardware resource modules of said target type based on the available number of each type of hardware resource module in each transcoding card, comprises:
determining the number of the transcoding cards of the primary transcoding card according to the available number of each type of hardware resource module in each transcoding card; the primary selection transcoding card is a transcoding card with the target number of hardware resource modules of the target type;
if the number of the transcoding cards is greater than 1, determining the total available number of all types of hardware resource modules in each primary transcoding card, acquiring the operation mode information of the transcoding cards from the deployment file, and selecting a target transcoding card according to the operation mode information of the transcoding cards and the total available number of each primary transcoding card;
and if the number of the transcoding cards is 1, directly taking the primary transcoding card as a target transcoding card.
4. The container deployment method of claim 3, wherein said selecting a target transcoding card based on said transcoding card operational mode information and a total available number of each initially selected transcoding card comprises:
if the operation mode information of the transcoding card is a performance mode, selecting the primary transcoding card with the minimum total available quantity as a target transcoding card;
and if the operation mode information of the transcoding card is a low-power consumption mode, selecting the primary transcoding card with the largest total available quantity as the target transcoding card.
5. A transcoding card based container deployment apparatus, comprising:
the first acquisition module is used for acquiring the deployment file; the deployment file comprises a target type and a target number of application hardware resource modules;
a determining module for determining the available number of each type of hardware resource module in each transcoding card; the coding units of each transcoding card are divided into different types of hardware resource modules, and the different types of hardware resource modules have different numbers of coding units;
the deployment module is used for deploying a target container on a target transcoding card according to the target type, the target quantity and the available quantity; the type of the hardware resource module occupied by the target container in running is the target type, and the number of the occupied hardware resource modules is the target number;
the apparatus further comprises:
the second acquisition module is used for acquiring module dividing parameters from the deployment file; the module dividing parameters include: the division types and the division numbers of the hardware resource modules;
the dividing module is used for carrying out resource division on the coding unit of each transcoding card according to the module dividing parameters to generate hardware resource modules of different types;
wherein the determining module comprises:
a first determining unit configured to determine a total number of each type of hardware resource modules in each transcoding card;
the acquisition unit is used for acquiring the utilization rate of all the coding units in each transcoding card;
a calculating unit, configured to calculate, according to the total number and the utilization rate, an available number of each type of hardware resource module in each transcoding card;
the deployment module comprises:
a second determining unit, configured to determine, according to an available number of each type of hardware resource module in each transcoding card, a target transcoding card having the target number of the target type of hardware resource modules;
and the deployment unit is used for deploying the target container on the target transcoding card according to the target type and the target number.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the transcoding card based container deployment method according to any of claims 1 to 4 when executing said computer program.
7. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the container deployment method based on a transcoding card according to any of claims 1 to 4.
CN202111165128.XA 2021-09-30 2021-09-30 Container deployment method, device, equipment and storage medium based on transcoding card Active CN114003238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111165128.XA CN114003238B (en) 2021-09-30 2021-09-30 Container deployment method, device, equipment and storage medium based on transcoding card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111165128.XA CN114003238B (en) 2021-09-30 2021-09-30 Container deployment method, device, equipment and storage medium based on transcoding card

Publications (2)

Publication Number Publication Date
CN114003238A CN114003238A (en) 2022-02-01
CN114003238B true CN114003238B (en) 2023-11-03

Family

ID=79922245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111165128.XA Active CN114003238B (en) 2021-09-30 2021-09-30 Container deployment method, device, equipment and storage medium based on transcoding card

Country Status (1)

Country Link
CN (1) CN114003238B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115098238B (en) * 2022-07-07 2023-05-05 北京鼎成智造科技有限公司 Application program task scheduling method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011057489A1 (en) * 2009-11-11 2011-05-19 腾讯科技(深圳)有限公司 Method and device for multimedia file transcoding
WO2017016292A1 (en) * 2015-07-24 2017-02-02 乐视控股(北京)有限公司 Method of allocating video transcoding resource and system utilizing same
CN112256430A (en) * 2020-10-23 2021-01-22 北京三快在线科技有限公司 Container deployment method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9344748B2 (en) * 2014-03-31 2016-05-17 Arris Enterprises, Inc. Adaptive streaming transcoder synchronization
US10394603B2 (en) * 2017-07-28 2019-08-27 Genband Us Llc Virtual container processing on high performance computing processors

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011057489A1 (en) * 2009-11-11 2011-05-19 腾讯科技(深圳)有限公司 Method and device for multimedia file transcoding
WO2017016292A1 (en) * 2015-07-24 2017-02-02 乐视控股(北京)有限公司 Method of allocating video transcoding resource and system utilizing same
CN112256430A (en) * 2020-10-23 2021-01-22 北京三快在线科技有限公司 Container deployment method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114003238A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN107018175B (en) Scheduling method and device of mobile cloud computing platform
Zhou et al. AAIoT: Accelerating artificial intelligence in IoT systems
CN111052149B (en) Method and apparatus for determining memory requirements in a network
CN110138732B (en) Access request response method, device, equipment and storage medium
CN110381322A (en) Method for decoding video stream, device, terminal device and storage medium
CN107111553B (en) System and method for providing dynamic caching extension in more cluster heterogeneous processor frameworks
CN103957237A (en) Architecture of elastic cloud
CN105159775A (en) Load balancer based management system and management method for cloud computing data center
CN104102543A (en) Load regulation method and load regulation device in cloud computing environment
CN105335229A (en) Business resource scheduling method and apparatus
CN109144658B (en) Load balancing method and device for limited resources and electronic equipment
CN111880936A (en) Resource scheduling method and device, container cluster, computer equipment and storage medium
US8799474B2 (en) Apparatus and method to allocate limited resources
CN112925607A (en) System capacity expansion and contraction method and device and electronic equipment
CN104580194A (en) Virtual resource management method and device oriented to video applications
Alsubhi et al. MEACC: an energy-efficient framework for smart devices using cloud computing systems
CN114003238B (en) Container deployment method, device, equipment and storage medium based on transcoding card
CN111338745B (en) Deployment method and device of virtual machine and intelligent device
CN112527509B (en) Resource allocation method and device, electronic equipment and storage medium
CN115562878B (en) GPU computing resource management method and device, electronic equipment and readable storage medium
CN109408230B (en) Docker container deployment method and system based on energy consumption optimization
CN111858241B (en) Monitoring method, device, equipment and storage medium of FPGA cloud platform
Bhagavathi et al. Improved beetle swarm optimization algorithm for energy efficient virtual machine consolidation on cloud environment
Guo et al. PARA: Performability‐aware resource allocation on the edges for cloud‐native services
CN117707797B (en) Task scheduling method and device based on distributed cloud platform and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant