Video transmission method and device, equipment and medium
By calculating the CMSE of video slices to determine the transmission priority, and combining adaptive packetization and dynamic error correction protection to optimize video transmission, it solves the problem of insufficient video transmission efficiency and robustness in the existing technology, and achieves a more efficient, Reliable real-time video transmission.
Patent Information
- Application Number
- CN202410636916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-03
AI Technical Summary
Existing video transmission technology cannot guarantee low latency, high reliability, and high video quality in real-time video transmission, especially when network conditions are unstable, resulting in insufficient video transmission efficiency and robustness.
The transmission priority is determined by calculating the cumulative mean square error (CMSE) of the video slice, and the transmission, encoding and bandwidth allocation of the slice are performed based on the priority, combined with adaptive packetization, dynamic forward error correction protection and intelligent slice discarding strategy. Optimize the video transmission process.
It improves the efficiency, quality and robustness of video transmission, ensures priority transmission of key content, reduces delays and packet loss, and provides a better real-time video viewing experience.
Smart Images

Figure CN118590675A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image technology, and in particular to a video transmission method, device, equipment and medium. Background Art
[0002] With the development of Internet technology and the increasing demand for high-quality video content, real-time video transmission has become an important and growing part of network applications. Real-time video transmission requires low latency, high reliability and high video quality, which puts higher requirements on video encoding and network transmission technology. Summary of the invention
[0003] The embodiments of the present application provide a video transmission method, apparatus, device and medium to improve the efficiency, quality and robustness of video transmission and provide users with a better video viewing experience.
[0004] At the video sending end, a video transmission method provided in an embodiment of the present application includes:
[0005] Determine the slice of the video currently to be sent to the receiving end;
[0006] For each of the slices, a cumulative mean square error CMSE of the slice is calculated, and based on the CMSE of the slice, a transmission priority of the slice is determined; wherein the larger the CMSE of the slice is, the higher the transmission priority of the slice is;
[0007] The slices of the video are sent to the receiving end based on the transmission priority of the slices of the video.
[0008] It can be seen that the embodiment of the present application determines the slices of the video currently to be sent to the receiving end, and for each of the slices, calculates the cumulative mean square error CMSE of the slice, and determines the transmission priority of the slice based on the CMSE of the slice; wherein, the larger the CMSE of the slice, the higher the transmission priority of the slice; thereby, based on the transmission priority of the slice of the video, the slice of the video is sent to the receiving end, thereby realizing the transmission of video slices based on the contribution of CMSE, ensuring that the content that has a greater impact on the video quality can be transmitted first, thereby improving the efficiency, quality and robustness of video transmission, and providing users with a better video viewing experience.
[0009] In some embodiments, based on the transmission priority of the slice of the video, sending the slice of the video to the receiving end includes:
[0010] For each of the slices:
[0011] Determine a data packet fragment size of the slice, and determine a forward error correction (FEC) protection level of the slice;
[0012] Encode the slice according to the data packet fragment size of the slice and the FEC protection level of the slice;
[0013] The encoded data of the slice is sent to the receiving end according to the transmission priority of the slice.
[0014] In some embodiments, determining the data packet segment size of the slice includes:
[0015] For each transmission priority, the optimal data packet segment size for the slice of the transmission priority is determined based on the transmission priority and the current network conditions.
[0016] In some embodiments, determining the FEC protection level of the slice includes:
[0017] Based on the slice transmission priority and current network conditions, the FEC protection level of the slice is determined.
[0018] In some embodiments, sending the encoded data of the slice to the receiving end according to the transmission priority of the slice includes:
[0019] Allocate network bandwidth to the slice based on the transmission priority of the slice;
[0020] Determine a sending time of the slice based on the network bandwidth;
[0021] According to the network bandwidth and the sending time, the encoded data of the slice is sent to the receiving end.
[0022] In some embodiments, the method further comprises:
[0023] Monitor the current network status;
[0024] If the current network status meets the preset conditions, based on the transmission priority of the slices of the video and the current network status, the slices to be discarded are selected from the slices of the video.
[0025] Accordingly, at the receiving end, a video transmission method provided by an embodiment of the present application includes:
[0026] The receiving video transmitter sends the slice of the video based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0027] When it is determined that there is a slice loss in the video transmission, based on the received partial slices of the video, recover the lost slices of the video;
[0028] The video playback output is performed using the received slices of the video and the restored slices of the video.
[0029] At the transmitting end, a video transmission device provided in an embodiment of the present application includes:
[0030] A slice determination unit, used to determine the slice of the video currently to be sent to the receiving end;
[0031] a transmission priority determination unit, configured to calculate, for each of the slices, a cumulative mean square error CMSE of the slice, and determine a transmission priority of the slice based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0032] A sending processing unit is used to send the slices of the video to the receiving end based on the transmission priority of the slices of the video.
[0033] Accordingly, at the receiving end, a video transmission device provided by an embodiment of the present application includes:
[0034] A receiving unit, configured to receive a slice of the video sent by a video transmitter based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0035] a slice loss identification unit, configured to restore the lost slices of the video based on the received partial slices of the video when it is determined that there is a slice loss in the video transmission;
[0036] The playback output unit is used to perform video playback output using the received slices of the video and the restored slices of the video.
[0037] Another embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.
[0038] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of the overall flow of a video transmission method provided by a video transmitter in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of slices obtained by dividing each frame of image provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the overall flow of a video transmission method provided by a video receiving end in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of a specific process of a video transmission method provided by a video transmitter in an embodiment of the present application;
[0044] Figure 5 A flowchart of a specific processing method for transmission priority classification of slices provided in an embodiment of the present application;
[0045] Figure 6 A flowchart of a specific processing method for adaptive packetization of each slice provided in an embodiment of the present application;
[0046] Figure 7 A flowchart of a specific processing method for FEC protection provided in an embodiment of the present application;
[0047] Figure 8 A flowchart of a specific processing method for slice discarding provided in an embodiment of the present application;
[0048] Fig. 9 A flowchart of a specific processing method for video reception provided in an embodiment of the present application;
[0049] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0050] Fig.11 A schematic diagram of the structure of a video transmission device at a video transmitting end provided in an embodiment of the present application;
[0051] Fig.12 A schematic diagram of the structure of a video transmission device at a video receiving end provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] The embodiments of the present application provide a video transmission method, apparatus, device and medium to improve the efficiency, quality and robustness of video transmission and provide users with a better video viewing experience.
[0054] Among them, the method and the device, equipment, and medium are based on the same application concept. Since the principles of solving problems by the method and the device, equipment, and medium are similar, the implementation of the device, equipment, medium, and method can refer to each other, and the repeated parts will not be repeated.
[0055] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0056] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to only those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.
[0057] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.
[0058] Video coding technology is a technology that compresses video data to reduce storage and transmission bandwidth requirements. H.264 / AVC (Advanced Video Coding) is a widely used video coding standard that provides high compression efficiency, enabling high-quality video to be transmitted over limited bandwidth. During the video encoding process, the video is divided into multiple frames and slices, which are given different transmission priorities based on their importance in the video and content complexity.
[0059] Network communication technology involves the transmission mechanism of data in the network, including the routing of data packets, transmission protocols, and network congestion control. In real-time video transmission, the instability of network conditions (such as bandwidth fluctuations, delay changes, packet loss, etc.) has a direct impact on video quality. Therefore, in mobile networks and changing network environments, how to effectively utilize limited network resources, dynamically adapt to changes in network conditions, and ensure the quality of video transmission, that is, to maintain the stability and high quality of video transmission under changing network conditions, is the main technical challenge facing real-time video transmission.
[0060] In view of the above background and challenges, the embodiments of the present application provide a more intelligent, flexible and efficient video transmission strategy. By comprehensively considering the importance of video content, real-time changes in network conditions, and user quality requirements, the video transmission process is optimized, bandwidth utilization is improved, delays and packet loss in video transmission are reduced, and the efficiency, quality and robustness of video transmission are improved, thereby providing users with a better real-time video viewing experience.
[0061] Traditional video transmission strategies often do not fully consider the importance differences of video content, resulting in the equal treatment of key content and non-key content. Therefore, in the embodiment of the present application, the transmission priority of video slices is classified by calculating CMSE (Cumulative Mean Squared Error), and the video transmission processing can be further combined with the importance of the frame, ensuring that the content with a greater impact on the video quality can obtain more protection and bandwidth resources.
[0062] First, the terms involved in the embodiments of the present application are explained as follows:
[0063] Adaptive Packetization:
[0064] Adaptive packetization technology dynamically adjusts the size of data packets based on current network conditions (such as bandwidth, latency, and packet loss rate) and the characteristics of video content (such as the importance of frames). Smaller data packets help reduce packet loss when network conditions are poor, while larger data packets can improve transmission efficiency when network conditions are good.
[0065] It can be seen that through adaptive packetization, it is possible to flexibly respond to network fluctuations, optimize bandwidth utilization, and reduce video quality loss caused by network congestion, thereby improving the stability and quality of video transmission.
[0066] Dynamic Forward Error Protection (Dynamic FEC Protection):
[0067] Dynamic forward error protection adjusts the FEC (Forward Error Correction) protection level based on the importance of the video content and the real-time network conditions. For critical content (such as I-frames) or when the network conditions are poor, a higher level of FEC protection is applied to ensure the reliability of video transmission.
[0068] It can be seen that by dynamically adjusting the FEC protection level, the requirements for bandwidth usage and error protection can be effectively balanced, the loss of key video content can be reduced, and the robustness of video transmission can be improved.
[0069] Intelligent Slice Dropping:
[0070] In the case of limited bandwidth, the importance of video frames and their contribution to video quality (such as CMSE) are used to determine which video data can be discarded. This strategy prioritizes the content that has the greatest impact on video quality, while discarding some video data that has less impact on the viewing experience.
[0071] It can be seen that the intelligent slice discarding strategy helps to maximize video quality when network bandwidth is limited, reduce quality loss in video playback, and optimize user experience.
[0072] Partial Slice Decoding:
[0073] Modify the traditional H.264 decoder to enable it to process and decode incompletely received slices, allowing the continuity and quality of video playback to be restored and maintained as much as possible in the event of partial packet loss.
[0074] It can be seen that partial slice decoding can significantly improve the robustness of video transmission. Even when the network conditions are not ideal, it can ensure a better video playback experience and reduce playback interruptions.
[0075] Priority and Network Condition-Based Scheduling:
[0076] The scheduling algorithm takes into account factors such as the transmission priority of video data packets, real-time network conditions and other traffic, optimizes the timing and resource allocation of video transmission, thereby ensuring that high-priority video data content is transmitted first under permitted network conditions and effectively manages network resources.
[0077] It can be seen that this scheduling algorithm can reduce video transmission delay, improve the response speed and real-time performance of real-time video services; and by optimizing resource allocation, it can improve the transmission efficiency and video quality of the overall network.
[0078] In summary, the above technical solutions can jointly constitute a highly comprehensive, dynamically adaptive and intelligent video transmission optimization framework, thereby providing more efficient, more stable and higher quality real-time video transmission services.
[0079] The following describes the implementation method of adaptive video transmission provided by the embodiment of the present application at the sending end and the receiving end of video transmission respectively.
[0080] See also Figure 1 First, at the video sending end, a video transmission method provided by an embodiment of the present application includes:
[0081] S101, determining a slice of a video to be sent to a receiving end;
[0082] The video includes multiple frames of images, and each frame of image includes multiple slices.
[0083] The way of dividing the slices can be determined according to actual needs and is not limited in the embodiments of the present application. For example, each frame image can be divided into 4 slices. Figure 2 As shown, they are slice 1, slice 2, slice 3, and slice 4 respectively.
[0084] S102, for each of the slices, calculating the cumulative mean square error CMSE of the slice, and determining the transmission priority of the slice based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0085] The CMSE of a slice reflects the contribution of the slice to the video quality. The larger the CMSE of a slice, the greater the contribution, and the higher the transmission priority of the slice, that is, the more important the slice is, and the more transmission needs to be guaranteed.
[0086] S103: Send the slices of the video to the receiving end based on the transmission priority of the slices of the video.
[0087] It can be seen that in the embodiments of the present application, the differences in the importance of video content are taken into consideration. In the transmission process of video slices, different transmission priorities are set to differentiate between critical content and non-critical content, thereby ensuring that content that has a greater impact on video quality can obtain more protection and bandwidth resources. While giving priority to the transmission of important content, the video quality is ensured, thereby improving the efficiency, quality and robustness of video transmission, thereby providing users with a better real-time video viewing experience.
[0088] Of course, in some embodiments, in addition to the transmission priority of the slice, the transmission processing of the video slice can be further performed in combination with factors such as the type of image frame to which the slice belongs (i.e., the importance of the image frame), current network conditions (such as bandwidth, delay, packet loss rate), etc.
[0089] In some embodiments, based on the transmission priority of the slice of the video, sending the slice of the video to the receiving end includes:
[0090] For each of the slices:
[0091] Determine a data packet fragment size of the slice, and determine a forward error correction (FEC) protection level of the slice;
[0092] Encode the slice according to the data packet fragment size of the slice and the FEC protection level of the slice;
[0093] The encoded data of the slice is sent to the receiving end according to the transmission priority of the slice.
[0094] Each slice includes multiple data packet fragments, and when encapsulating the data in the slice, it is encapsulated according to the size of the data packet fragment.
[0095] Different FEC protection levels reflect the different importance of video content. For example, slices with higher transmission priority should use higher levels of FEC protection. Before sending the slice, the FEC protection level of the slice needs to be additionally encoded to enhance the slice's ability to resist transmission errors.
[0096] In some embodiments, determining the data packet segment size of the slice includes:
[0097] For each transmission priority, based on the transmission priority and current network conditions (eg, including the current network bit error rate and the current network bandwidth), the optimal data packet fragment size of the slice of the transmission priority is determined.
[0098] It can be seen that the embodiment of the present application provides an adaptive packet segmentation strategy, which dynamically determines the size of data packet segments according to network conditions, effectively copes with network fluctuations, and maintains the stability and quality of video transmission.
[0099] In some embodiments, determining the FEC protection level of the slice includes:
[0100] Based on the slice transmission priority and current network conditions (such as the current network bit error rate and the current network bandwidth), the FEC protection level of the slice is determined.
[0101] It can be seen that the embodiment of the present application provides a method for dynamically determining the FEC protection level of a slice, providing appropriate protection for key video content based on real-time network conditions and the importance of the video content, and reducing video quality loss caused by network errors.
[0102] In some embodiments, sending the encoded data of the slice to the receiving end according to the transmission priority of the slice includes:
[0103] Allocate network bandwidth to the slice based on the transmission priority of the slice;
[0104] Determine a sending time of the slice based on the network bandwidth;
[0105] According to the network bandwidth and the sending time, the encoded data of the slice is sent to the receiving end.
[0106] It can be seen that the embodiment of the present application ensures that content that has a greater impact on video quality can obtain more bandwidth resources through priority classification, thereby optimizing the overall video viewing experience.
[0107] In some embodiments, the method further comprises:
[0108] Monitor the current network status;
[0109] If the current network status meets a preset condition (eg, bandwidth is limited), based on the transmission priority of the slices of the video and the current network status, a slice to be discarded is selected from the slices of the video.
[0110] It can be seen that the embodiment of the present application provides an intelligent slice discard strategy, which optimizes the utilization of network bandwidth, ensures that high-priority content is transmitted first, and maximizes the efficiency of network resource utilization.
[0111] Accordingly, at the video receiving end, see Figure 3 , a video transmission method provided in an embodiment of the present application includes:
[0112] S301, receiving a slice of the video sent by a video transmitter based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0113] S302: When it is determined that slices are lost in the video transmission, restore the lost slices of the video based on the received partial slices of the video;
[0114] S303: Use the received slices of the video and the restored slices of the video to perform video playback output.
[0115] When faced with unstable network or limited bandwidth, traditional video transmission methods may not be able to effectively guarantee the continuity and quality of video playback. The embodiments of the present application utilize partial slices of the received video to restore the lost slices of the video and implement partial slice decoding. Therefore, even if some data packets of the video are lost, the complete content of the video can be restored as much as possible, significantly improving the robustness of video transmission.
[0116] Some more specific embodiments are described below.
[0117] Embodiment 1:
[0118] See also Figure 4 At the transmitting end, a video transmission method provided in an embodiment of the present application specifically includes:
[0119] S401, Transmission Priority Classification:
[0120] Analyze H.264 / AVC video streams and classify H.264 slices into different transmission priority categories according to the contribution of each slice to the final video quality. This classification is based on the cumulative mean square error (CMSE) of the slice, the contribution to the received video quality, and the slice with high contribution gets a higher transmission priority.
[0121] Among them, about CMSE calculation: For each slice of the video, CMSE can be calculated by comparing the decoded output of the slice with the original input. Specifically, CMSE is the average of the accumulated squared errors of all pixels in the slice. If the CMSE value of a slice is high, it means that the slice plays a key role in the video, and its accuracy directly affects the visual quality of the overall video. For example:
[0122] Assume that a video stream includes multiple frames, each of which contains multiple slices, including key frame slices and B frame slices (B frames depend on other frames for decoding):
[0123] Keyframe slices: usually contain a lot of video information and new details of the scene. Therefore, the CMSE of these keyframe slices is usually high, which means that they contribute more to the video quality. If these keyframes are lost or damaged, the quality of subsequent frames will be seriously affected.
[0124] B-frame slices: These slices depend on the previous and next frames to be decoded. Although a single B-frame may have a low CMSE, if a keyframe is damaged, the CMSE of the affected B-frames will increase because the error will propagate between dependent frames.
[0125] Then, use CMSE to classify transmission priorities, including:
[0126] Slices with higher CMSE are given higher transmission priority, ensuring that they receive more protection (such as enhanced FEC protection) during transmission to reduce the risk of loss due to network errors.
[0127] Slices with lower CMSE may be assigned lower transmission priority, and even if they are lost under poor network conditions, it will not have much impact on video quality.
[0128] For example, the CMSE of each slice can be calculated using the following formula:
[0129]
[0130] Among them, CMSE ij represents the cumulative mean square error of the j-th slice in the i-th frame.
[0131] n ij Indicates the number of pixels in the jth slice in the i-th frame.
[0132] I ijk Represents the original value of the k-th pixel of the j-th slice in the i-th frame.
[0133] K ijk Represents the processed value of the k-th pixel of the j-th slice in the i-th frame.
[0134] The calculation of CMSE may be performed for a slice or an image frame. In some embodiments, the embodiment of the present application may also introduce a weighting coefficient to further distinguish the importance of different types of frames (such as I frames, P frames, and B frames), because they have different effects on video quality.
[0135] Then, for each frame, the CMSE of the frame can be calculated using the following formula, for example:
[0136]
[0137] Among them, Weighted CMSEi represents the CMSE (i.e., weighted CMSE) of the i-th frame.
[0138] m i Indicates the number of slices in the i-th frame.
[0139] w ij The weighting coefficient of the jth slice in the i-th frame may be set in advance for different slices according to the type of the slice or the importance of the content.
[0140] Similarly, the CMSE of a video frame (including multiple frames) can also be calculated. For example, the CMSE of a video within a preset duration can be calculated using the following formula:
[0141]
[0142] Wherein, N represents the total number of frames in the video within the preset duration.
[0143] Therefore, the embodiment of the present application uses CMSE to classify the transmission priority of video slices, so that the video transmission system can manage resources more intelligently, optimize the use of network bandwidth, and adapt to complex and changing network environments without sacrificing video quality.
[0144] In addition, in the priority scoring mechanism, in addition to considering CMSE, the temporal position information of the frame can also be considered, because frames at different temporal positions in the video sequence may have different effects on the viewing experience.
[0145] Therefore, in some embodiments, the following transmission priority scoring formula may be used to divide the transmission priorities of the slices:
[0146]
[0147] Among them, P i T represents the parameter value (i.e., the score value) for determining the transmission priority of the current slice belonging to the image frame i; i is the temporal position parameter of the frame i to which the current slice belongs in the video sequence, and λ is the preset coefficient for adjusting the influence of the temporal position. avg Represents the average cumulative mean square error, which is used to quantify the loss of video or image quality. This indicator reflects the average difference between the original video and the compressed or processed video. avg Examples of calculations include:
[0148] Step 1: Comparison of original and processed data:
[0149] For each frame in the video, there needs to be a pre-processed (original) and a post-processed version, which can be pre-set.
[0150] Typically, the processed version is encoded, transmitted, and then decoded, and may differ from the original version due to factors such as compression in these processing steps.
[0151] Step 2: Calculate MSE frame by frame:
[0152] For each pair of image frames, namely the original image frame and the corresponding processed image frame, the mean square error (MSE) between them is calculated, for example, using the following formula:
[0153]
[0154] Where I(i,j) is the pixel value at position (i,j) in the original frame, K(i,j) is the pixel value at the same position in the processed frame, and m and n are the number of rows and columns of the image, respectively.
[0155] Step 3: Calculate the average MSE:
[0156] The MSE values of all frames are summed and then divided by the total number of frames to obtain the cumulative mean square error average CMSEavg. This average provides an overall indicator of the quality loss of the entire video or a specified video segment. Among them, all the frames mentioned here are all video frames within a period of time of the video, rather than all video frames within the total time period of the video.
[0157] It should be noted that the embodiments of the present application are described using H.264 / AVC video stream as an example, but are not limited to H.264 / AVC video stream. The technical solution provided in the embodiments of the present application can also be applied to other video streams besides H.264 / AVC.
[0158] S402, Adaptive Packetization:
[0159] For each video slice of the transmission priority class, the optimal packet fragment size is derived based on the slice importance and network conditions (such as the encoded video bit rate, slice size, and the bit error rate of the network). The purpose of the adaptive packetization process is to determine the optimal packet fragment size for each slice of the transmission priority class. This step can find a balance between the higher error rate that larger fragments may cause and the more overhead required for smaller fragments to achieve the maximum expected weighted throughput.
[0160] The optimal packet fragment size is a balancing act, the goal is to find the best balance between the higher error rate that may be caused by larger packets and the more overhead required for smaller packets. The overhead here mainly refers to the additional data transmission caused by the packet header, especially when the packet is small, the proportion of this overhead will increase significantly.
[0161] Regarding determining the importance of slices: As mentioned above, CMSE or similar metrics are used to determine the importance of each slice. Slices with high importance (such as key frame slices) will be assigned high transmission priority, and their loss or damage will have a greater impact on the overall video quality.
[0162] About determining network conditions:
[0163] Consider the current network bit error rate: If the current network bit error rate is high, then smaller packets can reduce the risk of one error affecting the entire packet.
[0164] Consider the current network bandwidth: If the current network bandwidth is large and can accommodate larger data packets, the header overhead caused by the increase in the number of data packets can be reduced.
[0165] Regarding calculating the optimal packet fragment size: using a preset algorithm or model, combined with the current network conditions and the importance of the slice, the optimal packet size is calculated. For example, an algorithm can be set up to input the CMSE of each slice, the current network bit error rate, and the current network bandwidth, and then the algorithm can output the optimal packet size for the slice.
[0166] Specifically, suppose there are two slices: slice A: for example, a key frame; slice B: for example, a B frame;
[0167] So, these two slices compare:
[0168] Slice A, with a higher CMSE, is in an environment with a lower network bit error rate. Then, a larger packet fragment can be determined for slice A to reduce the header overhead.
[0169] Slice B, with lower CMSE, is in an environment with a higher network bit error rate. Then, a smaller packet fragment should be determined for slice B to reduce the impact of errors on the packet.
[0170] About throughput: It usually refers to the amount of data successfully transmitted per unit time, usually measured in bits per second (bps).
[0171] About weighted throughput: refers to the throughput that takes into account the priority or importance of data transmission. Different data packets may be assigned different weights. The successful transmission of data packets with high weights is considered more important, and therefore contributes more to the overall throughput.
[0172] Then, the calculation of the maximum expected weighted throughput includes:
[0173] Determination of weights:
[0174] In scenarios such as video transmission, different video slices are assigned different weights according to their impact on video quality. For example, key frames can get higher weights due to their importance to the decoding of subsequent frames.
[0175] Calculation of expected value:
[0176] Taking into account the uncertainty of network conditions (such as variable delay and packet loss rate), the calculation of expected weighted throughput can combine the probability of successful transmission of different data packets under different network conditions and accumulate the throughput of each data packet.
[0177] Optimize system parameters:
[0178] The system parameters include, for example, data packet size, FEC protection level, transmission rate, etc. In some embodiments, one or more of these system parameters may be optimized to maximize the expected weighted throughput. In some embodiments, these parameters may be dynamically adjusted to adapt to real-time changing network conditions.
[0179] For example, in an adaptive video transmission system, the system dynamically adjusts the packet size, FEC protection level, and scheduling transmission priority of the video data according to the current network bandwidth, bit error rate, and other network quality indicators. Through these adjustments, the system attempts to maximize the expected weighted throughput, that is, to ensure that the video data with high transmission priority is successfully transmitted as much as possible, while reasonably using network resources to reduce the impact of delay and packet loss rate. How to adjust these system parameters can be determined according to actual needs and is not limited in the embodiments of this application.
[0180] In some embodiments, a video transmission method provided by an embodiment of the present application further includes:
[0181] S403, FEC protection:
[0182] Dynamically determines the level of forward error correction (FEC) protection based on the segment size and network conditions for each transmission priority class. Assign stronger FEC protection to important video content to reduce the risk of critical information being lost due to network errors.
[0183] Basic principle of FEC protection: Forward Error Correction (FEC) is an error control method in data transmission, which is used to automatically correct errors during data transmission. It is achieved by adding redundant data (check data) at the sending end, which allows the receiving end to detect and correct a certain number of errors without retransmission.
[0184] Different slices in a video stream have different effects on the final video quality. Key frames contain a lot of new information and are the reference basis for other frames (such as predicted frames), so the integrity of key frames is critical to video quality. In order to protect these key frames, a higher level of FEC protection is required. For frames with less impact, a lower level of FEC protection can be used to save bandwidth and reduce transmission delay.
[0185] Then, the FEC protection level is dynamically adjusted according to the segment size and network conditions, such as the size of the data packet and the stability of the network (such as the bit error rate), to determine the FEC protection level. When the network conditions are poor or the data packets are large, more redundant data is required to ensure the integrity of the data, that is, the FEC protection level is higher. In addition, the embodiment of the present application assigns a stronger FEC protection level to important video content. For example, video content with a high transmission priority (such as key frame slices) will be assigned a higher FEC protection level. This is because any loss or damage to these contents will significantly reduce the overall video viewing experience.
[0186] The specific FEC protection level is usually used to describe the ratio of the amount of redundant data added to the original data. For example, if the size of a data packet is 1000 bytes and the FEC protection level is 20%, an additional 200 bytes of redundant data are added, making the total amount of transmitted data 1200 bytes. In actual applications, different coding schemes, such as Hamming code, Reed-Solomon code, etc., can be used to generate redundant data, and different coding schemes have different error correction capabilities.
[0187] In some embodiments, a video transmission method provided by an embodiment of the present application also includes: slice discarding.
[0188] The slice discarding scheme provided in the embodiment of the present application aims to optimize the video transmission quality when network resources are insufficient, by discarding slices that contribute less to the overall video quality to release bandwidth for more important slices.
[0189] Therefore, an embodiment of the present application proposes a slice discarding scheme based on frame importance and slice CMSE contribution. Under network bandwidth limitations, some slices are discarded in the buffer to control the error propagation effect and prioritize the slices that contribute most to video quality.
[0190] Regarding the determination of frame importance, each frame in the video is not equally important. Key frames (I frames) contain complete image information and are crucial for video decoding, while predicted frames (P frames) and bidirectional predicted frames (B frames) contain less new information and mainly rely on other frames for decoding. Therefore, the importance of a frame can be determined based on its role and function in the video coding structure.
[0191] Regarding the evaluation of slice CMSE contribution, as mentioned above, the cumulative mean square error (CMSE) of a slice can be used to measure the contribution of each slice to the video quality. A slice with a higher CMSE value has a greater impact on the video quality. If it is lost, it may have a serious impact on the overall video quality.
[0192] The embodiment of the present application provides a selective discarding strategy for slices. For example, in the case of bandwidth limitation, the system needs to decide which slices can be discarded and which must be retained. By evaluating the importance and CMSE contribution of each slice, the system can prioritize those slices that have the greatest impact on video quality. The slices that are usually discarded are those with low CMSE contribution and are not critical in video decoding, such as some non-critical B frames.
[0193] Regarding controlling the error propagation effect, in a lossy transmission environment, lost frames may cause error propagation, affecting the decoding quality of subsequent frames. Therefore, by precisely controlling which slices are discarded, this error propagation can be effectively reduced. For example, retaining all key frames and some important P frames can ensure that the video can maintain a relatively high quality even when some B frames are lost.
[0194] In some embodiments, the slice discarding strategy can also be dynamically adjusted according to the real-time changes in network bandwidth. For example, when the network conditions improve, the discarding of slices is reduced or stopped; when the network conditions deteriorate, the discarding rate of non-critical slices is increased.
[0195] In some embodiments, a feedback mechanism can also be implemented at the client or intermediate network node, and the video transmission strategy (including one or a combination of the above-mentioned transmission priority classification, adaptive packetization, FEC protection, slice discard, etc.) can be adjusted at the encoding end based on the video reception quality feedback to optimize subsequent video data transmission.
[0196] It should be noted that, for each slice, after its transmission priority is determined, the transmission resource allocation (including the allocation of network bandwidth and scheduling time), and the steps of packetization and FEC protection can be performed in parallel.
[0197] S404: Allocate network bandwidth.
[0198] In the bandwidth allocation strategy for slices, in addition to allocation based on the transmission priority of the slices, the size of the frame to which the slice belongs and the expected viewing quality can also be considered.
[0199] For example, a bandwidth allocation formula is as follows:
[0200]
[0201] Among them, B irepresents the network bandwidth allocated for the current slice (belonging to image frame i), Q i is the expected quality index of image frame i; S i Represents the size of image frame i, α represents a preset coefficient or constant used to adjust or scale the impact of other variables, that is, in the bandwidth allocation process, α is a preset adjustment parameter used to balance the weight of certain factors (such as frame size, frame type or quality requirements) in bandwidth allocation decisions. β represents a preset adjustment parameter used to balance the impact of frame size in bandwidth allocation. j represents an index or counting variable, especially when sequences or sets are involved. In a video frame or data packet, j represents a specific position in the frame sequence (such as a frame number), or is used to distinguish these different streams or layers when processing multiple data streams or layers. B represents the total available bandwidth, or the upper limit of the bandwidth allocated to the application or service, that is, the preset threshold.
[0202] In some embodiments, in order to more finely control the bandwidth allocation, a nonlinear adjustment factor f(B,δ) can be introduced, which dynamically adjusts the bandwidth allocation based on the current available bandwidth B and the network fluctuation parameter δ. Then the above bandwidth allocation formula can be optimized as follows:
[0203]
[0204] The nonlinear adjustment factor f(B,δ) may be optimized based on real-time network status data using a complex mathematical model (such as a model based on network congestion or a machine learning prediction model).
[0205] S405: Determine the scheduling time.
[0206] For each slice, the scheduled sending time of the slice is calculated according to its bandwidth allocation result.
[0207] In addition, the transmission time of a slice depends not only on the bandwidth allocation, but also on the network delay and the slice size. For example, the following formula is used to determine the transmission time of a slice:
[0208]
[0209] Among them, T i represents the sending time of the current slice i, T current represents the current time, D represents the current network delay, S i Indicates the size of the current slice i, B i Indicates the network bandwidth allocated to the current slice i.
[0210] It can be seen that through the above calculation formula, the scheduling of video slice transmission in the embodiment of the present application can comprehensively consider the importance of the video content and network conditions, dynamically optimize the video transmission strategy to improve the efficiency and quality of video transmission, which is particularly suitable for real-time video transmission and high-quality video streaming services, and can ensure the priority transmission of key content and high-quality video experience.
[0211] S406: Send data.
[0212] That is, for each slice, the data after the above-mentioned packetization and FEC protection processing is sent to the receiving end for decoding, playback processing, etc. using the transmission resources allocated to the slice.
[0213] The following is a further detailed description of the implementation process of each step of the sending end.
[0214] Embodiment 2:
[0215] See also Figure 5 ,The specific processing process for the transmission priority classification of slices includes:
[0216] S501: Input a video stream and identify slices therein.
[0217] For example, an H.264 / AVC encoded video stream is input, and all slices in the H.264 / AVC video stream are identified. These slices are basic coding units in H.264 / AVC encoding and may be part of an I frame, a P frame, or a B frame.
[0218] S502: For each slice, calculate the cumulative mean square error (CMSE) of the slice.
[0219] For each slice, its contribution to the final video quality is calculated, that is, the cumulative mean square error (CMSE) is calculated. The specific calculation process includes, for example:
[0220] Comparison between original and distorted: Compare the current slice with the preset distorted version of the slice, and calculate the square of the difference of each pixel of the current slice, that is, obtain the square difference of each pixel of the current slice.
[0221] Average: Add up the squared difference of each pixel of the current slice and divide it by the total number of pixels to get the mean square error (MSE) corresponding to the current slice.
[0222] Accumulation: Accumulate the MSE of the same slice of multiple frames in the video, and use the accumulated sum as the CMSE of the current slice, wherein the same slice of the multiple frames is a slice of the same image area as the current slice, and belongs to an adjacent frame of the frame where the current slice is located. For example, each frame is divided into four slices, that is, four areas, and each area corresponds to a slice, for example, numbered as slice 1, slice 2, slice 3, and slice 4 respectively. Assuming that the current slice is slice 1 of the nth frame image in the video, then after calculating the MSE of slice 1 of the nth frame image, accumulate the MSE of slice 1 of the nith frame image to the MSE of slice 1 of the nth frame image, and use the accumulated sum as the CMSE of slice 1 of the nth frame image, wherein i and n are both integers greater than 1.
[0223] That is to say, the calculation of the CMSE for each slice in the embodiment of the present application involves evaluating the impact of slice loss on the overall quality of the video, including the clarity and coherence of the picture. Therefore, it is necessary to combine the MSE of multiple frames of the same slice to determine the SMSE of the current slice, thereby determining the importance of each slice in the video playback.
[0224] S503: Determine the transmission priority of the slice:
[0225] Specifically, for each slice, the slice is divided into different transmission priority categories according to the CMSE of the slice.
[0226] For example, the CMSE of a slice is divided into three levels from high to low, and the corresponding slice is assigned to one of the three transmission priority categories of high, medium, and low, among which the high transmission priority slice contributes the most to the video quality. Specifically:
[0227] High transmission priority slices: The CMSE value of the slices is high, for example, greater than the first preset threshold, indicating that these slices have a particularly large impact on the video quality, such as key frames (I frames) or P frames containing a large amount of motion information.
[0228] Medium transmission priority slice: The CMSE value of the slice is medium, for example, less than or equal to the first preset threshold and greater than or equal to the second preset threshold, which is usually a P frame that has a certain but not decisive impact on the video quality. The first preset threshold is greater than the second preset threshold.
[0229] Low transmission priority slices: The CMSE value of the slice is low, for example, less than or equal to the second preset threshold. These slices may be B frames, which are more dependent on other frames in video decoding and have less independent visual information.
[0230] In the embodiments of the present application, a clear classification standard or threshold is formulated in advance to distinguish slices with different transmission priorities. This is based on the specific numerical range or relative comparison of CMSE. The specific classification standard or threshold is usually determined by the requirements of video processing and network conditions. For example, a simple threshold division method can be:
[0231] If CMSE > 1000, the slice is classified as high transmission priority.
[0232] If 200 < CMSE <= 1000, the slice is classified as medium transmission priority.
[0233] If CMSE <= 200, the slice is classified as low transmission priority.
[0234] The above thresholds are exemplary, and in actual applications, they need to be adjusted according to the characteristics of the video content and the specific conditions of the transmission network. Through such classification, the video transmission system can more intelligently adjust the transmission strategies of various slices, such as adjusting the FEC protection level and network resource allocation, to optimize the overall video quality.
[0235] S504. Encoding of transmission priority information of slices:
[0236] Specifically, it includes: marking the transmission priority information of each slice in the metadata of the video stream or slice to ensure that this information can be recognized and utilized during video transmission and processing. For example, it can be implemented in the following ways:
[0237] Method 1. Using SEI (Supplemental Enhancement Information) messages: In H.264 / AVC encoding, SEI messages can be used to transmit non-critical information, including the transmission priority of slices. SEI messages do not affect the video decoding process but can be recognized and utilized by the decoder to adjust, for example, buffer management or error handling strategies.
[0238] Method 2. Modifying the NAL (Network Abstraction Layer) unit header: In H.264 / AVC, each slice is encapsulated in a NAL unit. The transmission priority data can be included by extending the NAL unit header information.
[0239] To implement the encoding of the transmission priority information of slices, in some embodiments, it also includes pre-adjusting the settings of the encoder so as to retain the transmission priority information during the encoding process and ensure that this transmission priority information can be accessed during subsequent transmission and decoding processes.
[0240] The adjustments to the settings of the encoder include, for example:
[0241] Configure encoder parameters: Add options to the encoder configuration to enable it to automatically add transmission priority information to the appropriate locations during the encoding process.
[0242] Custom encoder extensions: If the existing encoder does not support the required transport priority marking functionality, this functionality can be implemented through a custom module or extension.
[0243] In some embodiments, accordingly, the decoding end includes:
[0244] The decoder identifies and processes the transmission priority information of the slices, including, for example, prioritizing the request or reconstruction of high transmission priority slices in the event of packet loss.
[0245] In addition, in some embodiments, network devices and transmission protocols can use the transmission priority information of the slice to adjust, for example, queuing strategies, retransmission requests, and packet scheduling.
[0246] After determining the transmission priority of the slice, in some embodiments, the method further includes:
[0247] According to the transmission priority of the slice, adjust the transmission strategy of the slice in the network, such as adjusting: packet size, FEC protection level and scheduled transmission priority. Specifically, for example:
[0248] Adjust the subpacket size:
[0249] The packet size is usually adjusted based on the importance of the slice and the reliability of the network. For example:
[0250] For high transmission priority slices (such as key frames), when the network is stable and the error rate is low, the packet size can be adjusted to a larger size to reduce header overhead and improve transmission efficiency. When the network conditions are poor, although the packet size needs to be reduced to reduce the risk of single packet loss, a relatively large packet can still be selected overall to ensure data integrity.
[0251] For slices with low transmission priority (such as some B frames), the packet size can be adjusted to a smaller size because these slices have less impact on the overall video quality. Smaller packets help reduce the impact of packet loss on video quality when network conditions are poor.
[0252] Among them, the specific adjustment method and adjustment amount of the subpacket size can be determined according to actual needs and are not limited in the embodiments of the present application.
[0253] Adjust the FEC protection level:
[0254] The FEC protection level can be adjusted based on the importance of the slice and the expected network error rate, for example:
[0255] For slices with high transmission priority, a higher FEC protection level needs to be adjusted to ensure that key content can be correctly received even under poor network conditions. For example, additional error correction codes are provided for key frames to reduce the loss of important information due to errors.
[0256] For low transmission priority slices, a lower FEC protection level can be adjusted because their loss has less impact on video quality. Doing so can save bandwidth and improve overall network efficiency.
[0257] Adjust the scheduled transmission priority:
[0258] This includes adjusting the transmission order and resource allocation of slices in the network, for example:
[0259] For slices with high transmission priority, they should be given priority in network resource allocation, that is, network resources should be scheduled for transmission of slices with high transmission priority to maximize the overall quality of video transmission. For example, these slices can be transmitted first when the network bandwidth is sufficient, or ensured to pass first when the network is congested.
[0260] For slices with low transmission priority, transmission can be delayed when network resources are tight, or bandwidth allocation can be reduced when the network is congested. That is, the transmission priority of scheduling network resources for slices with low transmission priority is lower.
[0261] In summary, the transmission priority classification for slices provided in the embodiments of the present application not only helps to identify and protect the most important video content during the video transmission process, but also, the adjustment of the transmission strategy based on the transmission priority of the slice can ensure that the quality of video transmission can be maintained as much as possible even under unfavorable network conditions.
[0262] Embodiment three:
[0263] See also Figure 6 The specific processing flow of adaptive packetization for each slice includes:
[0264] S601. Obtain transmission priority information of each slice.
[0265] S602: Evaluate current network conditions.
[0266] For example, it includes measuring the following parameters of the current network: encoded video bit rate, network bandwidth, bit error rate, etc.
[0267] In some embodiments, the method may further include: analyzing the possible impact of the above network parameters on video transmission, especially the impact on slices with different transmission priorities. For example, in a network environment with high bandwidth and low error rate, larger data packet fragments and lower levels of FEC protection may be used to improve transmission efficiency. In a network environment with high error rate, it may be necessary to increase the FEC protection level, especially for slices with high transmission priority, to ensure that key information is not lost.
[0268] S603: Determine the packet size of each slice.
[0269] That is, for each slice, the optimal data packet fragment size of the slice is calculated according to the transmission priority (i.e. importance) of the slice and the current network conditions (such as bandwidth, error rate, etc.). For example:
[0270] Assuming a key frame slice (high transmission priority), in an environment with a high network error rate (such as 0.1%), in order to reduce the risk of errors affecting the entire data packet, a smaller data packet fragment size can be determined, such as 500 bytes in each data packet, to reduce the risk of packet loss due to network errors.
[0271] For a B frame slice (low transmission priority), under the same network environment, a larger data packet fragment size can be determined, such as 1500 bytes in each data packet, to reduce header overhead and improve transmission efficiency.
[0272] It can be seen that in video transmission, the purpose of selecting a smaller data packet fragment size for high transmission priority slices is to reduce the impact caused by network errors (such as packet loss or high error rate). A smaller fragment size means that even if packet loss occurs, the amount of lost data will be less, and the impact on the overall video quality will be smaller. Assuming that the error rate is high under the current network conditions, a key frame slice (I frame) contributes greatly to the video quality. If you choose to divide this key frame slice into smaller fragments, such as 500 bytes per fragment, then even if one of the fragments is lost due to network problems, the possibility and success rate of recovering this key frame as a whole will be higher through error correction and retransmission. Therefore, the negative effect affecting video playback will be relatively small.
[0273] For slices with low transmission priority, such as B frames, they usually rely on other frames (such as I frames and P frames) to provide reference information and do not contain complete image information themselves. In this case, choosing a larger fragment size can reduce the header overhead required for each data packet, thereby improving transmission efficiency. Under the same high error rate network conditions, for low transmission priority slices such as B frames, you may choose to set each fragment to 1500 bytes. Although this will lose more data when packet loss occurs, the impact on video quality is relatively small due to the low transmission priority of these frames. Such settings help save bandwidth and processing resources, especially in bandwidth-constrained network environments.
[0274] In some embodiments, the packetization strategy of the video stream may also be dynamically adjusted based on the calculated optimal segment size. Specifically, it includes:
[0275] Continuously monitor the current network conditions, including bandwidth, latency, packet loss rate, and error rate, because changes in these parameters will directly affect subsequent packet segmentation strategies.
[0276] Calculate the optimal segment size: Based on the collected network parameters and the importance (transmission priority) of each video slice, calculate the optimal packet segment size to strike a balance between reducing data loss due to errors and reducing transmission overhead.
[0277] Adjust encoder settings: Based on the optimal segment size calculation results, adjust the packetization settings of the video encoder, including setting different data packet sizes for slices with different transmission priorities in the video stream. Specific settings include:
[0278] Adjust packet size: adjust the amount of data contained in each data packet, for example, from 500 bytes to 1500 bytes.
[0279] Adjust encoder parameters: adjust the maximum packet unit (MTU) and other parameters related to encoder characteristics, such as bit rate control and packetization mode.
[0280] Adjust error handling strategies: Adjust how to handle and respond to errors in the network, such as adding redundant frames or changing retransmission strategies.
[0281] For example, suppose a real-time video stream is being sent over a fluctuating network. When the network condition is good (low latency and low error rate), the system decides to use a larger segment size (such as 1500 bytes) to reduce transmission overhead, because the risk of packet loss is low. When the network condition deteriorates (high latency and high error rate), the system automatically reduces the segment size (such as 500 bytes) to reduce the impact caused by packet loss or errors, especially for those key frame segments with high transmission priority.
[0282] In some embodiments, the FEC protection level can be dynamically adjusted based on the adaptive packetization and the packetization size of the slices of each transmission priority category and the current network conditions.
[0283] Dynamically adjusting the FEC protection level means adjusting the amount of error correction data based on the current state of the network and the importance of the data. This is done to ensure that critical data can still be correctly received in a bad network environment.
[0284] For example, suppose a video stream contains multiple slices, including key frames and B frames. When the network is stable and the error rate is low, the system chooses to apply a lower FEC protection level to all slices, such as adding 5% redundant data, because the risk of packet loss is low. When the network state is unstable and the error rate is high, for key frames, the FEC protection level can be increased, such as adding 25% redundant data to ensure that the transmission of key content is not affected. For B frames with low transmission priority, 10% redundant data may be maintained or adjusted as needed. A stronger FEC protection level is assigned to high transmission priority slices to ensure that the loss of key information is minimized even under adverse network conditions. Among them, the stronger FEC protection level refers to adding more redundant data to the data packet to improve the recovery ability of the data packet in the face of network errors. The increase in redundant data can help reconstruct the original data when a partial data packet is lost. For example, if 10% redundant data is usually added to the data packet, then increasing it to 20% or more can be regarded as a stronger FEC protection level to improve the reliability of data transmission.
[0285] In some embodiments, adaptive packetization may also be integrated with scheduling of video transmission resources.
[0286] After the adaptive packetization strategy is determined, the scheduling algorithm is combined to consider the transmission priority of the video data packet (i.e., the transmission priority of the slice), the current network status, and other traffic, optimize the timing and resource allocation of video transmission, ensure that the video content with high transmission priority is transmitted first when the network conditions permit, and minimize the impact on the video quality through the adaptive packetization strategy. The scheduling refers to the use of the scheduling algorithm to optimize the transmission of the video data packet after the adaptive packetization strategy is determined. The scheduling includes considering the transmission priority of the data packet, the current network status, and other network traffic to dynamically adjust the resource allocation and transmission schedule. For example, suppose a video transmission system with limited network bandwidth. The scheduling algorithm will give priority to the transmission of key frames because they are critical to the overall quality of the video. At the same time, the algorithm will adjust the transmission time and bandwidth allocation of B frames according to the real-time changes in network bandwidth. When the network bandwidth is sufficient, the scheduling algorithm may allow more B frames and P frames to be transmitted simultaneously, but when the bandwidth is tight, the transmission frequency of these frames will be reduced to ensure that the key frames are transmitted first. Among them, the current network status and other traffic, that is, real-time monitoring of indicators such as network bandwidth, delay, packet loss rate, and the status of other data streams being transmitted, this information helps the system understand the current network load and available resources. Consider an important live event. The system must handle high network traffic during the evening peak hours, when network resources may become strained. Therefore, the system identifies key and non-key frames in the live video. Key frames are given the highest transmission priority because of their importance to video quality. The system monitors network conditions in real time and finds that bandwidth fluctuates greatly, especially during the evening peak hours. Therefore, when bandwidth is sufficient, the system allows larger packets and lower FEC protection levels to improve transmission efficiency. When the network is congested, the system increases the FEC protection level of key frames and reduces the packet size to cope with high packet loss rates, ensuring that the transmission of critical information is not affected. At the same time, the transmission of non-key frames is postponed or their packet size and bandwidth allocation are reduced. In the case of bandwidth constraints, the scheduling algorithm ensures that all key frames with high transmission priority are sent as planned, while the transmission of B frames with low transmission priority is delayed until network conditions improve.
[0287] In some embodiments, the performance of video transmission can also be continuously monitored, including indicators such as packet loss rate and video quality, and based on performance feedback, the packetization strategy and FEC protection level can be further adjusted to adapt to changes in network conditions and optimize video transmission quality.
[0288] Performance feedback usually includes packet loss rate, latency, bandwidth utilization, and video playback quality (e.g., through video quality evaluation metrics such as PSNR or VMAF score) of video transmission. These metrics help the system understand the current transmission effect.
[0289] The packetization strategy involves deciding how much data each video packet should contain. Therefore, the packetization strategy can be adjusted based on the packet loss rate feedback of the network. If the packet loss rate increases, the size of the packet needs to be reduced to reduce the amount of information lost each time. If the network condition is good and the packet loss rate is low, the packet size can be increased to reduce the total number of packets transmitted and the management overhead.
[0290] The adjustment of FEC protection level depends on the error rate of the network and the importance of video transmission. If the performance feedback results show a high error rate, FEC redundant data will be increased to enhance data recovery. Conversely, if the network status is good, the FEC protection level can be reduced to optimize bandwidth usage.
[0291] In summary, the adaptive packetization process can flexibly respond to changes in network conditions. At the same time, combined with the results of transmission priority classification, it ensures that the most important content in the video transmission process is given priority transmission and protection, thereby improving the utilization efficiency of network resources while ensuring video quality.
[0292] Embodiment 4:
[0293] See also Figure 7 , the specific processing flow of FEC protection includes:
[0294] S701. Obtain the output result of receiving adaptive packetization, including the transmission priority information of each slice and its corresponding optimal data packet fragment size.
[0295] S702, evaluating current network conditions:
[0296] That is, re-evaluate the current network conditions, especially the network reliability and bit error rate, which is crucial to determine the FEC protection level.
[0297] Specifically, it includes collecting key parameters of the current network status, such as:
[0298] Bandwidth: Measures available bandwidth to understand the data transfer rate that the network can support.
[0299] Latency: Measures the round-trip time (RTT) of data from source to destination. High latency may affect the smoothness of video streaming.
[0300] Packet loss rate: It is the ratio of statistical packets lost during transmission, which directly affects the video quality.
[0301] Bit Error Rate: Measures the rate at which bits that are erroneous during data transmission, a key parameter in determining FEC requirements.
[0302] S703: Determine the FEC protection level corresponding to each slice according to the current network conditions.
[0303] That is, based on the collection results of key parameters of the current network status, the FEC protection level corresponding to each slice is determined, for example:
[0304] If the network bit error rate is high, it means that the network is less stable and the transmitted data is more likely to be damaged. In this case, it is necessary to increase the FEC protection level, that is, to add more redundant data to ensure that critical information can be correctly restored in the event of damage.
[0305] If the network bit error rate is low, the FEC redundancy can be reduced, that is, the FEC protection level can be lowered to optimize bandwidth usage and improve transmission efficiency.
[0306] It can be seen that the embodiment of the present application dynamically determines the corresponding FEC protection level according to the slices of each transmission priority category and their fragment sizes and the current network conditions. For high transmission priority slices, a stronger FEC protection level is assigned to ensure that critical content can be received correctly as much as possible even under poor network conditions. For low transmission priority slices, a lower FEC protection level is assigned to optimize bandwidth usage, considering that they contribute less to the overall quality of the video.
[0307] S704: Apply the determined FEC protection level to each slice.
[0308] Specifically, for each data packet fragment of the slice, the determined FEC protection level is applied, that is, necessary redundant data is added so as to be able to resist a certain degree of data loss during transmission.
[0309] In FEC coding, redundant data can be in the form of check bits or additional error correction codes, which are calculated based on the original data. These redundant data allow the receiver to correct a certain number of errors without requesting the original data to be resent.
[0310] The amount of redundant data usually depends on the expected error rate and the importance of the data packet. For example, if the network conditions are poor (such as high bit error rate), or the data is very critical (such as key frames in video transmission), more redundant data is needed to ensure data reliability. The appropriate FEC scheme can be selected (i.e., the corresponding amount of redundant data is calculated) according to the network conditions and the transmission priority of the data packet. Common FEC schemes include Hamming codes, Reed-Solomon codes, convolutional codes, etc.
[0311] Before sending the data, the encoder combines the original data with the calculated redundant data to form a new, larger data packet. Even if the data packet is damaged in some way during transmission over the network, the decoder at the receiving end can use the redundant data to identify errors and correct them, restoring the original data.
[0312] In some embodiments, when applying the determined FEC protection level to each data packet fragment, the coding efficiency and the impact of redundant data on network bandwidth are considered to ensure that network resources are not over-consumed.
[0313] In some embodiments, the embodiments of the present application also integrate FEC protection with adaptive packetization, for example including: integrating FEC protection strategy into the transmission process of adaptive packetization to ensure that each data packet fragment receives appropriate protection according to its transmission priority and network conditions.
[0314] In some embodiments, the embodiments of the present application also dynamically adjust the FEC protection level during video transmission according to changes in network conditions and feedback from the receiving end to adapt to network fluctuations.
[0315] Among them, monitoring transmission performance can continuously monitor the performance indicators of video transmission, such as packet loss rate, video quality, etc. According to the performance monitoring results and the feedback results from the receiving end, the FEC protection level and packet subpacketization strategy are adjusted to optimize the video transmission quality and network resource usage.
[0316] In some embodiments, the embodiments of the present application can also coordinate the FEC protection strategy with the scheduling strategy of the video data to ensure that the FEC protection strategy works together with the scheduling method of the video data packet, taking into account the transmission priority of the video data packet, FEC protection level, network conditions and other traffic to optimize the timing and resource allocation of video transmission.
[0317] In summary, the above FEC protection strategy can be effectively combined with the adaptive packetization strategy to provide appropriate levels of protection for video content with different transmission priorities, while taking into account network conditions and resource utilization efficiency, ensuring stable video transmission quality even under unsatisfactory network conditions.
[0318] Embodiment five:
[0319] See also Figure 8 , the specific implementation of slice discard includes:
[0320] S801, obtaining the CMSE of each slice of the current video stream;
[0321] The CMSE of each slice is generated during the transmission priority classification process.
[0322] S802: For each video frame, evaluate the importance of the video frame based on the contribution of the CMSE values of the slices contained in the video frame to the video quality.
[0323] For example, identify key frames (I frames), B frames, and P frames in a video.
[0324] S803: Monitor the current network status (including network bandwidth and quality) in real time, and when preset conditions are met, such as network bandwidth limitation, determine that some slices need to be discarded.
[0325] S804: Based on the frame importance and / or the CMSE value of the slice, and according to a preset slice discarding standard, the slices in the current video stream are discarded.
[0326] The slice discarding criteria include, for example: preferentially retaining those slices that contribute most to the video quality, that is, retaining slices with high CMSE values and belonging to important frames, and discarding unimportant frames and / or slices with low CMSE values.
[0327] In some embodiments, the slice discard criteria is set based on the frame importance and / or the CMSE value of the slice, for example:
[0328] Slices whose CMSE values exceed a preset threshold (for example, 1000) are not discarded; however, slices whose CMSE values are lower than a preset threshold (for example, 200) can be discarded when the network bandwidth meets a preset condition (for example, the bandwidth is lower than a preset threshold).
[0329] Alternatively, only the type of frame may be considered, and when the network bandwidth meets a preset condition (e.g., the bandwidth is less than a preset threshold), the B frame is directly discarded. Assume that in a video conference, key frames contain high CMSE values, while some B frames have relatively low CMSE values. In the case of limited network bandwidth, it is possible to discard those B frames with low CMSE values and retain all key frames and P frames with high CMSE values to maintain the quality of the video call.
[0330] Alternatively, the frame type and the CMSE value of the slice may be combined, and when the network bandwidth meets a preset condition (for example, the bandwidth is less than a preset threshold), the slices in the B frame whose CMSE value is lower than a preset threshold (for example, 200) are discarded.
[0331] It can be seen that in the embodiment of the present application, slices can be discarded in units of video frames (including all slices in the video frame), or in units of slices (which can be partial slices in the video frame).
[0332] The embodiment of the present application provides a dynamic slice discarding strategy, which dynamically determines which slices can be discarded when the network bandwidth is limited, thereby minimizing the impact on video quality.
[0333] The dynamic discard strategy involves flexibly adjusting which slices are discarded while minimizing the impact on video quality when network conditions change in real time. By monitoring network bandwidth and quality in real time, for example, when bandwidth decreases or packet loss rate increases, the discard strategy is dynamically adjusted. Dynamically determine which slices can be discarded based on the transmission priority of the slice and the current network status. Reduce or stop discarding when bandwidth is sufficient, and give priority to discarding slices with low transmission priority when bandwidth is limited. Ensure that the use of network resources is optimized through the discard process while maintaining the highest possible quality of video transmission. In addition, by selectively discarding slices, the impact of error propagation is controlled. Prioritize discarding slices that have less impact on video quality to reduce error propagation caused by the loss of key slices.
[0334] In some embodiments, the slice discarding criteria provided in the embodiments of the present application can be updated in real time, for example, the video quality after the slice discarding strategy is implemented can be continuously monitored, including observing the picture quality and coherence during video playback. According to the monitoring results of the video quality, the slice discarding criteria and the corresponding execution strategy are adjusted to better adapt to changes in network conditions and optimize video quality.
[0335] In summary, the slice discarding solution provided in the embodiment of the present application can effectively optimize the quality of video transmission under limited network bandwidth through intelligent decision-making based on frame importance and slice CMSE contribution. It ensures that even under undesirable network conditions, some slices can be selectively discarded to maximize the overall quality of video transmission.
[0336] Embodiment six:
[0337] See also Fig. 9 At the receiving end, the specific method for video reception processing provided by the embodiment of the present application includes:
[0338] S901, receiving a slice of a video sent by a video sending end;
[0339] S902: Identify lost slices of the video, including identifying slices that are actively discarded by the video transmitter due to network bandwidth limitations and slices that are accidentally lost during transmission.
[0340] Among them, identifying the slices that are actively discarded by the video transmitter due to network bandwidth limitations includes: receiving the transmission priority and CMSE value of the discarded slices sent by the video transmitter, and based on this, identifying the slices that are actively discarded by the video transmitter due to network bandwidth limitations.
[0341] Identify slices that were accidentally lost during transmission, including one of the following ways:
[0342] Sequence number check: Each slice or packet usually has a sequence number. At the receiving end, the decoder can identify lost slices by checking the continuity of the packet sequence numbers. If there are jumps in the sequence numbers, then the slices between these sequence numbers are likely to have been lost.
[0343] Timeout mechanism: Set a timeout timer. If no slices are received within the scheduled time, the system will mark the slices within that time period as lost.
[0344] S903: Decode some slices.
[0345] In the embodiment of the present application, the H.264 decoder can be modified so that it can process partial slice decoding when slices are lost, so as to support adaptive packetization and video transmission under FEC protection.
[0346] Through the partial slice decoding, even if some data packet fragments are lost at the receiving end, the complete video frame can be restored, thereby improving the robustness of video transmission.
[0347] Among them, with regard to extending or modifying the H.264 decoder, for example, by using error concealment technology, using the statistical characteristics of the received data to estimate the most likely value of the lost data, specifically, by spatial or temporal interpolation, using information from adjacent slices or frames to reconstruct the lost content. For example, if a P frame is lost, it can be approximately reconstructed using information between the previous I frame and the next P frame, so that the decoder can process and decode the partially received slice.
[0348] In some embodiments, for those situations where FEC protection is applied and some data packets are lost, the remaining data packets and FEC redundant information can be used to try to recover the lost slice content. Specifically, the receiving end collects all received data packets, including data packets containing FEC redundancy. The receiving end uses the received FEC data to detect and identify which data packets or data parts are lost. Using the remaining received data packets and FEC redundant information, the decoder attempts to reconstruct the lost data. The FEC algorithm can calculate the original content of the lost data based on the remaining data and redundant parts, reducing the degradation of video quality caused by slice loss.
[0349] In some embodiments, it also includes: video quality adjustment and / or error concealment.
[0350] Regarding the quality adjustment: for slices that cannot be fully restored, a video quality adjustment strategy is implemented, such as reducing the resolution of the decoded video, or applying error concealment technology, to reduce the visual impact.
[0351] Regarding the error concealment: Error concealment techniques are applied, such as intra-frame interpolation or using information from adjacent frames, to conceal the video quality loss caused by the lost slices.
[0352] In some embodiments, it also includes:
[0353] Continuously monitor the performance of partial slice decoding, including monitoring video quality and decoding efficiency.
[0354] According to the partial slice decoding performance monitoring results, and further combined with user feedback, the decoding strategy, error concealment technology, etc. of the decoder for the partially received slices can be adjusted to optimize the video playback quality and user experience.
[0355] For example: Regarding the adjustment of the decoding strategy for partially received slices, if it is found that some received slices are not processed well, a more powerful interpolation algorithm can be introduced to predict the possible content of the lost data, or the existing algorithm can be optimized to reduce processing delays.
[0356] Regarding the optimization of error concealment technology, the error concealment technology can be adjusted or enhanced according to the type of visual errors reported by users. For example, if users report that the image suddenly blurs during playback, the intra-frame or inter-frame interpolation method can be improved to more naturally conceal these errors.
[0357] The following is an introduction to the equipment or device provided in the embodiments of the present application, in which the explanations or examples of technical features that are the same or corresponding to those described in the above method will not be repeated later.
[0358] An electronic device provided in an embodiment of the present application may be, for example, any video transmission device, which may be used for video transmission or video reception. Fig.10 , the electronic device includes, for example:
[0359] When the electronic device is used for video transmission, the processor 600 is used to read the program in the memory 620 and execute the following process:
[0360] Determine the slice of the video currently to be sent to the receiving end;
[0361] For each of the slices, a cumulative mean square error CMSE of the slice is calculated, and based on the CMSE of the slice, a transmission priority of the slice is determined; wherein the larger the CMSE of the slice is, the higher the transmission priority of the slice is;
[0362] The slices of the video are sent to the receiving end based on the transmission priority of the slices of the video.
[0363] In some embodiments, based on the transmission priority of the slice of the video, sending the slice of the video to the receiving end includes:
[0364] For each of the slices:
[0365] Determine a data packet fragment size of the slice, and determine a forward error correction (FEC) protection level of the slice;
[0366] Encode the slice according to the data packet fragment size of the slice and the FEC protection level of the slice;
[0367] The encoded data of the slice is sent to the receiving end according to the transmission priority of the slice.
[0368] In some embodiments, determining the data packet segment size of the slice includes:
[0369] For each transmission priority, the optimal data packet segment size for the slice of the transmission priority is determined based on the transmission priority and the current network conditions.
[0370] In some embodiments, determining the FEC protection level of the slice includes:
[0371] Based on the slice transmission priority and current network conditions, the FEC protection level of the slice is determined.
[0372] In some embodiments, sending the encoded data of the slice to the receiving end according to the transmission priority of the slice includes:
[0373] Allocate network bandwidth to the slice based on the transmission priority of the slice;
[0374] Determine a sending time of the slice based on the network bandwidth;
[0375] According to the network bandwidth and the sending time, the encoded data of the slice is sent to the receiving end.
[0376] In some embodiments, the processor 600 is further configured to read a program in the memory 620 and execute the following process:
[0377] Monitor the current network status;
[0378] If the current network status meets the preset conditions, based on the transmission priority of the slices of the video and the current network status, the slices to be discarded are selected from the slices of the video.
[0379] When the electronic device is used for video reception, the processor 600 is used to read the program in the memory 620 and perform the following process:
[0380] The receiving video transmitter sends the slice of the video based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0381] When it is determined that there is a slice loss in the video transmission, based on the received partial slices of the video, recover the lost slices of the video;
[0382] The video playback output is performed using the received slices of the video and the restored slices of the video.
[0383] The transceiver 610 is configured to receive and send data under the control of the processor 600 .
[0384] Among them, Fig.10 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 600 and various circuits of memory represented by memory 620 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, including wireless channels, wired channels, optical cables, and other transmission media. For different user devices, the user interface 630 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
[0385] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.
[0386] In some embodiments, the processor 600 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device), and the processor may also adopt a multi-core architecture.
[0387] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0388] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0389] See also Fig.11 At the transmitting end, a video transmission device provided by an embodiment of the present application includes:
[0390] The slice determination unit 11 is used to determine the slice of the video to be sent to the receiving end;
[0391] A transmission priority determination unit 12 is used to calculate the cumulative mean square error CMSE of each slice, and determine the transmission priority of the slice based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0392] The sending processing unit 13 is used to send the slices of the video to the receiving end based on the transmission priority of the slices of the video.
[0393] In some embodiments, based on the transmission priority of the slice of the video, sending the slice of the video to the receiving end includes:
[0394] For each of the slices:
[0395] Determine a data packet fragment size of the slice, and determine a forward error correction (FEC) protection level of the slice;
[0396] Encode the slice according to the data packet fragment size of the slice and the FEC protection level of the slice;
[0397] The encoded data of the slice is sent to the receiving end according to the transmission priority of the slice.
[0398] In some embodiments, determining the data packet segment size of the slice includes:
[0399] For each transmission priority, the optimal data packet segment size for the slice of the transmission priority is determined based on the transmission priority and the current network conditions.
[0400] In some embodiments, determining the FEC protection level of the slice includes:
[0401] Based on the slice transmission priority and current network conditions, the FEC protection level of the slice is determined.
[0402] In some embodiments, sending the encoded data of the slice to the receiving end according to the transmission priority of the slice includes:
[0403] Allocate network bandwidth to the slice based on the transmission priority of the slice;
[0404] Determine a sending time of the slice based on the network bandwidth;
[0405] According to the network bandwidth and the sending time, the encoded data of the slice is sent to the receiving end.
[0406] In some embodiments, the sending processing unit 13 is further used for:
[0407] Monitor the current network status;
[0408] If the current network status meets the preset conditions, based on the transmission priority of the slices of the video and the current network status, the slices to be discarded are selected from the slices of the video.
[0409] Accordingly, at the receiving end, a video transmission method provided by an embodiment of the present application includes:
[0410] The receiving video transmitter sends the slice of the video based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0411] When it is determined that there is a slice loss in the video transmission, based on the received partial slices of the video, recover the lost slices of the video;
[0412] The video playback output is performed using the received slices of the video and the restored slices of the video.
[0413] See also Fig.12 At the receiving end, a video transmission device provided by an embodiment of the present application includes:
[0414] The receiving unit 21 is used to receive the slices of the video sent by the video sending end based on the transmission priority of the slices of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; the larger the CMSE of the slice, the higher the transmission priority of the slice;
[0415] A slice loss identification unit 22 is used to restore the lost slices of the video based on the received partial slices of the video when it is determined that there is a slice loss in the video transmission;
[0416] The playback output unit 23 is used to perform video playback output using the received slices of the video and the restored slices of the video.
[0417] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0418] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0419] Any of the devices or apparatuses provided in the embodiments of the present application may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. It may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.
[0420] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.
[0421] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.
[0422] The present application embodiment also provides a computer program product or computer program, which includes a computer instruction, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device executes any of the methods described in the above embodiments. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0423] The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the embodiment of the present application, which includes a program for executing any of the methods provided in the embodiment of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.
[0424] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0425] It should be understood that:
[0426] The access technology through which entities in the communication network transmit traffic can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc.; in addition, the embodiments can also apply wired technology, for example, IP-based access technology, such as a wired network or a fixed line.
[0427] Embodiments suitable for being implemented as software code or a portion thereof and running using a processor or processing functionality are independent of the software code and may be specified using any known or future developed programming language, such as a high-level programming language such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language such as machine language or assembler.
[0428] The implementation of the embodiments is hardware independent and may be implemented using any known or future developed hardware technology or any mixture thereof, such as a microprocessor or CPU (central processing unit), MOS (metal oxide semiconductor), CMOS (complementary MOS), BiMOS (bipolar MOS), BiCMOS (bipolar CMOS), ECL (emitter coupled logic) and / or TTL (transistor-transistor logic).
[0429] Embodiments may be implemented as separate devices, apparatuses, units, components, or functions, or in a distributed manner, for example, one or more processors or processing functions may be used or shared in a process, or one or more processing segments or processing portions may be used and shared in a process, wherein one physical processor or more than one physical processor may be used to implement one or more processing portions dedicated to a specific process as described.
[0430] The device may be implemented by a semiconductor chip, a chipset, or a (hardware) module including such a chip or chipset.
[0431] The embodiments may also be implemented as any combination of hardware and software, such as ASIC (Application Specific IC (Integrated Circuit)) components, FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device) components or DSP (Digital Signal Processor) components.
[0432] The embodiments may also be implemented as a computer program product including a computer usable medium having computer readable program code embodied therein, the computer readable program code being adapted to perform the processes as described in the embodiments, wherein the computer usable medium may be a non-transitory medium.
[0433] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0434] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0435] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0436] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0437] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A video transmission method, characterized in that: The method comprises: Determine the slice of the video currently to be sent to the receiving end; For each of the slices, a cumulative mean square error CMSE of the slice is calculated, and based on the CMSE of the slice, a transmission priority of the slice is determined; wherein the larger the CMSE of the slice is, the higher the transmission priority of the slice is; The slices of the video are sent to the receiving end based on the transmission priority of the slices of the video.
2. The method according to claim 1, characterized in that The method includes sending the slices of the video to the receiving end based on the transmission priority of the slices of the video, including: For each of the slices: Determine a data packet fragment size of the slice, and determine a forward error correction (FEC) protection level of the slice; Encode the slice according to the data packet fragment size of the slice and the FEC protection level of the slice; The encoded data of the slice is sent to the receiving end according to the transmission priority of the slice.
3. The method according to claim 2, characterized in that Determining the data packet fragment size of the slice includes: For each transmission priority, the optimal data packet segment size for the slice of the transmission priority is determined based on the transmission priority and the current network conditions.
4. The method according to claim 2, characterized in that: The determining the FEC protection level of the slice includes: Based on the slice transmission priority and current network conditions, the FEC protection level of the slice is determined.
5. The method according to claim 2, characterized in that: The sending the encoded data of the slice to the receiving end according to the transmission priority of the slice includes: Allocate network bandwidth to the slice based on the transmission priority of the slice; Determine a sending time of the slice based on the network bandwidth; According to the network bandwidth and the sending time, the encoded data of the slice is sent to the receiving end.
6. The method according to claim 1, characterized in that The method further comprises: Monitor the current network status; If the current network status meets the preset conditions, based on the transmission priority of the slices of the video and the current network status, the slices to be discarded are selected from the slices of the video.
7. A video transmission method, characterized in that: The method comprises: The receiving video transmitter sends the slice of the video based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; the larger the CMSE of the slice, the higher the transmission priority of the slice; When it is determined that slices are lost in the video transmission, restoring the lost slices of the video based on the received partial slices of the video; The video playback output is performed using the received slices of the video and the restored slices of the video.
8. A video transmission device, characterized in that: The device comprises: A slice determination unit, used to determine the slice of the video currently to be sent to the receiving end; a transmission priority determination unit, configured to calculate, for each of the slices, a cumulative mean square error CMSE of the slice, and determine a transmission priority of the slice based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice; A sending processing unit is used to send the slices of the video to the receiving end based on the transmission priority of the slices of the video.
9. A video transmission device, characterized in that: The device comprises: A receiving unit, configured to receive a slice of the video sent by a video transmitter based on the transmission priority of the slice of the video; wherein the transmission priority of each slice is determined based on the CMSE of the slice; wherein the larger the CMSE of the slice, the higher the transmission priority of the slice; a slice loss identification unit, configured to restore the lost slices of the video based on the received partial slices of the video when it is determined that there is a slice loss in the video transmission; The playback output unit is used to perform video playback output using the received slices of the video and the restored slices of the video.
10. An electronic device, characterized in that: include: A memory for storing program instructions; A processor, configured to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 7 according to the obtained program.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the method according to any one of claims 1 to 7.
