X86 architecture edge computing node high concurrency real-time IP transcoding system
By creating an independent transcoding context instance for each basic video stream and employing an adaptive resolution-aware motion estimation and compensation algorithm to dynamically allocate computing resources, the problem of resource contention and energy waste in edge computing nodes when processing multiple video streams is solved, achieving high-concurrency, low-power transcoding processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU XIDE INTELLIGENT TECH CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, when edge computing nodes process real-time Internet Protocol video streams from multiple video sources, they cannot dynamically adapt to the encoding formats, resolutions, and frame rates of different basic video streams. This results in unreasonable utilization of computing resources, processing delays, and energy waste, making it difficult to achieve high-concurrency processing and low-power operation.
An independent transcoding context instance is created for each video base stream. An adaptive resolution-aware motion estimation and compensation algorithm is used to dynamically allocate computing resources. A transcoding quantization coefficient matrix is generated through a mode decision and intra-frame prediction fusion algorithm, and finally, the transcoded video base stream is generated.
It achieves precise allocation of computing resources for different video streams, improves concurrent processing capabilities, reduces energy consumption, ensures the stability of the transcoding process and video quality, and adapts to resource-constrained scenarios of edge computing nodes.
Smart Images

Figure CN122349028A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of edge computing transcoding technology, specifically a high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes. Background Technology
[0002] Edge computing nodes need to process real-time transcoding of multiple video streams from various video sources. Current technologies often employ a unified transcoding context to handle multiple basic video streams, with fixed resource allocation. This fails to dynamically adapt to differences in encoding format, resolution, and frame rate among the various basic video streams. Furthermore, the sharing of the same transcoding context among multiple basic video streams easily leads to resource contention. Simultaneously, existing motion estimation and compensation algorithms lack resolution awareness, employing a fixed processing mode that can only generate a single-direction motion vector field. This fails to meet the motion analysis requirements of video streams with different resolutions, making it difficult to satisfy the core transcoding requirements of edge computing nodes.
[0003] Fixed resource allocation and unified context processing lead to inefficient use of computing resources, resulting in processing delays during concurrent transcoding of multiple video streams and hindering the achievement of high-concurrency processing goals. Fixed-mode motion estimation and compensation algorithms result in insufficient motion analysis accuracy, affecting the stability of transcoded video quality. Furthermore, fixed resource allocation leads to energy waste, preventing low-power operation and making it incompatible with the limited resources of edge computing nodes. Therefore, a real-time IP transcoding technology solution is needed that can dynamically adapt to different video stream parameters, optimize motion analysis accuracy, and achieve low-power, high-concurrency processing, addressing the aforementioned problems of existing technologies. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; To address this, the present invention proposes a high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes, comprising: The receiving and parsing module receives real-time Internet Protocol (IP) video streams from multiple video sources. The IP video streams contain compressed video data encapsulated in different container formats. The module performs protocol decapsulation and bitstream extraction on the IP video streams, separating independent basic video bitstreams, basic audio bitstreams, and associated metadata. The context management module creates an independent transcoding context instance for each basic video bitstream. The transcoding context instance contains the encoding format information, resolution information, frame rate information, and a dynamically adjusted computing resource allocation table for the basic video bitstream. The data segmentation module divides the separated video base stream into continuous image groups according to the frame sequence. Each image group is independently input into the corresponding transcoding context instance. The analysis and estimation module, in the transcoding context instance, uses an adaptive resolution-aware motion estimation and compensation algorithm based on the computing resource allocation table to perform motion analysis on the input image group and generate forward motion vector fields and backward motion vector fields. The prediction and decision module, based on the motion vector field, uses a mode decision and intra-frame prediction fusion algorithm to perform macroblock-level coding mode selection and prediction for each frame in the image group, generating a transcoding quantization coefficient matrix. The reconstructed output module generates the transcoded video base stream based on the transcoding quantization coefficient matrix.
[0005] Furthermore, the step of creating an independent transcoding context instance for each video base stream includes: The sequence parameter set and image parameter set of the basic video bitstream are analyzed to obtain the encoding standard, grade and level, image resolution and frame rate of the basic video bitstream; Based on the encoding standard, resolution, and frame rate of the basic video bitstream, a preset complexity mapping table is queried to obtain the initial computational complexity rating of the basic video bitstream. Based on the initial computational complexity rating, the initial share of graphics processor core resources, digital signal processor resources, and memory bandwidth resources are dynamically allocated to the transcoding context instance from the available computing resource pool of the edge computing node to form a computing resource allocation table. Record the original encoding format information, target encoding format information, and real-time bitrate information of the basic video stream to the transcoding context instance.
[0006] Furthermore, in the transcoding context instance, based on the computational resource allocation table, an adaptive resolution-aware motion estimation and compensation algorithm is used to perform motion analysis on the input image group, including: From the reference frames of the input image group, multi-scale downsampling is performed in parallel according to the number of graphics processor cores specified in the computational resource allocation table to generate a pyramid-shaped multi-resolution reference image layer. In the current coded frame, motion search is performed on a macroblock basis, starting from the highest resolution reference image layer, within a preset search window, and the sum of absolute errors is calculated to obtain the initial motion vector. In turn, at lower resolution reference image layers, prediction and fine-tuning are performed using the motion vectors from the previous level, and the motion vectors are gradually corrected. After obtaining the final motion vector, motion compensation is performed using the reference frame to generate the prediction frame, and the residual between the current coded frame and the prediction frame is calculated. The final motion vector, predicted frame, and residual data are output together as the result of the motion estimation and compensation algorithm.
[0007] Furthermore, the method based on motion vector fields, employing a mode decision and intra-frame prediction fusion algorithm, performs macroblock-level coding mode selection and prediction for each frame in the image group, including: For each macroblock in the image, a list of candidate coding modes is generated based on the coding modes of its spatially adjacent macroblocks and the temporal correlation provided by the motion vector field. For each coding mode in the candidate coding mode list, calculate the rate-distortion cost of encoding the current macroblock using the coding mode, where the rate-distortion cost combines the number of bits after encoding and the reconstruction distortion. From all candidate coding modes, the coding mode with the lowest rate-distortion cost is selected as the optimal coding mode for the current macroblock; Depending on the selected optimal coding mode, if it is an inter-frame prediction mode, motion-compensated prediction values are used; if it is an intra-frame prediction mode, spatial orientation prediction is performed using pixels from adjacent macroblocks to generate the prediction block for the current macroblock. Based on the prediction block, the difference between the original pixels and the predicted pixels of the current macroblock is calculated to form a residual block. The residual block is then subjected to discrete cosine transform to obtain the transcoding quantization coefficient matrix.
[0008] Further, based on the transcoding quantization coefficient matrix, a transcoded video base stream is generated, including: Based on the differences between the original video encoding format and the target encoding format recorded in the transcoding context instance, a rate-distortion optimization and quantization parameter mapping algorithm is applied to the transcoding quantization coefficient matrix to calculate the target quantization parameters and generate the final transcoding quantization coefficients. The final transcoding quantization coefficients, motion vector fields, and encoding mode information are entropy encoded according to the syntax specifications of the target encoding format to generate the transcoded video basic bitstream.
[0009] Furthermore, the step of applying a rate-distortion optimization and quantization parameter mapping algorithm to the transcoding quantization coefficient matrix based on the differences between the original video encoding format and the target encoding format recorded in the transcoding context instance includes: Read the correspondence between the quantization parameters of the original video encoding format and the quantization step size of the target encoding format recorded in the transcoding context instance; Based on the target bit rate requirement, an initial target quantization parameter is calculated by analyzing the coefficient distribution of the transcoding quantization coefficient matrix. Based on the rate-distortion optimization theory, a small-range search is performed near the target quantization parameter to evaluate the rate and distortion generated after requantizing the transcoding quantization coefficient matrix under different quantization parameters. Select the quantization parameter that satisfies the target bit rate constraint and has the minimum distortion as the final target quantization parameter; The transcoding quantization coefficient matrix is scalar quantized using the final target quantization parameters to obtain the final transcoding quantization coefficients.
[0010] Furthermore, the step of entropy encoding the final transcoding quantization coefficients, motion vector field, and encoding mode information according to the syntax specification of the target encoding format includes: Based on the syntax element definition of the target encoding format, the final transcoding quantization coefficients are organized into a format of transformation units or encoding units; The motion vector differences and reference frame index information in the motion vector field are organized according to the motion vector prediction method of the target coding format; Convert the encoding mode information into a prediction mode identifier supported by the target encoding format; The organized transform unit data, motion vector difference data, reference frame index data, and prediction mode identifier data are entropy encoded using context-adaptive binary arithmetic coding or exponential Golomb coding that matches the target coding format to generate compressed video basic bitstream segments.
[0011] Further, the step of generating a pyramid-shaped multi-resolution reference image layer by performing multi-scale downsampling in parallel from the reference frames of the input image group, based on the number of graphics processor cores specified in the computational resource allocation table, includes: Based on the total number of available graphics processor cores specified in the computing resource allocation table, the reference frame is uniformly divided into multiple independent image blocks in the horizontal and vertical directions, matching the number of available cores. Each independent image block is assigned to a dedicated graphics processing unit (GPU) core, which then performs a two-dimensional discrete wavelet transform on the assigned image blocks in parallel to obtain the low-frequency sub-band data corresponding to the image blocks. The low-frequency subband data output by all graphics processor cores is collected and reorganized according to the spatial position relationship of image blocks to generate the first-level downsampled reference image layer; Using the first-level downsampled reference image layer as new input, the process of segmentation, allocation, transformation and recombination is repeated to generate the second-level, third-level and up to the Nth-level downsampled reference image layers in sequence, which together constitute the pyramid-shaped multi-resolution reference image layer, where N is the preset number of pyramid layers.
[0012] Further, the step of performing motion search within a preset search window in the current encoded frame, starting from the highest resolution reference image layer and calculating the sum of absolute errors, to obtain the initial motion vector, includes: In the highest resolution reference image layer, a rectangular region centered on the current position of the macroblock is defined as a search window for the macroblock to be processed in the current coded frame; Within the search window, each candidate position is traversed in the order of raster scanning. For each candidate position, the sum of absolute errors between the pixel value of the macroblock to be processed in the current coded frame and the pixel value of the macroblock region of the same size corresponding to the candidate position in the reference image layer is calculated. After the traversal is complete, select the candidate position that minimizes the sum of absolute errors from all candidate positions; The horizontal and vertical offsets of the selected candidate positions relative to the current position of the macroblock to be processed are recorded as the initial motion vector.
[0013] Furthermore, the system also includes a synchronous encapsulation output module: The transcoded video base stream and the corresponding audio base stream are synchronized and multiplexed, and then encapsulated according to the specified Internet protocol format. The encapsulated and transcoded real-time Internet Protocol video stream is sent to the requesting terminal. The process of synchronizing and multiplexing the transcoded video base stream and the corresponding audio base stream, and encapsulating them according to a specified Internet protocol format, includes: Parse the audio frames of the basic audio bitstream and extract the audio timestamp information; Analyze the video frames of the transcoded video base stream and extract the video timestamp information; Based on audio and video timestamp information, the timeline for audio-video synchronization is calculated, and frame-level buffering alignment is performed on the audio or video base streams. The time-stamped audio and video base streams are interleaved and encapsulated in consecutive transmission packets according to the multiplexing specifications of the specified Internet Protocol format.
[0014] Compared with the prior art, the beneficial effects of the present invention are: An independent transcoding context instance is created for each basic video stream. This instance contains the encoding format, resolution, and frame rate information of the basic video stream, as well as a dynamically adjusted computational resource allocation table. The separated basic video streams are then segmented into consecutive image groups based on frame sequences, and each image group is independently input into its corresponding transcoding context instance for processing. This approach precisely allocates computational resources based on the unique parameter characteristics of each basic video stream, avoiding resource contention caused by multiple video streams sharing the same context. The dynamically adjusted computational resource allocation table flexibly allocates resources according to the real-time processing needs of each video stream, reducing unnecessary energy consumption. While improving concurrent processing capabilities, it achieves low-power operation, ensuring that video streams with different parameters receive appropriate processing resources, thus guaranteeing the stability of the transcoding process.
[0015] In the transcoding context instance, based on a computational resource allocation table, an adaptive resolution-aware motion estimation and compensation algorithm is employed to perform motion analysis on the input image group, generating forward and backward motion vector fields. This algorithm dynamically adjusts the motion estimation strategy according to the resolution differences of the basic video bitstream, adapting to the motion analysis needs of image groups with different resolutions. Compared to a single-direction motion vector field, the forward and backward bidirectional vector fields can capture image motion information more comprehensively and accurately, improving the accuracy of motion analysis. This, in turn, optimizes the rationality of subsequent encoding mode selection and prediction, resulting in more stable image quality of the transcoded basic video bitstream. Simultaneously, the algorithm, combined with a dynamic computational resource allocation table, can reasonably control the computational load while ensuring analysis accuracy, further reducing energy consumption and adapting to resource-constrained scenarios of edge computing nodes. Attached Figure Description
[0016] Figure 1 This is a timing diagram of the high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes described in this invention; Figure 2 A flowchart for creating an independent transcoding context instance; Figure 3 The flowchart shows the adaptive resolution-sensing motion estimation and compensation algorithm. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 This invention provides a high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes, and its overall implementation scheme is as follows: The system runs on edge computing nodes to process real-time Internet Protocol (IP) video streams from multiple video sources. The system's receiving and parsing module receives these video streams, which contain compressed video data encapsulated in different container formats. This module performs protocol decapsulation and bitstream extraction on the IP video streams, separating independent video base streams, audio base streams, and associated metadata packets from the transport protocol packets. The context management module creates an independent transcoding context instance for each separated video base stream. Each transcoding context instance stores the encoding format information, resolution information, frame rate information, and a dynamically adjusted computing resource allocation table for the corresponding video base stream. The data segmentation module divides the separated video base streams into consecutive image groups according to their frame sequence structure. Each image group is independently input into the corresponding transcoding context instance created for that video base stream. Within the transcoding context instance, the analysis and estimation module, based on the computing resource allocation table, calls an adaptive resolution-aware motion estimation and compensation algorithm to perform motion analysis on the input image groups. This analysis process generates forward and backward motion vector fields describing the motion relationships between the images. The prediction and decision module, based on the motion vector field, employs a mode decision and intra-frame prediction fusion algorithm to perform macroblock-level coding mode selection and prediction operations on each frame in the image group. This process generates a corresponding transcoding quantization coefficient matrix for each macroblock. The reconstruction output module generates the transcoded video base stream based on the transcoding quantization coefficient matrices of all macroblocks.
[0019] In one embodiment of the present invention, see [reference] Figure 2 The process involves parsing the sequence parameter set and image parameter set of the basic video bitstream to obtain the encoding standard, grade and level, image resolution, and frame rate information followed by the basic video bitstream. Based on the obtained encoding standard, resolution, and frame rate parameters of the basic video bitstream, a pre-defined complexity mapping table is queried. This mapping table defines the computational load level corresponding to different combinations of encoding parameters, and the initial computational complexity rating of this basic video bitstream is obtained through the query. Based on the initial computational complexity rating, an initial share of computing resources is dynamically allocated to this newly created transcoding context instance from the available computing resource pool of the edge computing node. The allocated resources include graphics processor core resources, digital signal processor resources, and memory bandwidth resources. This allocation information is recorded and forms a computing resource allocation table specific to this instance. Simultaneously, the original encoding format information of the basic video bitstream, the target transcoded encoding format information, and the real-time monitored bitrate information are recorded in the storage structure of the transcoding context instance.
[0020] In practical implementation, the context management module of the high-concurrency real-time IP transcoding system on x86 architecture edge computing nodes creates an independent transcoding context instance for each basic video stream. The basic video stream originates from the independent basic stream separated after the receiving and parsing module performs protocol decapsulation and stream extraction on the real-time Internet Protocol video stream. The process of creating a transcoding context instance involves multiple steps. First, the sequence parameter set and image parameter set of the basic video stream are parsed. These sets contain information about the encoding standard, quality level, image resolution, and frame rate. For example, one basic video stream's sequence parameter set indicates an encoding standard of H.264, quality level of High, and quality level of 4.1; its image parameter set indicates an image resolution of 1920x1080 pixels and a frame rate of 30 frames per second. Another basic video stream's sequence parameter set indicates an encoding standard of H.265, quality level of Main, and quality level of 4; its image parameter set indicates an image resolution of 1280x720 pixels and a frame rate of 60 frames per second. These parsed parameters are used for subsequent query operations.
[0021] In some embodiments, a preset complexity mapping table is queried based on the encoding standard, resolution, and frame rate parameters of the basic video bitstream. The complexity mapping table stores the initial computational complexity rating values corresponding to different combinations of encoding parameters. The calculation of the initial computational complexity rating value can be expressed by a formula: in: This indicates the initial computational complexity rating. The width in pixels represents the image resolution. The height of the image is represented by the number of pixels. This represents the base resolution reference value. Indicates frame rate, This represents the base frame rate reference value. This represents the coding standard complexity coefficient. , and These are preset weighting coefficients. For the H.264 encoding standard, the encoding standard complexity coefficient... It can be set to 1.0. For the H.265 encoding standard, this represents the encoding standard complexity coefficient. It can be set to 1.5. Base resolution reference value. Set to 1920x1080 pixels, base frame rate reference value Set to 30 frames per second. Weighting coefficients. , and The processing capabilities of edge computing nodes are preset to 0.5, 0.3, and 0.2. For an H.264 video base stream with a resolution of 1920x1080 pixels and a frame rate of 30 frames per second, the initial computational complexity rating is... The initial computational complexity rating is 1.0 for an H.265 video base stream with a resolution of 1280x720 pixels and a frame rate of 60 frames per second. The calculated value is 1.3. These initial computational complexity ratings are obtained by querying the complexity mapping table.
[0022] Optionally, based on the initial computational complexity rating, an initial share of computational resources is dynamically allocated to the transcoding context instance from the available computational resource pool of the edge computing node. Computational resources include graphics processor (GPU) core resources, digital signal processor (DSP) resources, and memory bandwidth resources. The number of GPU cores, DSP cores, and memory bandwidth resources allocated are proportional to the initial computational complexity rating. For example, for a video base stream with an initial computational complexity rating of 1.0, 4 GPU cores, 2 DSP cores, and 2 GB / s of memory bandwidth are allocated. For a video base stream with an initial computational complexity rating of 1.3, 5 GPU cores, 3 DSP cores, and 2.6 GB / s of memory bandwidth are allocated. This allocation information is recorded and forms a computational resource allocation table specific to the transcoding context instance.
[0023] It is understandable that the original encoding format information of the basic video stream, the target transcoded encoding format information, and the real-time monitored bitrate information are recorded in the storage structure of the transcoding context instance. The original encoding format information is obtained from the parsed sequence parameter set and image parameter set, the target encoding format information is obtained from the system configuration, and the real-time monitored bitrate information is extracted from the metadata provided by the receiving and parsing module. For example, for an H.264 basic video stream, the original encoding format information is recorded as H.264, the target encoding format information is recorded as H.265, and the real-time monitored bitrate information is recorded as 5000 kilobits per second. For an H.265 basic video stream, the original encoding format information is recorded as H.265, the target encoding format information is recorded as H.264, and the real-time monitored bitrate information is recorded as 3000 kilobits per second. This information is stored in the data structure of the transcoding context instance for use by subsequent modules.
[0024] In one embodiment of the present invention, in a transcoding context instance, based on a computational resource allocation table, an adaptive resolution-aware motion estimation and compensation algorithm is used to perform motion analysis on the input image group. The specific steps are as follows. (See also...) Figure 3From the reference frame of the input image group, multi-scale downsampling is performed in parallel according to the number of GPU cores specified in the computational resource allocation table. The multi-scale downsampling process involves uniformly dividing the reference frame horizontally and vertically into multiple independent image blocks matching the number of available GPU cores, based on the total number of available GPU cores specified in the computational resource allocation table. Each independent image block is assigned to a dedicated GPU core, which performs a two-dimensional discrete wavelet transform on the assigned image block in parallel to obtain the corresponding low-frequency sub-band data. The low-frequency sub-band data output from all GPU cores are collected and recombined according to the original spatial relationships of the image blocks to generate the first-level downsampled reference image layer. Using the generated first-level downsampled reference image layer as new input, the above process of segmentation, allocation, transformation, and recombination is repeated to generate the second, third, and up to the Nth level downsampled reference image layers, collectively forming a pyramid-shaped multi-resolution reference image layer, where N is the preset number of pyramid layers. In the current coded frame, motion search begins from the highest resolution reference image layer, on a macroblock basis. In the highest resolution reference image layer, a rectangular region centered on the current position of the macroblock to be processed in the current coded frame is defined as a search window. Within the search window, each candidate position is traversed in raster scan order. For each candidate position, the sum of absolute errors between the pixel value of the macroblock to be processed in the current coded frame and the pixel value of the corresponding macroblock region of the same size in the reference image layer is calculated. After traversal, the candidate position that minimizes the calculated sum of absolute errors is selected from all candidate positions. The horizontal and vertical offsets of the selected candidate position relative to the current position of the macroblock to be processed are recorded as the initial motion vector. Subsequently, predictions are made sequentially in lower resolution reference image layers using the motion vectors calculated in the previous layer, and the search is performed within a finer search range to gradually correct the accuracy of the motion vectors. After obtaining the final motion vector, motion compensation is performed using the reference frame to generate the prediction frame, and the residual data between the current coded frame and the prediction frame is calculated. The final motion vector, prediction frame, and residual data are collectively output as the result of the motion estimation and compensation algorithm.
[0025] In practical implementation, the analysis and estimation module of the high-concurrency real-time IP transcoding system on x86 architecture edge computing nodes executes an adaptive resolution-aware motion estimation and compensation algorithm within the transcoding context instance. The algorithm performs motion analysis on the input image set based on the computational resource allocation table within the transcoding context instance. From the reference frame of the input image set, multi-scale downsampling is performed in parallel according to the number of graphics processor cores specified in the computational resource allocation table. The reference frame can be an image with a resolution of 1920 pixels wide and 1080 pixels high. The computational resource allocation table specifies the total number of graphics processor cores available for transcoding this basic video stream, for example, 4 graphics processor cores. The process of generating a pyramid-shaped multi-resolution reference image layer involves uniformly dividing the reference frame horizontally and vertically into multiple independent image blocks matching the number of available cores, based on the total number of available graphics processor cores specified in the computational resource allocation table. For 4 graphics processor cores, the reference frame is uniformly divided into 2 rows and 2 columns, totaling 4 independent image blocks, each with a size of 960 pixels wide and 540 pixels high. Each independent image patch is assigned to a dedicated graphics processing unit (GPU) core. The GPU core performs a two-dimensional discrete wavelet transform on each assigned image patch in parallel to obtain the corresponding low-frequency sub-band data. The low-frequency sub-band data output from all GPU cores are collected and recombined according to the original spatial relationships of the image patches to generate the first-level downsampled reference image layer. The resolution of the first-level downsampled reference image layer is 960 pixels wide and 540 pixels high. Using the generated first-level downsampled reference image layer as new input, the process of segmentation, allocation, transformation, and recombination is repeated to generate the second, third, and up to the Nth level downsampled reference image layers, collectively forming a pyramid-shaped multi-resolution reference image layer, where N is the preset number of pyramid layers. For example, if N is set to 3, the resolutions of the generated first, second, and third level downsampled reference image layers are 960x540, 480x270, and 240x135, respectively.
[0026] In some embodiments, within the current encoded frame, motion search is performed starting from the highest-resolution reference image layer, on a macroblock basis. The highest-resolution reference image layer is the layer with the highest resolution in the pyramid, such as the first-level downsampled reference image layer with a resolution of 960x540. The macroblock size can be 16 pixels wide and 16 pixels high. Within the highest-resolution reference image layer, a rectangular region centered on the current position of the macroblock to be processed in the current encoded frame is defined as a search window. The size of the search window can be [-16, +16] pixels horizontally and [-16, +16] pixels vertically. Within the search window, each candidate position is traversed in raster scan order. For each candidate position, the sum of absolute errors between the pixel values of the macroblock to be processed in the current encoded frame and the pixel values of the corresponding macroblock region of the same size in the reference image layer is calculated. The sum of absolute errors can be calculated using the formula: in: Indicates the sum of absolute errors. This indicates the coordinates of the macroblock to be processed in the current encoded frame. pixel values, Indicates the coordinates in the reference image layer. pixel values, and These are the horizontal and vertical offsets of the current candidate position. and These are the width and height of the macroblock. After traversal, select the position from all candidate positions that minimizes the sum of the absolute errors. The smallest candidate position. The horizontal and vertical offsets of the selected candidate position relative to the current position of the macroblock to be processed are recorded as the initial motion vector. For example, if the optimal candidate position is offset 4 pixels to the right and 2 pixels down relative to the center of the macroblock in the reference image layer, the recorded initial motion vector is (4,2).
[0027] Optionally, prediction and fine-tuning searches are performed sequentially on lower-resolution reference image layers using the motion vectors from the previous level, progressively refining the motion vectors. For the initial motion vector (4,2) generated in the previous level, it is corrected on the next level reference image layer with a resolution of 480x270. The initial motion vector needs to be scaled according to the resolution ratio; for example, from a 960x540 layer to a 480x270 layer, the resolution is halved, and the motion vector is scaled to (2,1). On the lower-resolution reference image layer, a fine-tuning search is performed with the scaled motion vector (2,1) as the prediction center within a smaller search range. This smaller search range can be [-2,+2] pixels horizontally and [-2,+2] pixels vertically. The fine-tuning search also calculates the sum of absolute errors for each candidate position and selects the offset corresponding to the smallest sum of absolute errors to correct the scaled motion vector, obtaining the corrected motion vector for that layer, for example, corrected to (3,0). This process is iterated across all layers of the pyramid until the bottom layer at the original resolution or a specified layer.
[0028] It can be understood that after obtaining the final motion vector, motion compensation is performed using the original reference frame to generate a prediction frame. The motion compensation process extracts the corresponding pixel block from the original reference frame based on the final motion vector as the prediction block. The residual between the current encoded frame and the prediction frame is calculated, i.e., the pixel value of the current encoded frame is subtracted from the pixel value of the corresponding position in the prediction frame. The final motion vector, the prediction frame, and the residual data together serve as the output of the motion estimation and compensation algorithm, which is used by subsequent prediction and decision modules. For example, for a macroblock, the output final motion vector is (6,1), and the corresponding prediction block pixel data and residual block data are also output.
[0029] In one embodiment of the present invention, based on the motion vector field, a mode decision and intra-frame prediction fusion algorithm is used to perform macroblock-level coding mode selection and prediction for each frame of the image group. The implementation is as follows: For each macroblock in the image, a candidate coding mode list containing multiple possible coding modes is generated based on the determined coding modes of its spatially adjacent macroblocks and the temporal correlation information provided by the motion vector field. For each coding mode in the candidate coding mode list, the rate-distortion cost of encoding the current macroblock using that coding mode is calculated. The rate-distortion cost calculation combines the bit overhead generated after encoding with that mode and the resulting image reconstruction distortion. From all candidate coding modes, the coding mode with the lowest calculated rate-distortion cost is selected as the optimal coding mode for the current macroblock. Depending on the type of the selected optimal coding mode, if it is an inter-frame prediction mode, the predicted value obtained from motion compensation is used as the prediction block for the current macroblock; if it is an intra-frame prediction mode, spatial direction prediction is performed using the pixels of adjacent macroblocks to generate the prediction block for the current macroblock. Based on the generated prediction block, the difference between the original pixel value and the predicted pixel value of the current macroblock is calculated to form a residual block. A discrete cosine transform is then performed on the formed residual block to obtain a set of transform coefficients, i.e., the transcoding quantization coefficient matrix.
[0030] In practical implementation, the prediction and decision module of the high-concurrency real-time IP transcoding system for x86 architecture edge computing nodes, based on motion vector fields, employs a mode decision and intra-frame prediction fusion algorithm to perform macroblock-level coding mode selection and prediction for each frame in an image group. For each macroblock in the image, a candidate coding mode list is generated based on the coding modes of its spatially adjacent macroblocks and the temporal correlation provided by the motion vector field. Spatially adjacent macroblocks can include the macroblock to the left of the current macroblock and the macroblock above the current macroblock. The temporal correlation information provided by the motion vector field includes the reference frame index and the motion vector. The candidate coding mode list contains multiple possible coding modes, such as vertical prediction mode and horizontal prediction mode in intra-frame prediction modes, and unidirectional prediction mode and bidirectional prediction mode in inter-frame prediction modes. Assuming that the coding modes of the spatially adjacent macroblocks of a 16x16 pixel macroblock are vertical prediction mode and unidirectional prediction mode, respectively, and the motion vector field indicates the existence of effective temporal correlation, the generated candidate coding mode list may include vertical prediction mode, horizontal prediction mode, unidirectional prediction mode, and bidirectional prediction mode.
[0031] In some embodiments, for each coding mode in the candidate coding mode list, the rate-distortion cost of encoding the current macroblock using that coding mode is calculated. The rate-distortion cost calculation combines the number of encoded bits and the reconstruction distortion. The reconstruction distortion can be measured as the sum of errors between the original macroblock pixels and the decoded and reconstructed macroblock pixels. The number of bits can be estimated using a context-based adaptive entropy coding model. A Lagrange multiplier is used to balance bit rate and distortion for each coding mode. The formula for calculating the rate-distortion cost is: in: The cost of representation rate distortion, This indicates the distortion between the reconstructed macroblock and the original macroblock when using this encoding mode. This indicates the estimated number of bits required to encode the current macroblock. These are Lagrange multipliers. The value is related to the quantization parameter. For a given quantization parameter, such as 28, the corresponding quantization parameter can be calculated. Value. Assuming the original pixel data of the current macroblock is known, the distortion under different candidate coding modes can be obtained through actual simulation coding process or fast model estimation. and estimated number of bits .
[0032] Optionally, from all candidate coding modes, the coding mode with the lowest rate-distortion cost is selected as the optimal coding mode for the current macroblock. The rate-distortion costs calculated for each candidate coding mode are compared. The value has the minimum The encoding mode for the value is selected. For example, see Table 1 for a list of candidate encoding modes for a macroblock and their calculated rate-distortion costs: Table 1: Correspondence between candidate coding modes and rate-distortion costs Based on the data in the table above, the rate-distortion cost of the unidirectional prediction mode... The value is 1464, the minimum in the list, therefore the unidirectional prediction mode is selected as the optimal coding mode for this macroblock. The selection process is based on specific numerical comparisons. It can be understood that, depending on the selected optimal coding mode, if the optimal coding mode is inter-frame prediction, then the motion-compensated prediction value is used as the prediction block for the current macroblock. The motion-compensated prediction value is obtained from the prediction frame generated by the motion estimation and compensation algorithm in the previous step. If the optimal coding mode is intra-frame prediction, then the pixels of adjacent macroblocks are used for spatial direction prediction to generate the prediction block for the current macroblock. For vertical prediction mode, the values of the pixels in the adjacent row above the current macroblock are copied downwards to fill the prediction block. For horizontal prediction mode, the values of the pixels in the adjacent column to the left of the current macroblock are copied to the right to fill the prediction block. Based on the generated prediction block, the difference between the original pixels and the predicted pixels of the current macroblock is calculated to form a residual block. The value of each pixel in the residual block is the original pixel value minus the predicted pixel value. A discrete cosine transform is performed on the residual block to transform the spatial domain residual pixel matrix into a frequency domain coefficient matrix, resulting in the transcoding quantization coefficient matrix. For example, for a 4x4 residual block, applying a two-dimensional discrete cosine transform yields a 4x4 transform coefficient matrix.
[0033] In one embodiment of the present invention, a transcoded video base stream is generated based on the transcoding quantization coefficient matrix. This process comprises two main stages. The first stage involves applying a rate-distortion optimization and quantization parameter mapping algorithm to the transcoding quantization coefficient matrix based on the differences between the original video encoding format and the target encoding format recorded in the transcoding context instance. First, the correspondence between the quantization parameters of the original video encoding format and the quantization step size of the target encoding format recorded in the transcoding context instance is read. Based on the target bitrate requirement, an initial target quantization parameter is calculated by analyzing the coefficient distribution of the transcoding quantization coefficient matrix. Based on the rate-distortion optimization theory, a small-range search is performed near the initial target quantization parameter to evaluate the bitrate and distortion generated by requantizing the transcoding quantization coefficient matrix with different quantization parameters. The quantization parameter that satisfies the target bitrate constraint and has the minimum distortion is selected as the final target quantization parameter. The transcoding quantization coefficient matrix is then scalar-quantized using the finally determined target quantization parameter to obtain the final transcoding quantization coefficients. The second stage involves entropy encoding the final transcoding quantization coefficients, motion vector field, and encoding mode information according to the syntax specification of the target encoding format. Based on the syntax element definition of the target coding format, the final transcoding quantization coefficients are organized into transform units or coding units. The motion vector differences and reference frame index information in the motion vector field are organized according to the motion vector prediction method of the target coding format. The coding mode information is converted into prediction mode identifiers supported by the target coding format. Using a context-adaptive binary arithmetic coding or exponential Golomb coding method that matches the target coding format, entropy coding is performed on the organized transform unit data, motion vector difference data, reference frame index data, and prediction mode identifier data to generate compressed video basic bitstream segments.
[0034] In practical implementation, the reconstruction output module of the high-concurrency real-time IP transcoding system on x86 architecture edge computing nodes generates the transcoded video base stream based on the transcoding quantization coefficient matrix. This process includes two main stages. The first stage involves applying a rate-distortion optimization and quantization parameter mapping algorithm to the transcoding quantization coefficient matrix based on the differences between the original and target video encoding formats recorded in the transcoding context instance. This involves reading the correspondence between the quantization parameters of the original video encoding format and the quantization step size of the target encoding format recorded in the transcoding context instance. For example, if the original video encoding format is H.264 and the target encoding format is H.265, there is a non-linear mapping relationship between the quantization parameters of H.264 and H.265. This mapping relationship can be established using a lookup table based on the quantization step sizes defined by the two standards. Based on the target bitrate requirement, an initial target quantization parameter is calculated by analyzing the coefficient distribution of the transcoding quantization coefficient matrix. The target bitrate requirement can be 4000 kilobits per second. Analyzing the coefficient distribution of the transcoding quantization coefficient matrix involves the number and magnitude of non-zero coefficients in the statistical matrix. The more concentrated the coefficient energy, the larger the initial target quantization parameter can be. Based on rate-distortion optimization theory, a small-range search is performed near the initial target quantization parameter to evaluate the bitrate and distortion generated after requantizing the transcoding quantization coefficient matrix under different quantization parameters. The search range can be set to [initial target quantization parameter - 3, initial target quantization parameter + 3]. For each quantization parameter to be evaluated, the transcoding quantization coefficient matrix is scalar quantized using this parameter, and then the number of bits (bitrate) required for the encoded quantized coefficients is estimated, and the distortion introduced by quantization is calculated. The quantization parameter that satisfies the target bitrate constraint and has the smallest distortion is selected as the final target quantization parameter. The transcoding quantization coefficient matrix is then scalar quantized using the final target quantization parameter to obtain the final transcoding quantization coefficients. The quantization formula can be expressed as: in: This represents a coefficient in the final transcoding quantization coefficient matrix. This represents the coefficient at the corresponding position in the input transcoding quantization coefficient matrix. It is the quantization step size scaling factor determined by the final target quantization parameters. This indicates the rounding operation.
[0035] In some embodiments, the second stage involves entropy encoding the final transcoding quantization coefficients, motion vector field, and coding mode information according to the syntax specification of the target coding format. Based on the syntax element definition of the target coding format, the final transcoding quantization coefficients are organized into transform units or coding units. For the H.265 target coding format, the coefficients are grouped and organized into 4x4, 8x8, 16x16, or 32x32 transform units. The motion vector differences and reference frame index information in the motion vector field are organized according to the motion vector prediction method of the target coding format. For the H.265 standard, the motion vector differences need to be calculated based on the advanced motion vector prediction mode, and the reference frame index information needs to be written into the strip header or slice header. The coding mode information is converted into prediction mode identifiers supported by the target coding format. Using context-adaptive binary arithmetic coding or exponential Golomb coding that matches the target coding format, entropy encoding is performed on the organized transform unit data, motion vector difference data, reference frame index data, and prediction mode identifier data to generate compressed video base stream segments. If the target format is H.265, then context-adaptive binary arithmetic encoding is used to encode the syntax elements.
[0036] Optionally, the small-range search and evaluation process in the bitrate-distortion optimization and quantization parameter mapping algorithm can be illustrated with specific data examples. Assume the initial target quantization parameter is 28, and the target bitrate constraint is 4000 kilobits per second. Evaluation is performed within the range of quantization parameters 25 to 31, assessing the bitrate and distortion under different quantization parameters. Distortion can be measured using the mean square error between the quantized coefficients and the original coefficients. See Table 2 for the search and evaluation results. Table 2: Evaluation Table for Quantitative Parameter Search Based on the data in the table above, the estimated bitrate corresponding to quantization parameter 28 is 4100kbps, slightly higher than the target bitrate of 4000kbps. The estimated bitrate corresponding to quantization parameter 29 is 3800kbps, satisfying the target bitrate constraint, but with a distortion of 190. Quantization parameter 30 also satisfies the bitrate constraint but has a higher distortion. Among the candidate quantization parameters (29, 30, 31) that satisfy the bitrate constraint (≤4000kbps), quantization parameter 29 has the lowest distortion of 190, therefore, quantization parameter 29 is selected as the final target quantization parameter.
[0037] Entropy coding compresses the organized syntax element data. Transform unit data contains a one-dimensional sequence of the final transcoding quantization coefficients after scanning and sorting. Motion vector difference data is the difference between the current block's motion vector and the predicted motion vector. Reference frame index data indicates the position of the reference frame used for prediction in the decoding buffer. Prediction mode identifier data indicates the intra- or inter-frame prediction mode used by the current block. The context-adaptive binary arithmetic encoder maintains independent probability models for different syntax elements, dynamically updating the probabilities based on the encoded context information, and performing arithmetic encoding on each binary bit. Exponential Golomb coding uses a fixed codeword structure to perform lossless variable-length encoding of syntax element values. The encoded output binary bitstream segments are encapsulated according to the network abstraction layer unit format defined by the target coding format to form the final transcoded video base stream.
[0038] In one embodiment of the present invention, the synchronous encapsulation output module synchronizes and multiplexes the transcoded video base stream and the corresponding audio base stream, and encapsulates them according to a specified Internet Protocol (IP) format. Then, the encapsulated transcoded real-time IP protocol video stream is sent to the requesting terminal. The process of synchronizing and multiplexing the transcoded video base stream and the corresponding audio base stream, and encapsulating them according to a specified IP protocol format, is as follows: The audio frames of the audio base stream are parsed, and the audio timestamp information is extracted. The video frames of the transcoded video base stream are parsed, and the video timestamp information is extracted. Based on the extracted audio and video timestamp information, the timeline for audio-video synchronization is calculated, and frame-level buffer alignment is performed on the audio or video base streams according to this timeline. The timestamp-aligned audio and video base streams are interleaved and encapsulated in consecutive transmission packets according to the specified IP protocol multiplexing specifications.
[0039] In practical implementation, the synchronous encapsulation output module of the high-concurrency real-time IP transcoding system on x86 architecture edge computing nodes synchronizes and multiplexes the transcoded video base stream and the corresponding audio base stream, and encapsulates them according to the specified Internet Protocol (IP) format. The synchronous encapsulation output module sends the encapsulated transcoded real-time IP protocol video stream to the requesting terminal. The audio frames of the audio base stream are parsed to extract audio timestamp information. The audio frames of the audio base stream may be encapsulated using an advanced audio coding format, and the audio timestamp information is recorded in the header of the audio frame, indicating the sampling time of that audio frame. For example, the audio timestamp information of an audio frame is 90,000 clock base units, corresponding to a specific sampling point in the audio sampling sequence. The video frames of the transcoded video base stream are parsed to extract video timestamp information. The video timestamp information is recorded in the image timing code of the video base stream, indicating the display time of the video frame. For example, the video timestamp information of a video frame is 3,000 clock base units, and the time base of the video timestamp information is consistent with the time base of the audio timestamp information.
[0040] In some embodiments, a timeline for audio-video synchronization is calculated based on audio and video timestamp information, and frame-level buffer alignment is performed on the audio or video base streams. The timeline calculation is based on a linear mapping relationship between audio and video timestamp information. The deviation between the audio timestamp information of the current audio frame and the video timestamp information of the current video frame is calculated. The formula for calculating the deviation is: in: Indicates timestamp deviation. This represents the audio timestamp information extracted from the audio frame header. This represents the video timestamp information extracted from the video frame. For example, the current audio timestamp information. 90100, current video timestamp information. The value is 3003, and the timestamp deviation is calculated. The value is 87097. A preset synchronization threshold is used to determine whether buffer alignment is needed. If the timestamp deviation... If the time stamp deviation exceeds the positive synchronization threshold, it indicates that the audio playback is ahead of the video playback. In this case, the basic audio stream is buffered, and subsequent audio frames are played with a delay. If the value is less than the negative synchronization threshold, it indicates that the video playback is ahead of the audio. In this case, the video base stream is buffered, and subsequent video frames are output with a delay. The buffer alignment operation is performed in either the audio base stream buffer or the video base stream buffer, and synchronization is achieved by controlling the timing of reading frames from the buffer.
[0041] Optionally, the timestamp-aligned audio and video base streams are interleaved and encapsulated in consecutive transport packets according to the multiplexing specifications of a specified Internet Protocol (IP) format. The specified IP format can be Real-Time Transport Protocol (RTP). RTP multiplexing specifications require that audio and video payloads be placed in different RTP sessions, or multiplexed within the same session using different payload type identifiers. When multiplexed within the same RTP session, each RTP packet contains a RTP header. The payload type field in the RTP header is used to distinguish between audio and video data. For example, a payload type value of 96 identifies H.264 video base stream data, and a payload type value of 97 identifies High-Level Audio Coding (HATIC) audio base stream data. The interleaving and encapsulation process involves encapsulating audio and video base stream segments into corresponding RTP packets according to the display time sequence of audio and video frames. The encapsulated consecutive RTP packets are then sent to the requesting terminal via Transmission Control Protocol (TCP) or User Datagram Protocol (UDP).
[0042] As can be understood, the synchronous encapsulation output module sends the transcoded real-time Internet Protocol (RTP) video stream to the requesting terminal. The transmission process is performed via a network socket interface. The network address and port information of the requesting terminal are received and stored by the edge computing node during the transcoding task initialization. For example, the network address of the requesting terminal is 192.168.1.100, and the port is 5004. The synchronous encapsulation output module sends an Internet Protocol (IP) datagram containing RTP packets to the destination address 192.168.1.100 and port 5004. The transport layer protocol type, encapsulation format, and destination address information remain consistent throughout the transcoding task context. The transmission operation is continuous and real-time, matching the frame output rate of the transcoding process.
[0043] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A high-concurrency real-time IP transcoding system for x86 architecture edge computing nodes, characterized in that, include: The receiving and parsing module receives real-time Internet Protocol (IP) video streams from multiple video sources. The IP video streams contain compressed video data encapsulated in different container formats. The module performs protocol decapsulation and bitstream extraction on the IP video streams, separating independent basic video bitstreams, basic audio bitstreams, and associated metadata. The context management module creates an independent transcoding context instance for each basic video bitstream. The transcoding context instance contains the encoding format information, resolution information, frame rate information, and a dynamically adjusted computing resource allocation table for the basic video bitstream. The data segmentation module divides the separated video base stream into continuous image groups according to the frame sequence. Each image group is independently input into the corresponding transcoding context instance. The analysis and estimation module, in the transcoding context instance, uses an adaptive resolution-aware motion estimation and compensation algorithm based on the computing resource allocation table to perform motion analysis on the input image group and generate forward motion vector fields and backward motion vector fields. The prediction and decision module, based on the motion vector field, uses a mode decision and intra-frame prediction fusion algorithm to perform macroblock-level coding mode selection and prediction for each frame in the image group, generating a transcoding quantization coefficient matrix. The reconstructed output module generates the transcoded video base stream based on the transcoding quantization coefficient matrix.
2. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 1, characterized in that, The process of creating an independent transcoding context instance for each video base stream includes: The sequence parameter set and image parameter set of the basic video bitstream are analyzed to obtain the encoding standard, grade and level, image resolution and frame rate of the basic video bitstream; Based on the encoding standard, resolution, and frame rate of the basic video bitstream, a preset complexity mapping table is queried to obtain the initial computational complexity rating of the basic video bitstream. Based on the initial computational complexity rating, the initial share of graphics processor core resources, digital signal processor resources, and memory bandwidth resources are dynamically allocated to the transcoding context instance from the available computing resource pool of the edge computing node to form a computing resource allocation table. Record the original encoding format information, target encoding format information, and real-time bitrate information of the basic video stream to the transcoding context instance.
3. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 2, characterized in that, In the transcoding context instance, based on the computational resource allocation table, an adaptive resolution-aware motion estimation and compensation algorithm is used to perform motion analysis on the input image group, including: From the reference frames of the input image group, multi-scale downsampling is performed in parallel according to the number of graphics processor cores specified in the computational resource allocation table to generate a pyramid-shaped multi-resolution reference image layer. In the current coded frame, motion search is performed on a macroblock basis, starting from the highest resolution reference image layer, within a preset search window, and the sum of absolute errors is calculated to obtain the initial motion vector. In turn, at lower resolution reference image layers, prediction and fine-tuning are performed using the motion vectors from the previous level, and the motion vectors are gradually corrected. After obtaining the final motion vector, motion compensation is performed using the reference frame to generate the prediction frame, and the residual between the current coded frame and the prediction frame is calculated. The final motion vector, predicted frame, and residual data are output together as the result of the motion estimation and compensation algorithm.
4. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 3, characterized in that, The algorithm, based on motion vector fields and employing a fusion of mode decision and intra-frame prediction, performs macroblock-level coding mode selection and prediction for each frame in the image group, including: For each macroblock in the image, a list of candidate coding modes is generated based on the coding modes of its spatially adjacent macroblocks and the temporal correlation provided by the motion vector field. For each coding mode in the candidate coding mode list, calculate the rate-distortion cost of encoding the current macroblock using the coding mode, where the rate-distortion cost combines the number of bits after encoding and the reconstruction distortion. From all candidate coding modes, the coding mode with the lowest rate-distortion cost is selected as the optimal coding mode for the current macroblock; Depending on the selected optimal coding mode, if it is an inter-frame prediction mode, motion-compensated prediction values are used; if it is an intra-frame prediction mode, spatial orientation prediction is performed using pixels from adjacent macroblocks to generate the prediction block for the current macroblock. Based on the prediction block, the difference between the original pixels and the predicted pixels of the current macroblock is calculated to form a residual block. The residual block is then subjected to discrete cosine transform to obtain the transcoding quantization coefficient matrix.
5. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 4, characterized in that, Based on the transcoding quantization coefficient matrix, a transcoded video base stream is generated, including: Based on the differences between the original video encoding format and the target encoding format recorded in the transcoding context instance, a rate-distortion optimization and quantization parameter mapping algorithm is applied to the transcoding quantization coefficient matrix to calculate the target quantization parameters and generate the final transcoding quantization coefficients. The final transcoding quantization coefficients, motion vector fields, and encoding mode information are entropy encoded according to the syntax specifications of the target encoding format to generate the transcoded video basic bitstream.
6. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 5, characterized in that, The step of applying a rate-distortion optimization and quantization parameter mapping algorithm to the transcoding quantization coefficient matrix based on the differences between the original video encoding format and the target encoding format recorded in the transcoding context instance includes: Read the correspondence between the quantization parameters of the original video encoding format and the quantization step size of the target encoding format recorded in the transcoding context instance; Based on the target bit rate requirement, an initial target quantization parameter is calculated by analyzing the coefficient distribution of the transcoding quantization coefficient matrix. Based on the rate-distortion optimization theory, a small-range search is performed near the target quantization parameter to evaluate the rate and distortion generated after requantizing the transcoding quantization coefficient matrix under different quantization parameters. Select the quantization parameter that satisfies the target bit rate constraint and has the minimum distortion as the final target quantization parameter; The transcoding quantization coefficient matrix is scalar quantized using the final target quantization parameters to obtain the final transcoding quantization coefficients.
7. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 5, characterized in that, The step of entropy encoding the final transcoding quantization coefficients, motion vector field, and encoding mode information according to the syntax specifications of the target encoding format includes: Based on the syntax element definition of the target encoding format, the final transcoding quantization coefficients are organized into a format of transformation units or encoding units; The motion vector differences and reference frame index information in the motion vector field are organized according to the motion vector prediction method of the target coding format; Convert the encoding mode information into a prediction mode identifier supported by the target encoding format; The organized transform unit data, motion vector difference data, reference frame index data, and prediction mode identifier data are entropy encoded using context-adaptive binary arithmetic coding or exponential Golomb coding that matches the target coding format to generate compressed video basic bitstream segments.
8. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 3, characterized in that, The step of generating a pyramid-shaped multi-resolution reference image layer by performing multi-scale downsampling in parallel from the reference frames of the input image group, based on the number of graphics processor cores specified in the computational resource allocation table, includes: Based on the total number of available graphics processor cores specified in the computing resource allocation table, the reference frame is uniformly divided into multiple independent image blocks in the horizontal and vertical directions, matching the number of available cores. Each independent image block is assigned to a dedicated graphics processing unit (GPU) core, which then performs a two-dimensional discrete wavelet transform on the assigned image blocks in parallel to obtain the low-frequency sub-band data corresponding to the image blocks. The low-frequency subband data output by all graphics processor cores is collected and reorganized according to the spatial position relationship of image blocks to generate the first-level downsampled reference image layer; Using the first-level downsampled reference image layer as new input, the process of segmentation, allocation, transformation and recombination is repeated to generate the second-level, third-level and up to the Nth-level downsampled reference image layers in sequence, which together constitute the pyramid-shaped multi-resolution reference image layer, where N is the preset number of pyramid layers.
9. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 3, characterized in that, The process of performing motion search within a preset search window in the current encoded frame, starting from the highest resolution reference image layer and taking macroblocks as the unit, calculating the sum of absolute errors, and obtaining the initial motion vector includes: In the highest resolution reference image layer, a rectangular region centered on the current position of the macroblock is defined as a search window for the macroblock to be processed in the current coded frame; Within the search window, each candidate position is traversed in the order of raster scanning. For each candidate position, the sum of absolute errors between the pixel value of the macroblock to be processed in the current coded frame and the pixel value of the macroblock region of the same size corresponding to the candidate position in the reference image layer is calculated. After the traversal is complete, select the candidate position that minimizes the sum of absolute errors from all candidate positions; The horizontal and vertical offsets of the selected candidate positions relative to the current position of the macroblock to be processed are recorded as the initial motion vector.
10. The high-concurrency real-time IP transcoding system for X86 architecture edge computing nodes according to claim 1, characterized in that, The system also includes a synchronous encapsulation output module: The transcoded video base stream and the corresponding audio base stream are synchronized and multiplexed, and then encapsulated according to the specified Internet protocol format. The encapsulated and transcoded real-time Internet Protocol video stream is sent to the requesting terminal. The process of synchronizing and multiplexing the transcoded video base stream and the corresponding audio base stream, and encapsulating them according to a specified Internet protocol format, includes: Parse the audio frames of the basic audio bitstream and extract the audio timestamp information; Analyze the video frames of the transcoded video base stream and extract the video timestamp information; Based on audio and video timestamp information, the timeline for audio-video synchronization is calculated, and frame-level buffering alignment is performed on the audio or video base streams. The time-stamped audio and video base streams are interleaved and encapsulated in consecutive transmission packets according to the multiplexing specifications of the specified Internet Protocol format.