Panoramic video transmission method and device based on greedy algorithm, equipment and medium

By using a greedy algorithm to divide panoramic video into segments and blocks and generate target block sets, the problem of high bandwidth occupancy in panoramic video transmission is solved, and more efficient video transmission is achieved.

CN116527960BActive Publication Date: 2026-03-27SHENZHEN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies cannot provide an effective method for panoramic video transmission, resulting in high bandwidth occupancy and low transmission efficiency.

Method used

A greedy algorithm is used to divide the received panoramic video into segments and blocks to generate a target block set, and the video is transmitted based on the block set.

Benefits of technology

It reduces data transmission consumption, saves bandwidth, and improves the transmission efficiency of panoramic video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527960B_ABST
    Figure CN116527960B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of video streaming, and provides a panoramic video transmission method, device and equipment based on a greedy algorithm and a medium, the method comprising: segmenting a received panoramic video to obtain a plurality of video segments, segmenting each video segment to obtain a basic block set corresponding to each video segment, processing each basic block set according to a preset greedy merging block algorithm to obtain a corresponding target block set, and performing video transmission on the panoramic video according to the target block set, thereby reducing traffic transmission consumption, saving bandwidth, and improving the transmission efficiency of the panoramic video.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of video streaming, and particularly relates to a panoramic video transmission method and device based on a greedy algorithm, equipment and a medium. BACKGROUND

[0002] Nowadays, video streaming media accounts for a large part of global Internet traffic. 360-degree video, also known as panoramic video, can provide viewers with an immersive viewing experience. Since high-resolution recording of panoramic signals is required, 360-degree video requires a high code rate to meet human perception. However, users can only see a small part of the screen at a time, which is called a viewport, and the pictures outside the viewport are discarded, resulting in a large amount of network resources being wasted on transmitting unnecessary pictures. Therefore, it is necessary to study advanced 360-degree video streaming technology to reduce the required bandwidth.

[0003] 360-degree video partitioning is currently an optimization scheme for 360-degree video streaming. The most classic method is fixed partitioning, which divides a 360-degree video frame into fixed-size grids in space, and each grid is a partition. Only the partitions located in the user's viewport are transmitted. Another type is dynamic partitioning, which generates partitions of different length and width, reduces the number of partitions, improves video encoding efficiency, and thus reduces traffic transmission consumption. Currently, non-uniform partitioning schemes can be generated by exhaustive search, integer linear programming, and computational geometry. However, these methods generate low-granularity partitions, which cannot provide more detailed boundary matching for the user's viewport, and cannot further save bandwidth. SUMMARY

[0004] The present application aims to provide a panoramic video transmission method and device based on a greedy algorithm, which aims to solve the problem of high video transmission bandwidth occupancy and low transmission efficiency caused by the inability of existing technology to provide an effective panoramic video transmission method.

[0005] In one aspect, the present application provides a panoramic video transmission method based on a greedy algorithm, which comprises the following steps:

[0006] segmenting the received panoramic video to obtain a plurality of video segments;

[0007] dividing each video segment into blocks to obtain a basic block set corresponding to each video segment, wherein all basic blocks in the basic block set are not marked;

[0008] processing each basic block set according to a preset greedy merging partition algorithm to obtain a corresponding target partition set;

[0009] transmit the panoramic video according to the target tile set.

[0010] Preferably, the step of dividing each video segment into tiles comprises:

[0011] extracting a viewport for each video segment to obtain a corresponding viewport map;

[0012] dividing a video frame of the viewport map into tiles to obtain the basic tile set corresponding to each video segment.

[0013] Preferably, the step of processing each basic tile set according to a preset greedy merge tile algorithm comprises:

[0014] when there is an unmarked tile in the basic tile set, selecting an unmarked tile at a preset position and setting the unmarked tile as a current tile;

[0015] calculating a first benefit of merging the current tile with a first tile adjacent to the current tile to obtain a first benefit;

[0016] calculating a second benefit of merging the current tile with a second tile adjacent to the current tile to obtain a second benefit;

[0017] when the maximum benefit of the first benefit and the second benefit is not less than 0, merging the current tile with the tile corresponding to the maximum benefit to obtain a third tile;

