Transcoding method and device of multimedia data, electronic equipment and storage medium

By grouping multimedia data transcoding requests and parallel processing of transcoders, the problem of low multimedia data transcoding efficiency is solved, achieving efficient resource utilization and reduced system overhead.

CN122340079APending Publication Date: 2026-07-03BEIJING FEIXUN DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING FEIXUN DIGITAL TECH CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in multimedia data transcoding, especially when there are high concurrency transcoding requests, which leads to insufficient resources causing tasks to queue and wait, resulting in low resource utilization and high system overhead.

Method used

After receiving multiple transcoding requests, parameters and data sources are grouped, a small number of transcoders are called for parallel processing, and transcoder initialization is optimized using preloading and lazy loading strategies, thereby achieving transcoder reuse and resource optimization.

Benefits of technology

It improves the efficiency of multimedia data transcoding, reduces the number of transcoders, avoids task queuing, reduces system overhead, and improves resource utilization and concurrent processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122340079A_ABST
    Figure CN122340079A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, electronic device, and storage medium for transcoding multimedia data. The method includes: receiving N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1; obtaining multimedia data from the data sources corresponding to the N data source information of the N transcoding requests, and grouping the N transcoding parameters corresponding to the N transcoding requests into M transcoding groups, where M is a positive integer less than or equal to N; calling the M transcoders corresponding to the M transcoding groups, and using the M transcoders in parallel to transcode each multimedia data to obtain each transcoded multimedia data; and sending each transcoded multimedia data to its corresponding requester. This reduces the number of transcoders required, avoids task queuing due to insufficient resources, and improves the efficiency of multimedia data transcoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multimedia data processing technology, and in particular to a method, apparatus, electronic device and storage medium for transcoding multimedia data. Background Technology

[0002] In multimedia data application scenarios such as video-on-demand, online education, and remote conferencing, it is usually necessary to transcode multimedia data, that is, to convert multimedia data in one format (such as video, audio, etc.) into another format to adapt to different multimedia terminals.

[0003] In related technologies, when transcoding multimedia data, it is usually necessary to allocate an independent transcoder for each transcoding request. When there are high-concurrency transcoding requests, the limited number of available transcoders can easily lead to insufficient resources, causing transcoding tasks to queue and wait, resulting in low transcoding efficiency. Therefore, how to improve the transcoding efficiency of multimedia data has become an urgent technical problem to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for transcoding multimedia data to solve the problem of low transcoding efficiency of multimedia data in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for transcoding multimedia data, the method comprising: Receive N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1; Multimedia data is obtained from the data sources of the N data sources corresponding to the N transcoding requests, and the N transcoding parameters corresponding to the N transcoding requests are grouped to obtain M transcoding groups, where M is a positive integer less than or equal to N; The M transcoders corresponding to the M transcoding groups are invoked, and the M transcoders are used in parallel to transcode each multimedia data to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders. Each transcoded multimedia data is sent to its corresponding requester.

[0006] Optionally, the step of grouping the N transcoding parameters corresponding to the N transcoding requests into M transcoding groups includes: Obtain the N transcoding parameters corresponding to the N transcoding requests, wherein each of the N transcoding parameters includes the encoding format, bitrate, frame rate, and resolution; The encoding format, bitrate, frame rate, and resolution are grouped to obtain the M transcoding groups, wherein at least one of the encoding format, bitrate, frame rate, and resolution is different for each transcoding group.

[0007] Optionally, obtaining multimedia data from the data sources corresponding to the N transcoding requests (N data source information) includes: Obtain the information of the N data sources corresponding to the N transcoding requests; The N data source information is grouped to obtain K data sources, where K is a positive integer less than or equal to N; Create K sessions and use the K sessions to obtain multimedia data from the K data sources. The K sessions correspond one-to-one with the K data sources, and multiple transcoding requests belonging to the same data source share one session.

[0008] Optionally, each of the N transcoding requests also carries the encapsulation format information of the requester; The step of sending each transcoded multimedia data to its corresponding requester includes: Obtain the N encapsulation format information corresponding to the N transcoding requests; The transcoded multimedia data of each requester is encapsulated according to the N encapsulation format information to obtain the encapsulated multimedia data. Each packaged multimedia data is sent to the corresponding requester.

