Method for starting operation of video conference and electronic equipment

By starting media control services for each CPU or GPU in the video conferencing system and performing resource scheduling, the problem that multi-GPU servers cannot make full use of codec resources is solved, and the computing density and resource optimization of the video conferencing system are improved.

CN118963850AActive Publication Date: 2024-11-15ZHEJIANG HUACHUANG VISION TECH CO LTD

Patent Information

Application Number
CN202410891625.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-11-15
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In video conferencing systems, multiple GPU servers cannot make full use of the codec resources of the CPU and GPU, resulting in insufficient computing density and cannot use each CPU or GPU as a codec resource for resource scheduling.

Method used

By starting the media control service as a codec unit in the server cluster, and storing the media control service directory, setting resources according to the codec capabilities of each CPU or GPU, and performing resource scheduling when receiving video conference requests, selecting the option of having Target media control services with sufficient remaining resources to initiate video conferencing and achieve unified resource scheduling.

Benefits of technology

It realizes the full utilization of codec resources on multi-GPU servers, improves the computing density of the server cluster, and prioritizes the launch of video conferences with GPU as codec unit to reduce the CPU running load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963850A_ABST
    Figure CN118963850A_ABST
Patent Text Reader

Abstract

The invention discloses a method for starting video conference operation and electronic equipment, which are used for realizing uniform resource scheduling of video conference starting operation by taking each CPU (Central Processing Unit) or GPU (Graphic Processing Unit) in a server cluster as a coding and decoding resource so as to realize full utilization of various coding and decoding resources on a multi-GPU server and improve the calculation density of the cluster. The invention provides a method for starting video conference operation. The method comprises the steps that each CPU and each GPU in a server cluster serve as coding and decoding units to start media control services; when a video conference request is received, according to the current residual coding and decoding resources of each media control service in the media control service directory, determining a media control service of which the current residual coding and decoding resources are greater than the coding and decoding resources required by the video conference as a target media control service; and sending a starting instruction of the video conference to the target media control service for the target media control service to start the media service corresponding to the video conference and then run the video conference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia service technology, and in particular to a method and electronic device for starting a video conference. Background Art

[0002] The video conferencing system includes a server (Multipoint Control Unit, i.e., video conferencing server) and various participating devices such as soft and hard terminals, recording and broadcasting servers, etc. The terminal collects images and sounds and sends them to the server after encoding. The server fuses or does not fuse the images sent by multiple terminals according to the meeting requirements, and mixes or does not mix the sounds, and then sends them to each participating terminal, thereby realizing audio and video calls for multiple participants. In video conferencing, the fusion conference consumes more audio and video codec resources, so the server will include GPU (Graphics Processing Unit, graphics processor) resources. In order to further improve the computing density of the server, we will insert multiple GPUs into a single server. However, when scheduling the codec resources for the startup and operation of the video conference, currently only one server can be used as a codec resource for scheduling the startup and operation resources of the video conference. When multiple GPUs are inserted into the server, each CPU or GPU cannot be used as a codec resource for resource scheduling, resulting in the inability to fully utilize all the codec resources of the CPU and GPU of the multi-GPU server. Summary of the invention

[0003] The embodiments of the present application provide a method and electronic device for starting a video conference, which are used to implement unified resource scheduling for starting a video conference using each CPU or GPU in a server cluster as a codec resource, thereby fully utilizing various codec resources on multi-GPU servers and improving the computing density of the cluster.

[0004] The present application embodiment provides a method for starting a video conference, including:

[0005] Each CPU and GPU in the server cluster respectively starts a media control service as a codec unit; and stores a media control service directory; the media control service directory at least includes: a service name of the started media control service corresponding to each CPU and GPU, and a first codec resource set according to the codec capability of each CPU and GPU;

[0006] When a video conference request is received, for each media control service in the media control service directory, the following operations are performed:

[0007] Acquire the first codec resource corresponding to the media control service;

[0008] If the media control service is started and a media service is running a video conference, the second codec resource occupied by the running video conference is obtained; if not, the second codec resource is 0;

[0009] Calculating a difference between the first codec resource and the second codec resource to determine current remaining codec resources of the media control service;

[0010] Determine a set of media control services whose current remaining codec resources are greater than the codec resources required for the requested video conference;

[0011] Selecting a media control service from the set as a target media control service;

[0012] A start instruction of the requested video conference is sent to the target media control service, so that the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference.

[0013] Through this method, each CPU and GPU in the server cluster respectively starts a media control service as a codec unit; and stores a media control service directory; the media control service directory at least includes: the service name of the started media control service corresponding to each CPU and GPU, and the first codec resource set according to the codec capability of each CPU and GPU; when a video conference request is received, for each media control service in the media control service directory, respectively execute: obtain the first codec resource corresponding to the media control service; if the media control service starts a media service that is running a video conference, obtain the second codec resource occupied by the running video conference; if not, the second codec resource is 0; calculate the first codec The method comprises the steps of: determining the difference between the code resources and the second code resources, determining the current remaining code resources of the media control service; determining a set of media control services whose current remaining code resources are greater than the code resources required for the requested video conference; selecting a media control service from the set as a target media control service; sending a start instruction of the requested video conference to the target media control service, so that the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference, thereby realizing unified resource scheduling for starting and running the video conference with each CPU or GPU in the server cluster as a code resource, thereby realizing full utilization of various code resources on multi-GPU servers and improving the computing density of the cluster.

[0014] In some embodiments, determining the target media control service includes:

[0015] According to the codec units corresponding to the media control services in the media control service directory, determine the media control services whose codec units are GPUs, and if the current remaining codec resources of at least one media control service whose codec unit is GPU are greater than the codec resources required for the requested video conference, select one of the at least one media control service whose codec unit is GPU as the target media control service;

[0016] When the media control services whose codec unit is a GPU do not meet the codec resources required for the requested video conference, the media control services whose codec unit is a CPU are determined according to the media control service directory; if the current remaining codec resources of at least one media control service whose codec unit is a CPU are greater than the codec resources required for the requested video conference, one of the media control services whose codec unit is a CPU is selected as the target media control service.

[0017] Through this method, when determining to start the media control service of the video conference, the media control service using the GPU as the encoding and decoding unit is preferentially used to start the media service of the video conference, thereby reducing the operating load of the CPU.

[0018] In some embodiments, the first codec resource includes a codec capability initial value, an encoding capability initial value, and a decoding capability initial value, and determining a target media control service from the media control service of the codec unit being a GPU includes:

[0019] For each media control service whose encoding and decoding unit is a GPU, when the media control service is started and a media service is running a video conference, determine the encoding capacity value and the decoding capacity value occupied by the running video conference; calculate the difference between the initial value of the encoding capacity of the media control service and the occupied encoding capacity value, and the difference between the initial value of the decoding capacity and the occupied decoding capacity value, to obtain the encoding capacity remaining value and the decoding capacity remaining value of the media control service;