[0018] marking the tiles contained in the third tile, setting the marked third tile as the current tile, and jumping to the step of calculating the first benefit of merging the current tile with the first tile adjacent to the current tile;

[0019] when the maximum benefit of the first benefit and the second benefit is less than 0, adding the current tile to the target tile set.

[0020] Preferably, the step of calculating the first benefit of merging the current tile with the first tile adjacent to the current tile comprises:

[0021] encoding the current tile and the first tile using a preset video encoding standard respectively to obtain a current tile byte number and a first tile byte number respectively;

[0022] obtaining the first benefit according to the current tile byte number, the first tile byte number, and a preset merging benefit formula.

[0023] In another aspect, the present application provides a panoramic video transmission device based on a greedy algorithm, the device comprising:

[0024] a segment obtaining unit configured to segment a received panoramic video to obtain a plurality of video segments;

[0025] a basic block obtaining unit configured to segment each of the video segments to obtain a basic block set corresponding to each of the video segments, wherein all basic blocks in the basic block set are unmarked;

[0026] a basic block processing unit configured to process each of the basic block sets according to a preset greedy merge and split algorithm to obtain a target block set corresponding to each of the basic block sets; and

[0027] a video transmission unit configured to perform video transmission on the panoramic video according to the target block set.

[0028] Preferably, the basic block obtaining unit comprises:

[0029] a viewport map obtaining unit configured to extract a viewport from each of the video segments to obtain a viewport map corresponding to each of the video segments; and

[0030] a basic block obtaining subunit configured to segment a video frame of the viewport map to obtain the basic block set corresponding to each of the video segments.

[0031] Preferably, the basic block processing unit comprises:

[0032] a current block setting unit configured to select an unmarked basic block at a preset position from the basic block set when the basic block set has unmarked basic blocks, and set the unmarked basic block as a current block;

[0033] a first benefit obtaining unit configured to calculate a benefit of merging the current block and a first block adjacent to the current block to obtain a first benefit;

[0034] a second benefit obtaining unit configured to calculate a benefit of merging the current block and a second block adjacent to the current block to obtain a second benefit;

[0035] a block merging unit configured to merge the current block and a block corresponding to a maximum benefit between the first benefit and the second benefit to obtain a third block when the maximum benefit is not less than 0;

[0036] a basic block marking unit, configured to mark basic blocks contained in the third sub-block, set the third sub-block after being marked as the current sub-block, and trigger the first benefit obtaining unit to perform the calculation of the benefit of merging the current sub-block and the first sub-block adjacent to the current sub-block; and

[0037] a sub-block set adding unit, configured to add the current sub-block to the target sub-block set when the maximum benefit of the first benefit and the second benefit is less than 0.

[0038] Preferably, the first benefit obtaining unit comprises:

[0039] a byte number obtaining unit, configured to encode the current sub-block and the first sub-block respectively using a preset video encoding standard, and obtain a current sub-block byte number and a first sub-block byte number respectively; and

[0040] a benefit obtaining sub-unit, configured to obtain the first benefit according to the current sub-block byte number, the first sub-block byte number, and a preset merging benefit formula.

[0041] In another aspect, the present application also provides a video processing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned panorama video transmission method based on a greedy algorithm when executing the computer program.

[0042] In another aspect, the present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the steps of the above-mentioned panorama video transmission method based on a greedy algorithm.

[0043] The present application divides the received panorama video into video segments, divides each video segment into blocks, obtains a basic block set corresponding to each video segment, processes each basic block set according to a preset greedy merging sub-block algorithm, obtains a target sub-block set corresponding to each basic block set, and transmits the panorama video according to the target sub-block set, thereby reducing the traffic transmission consumption, saving the bandwidth, and improving the transmission efficiency of the panorama video. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 is an implementation flowchart of the panorama video transmission method based on a greedy algorithm provided by the first embodiment of the present application;

[0045] Figure 2 is an implementation flowchart of the panorama video transmission method based on a greedy algorithm provided by the second embodiment of the present application;