[0009] Optionally, sending each encapsulated multimedia data to the corresponding requester includes: Obtain the timestamp sequence corresponding to each encapsulated multimedia data, wherein the timestamp sequence is used to characterize the data encapsulation order corresponding to each encapsulated multimedia data; Based on the timestamp sequence, the encapsulated multimedia data is time-calibrated, and the time-calibrated multimedia data is sent to the corresponding requester.

[0010] Optionally, after sending each transcoded multimedia data to its corresponding requester, the method further includes: Receive quality assessment results from each requester; The quality assessment results are compared with the preset standard assessment results; In the case of a target requester whose quality assessment result is lower than the standard assessment result, the encoding parameters in the target transcoder are adjusted, wherein the target transcoder is the transcoder among the M transcoders that outputs the transcoded multimedia data to the target requester.

[0011] Optionally, the encoding format core library of the M transcoders is preloaded when each transcoder is created, and the differentiation parameters of the M transcoders are lazy-loaded when multimedia data is added to each transcoder.

[0012] Secondly, embodiments of this application also provide a multimedia data transcoding apparatus, the apparatus comprising: The first receiving module is used to receive N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1. The acquisition and grouping module is used to acquire multimedia data from the data sources of the N data source information corresponding to the N transcoding requests, and to group the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, where M is a positive integer less than or equal to N; The calling and transcoding module is used to call the M transcoders corresponding to the M transcoding groups and use the M transcoders to transcode each multimedia data in parallel to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders. The sending module is used to send each transcoded multimedia data to the corresponding requester.

[0013] Thirdly, this application also provides an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the multimedia data transcoding method as described in the first aspect.

[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the multimedia data transcoding method as described in the first aspect.

[0015] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application receives N transcoding requests, each of which carries data source information and transcoding parameters, where N is an integer greater than or equal to 1; obtains multimedia data from the data sources corresponding to the N data source information of the N transcoding requests, and groups the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, where M is a positive integer less than or equal to N; calls the M transcoders corresponding to the M transcoding groups, and uses the M transcoders to transcode each multimedia data in parallel to obtain each transcoded multimedia data, where the M transcoding groups correspond one-to-one with the M transcoders; and sends each transcoded multimedia data to the corresponding requester. By using the above method, when N transcoding requests are received, the N transcoding parameters corresponding to the N transcoding requests can be grouped. Then, M transcoding units can be called according to the M transcoding groups obtained from the grouping. That is, each transcoder can transcode the multimedia data corresponding to multiple transcoding requests belonging to the same transcoding group, without having to call N transcoders to transcode each transcoding request separately. This reduces the number of transcoders required, avoids the situation of tasks queuing due to insufficient resources, and achieves the effect of improving the transcoding efficiency of multimedia data. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0019] Figure 1 A flowchart illustrating a multimedia data transcoding method provided in an embodiment of this application; Figure 2 A flowchart illustrating another multimedia data transcoding method provided in this application embodiment; Figure 3 A schematic diagram of a multimedia data transcoding device provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0022] To address the problem of low transcoding efficiency of multimedia data in related technologies, this application provides a multimedia data transcoding method, apparatus, electronic device, and storage medium, which can improve the transcoding efficiency of multimedia data.

[0023] See Figure 1 , Figure 1 This is a flowchart illustrating a multimedia data transcoding method provided in an embodiment of this application. Figure 1 As shown, the transcoding method for this multimedia data may include the following steps: Step S101: Receive N transcoding requests, where each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1.

[0024] It should be noted that the multimedia data transcoding method provided in this application embodiment can be applied to electronic devices, such as smart terminals or servers. The electronic device can be connected to at least one data source (i.e., a multimedia device with audio and video capture capabilities) and at least one requester (i.e., a multimedia device with audio and video playback capabilities). The data source and requester can be independent devices or integrated devices; this application does not impose specific limitations.