[0020] Obtain the latest CPU resource idle value reported by the media control service of the GPU whose codec unit is a GPU according to a set period, determine the media control services whose encoding capacity remaining value is greater than the encoding capacity value required for the requested video conference, whose decoding capacity remaining value is greater than the decoding capacity value required for the requested video conference, and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest encoding capacity remaining value as the target media control service.

[0021] Through this method, it is possible to determine the target media control service from the media control services whose encoding and decoding units are GPUs.

[0022] In some embodiments, determining a target media control service from the media control services of the codec unit being a CPU includes:

[0023] For each media control service whose codec unit is a CPU, when the media control service starts a media service that is running a video conference, determine the codec capacity value occupied by the running video conference; calculate the difference between the initial codec capacity value of the media control service and the occupied codec capacity value to obtain the codec capacity remaining value of the media control service;

[0024] Obtain the latest CPU resource idle value reported by the media control service of the codec unit as CPU according to the set period, determine the media control service whose codec capacity remaining value is greater than the codec capacity value required for the requested video conference and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest codec capacity remaining value as the target media control service.

[0025] Through this method, it is possible to determine the target media control service from the media control services whose encoding and decoding unit is a CPU.

[0026] In some embodiments, the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference, including:

[0027] The target media control service obtains a service type value set according to the corresponding CPU or GPU model when starting the service, and / or a GPU index value set according to the position sequence of the corresponding GPU in the corresponding server, and passes it into the media service startup script;

[0028] The media service startup script sets the environment variable dynamic link library path to the path of the encoding library version corresponding to the service type value according to the service type value, starts the media service corresponding to the requested video conference, and runs the requested video conference through the media service.

[0029] Through this method, it is possible to start the media service of the video conference through the target media control service.

[0030] The present application embodiment provides a method for controlling a terminal to access a video conference, including:

[0031] When receiving a request initiated by a terminal to access a video conference started and running by any of the above methods, determining a target media control service that is running the requested video conference;

[0032] Determine the total number of terminals currently accessed by the server to which the target media control service belongs. When the total number of terminals currently accessed is less than a preset value, access the terminals through the server to which the target media control service belongs; otherwise, access the terminals through other servers whose total number of terminals currently accessed is the smallest and less than the preset value.

[0033] Through the method, it is possible to preferentially access the terminal by using the server to which the target media control service for starting the video conference belongs, thereby reducing the network bandwidth occupied by the cross-server transmission of the media stream and avoiding insufficient network bandwidth.

[0034] In some embodiments, determining to access the terminal through the server to which the target media control service belongs includes:

[0035] Obtain the number of terminals currently connected to the media service started by the media control service using the CPU as the encoding and decoding unit in the server to which the target media control service belongs, and the number of terminals currently connected to the media proxy service of the server, calculate the sum, and obtain the total number of terminals currently connected to the server;

[0036] When the total number of terminals is less than a preset value, determining whether the target media control service satisfies: the encoding and decoding unit of the target media control service is a CPU, and the remaining access capacity of the media service started by the CPU is not 0;

[0037] If yes, accessing the terminal through the media service started by the target media control service; if no, accessing the terminal through the media proxy service of the server to which the target media control service belongs;

[0038] Among them, the media control service with the codec unit as the CPU can start the media service to access the participating terminals of the video conference where the media service is running; the media proxy service refers to the service for accessing any participating terminal of the video conference that is started in each server in the server cluster before starting the media control service in the server; the same server only includes one media control service with the CPU as the codec unit.

[0039] Through this method, the scheduling terminal is enabled to directly join the conference from the media service started by the target media control service that starts the video conference first, and join the conference from the media proxy service when the media service has no access capacity, thereby avoiding insufficient network bandwidth.

[0040] In some embodiments, determining that the terminal is accessed through the server to which the target media control service belongs further includes:

[0041] According to the service name of each media control service in the media control service directory, determine that the media control services belonging to the same server as the target media control service constitute a target media control service set;

[0042] Obtaining the number of terminals currently connected to the media service started by each media control service in the target media control service set and the number of terminals currently connected to the media proxy service of the server to which the target media control service belongs, and calculating the sum, to obtain the total number of terminals currently connected to the server to which the target media control service belongs;

[0043] When the total number of terminals is less than a preset value, determining whether the remaining access capacity of the media service started by the target media control service is 0;

[0044] If not, access the terminal through the media service started by the target media control service; if yes, access the terminal through the media proxy service of the server to which the target media control service belongs;

[0045] Among them, each of the media control services can start a media service that can access the participating terminals of the video conference running the media service; the media proxy service refers to a service for accessing any video conference participating terminal that is started in each server in the server cluster before starting the media control service in the server.

[0046] Through this method, the scheduling terminal is enabled to preferentially join the conference from the media service of the video conference that the terminal is requesting to join, rather than joining the conference from the media proxy service, thereby reducing network delay.

[0047] In some embodiments, obtaining the target media control service set includes:

[0048] According to the service name of the target media control service, determine the media control services having the same service name as the service name of the target media control service to form a target media control service set;

[0049] The service names of all media control services of the same server include the service name of the media control service using the CPU as the encoding and decoding unit in the server.

[0050] Through this method, all media control services in a server can be determined according to the service names.

[0051] Another embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.

[0052] Furthermore, according to an embodiment, for example, a computer program product for a computer is provided, which includes software code portions, and when the product is run on the computer, these software code portions are used to perform the steps of the method defined above. The computer program product may include a computer-readable medium having the software code portions stored thereon. Furthermore, the computer program product may be directly loaded into the internal memory of the computer and / or sent via a network through at least one of an upload process, a download process, and a push process.

[0053] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A schematic diagram of the structure of a server cluster provided in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of the structure of a video conferencing system software provided in an embodiment of the present application;

[0057] Figure 3 A schematic diagram of the overall process of a method for starting a video conference provided in an embodiment of the present application;

[0058] Figure 4 A schematic diagram of the overall process of a method for controlling a terminal to access a video conference provided in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of a specific process of starting a video conference operation provided in an embodiment of the present application;

[0060] Figure 6 A specific flow chart of determining a target media control service for starting a video conference provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of a specific process of controlling a terminal to access a video conference provided in an embodiment of the present application;

[0062] Figure 8A schematic diagram of another specific process of controlling a terminal to access a video conference provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] The embodiments of the present application provide a method and electronic device for starting a video conference, which are used to implement unified resource scheduling for starting a video conference using each CPU or GPU in a server cluster as a codec resource, thereby fully utilizing various codec resources on multi-GPU servers and improving the computing density of the cluster.

[0066] Among them, the method and the device are based on the same application concept. Since the method and the device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0067] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0068] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to only those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.

[0069] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0070] It should be noted that the technical solution provided in the embodiment of the present application forms a server cluster by stacking multiple servers, and starts a media control service with each CPU and GPU as a codec unit, and stores the service name of the media control service corresponding to each CPU and GPU and the pre-set initial codec resources. When starting a video conference, for each media control service, the codec resources occupied by the video conference running by the media control service are determined, and then the difference between the initial codec resources and the occupied codec resources are calculated to obtain the current remaining codec resources of the media control service, and then the target media control service for starting the video conference is determined based on the current remaining codec resources of each media control service for illustration, but it is not limited to this.