[0046] Figure 3is a structural schematic diagram of the panoramic video transmission device based on the greedy algorithm provided in Embodiment Three of the present application;

[0047] Figure 4 is a preferred structural schematic diagram of the panoramic video transmission device based on the greedy algorithm provided in Embodiment Three of the present application;

[0048] Figure 5 is a structural schematic diagram of the panoramic video transmission device based on the greedy algorithm provided in Embodiment Four of the present application;

[0049] Figure 6 is a structural schematic diagram of the device provided in Embodiment Five of the present application. DETAILED DESCRIPTION

[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0051] The specific implementation of the present application is described in detail below in combination with specific embodiments:

[0052] Example One:

[0053] Figure 1 The implementation process of the panoramic video transmission method based on the greedy algorithm provided in Embodiment One of the present application is shown, and only the part related to the embodiments of the present application is shown for the convenience of description, and the details are as follows:

[0054] In step S101, the received panoramic video is divided into segments to obtain a plurality of video segments.

[0055] The embodiments of the present application are applicable to video processing platforms, devices or systems, such as personal computers, servers, etc. In the embodiments of the present application, the panoramic video is also called 360-degree video, and the received panoramic video is divided into segments according to the pre-set duration of the segments to obtain a plurality of video segments, for example, the panoramic video is divided into a plurality of segments with a duration of 1.5 seconds.

[0056] In step S102, each video segment is divided into blocks to obtain a basic block set corresponding to each video segment, wherein all basic blocks in the basic block set are not marked.

[0057] In the embodiments of the present application, the unmarked basic block indicates that the basic block has not been accessed, and the marked basic block indicates that the basic block has been accessed. When each video segment is divided into blocks, the basic block set is preferably obtained by the following steps:

[0058] (1) performing viewport extraction on each video segment to obtain a viewport map corresponding to the video segment;

[0059] In the embodiment of the present application, the viewport extraction is performed on each video segment to obtain the user viewport corresponding to each video segment, and all the user viewports corresponding to the video segment are superimposed to obtain the viewport map corresponding to the video segment.

[0060] (2) performing block division on the video frames of the viewport map to obtain a basic block set corresponding to each video segment.

[0061] In the embodiment of the present application, the video frames of each viewport map are divided into n x m basic blocks in space, and all the basic blocks obtained by each viewport map constitute the basic block set of the video segment corresponding to the viewport map.

[0062] The basic block set is obtained through the above steps (1) to (2), so that the subsequent generated block granularity is low.

[0063] In step S103, each basic block set is processed according to the preset greedy merging block algorithm to obtain a corresponding target block set.

[0064] In the embodiment of the present application, in multiple iterations, the basic blocks in each basic block set are processed according to the preset greedy merging block algorithm to obtain a corresponding target block set, and each target block in the target block set is composed of one or more basic blocks.

[0065] In the embodiment of the present application, the specific implementation of processing each basic block set according to the preset greedy merging block algorithm is described in detail in the following method embodiment, which will not be described here.

[0066] In step S104, the panoramic video is transmitted according to the target block set.

[0067] In the embodiment of the present application, the target block set is the final block scheme, and the panoramic video is re-encoded according to each target block in the target block set, and then the encoded panoramic video is transmitted, so that the traffic transmitted to the user can be further saved.

[0068] In the embodiment of the present application, the received panoramic video is divided into segments to obtain a plurality of video segments, each video segment is divided into blocks to obtain a basic block set corresponding to each video segment, each basic block set is processed according to the preset greedy merging block algorithm to obtain a corresponding target block set, and the panoramic video is transmitted according to the target block set, thereby reducing the traffic transmission consumption, saving the bandwidth, and improving the transmission efficiency of the panoramic video.

[0069] Example Two:

[0070] Figure 2 The implementation flow of the panoramic video transmission method based on the greedy algorithm provided by the second embodiment of the present application is shown, only the parts related to the embodiments of the present application are shown for the convenience of description, and the details are described as follows:

[0071] The following steps are performed for each basic block set in step S103 of the first embodiment:

[0072] In step S201, it is judged whether there is an unmarked basic block in the basic block set.