[0025] Specifically, the value of N can be any integer greater than or equal to 1, such as 1, 5, 10, 50, etc., and can be determined according to the actual transcoding needs. The transcoding request is triggered by the requesting party. This transcoding request is used to request multimedia data from the corresponding data source, transcode the acquired multimedia data, and then transmit it to the requesting party to achieve functions such as video-on-demand, online education, and remote conferencing. Each requesting party can generate one or more transcoding requests simultaneously to obtain multimedia data from one or more data sources.

[0026] Each transcoding request carries at least data source information and transcoding parameters. The data source information can be understood as a unique identifier corresponding to the data source, such as the device identifier, Internet Protocol (IP) address, and Media Access Control (MAC) address. The transcoding parameters are the parameters required for transcoding multimedia data, such as encoding format, bitrate, frame rate, and resolution.

[0027] Step S102: Obtain multimedia data from the data sources corresponding to the N data sources of the N transcoding requests, and group the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, where M is a positive integer less than or equal to N.

[0028] Specifically, the value of M can be any positive integer less than or equal to N, and its specific value can be determined based on the grouping results of the transcoding parameters. The N data source information corresponding to the N transcoding requests can be the same data source information or different data source information; the N transcoding parameters corresponding to the N transcoding requests can be the same transcoding parameters or different transcoding parameters, and can be determined based on the actual transcoding needs of each requester.

[0029] Step S103: Call the M transcoders corresponding to the M transcoding groups, and use the M transcoders in parallel to transcode each multimedia data to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders.

[0030] Specifically, the above M transcoding groups correspond one-to-one with the above M transcoders, that is, one transcoding group corresponds to one transcoder, and the transcoding parameters corresponding to different transcoders and transcoding groups are different.

[0031] For example, suppose requesters 1, 2, and 3 each initiate a transcoding request, and the encoding parameters corresponding to their transcoding requests are the same. In this case, requesters 1, 2, and 3 are assigned to the same transcoding group, requiring only one transcoder to be called. However, if the encoding parameters corresponding to the transcoding requests of requesters 1 and 2 are the same, but the encoding parameters corresponding to the transcoding requests of requester 3 are different from those of requesters 1 and 2, then requesters 1 and 2 are assigned to the same transcoding group, while requester 3 is assigned to another transcoding group, requiring two transcoders to be called.

[0032] It should be noted that upon receiving a transcoding request, a transcoding instance can be created for each request. Each transcoding instance can determine the transcoder to be invoked based on the transcoding parameters in its corresponding transcoding request. If the required transcoder does not exist, it must be created first before invoking; otherwise, it can be invoked directly. After invoking the transcoder, the transcoding instance can use it to perform a series of processes on the added multimedia data, such as decoding, format processing, and encoding, to achieve the transcoding process. When the lifecycle of all transcoding instances invoking a particular transcoder ends (i.e., the transcoding request process ends), the transcoder is destroyed. When a new transcoding instance needs to be invoked again, the transcoder is recreated to fully utilize resources. Step S104: Send each transcoded multimedia data to the corresponding requester.

[0033] After acquiring the transcoded multimedia data, the transcoded multimedia data output by the same transcoder can be sent to the corresponding requesters through a shared port. When multimedia data output by a transcoder needs to be sent to multiple requesters, the shared port can be used to encapsulate the multimedia data output by the transcoder into the encapsulation format required by each requester according to their respective packaging requirements before sending. For example, when multimedia data output by transcoder T1 needs to be sent to requesters S2 and S3, the shared port can be used to encapsulate the multimedia data output by transcoder T1 into the format required by requesters S2 and S3 according to their different packaging requirements before sending. In this way, only one socket needs to be created to send data to requesters S2 and S3, saving network resources. In addition, for the transcoding parameters (such as bitrate, resolution, etc.) of each transcoding group, an independent output parameter mapping table can be set for it within the shared engine, that is, a transcoding group shares one output parameter mapping table, thereby achieving the effect of "decoding once, outputting multiple differentiated codes".

[0034] In related technologies, the transcoding process for multimedia data is as follows: 1. The requester initiates a transcoding request.

[0035] 2. Allocate a separate transcoder for this transcoding request and establish a separate data processing stream.

[0036] 3. This transcoder obtains multimedia data from the source and completes a series of steps such as decoding, format processing, and re-encoding.

[0037] 4. Write the transcoded data to the target file or send it to the requester. After the task is completed, destroy the transcoder.