[0071] The video conferencing system includes servers and various participating devices such as soft and hard terminals, and recording and broadcasting servers. The terminal collects images and sounds and sends them to the server after encoding. The server will fuse or not fuse the images sent by multiple terminals according to the meeting requirements, and mix or not mix the sounds before sending them to each participating terminal, thereby realizing audio and video calls for multiple participants. In video conferencing, fusion conferences consume more audio and video codec resources, so the server will include GPU resources. In order to further improve the computing density of the server, we will insert multiple GPUs into a single server. However, when scheduling the codec resources for the start-up and operation of the video conference, currently only one server can be used as a codec resource for scheduling the start-up and operation resources of the video conference. When multiple GPUs are inserted into the server, each CPU or GPU cannot be used as a codec resource for resource scheduling, resulting in the inability to fully utilize all the codec resources of the CPU and GPU of the multi-GPU server.

[0072] In order to solve the above problems, the embodiment of the present application provides a method for starting a video conference, which is applied to a server cluster. The server cluster is composed of a plurality of servers of different or same models, one of which is a master server and the other servers are slave servers. Multiple media control services are started in each server, and each media control service uses a CPU (including CPU, integrated graphics card GPU) or GPU (independent graphics card GPU) as a codec unit (a CPU or GPU is equivalent to a virtual media node), for example Figure 1 As shown in the figure, the server cluster is composed of two stacked servers, each of which is equipped with three GPUs of different models, that is, each server contains four virtual media nodes, each of which is connected to the motherboard via a PCIE (peripheral component interconnect express) bus. Different servers, as well as servers and terminals, are connected via an access network (external network).

[0073] See also Figure 2 , a structural diagram of a video conferencing system software provided by an embodiment of the present application includes a signaling service, a media service, a media proxy service, a media control service and a message bus service. A media control service can be started on each media node (i.e., CPU or GPU), and each media node can start a media service through its own media control service to provide encoding and decoding computing services for video conferencing; wherein, the media service started by the media control service of each GPU virtual media node cannot directly access the participating terminal of the video conference where the media service is running, and needs to access the terminal through the media proxy service started on the server to which it belongs, and the media service of each CPU virtual media node can directly access the participating terminal of the video conference started on the media node.

[0074] When the video conferencing system is started, execute:

[0075] For each server in the server cluster, a media proxy service is started on the server, and its listening port is set to, for example, 38182, for subsequent access to the terminal, and audio and video stream transmission is performed with the accessed terminal.

[0076] Get the CPU model of the server, determine its codec capability based on the CPU model, and then set a suitable initial value of the codec capability, totalCapacity, based on the codec capability; and configure the media service type based on the CPU model. For a CPU with a core graphics card that supports Intel MediaSDK (high-performance media processor) codec, set its media service type, msType, to mediasdk, and set the media service type, msType, of other CPUs to cpu. For media services of the mediasdk type, the CPU's built-in core graphics card GPU is used for codecs (or hard coding); for media services of the cpu type, the CPU's own computing power is used for codecs through software (or soft coding).

[0077] For the CPU, according to the above configured codec capability value, configure the system environment variables, for example, MS_TYPE value is msType, TOTAL_CAP value is totalCapacity, FIRST_MSC value is 1. Then start a media control service with the CPU as the codec unit, which is the first media control service of the server.

[0078] Traverse the hardware information of the GPU (i.e., independent graphics card GPU) in each server, and load the initialization driver corresponding to each GPU according to the manufacturer model of each GPU. For each GPU, set the initial value of encoding capacity encodeCapacity, the initial value of decoding capacity decodeCapacity, and the media service type msType according to the manufacturer model of the GPU. This application does not limit the specific media service type. Different GPU manufacturers correspond to different media service types. For example, for NETINT or NVIDIA GPU manufacturers, msType is set to netint or nvidia. According to the position order of each GPU in the server to which it belongs, set the GPU index value gpuIndex to distinguish multiple GPUs of different models inserted on the same server. For each GPU, configure system environment variables, for example: MS_TYPE value is msType, GPU_INDEX value is gpuIndex, DECODE_CAP is decodeCapacity, ENCODE_CAP value is encodeCapacity, TOTAL_CAP value is 0, FIRST_MSC value is 0; start a media control service with each GPU as the encoding and decoding unit, and set the index value MSC_INDEX corresponding to the media control service; MSC_INDEX is used to distinguish all media control services on a server; each time a media control service is started, MSC_INDEX increases by 1.

[0079] When each media control service is initialized, execute:

[0080] Read the environment variables of this media control service from MS_TYPE to msType, GPU_INDEX to gpuIndex, MSC_INDEX to mscIndex, and FIRST_MSC to isFirstMSC. Generate the service name of this media control service using the media service type msType and GPU index value gpuIndex information corresponding to this media control service, which is used to identify multiple media control services started by the server cluster; use the service name of this media control service to register to the message bus (a public communication transmission tool for transmitting messages between media control services), for example: if msType is ni0203 and gpuIndex is 0, the service name can be s.msc.10.33.18.38.ni0203.0.

[0081] Determine whether this media control service is the first media control service in the server to which it belongs. If so (for example, the system environment variable isFirstMSC is 1), set the media proxy service port number msProxyPort of this media control service to the actual listening port number, for example, 38182. If not, set the media proxy service port number to, for example, 0.

[0082] After each media control service is initialized, it will send ReportCapacity, which contains the initial value of totalCapacity for encoding and decoding, decodeCapacity for encoding, decodeCapacity for decoding, and msProxyPort for the media proxy service port, to the signaling service; and each media control service will send MSCHeartbeat messages to the signaling service according to the set period. The heartbeat information includes the sum of periodically collected CPU idle (the proportion of time when the CPU is idle) and iowait value (the CPU is idle and there are unfinished disk IO requests), idleIowaitRate (CPU resource idle value), which represents the current idleness of the media control service. Each media control service maintains a heartbeat with the corresponding media service it has started, and performs process daemonization, automatically restarting when an abnormal situation occurs.

[0083] When the media service starts, execute:

[0084] Input in the media service startup script includes: msType, gpuIndex and other media service parameters msArgs; determine the media service type msType value. If the msType value is mediasdk, set the environment variable dynamic link library path to the path where the intel mediasdk encoding library version is located; if the msType value is cpu, set the environment variable dynamic link library path to the path where the cpu encoding library version is located; if the msType value is ni0203, set the environment variable dynamic link library path to the path where the GPU encoding library of this model is located; and so on. For each GPU, set the environment variable GPU_ID to the gpuIndex value. Finally, use the remaining parameters msArgs to start the media service corresponding to the video conference. msArgs refers to the command line parameters entered in the script. For example, the command line is called startMS.sh msType gpuIndex msArgs... After using the msType and gpuIndex parameters here, msArgs... is passed to the command line of the actual media service MS, such as: MS msArgs... to start the media service.

[0085] When the media service starts a video conference, it executes:

[0086] Load the corresponding audio and video encoding library according to the environment variable dynamic link library path; when the audio and video encoding library is initialized, bind the corresponding GPU instance according to the environment variable GPU_ID, that is, use the corresponding GPU for audio and video encoding and decoding calculations; send heartbeat information to its corresponding media control service.

[0087] Signaling services, used to perform:

[0088] Receive the capability value message sent by each media control service and save it to the media node directory (each media node in the directory corresponds to a media control service), as shown in Table 1; and receive the heartbeat message sent by each media control service, and use the CPU resource idle value carried in the heartbeat message to update the historical CPU resource idle value in the media node directory.

[0089] When starting a video conference, if the user has allocated a media node for the video conference, the media node is forced to be used to start the media service of the video conference, and the scheduling ends; if the video conference has not allocated a media node, the encoding overhead, decoding overhead and encoding and decoding overhead required for the video conference are calculated (the total decoding overhead is obtained by converting the encoding overhead to the decoding overhead); then all media nodes are traversed, and a media node that can meet the encoding and decoding resources required for the video conference is selected from the media nodes whose encoding and decoding units are GPUs to start the video conference; if the media nodes whose encoding and decoding units are GPUs do not meet the requirements, a media node that can meet the encoding and decoding resources required for the video conference is selected from the media nodes whose encoding and decoding units are CPUs to start the video conference.

[0090] When the media node for starting the video conference is successfully selected, an instruction for starting the corresponding media service of the video conference is sent to the media control service corresponding to the selected media node.

[0091]

[0092]

[0093] Table 1 Media node directory

[0094] When a request for accessing a video conference is received from a terminal, when it is determined that the total number of terminals currently connected to the server to which the media node that starts the video conference belongs is less than the preset value, that is, the server has terminal access capability, the terminal is accessed through the media service corresponding to the media node or the media proxy service of the server; otherwise, the terminal is accessed through other servers whose total number of currently connected terminals is the smallest and less than the preset value.

[0095] See also Figure 3 , a method for starting a video conference provided in an embodiment of the present application includes:

[0096] Step S301, each CPU and GPU in the server cluster respectively starts a media control service as a codec unit; and stores a media control service directory; the media control service directory at least includes: the service name of the started media control service corresponding to each CPU and GPU, and the first codec resource set according to the codec capability of each CPU and GPU; when a video conference request is received, for each media control service in the media control service directory, respectively execute: obtain the first codec resource corresponding to the media control service; if the media control service starts a media service that is running a video conference, obtain the second codec resource occupied by the running video conference; if not, the second codec resource is 0; calculate the difference between the first codec resource and the second codec resource to determine the current remaining codec resource of the media control service; determine the media control service set whose current remaining codec resource is greater than the codec resource required for the requested video conference; select a media control service from the set as the target media control service;

[0097] The CPU may be, for example, a CPU or an integrated graphics card GPU (also known as a core graphics GPU, which uses the extra space inside the processor CPU to integrate the GPU and the CPU on the same chip); the GPU may be, for example, an independent graphics card GPU (referred to as an independent graphics GPU, in which the GPU end is manufactured on a circuit board and connected to the motherboard through a PCIE slot). The first codec resource may include, for example, the above-mentioned codec capability initial value, encoding capability initial value, and decoding capability initial value.

[0098] Step S302: Send a start instruction of the requested video conference to the target media control service, so that the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference.

[0099] To reduce the CPU operating load, in some embodiments, determining the target media control service includes:

[0100] According to the codec units corresponding to the media control services in the media control service directory, determine the media control services whose codec units are GPUs, and if the current remaining codec resources of at least one media control service whose codec unit is GPU are greater than the codec resources required for the requested video conference, select one of the at least one media control service whose codec unit is GPU as the target media control service;

[0101] When the media control services whose codec unit is a GPU do not meet the codec resources required for the requested video conference, the media control services whose codec unit is a CPU are determined according to the media control service directory; if the current remaining codec resources of at least one media control service whose codec unit is a CPU are greater than the codec resources required for the requested video conference, one of the media control services whose codec unit is a CPU is selected as the target media control service.

[0102] In some embodiments, the first codec resource includes a codec capability initial value, an encoding capability initial value, and a decoding capability initial value, and determining a target media control service from the media control service of the codec unit being a GPU includes:

[0103] For each media control service whose encoding and decoding unit is a GPU, when the media control service is started and a media service is running a video conference, determine the encoding capacity value and the decoding capacity value occupied by the running video conference; calculate the difference between the initial value of the encoding capacity of the media control service and the occupied encoding capacity value, and the difference between the initial value of the decoding capacity and the occupied decoding capacity value, to obtain the encoding capacity remaining value and the decoding capacity remaining value of the media control service;

[0104] Obtain the latest CPU resource idle value reported by the media control service of the GPU whose codec unit is a GPU according to a set period, determine the media control services whose encoding capacity remaining value is greater than the encoding capacity value required for the requested video conference, whose decoding capacity remaining value is greater than the decoding capacity value required for the requested video conference, and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest encoding capacity remaining value as the target media control service.

[0105] The encoding capability remaining value, for example, 64 channels, indicates that the media control service can encode 64 channels of video; the decoding capability remaining value, for example, 16 channels, indicates that the media control service can decode 16 channels of video.

[0106] The encoding and decoding capability value required for the video conference refers to the total decoding capability value obtained by converting the encoding capability value required for the video conference into the decoding capability value.

[0107] For example, as shown in Table 1 above, the media control service (i.e., media node) whose codec unit is a CPU has only an initial value of codec capability, and both the initial value of encoding capability and the initial value of decoding capability are 0. The more the encoding capability value is occupied by the running video conference, the smaller the remaining decoding capability value is. Conversely, the more the decoding capability value is occupied, the smaller the remaining encoding capability value is. The media control service whose codec unit is a GPU has independent initial value of encoding capability and initial value of decoding capability, which do not affect each other. Therefore, when selecting a media control service for starting a video conference, the media control service whose codec unit is a GPU is preferred.

[0108] Normally, the number of decoding paths of a GPU is much larger than the number of encoding paths. For example, a GPU supports 64 decoding paths but only 16 encoding paths. When using this GPU for encoding and decoding, the CPU is generally relatively idle. Therefore, when using GPU encoding and decoding, the bottleneck of the video conferencing system is generally in the encoding capacity value. The GPU with the largest remaining encoding capacity value is preferentially selected as the media control service started by the encoding and decoding unit.

[0109] In some embodiments, determining a target media control service from the media control services of the codec unit being a CPU includes:

[0110] For each media control service whose codec unit is a CPU, when the media control service starts a media service that is running a video conference, determine the codec capacity value occupied by the running video conference; calculate the difference between the initial codec capacity value of the media control service and the occupied codec capacity value to obtain the codec capacity remaining value of the media control service;

[0111] Obtain the latest CPU resource idle value reported by the media control service of the codec unit as CPU according to the set period, determine the media control service whose codec capacity remaining value is greater than the codec capacity value required for the requested video conference and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest codec capacity remaining value as the target media control service.

[0112] In some embodiments, the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference, including:

[0113] The target media control service obtains the service type value (e.g., mediasdk, cpu, netint, nvidia) set according to the corresponding CPU or GPU model when starting the service, and / or the GPU index value set according to the position sequence of the corresponding GPU in the corresponding server, and passes it into the media service startup script;

[0114] The media service startup script sets the environment variable dynamic link library path to the path of the encoding library version corresponding to the service type value according to the service type value, starts the media service corresponding to the requested video conference, and runs the requested video conference through the media service.

[0115] See also Figure 4 , a method for controlling a terminal to access a video conference provided in an embodiment of the present application includes:

[0116] Step S401: upon receiving a request initiated by a terminal to access a video conference started and running by any of the above methods, determining a target media control service that is running the requested video conference;

[0117] Step S402: determine the total number of terminals currently connected to the server to which the target media control service belongs; when the total number of terminals currently connected is less than a preset value, access the terminals through the server to which the target media control service belongs; otherwise, access the terminals through other servers whose total number of terminals currently connected is the smallest and less than the preset value.

[0118] In order to enable the scheduling terminal to directly join the conference from the media service started by the target media control service that starts the video conference in priority, and join the conference from the media proxy service when the media service has no access capacity, so as to avoid insufficient network bandwidth, in some embodiments, determining to access the terminal through the server to which the target media control service belongs includes:

[0119] Obtain the number of terminals currently connected to the media service started by the media control service using the CPU as the encoding and decoding unit in the server to which the target media control service belongs, and the number of terminals currently connected to the media proxy service of the server, calculate the sum, and obtain the total number of terminals currently connected to the server;

[0120] When the total number of terminals is less than a preset value, determining whether the target media control service satisfies: the encoding and decoding unit of the target media control service is a CPU, and the remaining access capacity of the media service started by the CPU is not 0;

[0121] If yes, accessing the terminal through the media service started by the target media control service; if no, accessing the terminal through the media proxy service of the server to which the target media control service belongs;

[0122] Among them, the media control service with the codec unit as the CPU can start the media service to access the participating terminals of the video conference where the media service is running; the media proxy service refers to the service for accessing any participating terminal of the video conference that is started in each server in the server cluster before starting the media control service in the server; the same server only includes one media control service with the CPU as the codec unit.

[0123] The remaining access capacity, for example 100, means that 100 terminals can access the conference.

[0124] In order to enable the scheduling terminal to preferentially join the media service of the video conference that is currently running and requesting the terminal to join, thereby reducing network latency, in some embodiments, determining to access the terminal through the server to which the target media control service belongs also includes:

[0125] According to the service name of each media control service in the media control service directory, determine that the media control services belonging to the same server as the target media control service constitute a target media control service set;

[0126] Obtaining the number of terminals currently connected to the media service started by each media control service in the target media control service set and the number of terminals currently connected to the media proxy service of the server to which the target media control service belongs, and calculating the sum, to obtain the total number of terminals currently connected to the server to which the target media control service belongs;

[0127] When the total number of terminals is less than a preset value, determining whether the remaining access capacity of the media service started by the target media control service is 0;

[0128] If not, access the terminal through the media service started by the target media control service; if yes, access the terminal through the media proxy service of the server to which the target media control service belongs;

[0129] Among them, each of the media control services can start a media service that can access the participating terminals of the video conference running the media service; the media proxy service refers to a service for accessing any video conference participating terminal that is started in each server in the server cluster before starting the media control service in the server.

[0130] To determine a media control service that belongs to the same server as the target media control service, in some embodiments, obtaining the target media control service set includes:

[0131] According to the service name of the target media control service, determine the media control services having the same service name as the service name of the target media control service to form a target media control service set;

[0132] The service names of all media control services of the same server include the service name of the media control service using the CPU as the encoding and decoding unit in the server.

[0133] For example, s.msc.10.32.38.12 and s.msc.10.32.38.12.ni0203.0 shown in Table 1 above both contain s.msc.10.32.38.12, and the media control services corresponding to these two service names belong to the same server.

[0134] Several specific method flow examples are given below.

[0135] Embodiment 1:

[0136] See also Figure 5 , a method for starting a video conference provided in an embodiment of the present application, for example, executing the method through the above-mentioned signaling service, specifically includes the following steps:

[0137] Step S501: Start a media proxy service in each server respectively, and set the port number of each media proxy service;

[0138] Step S502: obtaining CPU device information of each server in the server cluster, starting a media control service with the CPU as a codec unit for each CPU, and configuring service parameters such as codec capability initial value, service type, and service identifier for the media control service;

[0139] Service type, for example, if the corresponding CPU is an Intel core graphics CPU that supports Intel MediaSDK (high-performance media processor) codec, its media service type msType is set to mediasdk; for example, if the corresponding CPU is a core graphics GPU, its media service type msType is set to cpu.

[0140] The service identifier, such as the FIRST_MSC value mentioned above, sets the FIRST_MSC value to 1, indicating that the corresponding media control service is the first media control service in the server, and the codec unit of the media control service is the CPU; sets the FIRST_MSC value to 0, indicating that the codec unit of the corresponding media control service is the GPU.

[0141] Step S503: Obtain GPU device information of each server in the server cluster, start a media control service with the GPU as a codec unit for each GPU, and configure service parameters such as an initial value of encoding capability, an initial value of decoding capability, a GPU index value, a service type, and a service identifier for the media control service;

[0142] The GPU index value is set according to the position order of the GPU in the server. For example, a GPU index value of 0 indicates that the corresponding GPU is the first GPU of the server.

[0143] Step S504: When the media control service is initialized, the corresponding media proxy service port number and service name are set according to the corresponding service identifier, and after the initialization is completed, the corresponding service name, initial value of the codec capability, initial value of the encoding capability, initial value of the decoding capability, and media proxy service port number are reported;

[0144] In this step, if the service identifier corresponding to a certain media control service, for example, the value of FIRST_MSC, is 1, the media proxy service port number of the media control service is set to the media proxy service port number of the corresponding server set in step S501.

[0145] It should be noted that the codec unit reports the service name, initial value of the codec capability, and the media proxy service port number for the media control service of the CPU; the codec unit reports the service name, initial value of the encoding capability, initial value of the decoding capability, and the media proxy service port number for the media control service of the GPU.

[0146] Step S505: After the initialization is completed, the media control service reports the corresponding CPU resource idle value according to the set period;

[0147] Step S506: receiving the service name, codec capability initial value, encoding capability initial value, decoding capability initial value, and media proxy service port number sent by each media control service, and saving them to the media control service directory; and receiving the CPU resource idle value sent by each media control service according to a set period, and updating the historical CPU resource idle value in the media control service directory;

[0148] Step S507: when receiving a video conference request, determine whether the video conference has been assigned a media control service. If so, use the assigned media control service as the target media control service. If not, proceed to step S508.

[0149] Step S508: for each media control service in the media control service directory, determine the current remaining codec resources of the media control service; according to the current remaining codec resources of each media control service, determine a media control service whose current remaining codec resources meet the codec resources required for the requested video conference as the target media control service;