[0073] In the embodiment of the present application, it is judged whether there is an unmarked basic block in the basic block set, if yes, step S202 is performed, otherwise, step S209 is performed.

[0074] In step S202, the unmarked basic block at the preset position is selected, and the unmarked basic block is set as the current partition.

[0075] In the embodiment of the present application, when there is an unmarked basic block in the basic block set, the unmarked basic block at the preset position is selected, specifically, the unmarked basic block at the top left corner is selected, and the basic block is set as the current partition, wherein the current partition is a rectangle composed of one or more basic blocks.

[0076] In step S203, the revenue of merging the current partition and the first partition adjacent to the current partition is calculated, and the first revenue is obtained.

[0077] In the embodiment of the present application, only the merging revenue of the current partition and the partitions adjacent to it in two directions is calculated, and the position of the selected unmarked basic block is the top left corner, which indicates that the block adjacent to the top of the basic block and the block adjacent to the left of the basic block have been visited, and here, only the merging revenue of the current partition and the partitions adjacent to it in the right and bottom directions is calculated, and the first partition is a rectangle composed of one or more unmarked basic blocks, which is a row adjacent to the bottom of the current partition and aligned with the width of the current partition, or a column adjacent to the right of the current partition and aligned with the height of the current partition.

[0078] In the calculation of the revenue of merging the current partition and the first partition adjacent to the current partition, preferably, the calculation of the merging revenue is realized by the following steps:

[0079] (1) The current partition and the first partition are respectively encoded using a preset video encoding standard, and the number of bytes of the current partition and the number of bytes of the first partition are respectively obtained;

[0080] In the embodiment of the present application, the current block t and the first block t1 are encoded using a High Efficiency Video Coding (HEVC) standard respectively, and the current block byte number n(t) and the first block byte number n(t1) are obtained respectively.

[0081] (2) The first benefit is obtained according to the current block byte number, the first block byte number and a preset merging benefit formula.