[0038] Therefore, the relevant technologies have the following shortcomings: 1. Low resource utilization: Each transcoding task, regardless of its size or complexity, typically requires a transcoder. When the transcoder is in an I / O waiting state (such as reading or writing data), computing resources such as the Central Processing Unit (CPU) and Graphics Processing Unit (GPU) are idle, resulting in low resource utilization.

[0039] 2. Low transcoding efficiency: The number of transcoding tasks that the system can process at the same time is limited by the number of available transcoders. When faced with sudden high concurrency requests, the system is prone to queuing up tasks due to insufficient resources, which increases processing latency.

[0040] 3. High system overhead: The system needs to frequently create and destroy transcoders for each transcoding task, which will generate significant system overhead, including resource allocation, environment initialization and other costs, affecting the overall system throughput. In the case of network transmission, it will consume a lot of bandwidth, which is extremely unfriendly to environments with limited bandwidth.

[0041] In this embodiment, when N transcoding requests are received, the N transcoding parameters corresponding to the N transcoding requests can be grouped. Then, M transcoding groups are obtained by calling M transcoders for transcoding. That is, each transcoder can transcode the multimedia data corresponding to multiple transcoding requests belonging to the same transcoding group without calling N transcoders, thereby reducing the number of transcoders required, improving the reusability of transcoders, and thus improving the resource utilization of transcoders. At the same time, since M transcoders can respond to N transcoding requests in parallel, the situation of task queuing due to insufficient resources is avoided, improving the transcoding efficiency of multimedia data. In addition, there is no need to frequently create and destroy transcoders for each transcoding task, reducing system overhead.

[0042] In an optional embodiment, step S102 above, grouping the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, includes: Obtain the N transcoding parameters corresponding to the N transcoding requests, where each of the N transcoding parameters includes the encoding format, bitrate, frame rate, and resolution; The encoding format, bitrate, frame rate, and resolution are grouped to obtain M transcoding groups, wherein at least one of the encoding format, bitrate, frame rate, and resolution is different for each transcoding group.

[0043] Specifically, when grouping the N transcoding parameters corresponding to N transcoding requests, the N transcoding requests can be parsed first to obtain the transcoding parameters corresponding to each transcoding request. These transcoding parameters may include encoding format, bitrate, frame rate, and resolution. Then, the encoding format, bitrate, frame rate, and resolution are grouped to obtain M transcoding groups. At least one of the encoding format, bitrate, frame rate, and resolution must be different for each transcoding group. The encoding format, bitrate, frame rate, and resolution must be the same for the same transcoding group.

[0044] In this way, groups can be formed using encoding format, bitrate, frame rate, and resolution, thereby grouping the same transcoding parameters into the same transcoding group. This facilitates subsequent transcoding using a smaller number of transcoders, improves the resource utilization and concurrent processing capability of a single transcoder, and reduces the overhead caused by the frequent creation and destruction of transcoders.

[0045] In an optional embodiment, step S102, obtaining multimedia data from the data sources corresponding to the N transcoding requests and the N data source information, includes: Obtain information about N data sources corresponding to N transcoding requests; Group the information from N data sources to obtain K data sources, where K is a positive integer less than or equal to N; Create K sessions and use the K sessions to retrieve multimedia data from K data sources. The K sessions correspond one-to-one with the K data sources, and multiple transcoding requests belonging to the same data source share one session.

[0046] Specifically, the value of K can be any positive integer less than or equal to N, and its specific value can be determined based on the grouping results of the data source information. The K sessions correspond one-to-one with the K data sources, meaning one session corresponds to one data source. The N data source information corresponding to the N transcoding requests can be the same or different data sources. When multiple transcoding requests have the same data source information, they can be grouped into the same group and share a single session to acquire multimedia data; when multiple transcoding requests have different data source information, they can be grouped into different groups and use different sessions to acquire multimedia data.

[0047] When retrieving multimedia data corresponding to N transcoding requests, one can first obtain the N data source information carried by the N transcoding requests, then group this N data source information into K data sources, and then create K sessions to retrieve the multimedia data from the K data sources. In other words, multiple transcoding requests with identical data source information can share a single session. When fetching the data source corresponding to this data source information, only one session needs to be initiated with the source end, and the stream needs to be fetched from the source end once to supply these multiple transcoding requests.