[0150] Step S509: Sending a start instruction of the requested video conference to the target media control service;

[0151] Step S510: The target media control service passes the corresponding service type and / or GPU index value to the media service startup script according to the startup instruction. The media service startup script starts the media service corresponding to the requested video conference and then runs the requested video conference.

[0152] Embodiment 2:

[0153] See also Figure 6 , determining the specific steps of the target media control service for starting the video conference, including:

[0154] Step S601: Determine a media control service whose codec unit is a CPU and a media control service whose codec unit is a GPU according to a media proxy service port number in a media control service directory;

[0155] In this step, for example, the codec unit of the media control service whose media proxy service port number is 0 is the GPU; and the codec unit of the media control service whose media proxy service port number is 38182 is the CPU.

[0156] Step S602: for each media control service whose codec unit is a GPU, determine whether the media service started by the media control service has a running video conference; if so, proceed to step S603; if not, proceed to step S604;

[0157] Step S603: determining the encoding capacity value and decoding capacity value occupied by the video conference being run by the media control service, calculating the difference between the initial value of the encoding capacity of the media control service and the occupied encoding capacity value, and the difference between the initial value of the decoding capacity and the occupied decoding capacity value, to obtain the encoding capacity remaining value and the decoding capacity remaining value of the media control service;

[0158] Step S604, obtaining the latest CPU resource idle value reported by the media control service whose codec unit is GPU according to the set period, determining that the media control services whose encoding capacity remaining value is greater than the encoding capacity value required by the requested video conference, whose decoding capacity remaining value is greater than the decoding capacity value required by the requested video conference, and whose latest CPU resource idle value is greater than the preset value form a media control service set 1;

[0159] Step S605: determine whether the number of media control services in the media control service set 1 is 0, if not, proceed to step S606; if yes, proceed to step S607;

[0160] Step S606: Select a media control service with the largest remaining coding capability from the media control service set 1 as the target media control service.

[0161] Step S607: for each media control service whose codec unit is a CPU, determine whether the media service started by the media control service has a running video conference; if so, proceed to step S608; if not, proceed to step S609;

[0162] Step S608: Determine the codec capacity value occupied by the video conference being run by the media control service, calculate the difference between the initial codec capacity value of the media control service and the occupied codec capacity value, and obtain the codec capacity remaining value of the media control service;

[0163] Step S609, obtaining the latest CPU resource idle value reported by the media control service whose codec unit is a CPU according to the set period, and determining that the media control services whose codec capacity remaining value is greater than the codec capacity value required by the requested video conference and whose latest CPU resource idle value is greater than the preset value form a media control service set 2;

[0164] Step S610, determining whether the number of media control services in the media control service set 2 is 0, if not, proceeding to step S611; if yes, proceeding to step S612;

[0165] Step S611: Select a media control service with the largest codec capability remaining value from the media control service set 2 as the target media control service;

[0166] Step S612: Return information indicating that the allocation of media control services has failed, indicating that the current media service capacity of the server cluster is insufficient.

[0167] Embodiment three:

[0168] See also Figure 7 , a method for controlling a terminal to access a video conference provided in an embodiment of the present application includes:

[0169] Assume that the media service of a video conference started by a media control service whose codec unit is a GPU cannot directly access the participating terminals of the video conference, while the media service of a video conference started by a media control service whose codec unit is a CPU can directly access the participating terminals of the video conference; the media proxy service can directly access any participating terminal of the video conference;

[0170] Step S701: when receiving a video conference access request sent by a terminal, counting the total number of terminals currently accessing the server to which the target media control service belongs;

[0171] In this step, the number of terminals currently connected to the media service started by the first media control service of the server to which the target media control service belongs (i.e., the media control service whose codec unit is the CPU) and the number of terminals currently connected to the media proxy service of the server are counted, and the two terminal numbers are added together to obtain the total number of terminals currently connected to the server to which the target media control service belongs.

[0172] Step S702: determine whether the total number of terminals currently connected to the server to which the target media control service belongs is less than a preset value. If so, proceed to step S703; if not, proceed to step S704;

[0173] Step S703, determining whether the target media control service satisfies: the codec unit of the target media control service is a CPU and the remaining access capacity of the started media service is not 0, if so, accessing the terminal through the media service started by the target media control service; if not, accessing the terminal through the media proxy service of the server to which the target media control service belongs;

[0174] Step S704: Using the same method as in step S701, the total number of terminals currently connected to each other server is counted, and the servers whose total number of terminals currently connected is less than a preset value are determined to form a server set;

[0175] Step S705: determine whether the number of servers in the server set is 0, if not, proceed to step S706; if yes, proceed to step S707;

[0176] Step S706: Determine a server with the smallest total number of terminals currently connected in the server set, and access the terminal through the media service started by the media proxy service of the server or the media control service whose codec unit is the CPU;

[0177] Step S707: Return terminal access failure information, indicating that the current terminal access capability of the server cluster is insufficient.

[0178] Embodiment 4:

[0179] See also Figure 8 Another method for controlling a terminal to access a video conference provided in an embodiment of the present application includes:

[0180] Assume that the media services started by each media control service in the server cluster can directly access any participating terminal of the video conference;

[0181] Step S801: According to the service names in the media control service directory, determine the media control services that belong to the same server as the target media control service to form a target media control service set;

[0182] In this step, the service names of all media control services of the same server include the service name of the media control service using the CPU as the encoding and decoding unit in the server.

[0183] Step S802: obtaining the number of terminals currently connected to the media service started by each media control service in the target media control service set and the number of terminals currently connected to the media proxy service of the server to which the target media control service belongs, and calculating the sum to obtain the total number of terminals currently connected to the server to which the target media control service belongs;

[0184] Step S803, determining whether the total number of terminals currently connected to the server to which the target media control service belongs is less than a preset value, if so, proceeding to step S804; if not, proceeding to step S807;

[0185] Step S804: determine whether the remaining access capacity of the media service started by the target media control service is 0. If not, proceed to step S805; if yes, proceed to step S806;

[0186] Step S805: The media service access terminal is started by the target media control service;

[0187] Step S806: access the terminal through the media proxy service of the server to which the target media control service belongs;

[0188] Step S807: Count the total number of terminals currently connected to other servers, and determine the target server whose total number of terminals currently connected is the smallest and smaller than a preset value;

[0189] Step S808: Access the terminal through the media proxy service of the target server.

[0190] The following is an introduction to the equipment or device provided in the embodiments of the present application, in which the explanations or examples of technical features that are the same or corresponding to those described in the above method will not be repeated later.

[0191] See also Fig. 9 , an electronic device provided in an embodiment of the present application includes:

[0192] The processor 900 is used to read the program in the memory 920 and execute the following process:

[0193] Each CPU and GPU in the server cluster respectively starts a media control service as a codec unit; and stores a media control service directory; the media control service directory at least includes: a service name of the started media control service corresponding to each CPU and GPU, and a first codec resource set according to the codec capability of each CPU and GPU;

[0194] When a video conference request is received, for each media control service in the media control service directory, the following operations are performed:

[0195] Acquire the first codec resource corresponding to the media control service;

[0196] If the media control service is started and a media service is running a video conference, the second codec resource occupied by the running video conference is obtained; if not, the second codec resource is 0;

[0197] Calculating a difference between the first codec resource and the second codec resource to determine current remaining codec resources of the media control service;

[0198] Determine a set of media control services whose current remaining codec resources are greater than the codec resources required for the requested video conference;

[0199] Selecting a media control service from the set as a target media control service;

[0200] A start instruction of the requested video conference is sent to the target media control service, so that the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference.

[0201] In some embodiments, determining the target media control service includes:

[0202] According to the codec units corresponding to the media control services in the media control service directory, determine the media control services whose codec units are GPUs, and if the current remaining codec resources of at least one media control service whose codec unit is GPU are greater than the codec resources required for the requested video conference, select one of the at least one media control service whose codec unit is GPU as the target media control service;

[0203] When the media control services whose codec unit is a GPU do not meet the codec resources required for the requested video conference, the media control services whose codec unit is a CPU are determined according to the media control service directory; if the current remaining codec resources of at least one media control service whose codec unit is a CPU are greater than the codec resources required for the requested video conference, one of the media control services whose codec unit is a CPU is selected as the target media control service.

[0204] In some embodiments, the first codec resource includes a codec capability initial value, an encoding capability initial value, and a decoding capability initial value, and determining a target media control service from the media control service of the codec unit being a GPU includes:

[0205] For each media control service whose encoding and decoding unit is a GPU, when the media control service is started and a media service is running a video conference, determine the encoding capacity value and the decoding capacity value occupied by the running video conference; calculate the difference between the initial value of the encoding capacity of the media control service and the occupied encoding capacity value, and the difference between the initial value of the decoding capacity and the occupied decoding capacity value, to obtain the encoding capacity remaining value and the decoding capacity remaining value of the media control service;

[0206] Obtain the latest CPU resource idle value reported by the media control service of the GPU whose codec unit is a GPU according to a set period, determine the media control services whose encoding capacity remaining value is greater than the encoding capacity value required for the requested video conference, whose decoding capacity remaining value is greater than the decoding capacity value required for the requested video conference, and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest encoding capacity remaining value as the target media control service.

[0207] In some embodiments, determining a target media control service from the media control services of the codec unit being a CPU includes:

[0208] For each media control service whose codec unit is a CPU, when the media control service starts a media service that is running a video conference, determine the codec capacity value occupied by the running video conference; calculate the difference between the initial codec capacity value of the media control service and the occupied codec capacity value to obtain the codec capacity remaining value of the media control service;

[0209] Obtain the latest CPU resource idle value reported by the media control service of the codec unit as CPU according to the set period, determine the media control service whose codec capacity remaining value is greater than the codec capacity value required for the requested video conference and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest codec capacity remaining value as the target media control service.

[0210] In some embodiments, the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference, including:

[0211] The target media control service obtains a service type value set according to the corresponding CPU or GPU model when starting the service, and / or a GPU index value set according to the position sequence of the corresponding GPU in the corresponding server, and passes it into the media service startup script;

[0212] The media service startup script sets the environment variable dynamic link library path to the path of the encoding library version corresponding to the service type value according to the service type value, starts the media service corresponding to the requested video conference, and runs the requested video conference through the media service.

[0213] The processor 900 is also used to read the program in the memory 920 and execute the following process:

[0214] When receiving a request initiated by a terminal to access a started video conference, determining a target media control service that is running the requested video conference;

[0215] Determine the total number of terminals currently accessed by the server to which the target media control service belongs. When the total number of terminals currently accessed is less than a preset value, access the terminals through the server to which the target media control service belongs; otherwise, access the terminals through other servers whose total number of terminals currently accessed is the smallest and less than the preset value.

[0216] In some embodiments, determining to access the terminal through the server to which the target media control service belongs includes:

[0217] Obtain the number of terminals currently connected to the media service started by the media control service using the CPU as the encoding and decoding unit in the server to which the target media control service belongs, and the number of terminals currently connected to the media proxy service of the server, calculate the sum, and obtain the total number of terminals currently connected to the server;

[0218] When the total number of terminals is less than a preset value, determining whether the target media control service satisfies: the encoding and decoding unit of the target media control service is a CPU, and the remaining access capacity of the media service started by the CPU is not 0;

[0219] If yes, accessing the terminal through the media service started by the target media control service; if no, accessing the terminal through the media proxy service of the server to which the target media control service belongs;

[0220] Among them, the media control service with the codec unit as the CPU can start the media service to access the participating terminals of the video conference where the media service is running; the media proxy service refers to the service for accessing any participating terminal of the video conference that is started in each server in the server cluster before starting the media control service in the server; the same server only includes one media control service with the CPU as the codec unit.

[0221] In some embodiments, determining that the terminal is accessed through the server to which the target media control service belongs further includes:

[0222] According to the service name of each media control service in the media control service directory, determine that the media control services belonging to the same server as the target media control service constitute a target media control service set;

[0223] Obtaining the number of terminals currently connected to the media service started by each media control service in the target media control service set and the number of terminals currently connected to the media proxy service of the server to which the target media control service belongs, and calculating the sum, to obtain the total number of terminals currently connected to the server to which the target media control service belongs;

[0224] When the total number of terminals is less than a preset value, determining whether the remaining access capacity of the media service started by the target media control service is 0;

[0225] If not, access the terminal through the media service started by the target media control service; if yes, access the terminal through the media proxy service of the server to which the target media control service belongs;

[0226] Among them, each of the media control services can start a media service that can access the participating terminals of the video conference running the media service; the media proxy service refers to a service for accessing any video conference participating terminal that is started in each server in the server cluster before starting the media control service in the server.

[0227] In some embodiments, obtaining the target media control service set includes:

[0228] According to the service name of the target media control service, determine the media control services having the same service name as the service name of the target media control service to form a target media control service set;

[0229] The service names of all media control services of the same server include the service name of the media control service using the CPU as the encoding and decoding unit in the server.

[0230] In some embodiments, the electronic device provided by the embodiments of the present application further includes a transceiver 910 for receiving and sending data to a terminal under the control of the processor 900 .

[0231] Among them, Fig. 9 In the embodiment of the present invention, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 900 and memory represented by memory 920. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are not further described herein. The bus interface provides an interface. The transceiver 910 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.

[0232] The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 can store data used by the processor 900 when performing operations.

[0233] In some embodiments, the processor 900 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device).

[0234] The embodiment of the present application provides a computing device, which may be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.

[0235] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.

[0236] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.

[0237] The present application embodiment also provides a computer program product or computer program, which includes a computer instruction, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device executes any of the methods described in the above embodiments. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0238] The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the embodiment of the present application, which includes a program for executing any of the methods provided in the embodiment of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.