[0082] In the embodiment of the present application, the merging benefit formula is G(t, t') = C(t) + C(t') - C(t U t'), wherein t is the current block, t' is the block adjacent to t in a direction, C(t) is the average bandwidth consumption of the current block t, which is calculated according to the formula C(t) = max(M t ) x n(t), M t is a viewport map to which the current block t belongs, and t U t' is the merging of the blocks t and t', and the first benefit g1 = G(t, t1) is calculated according to the current block byte number n(t), the first block byte number n(t1) and the merging benefit formula.

[0083] The first benefit is obtained through the steps (1) and (2) above, so that the subsequent obtained block scheme is more optimal.

[0084] In step S204, the benefit of merging the current block and a second block adjacent to the current block is calculated, and a second benefit is obtained.

[0085] In the embodiment of the present application, the second block is a rectangle composed of one or more unmarked basic blocks, which is a row aligned with the width of the current block or a column aligned with the height of the current block, and the second block is a block adjacent to the current block in a direction different from the first block.

[0086] When the benefit of merging the current block and the second block adjacent to the current block is calculated, preferably, the merging benefit is calculated through the following steps:

[0087] (1) The current block and the second block are encoded using a preset video coding standard respectively, and the current block byte number and the second block byte number are obtained respectively.

[0088] In the embodiment of the present application, the current block t and the first block t2 are encoded using the HEVC standard respectively, and the current block byte number n(t) and the second block byte number n(t2) are obtained respectively.

[0089] (2) The second benefit is obtained according to the current block byte number, the second block byte number and the merging benefit formula.

[0090] In the embodiment of the present application, the second revenue g2=G(t, t2) is calculated according to the current block byte number n(t), the second block byte number n(t2) and the merging revenue formula G(t, t')=C(t)+C(t')-C(t∪t').

[0091] The second revenue is obtained through the steps (1)-(2) above, so that the subsequent obtained block scheme is more optimal.

[0092] In step S205, it is judged whether the maximum revenue in the first revenue and the second revenue is not less than 0.

[0093] In the embodiment of the present application, the revenues of the first revenue g1 and the second revenue g2 are compared, the revenue of which is greater is taken as the maximum revenue, and then the maximum revenue is compared with 0 to judge whether the maximum revenue is greater than or equal to 0. If yes, step S206 is executed, otherwise, step S208 is executed. For example, if g1>g2, the maximum revenue is g1, and then it is judged whether g1 is greater than or equal to 0.

[0094] In step S206, the current block is merged with the block corresponding to the maximum revenue to obtain a third block.

[0095] In the embodiment of the present application, when the maximum revenue in the first revenue and the second revenue is greater than or equal to 0, the block corresponding to the direction of the greater revenue is selected to be merged, that is, the current block is merged with the block corresponding to the direction of the maximum revenue to obtain a third block, and one row or one column is merged each time, so that the third block obtained after the merging is still a rectangle.

[0096] In step S207, the basic blocks contained in the third block are marked, and the marked third block is set as the current block.

[0097] In the embodiment of the present application, the basic blocks contained in the third block are marked to indicate that the basic blocks in the block have been visited, the third block after the marking is taken as the current block, and the iteration continues to the step S203 to continue the greedy merging until the maximum revenue of the merging is less than 0.

[0098] In step S208, the current block is added to the target block set.

[0099] In the embodiment of the present application, when the maximum revenue in the first revenue and the second revenue is less than 0, the current block is added to the target block set, and the iteration continues to the step S201 to continue the processing of the basic blocks in the basic block set which are not marked.

[0100] In step S209, the processing of the basic block set is ended to obtain the corresponding target block set.

[0101] In the embodiment of the present application, when there is no unmarked basic block in the basic block set, it indicates that all the basic blocks in the basic block set have been accessed, and then the processing of the basic block set is ended, and the target block set corresponding to the basic block set is obtained, and each target block set corresponds to a video segment.

[0102] In the embodiment of the present application, when there is an unmarked basic block in the basic block set, the unmarked basic block at the preset position is selected as the current block, the revenue of merging the current block and the first block adjacent to the current block is calculated to obtain the first revenue, the revenue of merging the current block and the second block adjacent to the current block is calculated to obtain the second revenue, when the maximum revenue in the first revenue and the second revenue is not less than 0, the current block and the block corresponding to the maximum revenue are merged to obtain the third block, the basic blocks contained in the third block are marked, and the marked third block is taken as the current block, and the step of calculating the revenue of merging the current block and the first block adjacent to the current block is jumped to continue to be executed, when the maximum revenue in the first revenue and the second revenue is less than 0, the current block is added to the target block set, thereby improving the block granularity, providing more detailed boundary matching for the viewport of the user, and further saving the bandwidth.

[0103] Example Three:

[0104] Figure 3 The structure of the panoramic video transmission device based on the greedy algorithm provided in the third embodiment of the present application is shown, only the parts related to the embodiments of the present application are shown, and the parts include:

[0105] The segment obtaining unit 31 is configured to perform segment division on the received panoramic video to obtain a plurality of video segments.

[0106] The embodiments of the present application are applicable to a video processing platform, device or system, for example, a personal computer, a server and the like. In the embodiments of the present application, the panoramic video is also referred to as a 360-degree video, and the received panoramic video is divided into a plurality of video segments according to the preset duration of the segments, for example, the panoramic video is divided into a plurality of segments with a duration of 1.5 seconds.

[0107] The basic block obtaining unit 32 is configured to perform block division on each video segment to obtain a basic block set corresponding to each video segment, wherein all the basic blocks in the basic block set are unmarked.

[0108] In the embodiments of the present application, the unmarked basic block indicates that the basic block has not been accessed, and the marked basic block indicates that the basic block has been accessed.

[0109] The basic block processing unit 33 is configured to process each basic block set according to a preset greedy merge block algorithm to obtain a corresponding target block set.

[0110] In the embodiment of the present application, in multiple iterations, the basic blocks in each basic block set are processed according to a preset greedy merge block algorithm to obtain a corresponding target block set, and each target block in the target block set is composed of one or more basic blocks.

[0111] The video transmission unit 34 is configured to perform video transmission on the panoramic video according to the target block set.

[0112] In the embodiment of the present application, the target block set is a final block scheme, and the panoramic video is re-encoded according to each target block in the target block set, and the encoded panoramic video is transmitted, so that the traffic transmitted to the user can be further saved.

[0113] As shown in Figure 4 Preferably, the basic block obtaining unit 32 includes:

[0114] The viewport map obtaining unit 321 is configured to perform viewport extraction on each video segment to obtain a corresponding viewport map of the video segment.

[0115] In the embodiment of the present application, the viewport extraction is performed on each video segment to obtain a corresponding user viewport of the video segment, and all user viewports corresponding to the video segment are superimposed to obtain a corresponding viewport map of the video segment.

[0116] The basic block obtaining sub-unit 322 is configured to perform block division on the video frames of the viewport map to obtain a basic block set corresponding to each video segment.

[0117] In the embodiment of the present application, the video frames of each viewport map are divided into n x m basic blocks in space, and all the basic blocks obtained from each viewport map constitute a basic block set of the video segment corresponding to the viewport map.

[0118] In the embodiment of the present application, the units of the panoramic video transmission device based on the greedy algorithm can be realized by corresponding hardware or software units, and each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which does not limit the present application.

[0119] Example Four:

[0120] Figure 5 The structure of the panoramic video transmission device based on the greedy algorithm provided in the fourth embodiment of the present application is shown, and only the parts related to the embodiments of the present application are shown for the convenience of description, which include:

[0121] The basic block processing unit 33 in the third embodiment comprises:

[0122] The current block setting unit 51 is configured to select an unmarked basic block at a preset position when there is an unmarked basic block in the basic block set, and set the unmarked basic block as a current block.

[0123] In the embodiment of the present application, when there is an unmarked basic block in the basic block set, the unmarked basic block at the left upper corner is selected and set as the current block, wherein the current block is a rectangle composed of one or more basic blocks.

[0124] The first benefit obtaining unit 52 is configured to calculate a benefit of merging the current block and a first block adjacent to the current block, to obtain a first benefit.

[0125] In the embodiment of the present application, only the merging benefits of the current block and the blocks adjacent to the current block in two directions are calculated. Since the position of the selected unmarked basic block is the left upper corner, it indicates that the block adjacent to the upper side of the basic block and the block adjacent to the left side of the basic block have been visited. In this case, only the merging benefits of the current block and the blocks adjacent to the right side and the lower side of the current block are calculated. The first block is a rectangle composed of one or more unmarked basic blocks, which is a row adjacent to the lower side of the current block and aligned with the width of the current block, or a column adjacent to the right side of the current block and aligned with the height of the current block.

[0126] The second benefit obtaining unit 53 is configured to calculate a benefit of merging the current block and a second block adjacent to the current block, to obtain a second benefit.

[0127] In the embodiment of the present application, the second block is a rectangle composed of one or more unmarked basic blocks, which is a row aligned with the width of the current block, or a column aligned with the height of the current block, and the second block is a block adjacent to the current block in a direction different from the first block.

[0128] The block merging unit 54 is configured to merge the current block and the block corresponding to the maximum benefit between the first benefit and the second benefit when the maximum benefit is not less than 0, to obtain a third block.

[0129] In the embodiment of the present application, when the maximum benefit between the first benefit and the second benefit is greater than or equal to 0, the block corresponding to the direction with the greater benefit is selected for merging, i.e. the current block is merged with the block corresponding to the direction with the maximum benefit, to obtain the third block. One row or one column is merged each time, so that the third block obtained after merging is still a rectangle.

[0130] The basic block marking unit 55 marks the basic blocks contained in the third sub-block, sets the marked third sub-block as the current sub-block, and triggers the first benefit obtaining unit to calculate the benefit of merging the current sub-block and the first sub-block adjacent to the current sub-block.

[0131] In the embodiment of the present application, the basic blocks contained in the third sub-block are marked, indicating that all the basic blocks in the sub-block have been visited, the marked third sub-block is set as the current sub-block, and the first benefit obtaining unit 52 is triggered to calculate the benefit of merging the current sub-block and the first sub-block adjacent to the current sub-block.

[0132] The sub-block set adding unit 56 adds the current sub-block to the target sub-block set when the maximum benefit in the first benefit and the second benefit is less than 0.

[0133] Preferably, the first benefit obtaining unit 52 comprises:

[0134] The byte number obtaining unit 521 encodes the current sub-block and the first sub-block using a preset video coding standard respectively to obtain the current sub-block byte number and the first sub-block byte number respectively.

[0135] In the embodiment of the present application, the current sub-block t and the first sub-block t1 are encoded using the High Efficiency Video Coding (HEVC) standard respectively to obtain the current sub-block byte number n(t) and the first sub-block byte number n(t1) respectively.

[0136] The benefit obtaining sub-unit 522 obtains the first benefit according to the current sub-block byte number, the first sub-block byte number and a preset merging benefit formula.

[0137] In the embodiment of the present application, the merging benefit formula is G(t, t') = C(t) + C(t') - C(t∪t'), wherein t is the current sub-block, t' is the sub-block adjacent to t in the direction, C(t) is the average bandwidth consumption of the current sub-block t, which is calculated according to the formula C(t) = max(M t )×n(t), M t is the viewport map to which the current sub-block t belongs, t∪t' is the merging of the sub-block t and t', and the first benefit h1 = G(t, t1) is calculated according to the current sub-block byte number n(t), the first sub-block byte number n(t1) and the merging benefit formula.

[0138] In the embodiment of the present application, the units of the panoramic video transmission device based on the greedy algorithm can be realized by corresponding hardware or software units, each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which does not limit the present application.

[0139] Example Five:

[0140] Figure 6 The structure of the device provided by the fifth embodiment of the present application is shown, and only parts related to the embodiments of the present application are shown for the convenience of description.

[0141] The device 6 of the embodiment of the present application comprises a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. The processor 60 implements the steps in the above-described embodiment of the method for panoramic video transmission based on the greedy algorithm when executing the computer program 62, for example, the steps S101 to S104 shown in the above. Figure 1 Alternatively, the processor 60 implements the functions of the units in the above-described embodiments of the device when executing the computer program 62, for example, the functions of the units 31 to 34 shown in the above. Figure 3 Alternatively, the processor 60 implements the functions of the units in the above-described embodiments of the device when executing the computer program 62, for example, the functions of the units 31 to 34 shown in the above.

[0142] In the embodiment of the present application, the received panoramic video is divided into segments to obtain a plurality of video segments, each video segment is divided into blocks to obtain a basic block set corresponding to each video segment, each basic block set is processed according to a preset greedy merging block algorithm to obtain a corresponding target block set, and the panoramic video is transmitted according to the target block set, thereby reducing the traffic transmission consumption, saving the bandwidth, and improving the transmission efficiency of the panoramic video.

[0143] The device of the embodiment of the present application can be a personal computer or a server. The steps implemented by the processor 60 of the video processing device 6 when implementing the method for panoramic video transmission based on the greedy algorithm can refer to the description of the above-described method embodiments, which will not be described here.

[0144] Example Six:

[0145] In the embodiment of the present application, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-described embodiment of the method for panoramic video transmission based on the greedy algorithm, for example, the steps S101 to S104 shown in the above. Figure 1 Alternatively, the computer program is executed by the processor to implement the functions of the units in the above-described embodiments of the device, for example, the functions of the units 31 to 34 shown in the above. Figure 3 Alternatively, the computer program is executed by the processor to implement the functions of the units in the above-described embodiments of the device, for example, the functions of the units 31 to 34 shown in the above.

[0146] In the embodiment of the present application, the received panoramic video is divided into video segments, each video segment is divided into blocks, a basic block set corresponding to each video segment is obtained, each basic block set is processed according to a preset greedy merging block algorithm, a target block set corresponding to each basic block set is obtained, and the panoramic video is transmitted according to the target block set, so that the traffic transmission consumption is reduced, the bandwidth is saved, and the transmission efficiency of the panoramic video is improved.

[0147] The computer readable storage medium of the embodiment of the present application can include any entity or device capable of carrying computer program code, recording medium, such as ROM / RAM, magnetic disk, optical disk, flash memory, etc.

[0148] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A panoramic video transmission method based on a greedy algorithm, characterized in that, The method includes the following steps: The received panoramic video is divided into segments to obtain several video segments; Each video segment is divided into blocks to obtain a basic block set corresponding to each video segment, wherein all basic blocks in the basic block set are unlabeled; Each of the basic block sets is processed according to the preset greedy merging and partitioning algorithm to obtain the corresponding target block set; The panoramic video is transmitted according to the target block set; The step of processing each basic block set according to a preset greedy merging and partitioning algorithm includes: When there are unmarked basic blocks in the basic block set, select the unmarked basic block at the preset position and set the unmarked basic block as the current block; Calculate the benefit of merging the current block and the first block adjacent to the current block to obtain the first benefit; Calculate the benefit of merging the current block and the second block adjacent to the current block to obtain the second benefit; When the maximum benefit between the first benefit and the second benefit is not less than 0, the current block is merged with the block corresponding to the maximum benefit to obtain the third block; The basic blocks contained in the third block are marked, the marked third block is set as the current block, and the process jumps to the step of calculating the benefit of merging the current block and the first block adjacent to the current block; When the maximum benefit between the first benefit and the second benefit is less than 0, the current block is added to the target block set.

2. The method as described in claim 1, characterized in that, The step of dividing each video segment into blocks includes: Viewport extraction is performed on each video segment to obtain the viewport map corresponding to the video segment; The video frames of the viewport are divided into blocks to obtain the basic block set corresponding to each video segment.

3. The method as described in claim 1, characterized in that, The step of calculating the benefit of merging the current block and the first block adjacent to the current block includes: The current block and the first block are encoded using a preset video encoding standard to obtain the number of bytes in the current block and the number of bytes in the first block, respectively. The first revenue is obtained based on the current block size, the first block size, and the preset merge revenue formula.

4. A panoramic video transmission device based on a greedy algorithm, characterized in that, The device includes: The segment acquisition unit is used to divide the received panoramic video into segments to obtain several video segments; A basic block acquisition unit is used to divide each video segment into blocks to obtain a basic block set corresponding to each video segment, wherein all basic blocks in the basic block set are unlabeled; A basic block processing unit is used to process each of the basic block sets according to a preset greedy merge and partition algorithm to obtain the corresponding target block set; and The video transmission unit is used to transmit the panoramic video according to the target block set; The basic block processing unit includes: The current block setting unit is used to select an unmarked basic block at a preset position and set the unmarked basic block as the current block when there are unmarked basic blocks in the basic block set; The first revenue-generating unit is used to calculate the revenue from merging the current block and the first block adjacent to the current block to obtain the first revenue. The second revenue-generating unit is used to calculate the revenue from merging the current block and the second block adjacent to the current block to obtain the second revenue. The block merging unit is used to merge the current block with the block corresponding to the maximum benefit when the maximum benefit between the first benefit and the second benefit is not less than 0, to obtain a third block; A basic block marking unit is used to mark the basic blocks contained in the third block, set the marked third block as the current block, and trigger the first profit obtaining unit to perform the calculation of the profit of merging the current block and the first block adjacent to the current block; and The block set addition unit is used to add the current block to the target block set when the maximum benefit between the first benefit and the second benefit is less than 0.

5. The apparatus as described in claim 4, characterized in that, The basic block acquisition unit includes: A viewport acquisition unit is configured to extract the viewport for each video segment to obtain a viewport image corresponding to the video segment; and The basic block acquisition subunit is used to divide the video frames of the viewport into blocks to obtain the basic block set corresponding to each video segment.

6. The apparatus as claimed in claim 4, characterized in that, The first revenue-generating unit includes: A byte count acquisition unit is used to encode the current block and the first block respectively using a preset video encoding standard to obtain the byte count of the current block and the byte count of the first block respectively; and The revenue acquisition subunit is used to obtain the first revenue based on the current block byte count, the first block byte count, and a preset merged revenue formula.

7. A video processing apparatus, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 3.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Panoramic video transmission method and device, storage medium and electronic equipment

    CN115776564A