[0048] In this way, only K sessions need to be created to obtain the multimedia data corresponding to N transcoding requests. Compared with the existing technology that requires the creation of N sessions to obtain the multimedia data corresponding to N transcoding requests, the embodiments of this application significantly reduce the number of sessions created, thereby saving resource consumption.

[0049] In an optional embodiment, each of the N transcoding requests also carries the encapsulation format information of the requester; step S104 above, sending each transcoded multimedia data to the corresponding requester, includes: Obtain the N encapsulation format information corresponding to N transcoding requests; The transcoded multimedia data of each requester is encapsulated according to N encapsulation format information to obtain the encapsulated multimedia data. Each packaged multimedia data is sent to the corresponding requester.

[0050] Specifically, when sending each transcoded multimedia data to its corresponding requester, the system first obtains N container format information corresponding to the N transcoding requests. This information can include audio container formats such as MP4 (short for MPEG-4 Part 14), Advanced Audio Coding (AAC), Waveform Audio File Format (WAV), and Free Lossless Audio Codec (FLAC), as well as video container formats such as MP4, FLV (short for Flash Video), and Matroska Video (MKV). Then, according to the N container format information, the transcoded multimedia data from each requester is containerized to obtain the containerized multimedia data, which is then sent to the corresponding requester.

[0051] In this way, the transcoded multimedia data can be encapsulated according to the encapsulation format requirements of each requester, so that each requester can play the multimedia data content normally.

[0052] In an optional embodiment, the above steps, including sending each encapsulated multimedia data to the corresponding requester, include: Obtain the timestamp sequence corresponding to each encapsulated multimedia data, where the timestamp sequence is used to characterize the data encapsulation order corresponding to each encapsulated multimedia data; Based on the timestamp sequence, the time sequence of each encapsulated multimedia data is calibrated, and the time sequence-calibrated multimedia data is sent to the corresponding requester.

[0053] Specifically, when sending each encapsulated multimedia data to the corresponding requester, the timestamp sequence corresponding to each encapsulated multimedia data can also be obtained. Each timestamp sequence corresponds to one encapsulated multimedia data stream. Here, the timestamp sequence refers to a sequence composed of multiple timestamps, which can be either a decoding time stamp (DTS) or a presentation time stamp (PTS). After obtaining the timestamp sequence corresponding to each encapsulated multimedia data, timing calibration can be performed on each encapsulated multimedia data stream based on the timestamp sequence, and the timing-calibrated multimedia data can be sent to the corresponding requester.

[0054] In this way, the timing of each encapsulated multimedia data can be calibrated based on the timestamp sequence, ensuring that the output streams of each multimedia data are synchronized in time and have small errors.

[0055] In an optional embodiment, after step S104 above, in which each transcoded multimedia data is sent to the corresponding requester, the method further includes: Receive quality assessment results from each requester; Compare the quality assessment results with the pre-set standard assessment results; In cases where a target requester's quality assessment result is lower than the standard assessment result, the encoding parameters in the target transcoder are adjusted. The target transcoder is one of M transcoders that outputs transcoded multimedia data to the target requester.

[0056] Specifically, after sending each transcoded multimedia data to the corresponding requester, the system can also receive the quality assessment results returned by each requester, and then compare the quality assessment results with the preset standard assessment results. If there is a target requester whose quality assessment result is lower than the standard assessment result, the encoding parameters in the target transcoder can be adjusted. Here, the target transcoder is the transcoder that outputs the transcoded multimedia data to the target requester among M transcoders.

[0057] This allows for real-time quality assessment of each multimedia data stream, and adjustment of the encoding parameters of that data stream when the quality is substandard, thereby improving the quality of each data stream.

[0058] In one optional embodiment, the encoding format core library of the M transcoders is preloaded when each transcoder is created, and the differentiation parameters of the M transcoders are lazy-loaded when multimedia data is added to each transcoder.