[0239] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0240] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0241] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0242] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0243] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0244] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for starting a video conference, applied to a server cluster, characterized in that: Each CPU and GPU in the server cluster starts a media control service as a codec unit; and storing a media control service directory; the media control service directory at least includes: a service name of a started media control service corresponding to each CPU and GPU, and a first codec resource set according to the codec capability of each CPU and GPU; When a video conference request is received, for each media control service in the media control service directory, the following operations are performed: Acquire the first codec resource corresponding to the media control service; If the media control service is started and a media service is running a video conference, the second codec resource occupied by the running video conference is obtained; if not, the second codec resource is 0; Calculating a difference between the first codec resource and the second codec resource to determine current remaining codec resources of the media control service; Determine a set of media control services whose current remaining codec resources are greater than the codec resources required for the requested video conference; Selecting a media control service from the set as a target media control service; A start instruction of the requested video conference is sent to the target media control service, so that the target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference.

2. The method according to claim 1, characterized in that Determining the target media control service includes: According to the codec units corresponding to the media control services in the media control service directory, determine the media control services whose codec units are GPUs, and if the current remaining codec resources of at least one media control service whose codec unit is GPU are greater than the codec resources required for the requested video conference, select one of the at least one media control service whose codec unit is GPU as the target media control service; When the media control services whose codec unit is a GPU do not meet the codec resources required for the requested video conference, the media control services whose codec unit is a CPU are determined according to the media control service directory; if the current remaining codec resources of at least one media control service whose codec unit is a CPU are greater than the codec resources required for the requested video conference, one of the media control services whose codec unit is a CPU is selected as the target media control service.

3. The method according to claim 2, characterized in that The first codec resource includes a codec capability initial value, an encoding capability initial value, and a decoding capability initial value, and determining a target media control service from the media control service of the codec unit being a GPU includes: For each media control service whose encoding and decoding unit is a GPU, when the media control service is started and a media service is running a video conference, determine the encoding capacity value and the decoding capacity value occupied by the running video conference; calculate the difference between the initial value of the encoding capacity of the media control service and the occupied encoding capacity value, and the difference between the initial value of the decoding capacity and the occupied decoding capacity value, to obtain the encoding capacity remaining value and the decoding capacity remaining value of the media control service; Obtain the latest CPU resource idle value reported by the media control service of the GPU whose codec unit is a GPU according to a set period, determine the media control services whose encoding capacity remaining value is greater than the encoding capacity value required for the requested video conference, whose decoding capacity remaining value is greater than the decoding capacity value required for the requested video conference, and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest encoding capacity remaining value as the target media control service.

4. The method according to claim 3, characterized in that Determining a target media control service from the media control service of the encoding and decoding unit being a CPU includes: For each media control service whose codec unit is a CPU, when the media control service starts a media service that is running a video conference, determine the codec capacity value occupied by the running video conference; calculate the difference between the initial codec capacity value of the media control service and the occupied codec capacity value to obtain the codec capacity remaining value of the media control service; Obtain the latest CPU resource idle value reported by the media control service of the codec unit as CPU according to the set period, determine the media control service whose codec capacity remaining value is greater than the codec capacity value required for the requested video conference and whose latest CPU resource idle value is greater than a preset value, and select the media control service with the largest codec capacity remaining value as the target media control service.

5. The method according to claim 1, characterized in that The target media control service starts the media service corresponding to the video conference according to the start instruction and then runs the requested video conference, including: The target media control service obtains a service type value set according to the corresponding CPU or GPU model when starting the service, and / or a GPU index value set according to the position sequence of the corresponding GPU in the corresponding server, and passes it into the media service startup script; The media service startup script sets the environment variable dynamic link library path to the path of the encoding library version corresponding to the service type value according to the service type value, starts the media service corresponding to the requested video conference, and runs the requested video conference through the media service.

6. A method for controlling a terminal to access a video conference, characterized in that: The method comprises: When receiving a request initiated by a terminal to access a video conference started and running by the method described in any one of claims 1 to 4, determining a target media control service that is running the requested video conference; Determine the total number of terminals currently accessed by the server to which the target media control service belongs. When the total number of terminals currently accessed is less than a preset value, access the terminals through the server to which the target media control service belongs; otherwise, access the terminals through other servers whose total number of terminals currently accessed is the smallest and less than the preset value.

7. The method according to claim 6, characterized in that Determining that the terminal is accessed through a server to which the target media control service belongs includes: Obtain the number of terminals currently connected to the media service started by the media control service using the CPU as the encoding and decoding unit in the server to which the target media control service belongs, and the number of terminals currently connected to the media proxy service of the server, calculate the sum, and obtain the total number of terminals currently connected to the server; When the total number of terminals is less than a preset value, determining whether the target media control service satisfies: the encoding and decoding unit of the target media control service is a CPU, and the remaining access capacity of the media service started by the CPU is not 0; If yes, accessing the terminal through the media service started by the target media control service; if no, accessing the terminal through the media proxy service of the server to which the target media control service belongs; Among them, the media control service with the codec unit as the CPU can start the media service to access the participating terminals of the video conference where the media service is running; the media proxy service refers to the service for accessing any participating terminal of the video conference that is started in each server in the server cluster before starting the media control service in the server; the same server only includes one media control service with the CPU as the codec unit.

8. The method according to claim 6, characterized in that Determining that the terminal is accessed through the server to which the target media control service belongs also includes: According to the service name of each media control service in the media control service directory, determine that the media control services belonging to the same server as the target media control service constitute a target media control service set; Obtaining the number of terminals currently connected to the media service started by each media control service in the target media control service set and the number of terminals currently connected to the media proxy service of the server to which the target media control service belongs, and calculating the sum, to obtain the total number of terminals currently connected to the server to which the target media control service belongs; When the total number of terminals is less than a preset value, determining whether the remaining access capacity of the media service started by the target media control service is 0; If not, access the terminal through the media service started by the target media control service; if yes, access the terminal through the media proxy service of the server to which the target media control service belongs; Among them, each of the media control services can start a media service that can access the participating terminals of the video conference running the media service; the media proxy service refers to a service for accessing any video conference participating terminal that is started in each server in the server cluster before starting the media control service in the server.

9. The method according to claim 8, characterized in that Obtaining the target media control service set, including: According to the service name of the target media control service, determine the media control services having the same service name as the service name of the target media control service to form a target media control service set; The service names of all media control services of the same server include the service name of the media control service using the CPU as the encoding and decoding unit in the server.

10. An electronic device, characterized in that: include: A memory for storing program instructions; A processor, configured to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 9 according to the obtained program.

Citation Information

Patent Citations

  • Intelligent scheduling method of video conference, electronic equipment and storage medium

    CN109688368A

  • Intranet and extranet mapping method and device, electronic equipment, medium and video conference system

    CN110225146A

  • Media node load balancing method and device, storage medium and electronic device

    CN111432158A

  • Media data processing method and device and media server

    CN112445605A

  • Method and system for distributing computing nodes for video cloud service based on multiple attributes

    CN112988396A

Cited By

  • Decoding resource allocation method, computer equipment and readable storage medium

    CN119645663A

  • Decoding Resource Allocation Method, Computer Device, and Readable Storage Medium

    CN119645663B