[0059] Specifically, the aforementioned preloading refers to preparing basic and time-consuming resources that are likely to be used in advance. The aforementioned lazy loading refers to loading specific, differentiated resources only when they are actually needed. The encoding format core libraries of each transcoder (such as the H.265 core library) are preloaded when each transcoder is created. Since core library loading and hardware initialization often take hundreds of milliseconds or even longer, preloading amortizes this time across the group's lifecycle, significantly reducing the startup latency of the first task in the group. Furthermore, the differentiated parameters of each transcoder are lazy-loaded when multimedia data is added to each transcoder. Thus, when a new transcoding task is added to an existing transcoder, only its unique parameters need to be loaded and configured for this new task, without reloading the core library. This effectively avoids resource waste. Without lazy loading, preloading all resources for all possible combinations of target parameters when creating the group would result in huge memory consumption, and many resources might never be used.

[0060] In this embodiment, by adopting an initialization strategy that combines "preloading + lazy loading", the corresponding encoding format core library is preloaded when a transcoder is created for each group, and the corresponding differential parameters are lazy loaded when multimedia data is added to each transcoder. This can effectively shorten the startup time of each transcoder and improve the data transcoding efficiency.

[0061] In an optional embodiment, the multimedia data transcoding process provided in this application is as follows: Figure 2 As shown, it includes the following steps: Step S201: Receive multiple transcoding requests.

[0062] Each transcoding request includes parameters such as data source information, encoding format, bitrate, frame rate, and resolution.

[0063] Step S202: Parse each transcoding request to obtain the data source information and transcoding parameters for each transcoding request.

[0064] Step S203: Group the data according to the data source information, and establish a media connection to the data source for each group to retrieve the multimedia data from the data source.

[0065] Step S204: Group the data according to the transcoding parameters and coordinate a transcoder for each group to perform transcoding.

[0066] Step S205: Each transcoded output data stream is independently encapsulated, timestamped, and distributed to its respective requester via the network.

[0067] Step S206: Perform real-time quality assessment on each output stream, and fine-tune the parameters of a single stream if necessary.

[0068] To facilitate understanding, the following will provide a detailed explanation using a transcoding scenario based on the Session Initiation Protocol (SIP).

[0069] Suppose a SIP video conferencing scenario involves three devices (S1, S2, and S3) and one server (for transcoding and scheduling). Each device needs to play videos from the other devices. The requirements are as follows: S2 and S3 both need to play videos from S1, and both require H.265 encoding and 1080P resolution (all other encoding parameters are the same). S1 and S3 also need to play videos from S2; S1 requires H.264 encoding and 1080P resolution, while S3 requires H.265 encoding and 1080P resolution. Finally, S1 and S2 both need to play videos from S3, and both require H.265 encoding and 1080P resolution.

[0070] In the traditional approach, the server needs to establish six independent SIP sessions and six independent transcoders for six transcoding requests; that is, each transcoding request requires one SIP session and one transcoder. When transcoding a specific request, the SIP session corresponding to that request pulls multimedia data from the corresponding data source, then uses its corresponding transcoder to transcode the data, and finally sends the transcoded data to the requesting party. In other words, in the traditional approach, each transcoding request corresponds to a complete data transcoding process. However, the solution provided in this application breaks down the complete data transcoding process into multiple processing stages, specifically the data retrieval stage from the data source to the transcoder, the data transcoding stage from the transcoder, and the data transmission stage from the transcoder to the requesting party. In the data retrieval phase of the data source-transcoder, data source information can be used for grouping, with data sources sharing the same information grouped together, thus achieving session reuse. In the data transcoding phase of the transcoder, encoding parameters can be used for grouping, with data sources sharing the same encoding parameters grouped together, thus achieving transcoder reuse. In the data sending phase of the transcoder-requestor, data can be packaged and sent simultaneously according to the packaging requirements of different requesters through a shared port, thus achieving port reuse. In this way, the solution provided in this application embodiment can break down the data transcoding process into multiple processing stages and flexibly handle each stage according to its actual situation, achieving full utilization of computing resources and improving data transcoding efficiency. Furthermore, in the solution provided in this application embodiment, for a single transcoder, it can be further divided into multiple processing units according to its internal transcoding logic. Different processing units are used to execute different processing logics, such as decoding logic, format processing logic, and encoding logic. When the transcoder transcodes multiple multimedia data streams from different data sources, it can process each multimedia data stream in parallel according to the idle / busy status and processing performance of each processing unit, thereby improving the processing capability of each processing unit within the transcoder and further realizing the full utilization of computing resources.

[0071] Since the six transcoding requests in the example above only involve three types of data source information, the server only needs to establish one SIP media session with each of S1, S2, and S3, for a total of three sessions. Furthermore, since these six transcoding requests only involve two types of encoding parameters, the server only needs to establish two transcoders. Therefore, compared to traditional solutions, the solution provided in this application saves 50% of the source-end downlink bandwidth consumption, saves 67% of the transcoders, and simultaneously reduces the number of network connections and related system overhead, significantly improving overall concurrent processing efficiency.

[0072] See Figure 3 , Figure 3 This is a schematic diagram of a multimedia data transcoding device provided in an embodiment of this application. Figure 3 As shown, the multimedia data transcoding device 300 includes: The first receiving module 301 is used to receive N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1. The acquisition and grouping module 302 is used to acquire multimedia data from the data sources of N data source information corresponding to N transcoding requests, and group the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, where M is a positive integer less than or equal to N; The calling and transcoding module 303 is used to call the M transcoders corresponding to the M transcoding groups and use the M transcoders in parallel to transcode each multimedia data to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders. The sending module 304 is used to send each transcoded multimedia data to the corresponding requester.

[0073] Furthermore, the acquisition and grouping module 302 includes: The first acquisition submodule is used to acquire N transcoding parameters corresponding to N transcoding requests, wherein each of the N transcoding parameters includes encoding format, bit rate, frame rate and resolution; The first grouping submodule is used to group the encoding format, bit rate, frame rate and resolution to obtain M transcoding groups, wherein at least one of the encoding format, bit rate, frame rate and resolution is different for different transcoding groups.

[0074] Furthermore, the acquisition and grouping module 302 also includes: The second acquisition submodule is used to acquire information about the N data sources corresponding to the N transcoding requests; The second grouping submodule is used to group N data source information into K data sources, where K is a positive integer less than or equal to N; The third acquisition submodule is used to create K sessions and use the K sessions to obtain multimedia data from K data sources. The K sessions correspond one-to-one with the K data sources, and multiple transcoding requests belonging to the same data source share one session.

[0075] Furthermore, each of the N transcoding requests also carries the encapsulation format information of the requester; the sending module 304 includes: The fourth submodule is used to obtain the N encapsulation format information corresponding to the N transcoding requests; The encapsulation submodule is used to encapsulate the transcoded multimedia data of each requester according to N encapsulation format information to obtain the encapsulated multimedia data. The sending submodule is used to send the encapsulated multimedia data to the corresponding requester.

[0076] Furthermore, the sending submodule includes: The acquisition unit is used to acquire the timestamp sequence corresponding to each encapsulated multimedia data, wherein the timestamp sequence is used to characterize the data encapsulation order corresponding to each encapsulated multimedia data. The calibration unit is used to perform time-series calibration on each encapsulated multimedia data based on the timestamp sequence, and send each time-series calibrated multimedia data to the corresponding requester.

[0077] Furthermore, the multimedia data transcoding device 300 also includes: The second receiving module is used to receive the quality assessment results returned by each requester. The comparison module is used to compare the quality assessment results with the preset standard assessment results; The adjustment module is used to adjust the encoding parameters in the target transcoder when there is a target requester whose quality assessment result is lower than the standard assessment result. The target transcoder is the transcoder that outputs transcoded multimedia data to the target requester among M transcoders.

[0078] Furthermore, the encoding format core library of the M transcoders is preloaded when each transcoder is created, and the differentiation parameters of the M transcoders are lazy-loaded when multimedia data is added to each transcoder.

[0079] It should be noted that the multimedia data transcoding device 300 can implement the multimedia data transcoding method provided in any of the aforementioned method embodiments and achieve the same technical effect, which will not be elaborated here.

[0080] like Figure 4 As shown in the illustration, this application also provides an electronic device, including a processor 411, a communication interface 412, a memory 413, and a communication bus 414, wherein the processor 411, the communication interface 412, and the memory 413 communicate with each other via the communication bus 414. Memory 413 is used to store computer programs; In one embodiment of this application, when the processor 411 executes the program stored in the memory 413, it implements the multimedia data transcoding method provided in any of the foregoing method embodiments.

[0081] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the multimedia data transcoding method provided in any of the foregoing method embodiments.

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

[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0084] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0085] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for transcoding multimedia data, characterized in that, The method includes: Receive N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1; Multimedia data is obtained from the data sources of the N data sources corresponding to the N transcoding requests, and the N transcoding parameters corresponding to the N transcoding requests are grouped to obtain M transcoding groups, where M is a positive integer less than or equal to N; The M transcoders corresponding to the M transcoding groups are invoked, and the M transcoders are used in parallel to transcode each multimedia data to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders. Each transcoded multimedia data is sent to its corresponding requester.

2. The method according to claim 1, characterized in that, The step of grouping the N transcoding parameters corresponding to the N transcoding requests into M transcoding groups includes: Obtain the N transcoding parameters corresponding to the N transcoding requests, wherein each of the N transcoding parameters includes the encoding format, bitrate, frame rate, and resolution; The encoding format, bitrate, frame rate, and resolution are grouped to obtain the M transcoding groups, wherein at least one of the encoding format, bitrate, frame rate, and resolution is different for each transcoding group.

3. The method according to claim 1, characterized in that, The step of obtaining multimedia data from the data sources corresponding to the N transcoding requests includes: Obtain the information of the N data sources corresponding to the N transcoding requests; The N data source information is grouped to obtain K data sources, where K is a positive integer less than or equal to N; Create K sessions and use the K sessions to obtain multimedia data from the K data sources. The K sessions correspond one-to-one with the K data sources, and multiple transcoding requests belonging to the same data source share one session.

4. The method according to claim 1, characterized in that, Each of the N transcoding requests also carries the encapsulation format information of the requester; The step of sending each transcoded multimedia data to its corresponding requester includes: Obtain the N encapsulation format information corresponding to the N transcoding requests; The transcoded multimedia data of each requester is encapsulated according to the N encapsulation format information to obtain the encapsulated multimedia data. Each packaged multimedia data is sent to the corresponding requester.

5. The method according to claim 4, characterized in that, Sending each encapsulated multimedia data to the corresponding requester includes: Obtain the timestamp sequence corresponding to each encapsulated multimedia data, wherein the timestamp sequence is used to characterize the data encapsulation order corresponding to each encapsulated multimedia data; Based on the timestamp sequence, the encapsulated multimedia data is time-calibrated, and the time-calibrated multimedia data is sent to the corresponding requester.

6. The method according to claim 4, characterized in that, After sending each transcoded multimedia data to its corresponding requester, the method further includes: Receive quality assessment results from each requester; The quality assessment results are compared with the preset standard assessment results; In the case of a target requester whose quality assessment result is lower than the standard assessment result, the encoding parameters in the target transcoder are adjusted, wherein the target transcoder is the transcoder among the M transcoders that outputs the transcoded multimedia data to the target requester.

7. The method according to claim 1, characterized in that, The core encoding format library of the M transcoders is preloaded when each transcoder is created, and the differentiation parameters of the M transcoders are lazy-loaded when multimedia data is added to each transcoder.

8. A multimedia data transcoding device, characterized in that, The device includes: The first receiving module is used to receive N transcoding requests, wherein each of the N transcoding requests carries data source information and transcoding parameters, and N is an integer greater than or equal to 1. The acquisition and grouping module is used to acquire multimedia data from the data sources of the N data source information corresponding to the N transcoding requests, and to group the N transcoding parameters corresponding to the N transcoding requests to obtain M transcoding groups, where M is a positive integer less than or equal to N; The calling and transcoding module is used to call the M transcoders corresponding to the M transcoding groups and use the M transcoders to transcode each multimedia data in parallel to obtain each transcoded multimedia data. The M transcoding groups correspond one-to-one with the M transcoders. The sending module is used to send each transcoded multimedia data to the corresponding requester.

9. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the transcoding method for multimedia data as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multimedia data transcoding method according to any one of claims 1-7.