Video carousel method, device, electronic device and storage medium
By determining the number of channels and the arrangement of shards based on a tree structure in a video carousel, the problem of resource waste caused by the increase in the number of channels as shards increase is solved, and efficient resource utilization of fixed channels is achieved.
Patent Information
- Application Number
- CN202211020554.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the prior art, the number of video carousel channels increases as the number of video segments increases, resulting in a waste of resources.
The number of carousel channels is determined based on the preset total carousel bandwidth and the playback rate of the target video, an initial tree structure is constructed, the arrangement method and number of video segments are determined, and the video segments are periodically arranged on a fixed number of carousel channels for broadcasting.
The fixed number of carousel channels does not increase with the increase of video segments, which saves resource consumption, reduces channel maintenance costs, and improves resource utilization efficiency.
Smart Images

Figure CN115695855B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a video carousel method, device, electronic device and storage medium. Background Art
[0002] The ideal effect of a video on demand (VOD) service is that users can watch the entire video smoothly after sending a request without waiting. In early broadcast systems, each channel only transmitted a single program, but this resulted in very long wait times for users. To reduce user wait times, improvements were made to early broadcast systems by allocating multiple channels to broadcast the same program, thus achieving the VOD effect. However, broadcasting the same program across multiple channels consumes a significant amount of bandwidth resources, so further improvements were needed to reduce bandwidth waste.
[0003] In the prior art, a harmonic broadcasting (HB) scheme is usually adopted. First, the video is evenly divided into N video segments according to the duration, and the segments are respectively represented by S1, S2, S3, ..., S N The duration D of the i-th video segment i Equal to satisfy = duration D of the jth video segment j ; Then the i-th video segment is divided into i video sub-segments according to the bandwidth, and S i,1 , S i,2 ,...,S i,i For each video segment, all the video sub-segments of the video segment are placed in a carousel channel C according to the sequence number from small to large. i The number of carousel channels is equal to the number of video segments; i The bandwidth is b / i, where b is the normal playback rate of the video. i Each video sub-segment is broadcast periodically.
[0004] However, in the above-mentioned prior art, the number of carousel channels increases with the number of video fragments. When the number of video fragments is large, the number of carousel channels is also large. Such channel design requires consuming a lot of resources to maintain each carousel channel, resulting in a waste of resources. Summary of the Invention
[0005] In view of the problems existing in the prior art, embodiments of the present invention provide a video carousel method, device, electronic device and storage medium.
[0006] The present invention provides a video carousel method, comprising:
[0007] Determining a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each of the carousel channels is equal to the playback rate of the target video;
[0008] constructing an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0009] Determining an arrangement of the video segments based on the initial tree structure, and determining a first number of the video segments based on the initial tree structure;
[0010] Based on the first number of portions, the target video is equally divided into at least one video segment;
[0011] Based on the arrangement of the video segments, the at least one video segment is periodically arranged and broadcasted on the first number of carousel channels.
[0012] According to a video carousel method provided by the present invention, determining the first number of video segments based on the initial tree structure includes:
[0013] Step a: for a video slice reference number i, traverse each leaf node in a current leaf set, determine a candidate period for each leaf node in the current leaf set, determine a target leaf node based on the candidate period for each leaf node, and assign the video slice reference number i to the target leaf node; the initial value of i is equal to 1;
[0014] Step b, adding a second number of new leaf nodes to the target leaf node, deleting the target leaf node from the current leaf set, adding the second number of new leaf nodes to the current leaf set, and updating the numbers of the previous leaf nodes in the current leaf set; the second number includes the candidate multiple of the target leaf node minus one;
[0015] Increment i by 1, and repeat step a and step b until the current leaf set is empty, and determine the current value of i as the first number of the video fragments.
[0016] According to a video carousel method provided by the present invention, determining the candidate period of each leaf node in the current leaf set includes:
[0017] For each leaf node, determining a candidate multiple of the leaf node based on a preset delay coefficient, the video segment reference number, and the candidate period of the parent node of the leaf node; the candidate period of the parent node of the initial tree structure is equal to 1;
[0018] The waiting period for selection of the leaf node is determined based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node.
[0019] According to a video carousel method provided by the present invention, determining the candidate multiple of the leaf node based on a preset delay coefficient, the video segment reference number, and the candidate period of the parent node of the leaf node includes:
[0020] Determine the candidate multiples of the leaf node based on formula (1);
[0021] mji=(i+delay) / Tflj (1)
[0022] Wherein, mji represents the multiple to be selected of the leaf node, i represents the reference number of the video segment, delay represents the preset delay coefficient, and Tflj represents the period to be selected of the parent node of the leaf node;
[0023] The determining the waiting period for selection of the leaf node based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node includes:
[0024] Determine the candidate period of the leaf node based on formula (2);
[0025] Tji=mji*Tflj (2)
[0026] Wherein, the Tji represents the period of waiting for selection of the leaf node.
[0027] According to a video carousel method provided by the present invention, determining a target leaf node based on a candidate period of each leaf node includes:
[0028] Determine the leaf node corresponding to the maximum candidate cycle as the target leaf node; or,
[0029] When the video segment reference number is within a preset number range, determining at least one to-be-selected leaf node from among all leaf nodes of the current leaf set, the to-be-selected period of which is less than or equal to the video segment reference number and greater than a preset value;
[0030] The target leaf node is determined among the at least one to-be-selected leaf node.
[0031] According to a video carousel method provided by the present invention, determining the target leaf node from the at least one to-be-selected leaf node includes:
[0032] Determine the waiting period for selection of the parent node corresponding to each of the leaf nodes to be selected;
[0033] The to-be-selected leaf node corresponding to the parent node with the largest to-be-selected period is determined as the target leaf node.
[0034] According to a video carousel method provided by the present invention, updating the numbers of previous leaf nodes in the current leaf set includes:
[0035] The number of each leaf node in the current leaf set whose number is greater than the number of the target leaf node is increased by a target value; the target value is equal to the second number minus one.
[0036] According to a video carousel method provided by the present invention, determining the leaf node corresponding to the maximum waiting period as the target leaf node includes:
[0037] When the number of leaf nodes corresponding to the maximum candidate cycle is greater than 1, the leaf node with the smallest number among each leaf node corresponding to the maximum candidate cycle is determined as the target leaf node.
[0038] According to a video carousel method provided by the present invention, the method further includes:
[0039] Determine a carousel start point of the video segment corresponding to each leaf node in the current leaf set;
[0040] The determining of an arrangement of the video segments based on the initial tree structure includes:
[0041] For each target leaf node, the video segment reference number, the arrangement period of the video segment, the number of the carousel channel, and the carousel starting point of the video segment corresponding to the target leaf node are determined as the arrangement mode of the target video segment; the arrangement period of the video segment is the waiting period of the target leaf node;
[0042] The number of the target video segment corresponds to the video segment reference number; and the at least one video segment is numbered based on a playback order.
[0043] According to a video carousel method provided by the present invention, determining the carousel starting point of the video segment corresponding to each leaf node in the current leaf set includes:
[0044] Determine the carousel starting point of the video segment corresponding to each leaf node in the current leaf set based on formula (3);
[0045] Sp=Sp0+Tflj*k (3)
[0046] Among them, Sp represents the carousel starting point of the video segment corresponding to the leaf node, Sp0 represents the carousel starting point of the video segment corresponding to the parent node of the leaf node, Tflj represents the waiting period of the parent node of the leaf node, and k represents the kth new leaf node added by the parent node of the leaf node.
[0047] The present invention also provides a video carousel device, comprising:
[0048] A first determining unit is configured to determine a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each carousel channel is equal to the playback rate of the target video;
[0049] A construction unit, configured to construct an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0050] a second determining unit, configured to determine an arrangement of the video segments based on the initial tree structure, and determine a first number of the video segments based on the initial tree structure;
[0051] a third determining unit, configured to determine at least one video segment of the target video based on the first number;
[0052] An arranging unit is configured to periodically arrange the at least one video segment on the first number of carousel channels for broadcasting based on the arrangement of the video segments.
[0053] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described video carousel methods is implemented.
[0054] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the video carousel method described above is implemented.
[0055] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned video carousel methods.
[0056] The video carousel method, device, electronic device, and storage medium provided by the present invention determine a first number of carousel channels based on a preset total carousel bandwidth and the playback rate of a target video, determine an arrangement of video slices and a first number of video slices based on an initial tree structure constructed according to the first number, equally divide the target video into multiple video slices based on the first number of slices, and finally, based on the arrangement of the video slices, periodically arrange the multiple video slices on the first number of carousel channels for broadcast. It can be seen that the number of carousel channels of the present invention is fixed, and the multiple video slices are periodically arranged on the fixed number of carousel channels. The number of carousel channels does not increase as the number of video slices increases, thereby eliminating the need to consume a large amount of resources to maintain each carousel channel, thereby saving resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0058] Figure 1 This is one of the flow charts of the video carousel method provided by an embodiment of the present invention;
[0059] Figure 2 This is one of the schematic diagrams of the tree structure provided by the embodiment of the present invention;
[0060] Figure 3 This is the second schematic diagram of the tree structure provided by the embodiment of the present invention;
[0061] Figure 4 This is the third schematic diagram of the tree structure provided by the embodiment of the present invention;
[0062] Figure 5 This is the fourth schematic diagram of the tree structure provided by the embodiment of the present invention;
[0063] Figure 6 This is the fifth schematic diagram of the tree structure provided by the embodiment of the present invention;
[0064] Figure 7 This is a schematic diagram of the arrangement of all video segments on each carousel channel provided by an embodiment of the present invention;
[0065] Figure 8 This is the second flow chart of the video carousel method provided by an embodiment of the present invention;
[0066] Figure 9 This is a schematic diagram of a time series provided by an embodiment of the present invention;
[0067] Figure 10 Schematic diagram of the structure of a video carousel device provided by an embodiment of the present invention;
[0068] Figure 11 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0070] The following combination Figures 1-9 The video carousel method of the present invention is described.
[0071] Figure 1 This is one of the flow charts of the video carousel method provided by the embodiment of the present invention. Figure 1 As shown, the video carousel method includes the following steps:
[0072] Step 101: Determine a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each carousel channel is equal to the playback rate of the target video.
[0073] The video carousel method can be applied to a content distribution network server. Specifically, the content distribution network server constitutes a content delivery network (CDN). CDN is a content distribution network built on the Internet. It relies on edge servers deployed in various locations and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to obtain the required video content nearby, reduce Internet congestion, and improve user access response speed and hit rate. The present invention does not limit the number of content distribution network servers. It can be one content distribution network server, multiple content distribution network servers, or a server cluster formed by several content distribution network servers.
[0074] For example, the first number of carousel channels is obtained by dividing the preset total carousel bandwidth by the playback rate of the target video. Assuming a target video with a duration of D = 120 minutes (min) and a playback rate of b, the total size of the target video is S = D * b. Taking the target video with a duration of D = 120 minutes (min) as an example, assuming a playback rate of b = 10 megabits per second (Mbps), the total size of the video is equal to 120 * 60 * 10 / 1024 / 8, which is approximately equal to 9 gigabytes (GB). Assuming the preset total carousel bandwidth B allocated to the target video is 4b, the preset total carousel bandwidth B = 40 Mbps, then the first number of carousel channels = 40 / 10 = 4, that is, the number of given carousel channels is 4, and the bandwidth of each carousel channel is 10 Mbps.
[0075] Step 102: construct an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels.
[0076] For example, each carousel channel corresponds to a leaf node, and the number of leaf nodes is also equal to the first number, and the initial tree structure is constructed based on the first number of leaf nodes. Figure 2 This is one of the schematic diagrams of the tree structure provided by the embodiment of the present invention, such as Figure 2 As shown, the parent node (root node) of the initial tree structure has 4 leaf nodes, and the leaf nodes are numbered L1, L2, L3 and L4 respectively. L1, L2, L3 and L4 form a current leaf set that can be increased or decreased. The parent node's selection period is set to 1, and the carousel channel corresponding to the leaf node L1 is numbered C1, the carousel channel corresponding to the leaf node L2 is numbered C2, the carousel channel corresponding to the leaf node L3 is numbered C3, and the carousel channel corresponding to the leaf node L4 is numbered C4. The carousel starting point of each channel is recorded as 0.
[0077] Step 103: Determine an arrangement of the video segments based on the initial tree structure, and determine a first number of the video segments based on the initial tree structure.
[0078] For example, all leaf nodes in the initial tree structure are grouped into a leaf set that can be increased or decreased, namely the current leaf set, and each leaf node in the current leaf set is traversed to determine the arrangement of the video segments and the first number of the video segments.
[0079] Step 104: Divide the target video into at least one video segment equally based on the first number of segments.
[0080] Preferably, the target video is equally divided into a plurality of video segments according to a second number of segments, and the second number of segments is less than or equal to the first number of segments.
[0081] For example, assuming there is a target video with a duration of D = 120 minutes (min), and the first number is equal to 120, then the target video can be equally divided into 120 video segments with a duration of 1 minute. In addition, each video segment can be numbered according to the playback order of the target video to obtain each video segment Si; where i is the number of the video segment; all video segments Si are connected in series in ascending order of numbers to form the target video; for example, the target video is divided into 120 segments, and each video segment is numbered S1, S2,..., S120 in sequence according to the playback order.
[0082] Step 105: Based on the arrangement of the video segments, periodically arrange the at least one video segment on the first number of carousel channels for broadcasting.
[0083] For example, based on the arrangement of each video segment, each segmented video segment is periodically arranged on the corresponding carousel channel, and then the corresponding video segment is broadcast on each carousel channel, so that the terminal can receive the corresponding video segment on each carousel channel and realize the playback of the video segment.
[0084] The video carousel method provided by the present invention determines a first number of carousel channels based on a preset total carousel bandwidth and the playback rate of a target video, determines an arrangement of video slices and a first number of video slices based on an initial tree structure constructed according to the first number, equally divides the target video into a plurality of video slices based on the first number of slices, and finally, based on the arrangement of the video slices, periodically arranges the plurality of video slices on the first number of carousel channels for broadcast. It can be seen that the number of carousel channels of the present invention is fixed, and the plurality of video slices are periodically arranged on the fixed number of carousel channels. The number of carousel channels does not increase as the number of video slices increases, thereby eliminating the need to consume a large amount of resources to maintain each carousel channel, thereby conserving resources.
[0085] In one embodiment, determining the first number of video segments based on the initial tree structure can be specifically implemented in the following manner:
[0086] Step a: for a video slice reference number i, traverse each leaf node in a current leaf set, determine a candidate period for each leaf node in the current leaf set, determine a target leaf node based on the candidate period for each leaf node, and assign the video slice reference number i to the target leaf node; the initial value of i is equal to 1;
[0087] Step b, adding a second number of new leaf nodes to the target leaf node, deleting the target leaf node from the current leaf set, adding the second number of new leaf nodes to the current leaf set, and updating the numbers of the previous leaf nodes in the current leaf set; the second number includes the candidate multiple of the target leaf node minus one;
[0088] Increment i by 1, and repeat step a and step b until the current leaf set is empty, and determine the current value of i as the first number of the video fragments.
[0089] Specifically, the numbering of the previous leaf nodes in the current leaf set is updated as follows:
[0090] The number of each leaf node in the current leaf set whose number is greater than the number of the target leaf node is increased by a target value; the target value is equal to the second number minus one.
[0091] In one embodiment, determining the candidate period for each leaf node in the current leaf set may be specifically implemented in the following manner:
[0092] For each leaf node, determining a candidate multiple of the leaf node based on a preset delay coefficient, the video segment reference number, and the candidate period of the parent node of the leaf node; the candidate period of the parent node of the initial tree structure is equal to 1;
[0093] The waiting period for selection of the leaf node is determined based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node.
[0094] Specifically, the candidate multiples of the leaf node are determined based on formula (1);
[0095] mji=(i+delay) / Tflj (1)
[0096] Wherein, mji represents the multiple to be selected of the leaf node, i represents the reference number of the video segment, delay represents the preset delay coefficient, and Tflj represents the period to be selected of the parent node of the leaf node;
[0097] Determine the candidate period of the leaf node based on formula (2);
[0098] Tji=mji*Tflj (2)
[0099] Wherein, the Tji represents the period of waiting for selection of the leaf node.
[0100] For example, assuming delay = 2, the waiting period of the parent node of the four leaf nodes (the root node of the initial tree structure) = 1, then the waiting multiples of the four leaf nodes = (1 + delay coefficient) / T = (1 + 2) / 1 = 3, the waiting period of the four leaf nodes = 3*T = 3, that is, the waiting period of the four leaf nodes is 3.
[0101] In one embodiment, the target leaf node is determined based on the candidate period of each leaf node, which can be specifically implemented in the following two ways:
[0102] The first way is to determine the leaf node corresponding to the maximum candidate cycle as the target leaf node.
[0103] Furthermore, when the number of leaf nodes corresponding to the maximum period to be selected is greater than 1, the leaf node with the smallest number among each leaf node corresponding to the maximum period to be selected is determined as the target leaf node.
[0104] For example, if the candidate periods of the four leaf nodes are all 3, the leaf node L1 with the smallest number is used as the target leaf node.
[0105] The second method is that when the video segment reference number is within a preset number range, at least one candidate leaf node is determined among all leaf nodes of the current leaf set, whose selection period is less than or equal to the video segment reference number and greater than a preset value; and the target leaf node is determined among the at least one candidate leaf node.
[0106] Specifically, the waiting period of the parent node corresponding to each of the to-be-selected leaf nodes is determined; and the to-be-selected leaf node corresponding to the parent node with the largest waiting period is determined as the target leaf node.
[0107] The preset number range can be set based on demand; the preset value is a value close to the video segment reference number. For example, when the video segment reference number is 4, the preset value can be 2 or 3.
[0108] For example, delay=1, the preset number range can be [4, 5]. When the video segment reference number is 4 and the preset value is 2, the video segment reference number is within the preset number range. If the current leaf set includes leaf nodes including leaf node L1, leaf node L2 and leaf node L3, where the waiting period of the parent node of leaf node L1 is 3, the waiting period of the parent node of leaf node L2 is 2, and the waiting period of the parent node of leaf node L3 is 1, then the waiting period of leaf node L1 is 3, the waiting period of leaf node L2 is 4, and the waiting period of leaf node L3 is 5. At this time, leaf node L1 and leaf node L2 are determined to be the to-be-selected leaf nodes. Since the to-be-selected period of the parent node of the to-be-selected leaf node L1 is greater than the to-be-selected period of the parent node of the to-be-selected leaf node L2, the to-be-selected leaf node L1 is finally selected as the target leaf node.
[0109] It should be noted that when the candidate periods of the parent nodes corresponding to each candidate leaf node are the same, a candidate leaf node is randomly selected from all the candidate leaf nodes as the target leaf node.
[0110] In one embodiment, the video carousel method further includes the following steps:
[0111] Determine the carousel starting point of the video segment corresponding to each leaf node in the current leaf set.
[0112] Specifically, based on formula (3), the carousel starting point of the video segment corresponding to each leaf node in the current leaf set is determined;
[0113] Sp=Sp0+Tflj*k (3)
[0114] Among them, Sp represents the carousel starting point of the video segment corresponding to the leaf node, Sp0 represents the carousel starting point of the video segment corresponding to the parent node of the leaf node, Tflj represents the waiting period of the parent node of the leaf node, and k represents the kth new leaf node added by the parent node of the leaf node.
[0115] In one embodiment, the above-mentioned determination of the arrangement of the video segments based on the initial tree structure can be specifically implemented in the following manner:
[0116] For each target leaf node, the video segment reference number, the arrangement period of the video segment, the number of the carousel channel, and the carousel starting point of the video segment corresponding to the target leaf node are determined as the arrangement mode of the target video segment; the arrangement period of the video segment is the waiting period of the target leaf node;
[0117] The number of the target video segment corresponds to the video segment reference number; and the at least one video segment is numbered based on a playback order.
[0118] The number of the carousel channel corresponding to each newly added leaf node in the current leaf set is the same as the number of the carousel channel corresponding to the parent node of the newly added leaf node.
[0119] Specifically, based on the video segment reference number assigned to the target leaf node, the arrangement period of the video segment, the number of the carousel channel, and the carousel starting point of the video segment, the target video segment corresponding to the video segment reference number is periodically arranged on the target carousel channel corresponding to the target leaf node.
[0120] The following example illustrates traversing the current leaf set to determine the arrangement of each video segment and the first number of video segments into which the target video needs to be evenly divided.
[0121] For example, a video slice reference number i is preset, and delay=2 is assumed. The target leaf nodes are allocated in order from the smallest to the largest video slice reference number.
[0122] Figure 3 This is a second schematic diagram of a tree structure provided by an embodiment of the present invention, such as Figure 3 As shown, when i=1, the waiting period T0 of the parent node of the four leaf nodes (the root node of the initial tree structure) is equal to 1, the waiting multiples of the four leaf nodes = (1+delay coefficient) / T0 = (1+2) / 1 = 3, the waiting period T of the four leaf nodes = 3*T0 = 3, that is, the waiting period of the four leaf nodes is 3. At this time, the leaf node with the smallest number can be assigned to i=1, that is, the leaf node L1 is determined as the target leaf node, and the leaf node L1 is assigned to the video segment reference number i=1, and the number C=1 of the carousel channel corresponding to the leaf node L1; at this time, the waiting multiple of the leaf node L1 is added to the leaf node L1 minus a new leaf node, that is, 3-1=2 new leaf nodes are added to the leaf node L1, and the leaf node L1 is deleted from the current leaf set and becomes the target leaf node. Point L1, that is, the target intermediate node M1, and record the video segment reference number i=1, arrangement period T=3, carousel channel number C=1 and carousel starting point SP0=0 assigned to the target intermediate node M1; number the two new leaf nodes L1 and L2, and add the new leaf nodes L1 and L2 to the current leaf set, wherein the carousel starting point Sp0=0+1*1=1 corresponding to the new leaf node L1, the carousel starting point Sp0=0+1*2=2 corresponding to the new leaf node L2, and the carousel channels corresponding to the new leaf node L1 and the new leaf node L2 have the same carousel channel number as the target intermediate node M1; in addition, the leaf node originally recorded as L2 is recorded as L3, the leaf node originally recorded as L3 is recorded as L4, and the leaf node originally recorded as L4 is recorded as L5.
[0123] Figure 4 This is the third schematic diagram of the tree structure provided by the embodiment of the present invention, such as Figure 4 As shown, when i=2, from Figure 3 It can be seen that the leaf nodes included in the current leaf set are L1 to L5, among which the to-be-selected multiples of L1 and L2 are both equal to 1, and the to-be-selected periods of L1 and L2 are both equal to 3; the to-be-selected multiples of L3 to L5 are both equal to 4, and the to-be-selected periods of L3 to L5 are both equal to 4. According to the order of the numbering of each leaf node in the current leaf set, the leaf node L3 is determined as the target leaf node, that is, the leaf node L3 is assigned to the video segment reference number i=2, and the number of the carousel channel corresponding to the leaf node L3 is C=2; at this time, the to-be-selected multiple of the leaf node L3 is added to the leaf node L3 minus a new leaf node, that is, 4-1=3 new leaf nodes are added to the leaf node L3, and the leaf node L3 is deleted from the current leaf set and becomes the target intermediate node M2, and the number assigned to the target intermediate node is recorded. The video segment reference number of node M2 is i=2, the arrangement period is T=4, the carousel channel number is C=2 and the carousel starting point SP0=0; the three new leaf nodes are numbered L3, L4 and L5, and the new leaf nodes L3, L4 and L5 are added to the current leaf set, among which the carousel starting point Sp0=0+1*1=1 corresponding to the new leaf node L3, the carousel starting point Sp0=0+1*2=2 corresponding to the new leaf node L4, and the carousel starting point Sp0=0+1*3=3 corresponding to the new leaf node L5; and the carousel channels corresponding to the new leaf nodes L3 to the new leaf nodes L5 are the same as the carousel channel numbers of the target intermediate node M2. In addition, the leaf node originally marked as L4 is marked as L6, and the leaf node originally marked as L5 is marked as L7.
[0124] Figure 5 This is a fourth diagram of a tree structure provided by an embodiment of the present invention, such as Figure 5 As shown, when i=3, from Figure 4It can be seen that the leaf nodes included in the current leaf set are L1 to L7, among which the to-be-selected multiples of L1 and L2 = (3+2) / 3 rounded down = 1, and the to-be-selected periods of L1 and L2 are both equal to 3; the to-be-selected multiples of L3 to L5 = (3+2) / 4 rounded down = 1, and the to-be-selected periods of L3 to L5 are both equal to 4, the to-be-selected multiples of L6 and L7 = (3+2) / 1 = 5, and the to-be-selected periods of L6 and L7 are both equal to 5; according to the order in which each leaf node in the current leaf set is numbered, the leaf node L6 is determined as the target leaf node, that is, the leaf node L6 is assigned to the video segment reference number i = 3, and the carousel channel number C = 3 corresponding to the leaf node L6; at this time, the to-be-selected multiple of the leaf node L6 is added to the leaf node L6 minus a new leaf node, that is, 5-1 = 4 new leaf nodes are added to the leaf node L6. Leaf node, delete the leaf node L6 from the current leaf set and change it to the target intermediate node M3, and record the video segment reference number i=3, arrangement period T=5, carousel channel number C=3 and carousel starting point SP0=0 assigned to the target intermediate node M3; number the 4 new leaf nodes L6, L7, L8 and L9, and add the new leaf nodes L6, L7, L8 and L9 to the current leaf set, among which the carousel starting point Sp0=0+1*1=1 corresponding to the new leaf node L6, the carousel starting point Sp0=0+1*2=2 corresponding to the new leaf node L7, the carousel starting point Sp0=0+1*3=3 corresponding to the new leaf node L8, and the carousel starting point Sp0=0+1*4=4 corresponding to the new leaf node L9; in addition, the leaf node originally recorded as L7 is recorded as L10.
[0125] Figure 6 This is a fifth diagram of a tree structure provided by an embodiment of the present invention, such as Figure 6As shown, when i=4, the leaf nodes included in the current leaf set are L1 to L10, among which, the to-be-selected multiples of L1 and L2=(4+2) / 3=2, and the to-be-selected periods of L1 and L2 are both equal to 6; the to-be-selected multiples of L3 to L5=(4+2) / 4 rounded down to 1, and the to-be-selected periods of L3 to L5 are both equal to 4, the to-be-selected multiples of L6 to L9=(4+2) / 5 rounded down to 1, and the to-be-selected periods of L6 to L9 are both equal to 5, the to-be-selected multiple of L10=(4+2) / 1=6, and the to-be-selected period of L10 is equal to 6; according to the order in which each leaf node in the current leaf set is numbered, the leaf node L1 with the smallest number is determined as the target leaf node, that is, the leaf node L1 is determined as the target leaf node, that is, The leaf node L1 is assigned to the video segment reference number i=4, and the carousel channel number C=1 corresponding to the leaf node L1; at this time, the leaf node L1 is added with the selected multiple of the leaf node L1 minus a new leaf node, that is, 2-1=1 new leaf nodes are added to the leaf node L1, and the leaf node L1 is deleted from the current leaf set and becomes the target intermediate node M4, and the video segment reference number i=4, arrangement period T=6, carousel channel number C=1 and carousel starting point SP0=1 assigned to the target intermediate node M4 are recorded; a new leaf node is numbered L1, and the new leaf node L1 is added to the current leaf set, wherein the carousel starting point Sp0=0+1*1=1 corresponding to the new leaf node L1.
[0126] The following allocations are repeated in this way until the current leaf set is empty. At this point, if i = 120, the first number of shares is 120, and the target video can be evenly divided into 120 or fewer video segments. The video segment reference number, arrangement period, carousel channel number, and carousel start point recorded at each target leaf node represent the arrangement of the corresponding video segments.
[0127] For example, the target intermediate node M1 records the video slice reference number i=1, the arrangement period T=3, the carousel channel number C=1 and the carousel starting point SP0=0, then a video slice S1 is arranged on the carousel channel numbered 1 according to the arrangement period 3; the target intermediate node M2 records the video slice reference number i=2, the arrangement period T=4, the carousel channel number C=2 and the carousel starting point SP0=0, then the second video slice S2 is arranged on the carousel channel numbered 2 according to the arrangement period 4; the target intermediate node M3 records the video slice reference number i=3, the arrangement period T=5, the carousel channel number C=3 and the carousel starting point SP0=0, then the third video slice S3 is arranged on the carousel channel numbered 3 according to the arrangement period 5, and so on.
[0128] According to the above method, the periodic arrangement of the video segments on all the carousel channels is completed. Figure 7 is a schematic diagram of the arrangement of all video segments on each carousel channel provided by an embodiment of the present invention. Figure 7 The figure shows the periodic arrangement of each video segment corresponding to the four carousel channels. For example, video segment S1 is arranged on the carousel channel C1. Since the arrangement period of video segment S1 is 3, a video segment S1 is arranged every 3 times on the carousel channel C1 to achieve the periodic arrangement of video segment S1 on the carousel channel C1. The arrangement of other video segments is similar to that of video segment S1. Figure 7 shown.
[0129] The video carousel method provided by the embodiment of the present invention adopts a vertical dense slicing method, and simultaneously places multiple slices in the same channel for broadcasting, allowing multiple users to share channel resources, which not only reduces the overall video data traffic, but also effectively reduces the number of channels required for video transmission, greatly saving the additional overhead required for maintaining the transmission channel, and ensuring the feasibility of engineering implementation; in addition, the present invention sets a reasonable preset delay coefficient, so that the number of determined video slices is larger, thereby shortening the user's waiting time.
[0130] Figure 8 This is a second flow chart of the video carousel method provided by an embodiment of the present invention. Figure 8 As shown, the video carousel method includes the following steps:
[0131] Step 801: Generate a video download request based on a video-on-demand request.
[0132] For example, when a user needs to play a target video on demand, he or she can click the on-demand control on the corresponding interface, so that the terminal receives the on-demand request and generates a video download request based on the on-demand request. The video download request is used to request downloading of the target video.
[0133] Step 802: Using the generation time of the video download request as the starting time, detect the carousel starting point of each video segment broadcast in each carousel channel within each preset duration; the preset duration is the duration of each video segment.
[0134] For example, when a video download request is generated, the generation time of the video download request is recorded, and timing is started with the generation time as the starting time. Within each preset time period, the carousel starting point of each video segment broadcast in each carousel channel is detected.
[0135] Step 803: For each of the video segments, download the video segment based on the carousel start point of the video segment.
[0136] For example, when the carousel start point of each video segment is detected, the video segment is downloaded based on the bandwidth of the carousel channel broadcasting the video segment starting from the carousel start point, and the downloaded video segment is stored and played.
[0137] Optionally, after step 803, the video carousel method further includes the following steps:
[0138] Determining a start time for playing the video segment based on a preset delay coefficient, a start time for downloading the video segment, and the preset duration;
[0139] The video segment is played based on the start playback time.
[0140] For example, to ensure continuous video playback, the user's viewing start time must be delayed relative to the download start time. Assume that the user places a request for a video at time T0, and downloading of the target video segments begins at time T1. Each segment has a preset duration of d, and the delay factor is delay. Then, the user will start watching the target video at time T2 = T1 + delay * d, achieving uninterrupted viewing of the target video. Figure 9 This is a schematic diagram of a time series provided by an embodiment of the present invention, such as Figure 9 As shown, when delay=2, the user plays the target video at time T0, downloads the data at time T1, and watches the target video at time T2.
[0141] Figure 10 FIG. 1 is a structural diagram of a video carousel device provided by an embodiment of the present invention. Figure 10 As shown, the video carousel device includes a first determining unit 1001, a constructing unit 1002, a second determining unit 1003, a third determining unit 1004 and an arranging unit 1005; wherein:
[0142] The first determining unit 1001 is configured to determine a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each carousel channel is equal to the playback rate of the target video;
[0143] A construction unit 1002 is configured to construct an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0144] A second determining unit 1003 is configured to determine an arrangement of the video segments based on the initial tree structure, and determine a first number of the video segments based on the initial tree structure;
[0145] A third determining unit 1004 is configured to determine at least one video segment of the target video based on the first number of segments;
[0146] The arranging unit 1005 is configured to periodically arrange the at least one video segment on the first number of carousel channels for broadcasting based on the arrangement of the video segments.
[0147] The video carousel device provided by the present invention determines a first number of carousel channels based on a preset total carousel bandwidth and the playback rate of a target video, determines a video slice arrangement and a first number of video slices based on an initial tree structure constructed according to the first number, equally divides the target video into a plurality of video slices based on the first number of slices, and finally, based on the arrangement of the video slices, periodically arranges the plurality of video slices on the first number of carousel channels for broadcast. It can be seen that the number of carousel channels of the present invention is fixed, and the plurality of video slices are periodically arranged on the fixed number of carousel channels. The number of carousel channels does not increase as the number of video slices increases, thereby eliminating the need to consume a large amount of resources to maintain each carousel channel, thereby conserving resources.
[0148] Based on any of the foregoing embodiments, the second determining unit 1003 is specifically configured to:
[0149] Step a: for a video slice reference number i, traverse each leaf node in a current leaf set, determine a candidate period for each leaf node in the current leaf set, determine a target leaf node based on the candidate period for each leaf node, and assign the video slice reference number i to the target leaf node; the initial value of i is equal to 1;
[0150] Step b, adding a second number of new leaf nodes to the target leaf node, deleting the target leaf node from the current leaf set, adding the second number of new leaf nodes to the current leaf set, and updating the numbers of the previous leaf nodes in the current leaf set; the second number includes the candidate multiple of the target leaf node minus one;
[0151] Increment i by 1, and repeat step a and step b until the current leaf set is empty, and determine the current value of i as the first number of the video fragments.
[0152] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0153] For each leaf node, determining a candidate multiple of the leaf node based on a preset delay coefficient, the video segment reference number, and the candidate period of the parent node of the leaf node; the candidate period of the parent node of the initial tree structure is equal to 1;
[0154] The waiting period for selection of the leaf node is determined based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node.
[0155] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0156] Determine the candidate multiples of the leaf node based on formula (1);
[0157] mji=(i+delay) / Tflj (1)
[0158] Wherein, mji represents the multiple to be selected of the leaf node, i represents the reference number of the video segment, delay represents the preset delay coefficient, and Tflj represents the period to be selected of the parent node of the leaf node;
[0159] Determine the candidate period of the leaf node based on formula (2);
[0160] Tji=mji*Tflj (2)
[0161] Wherein, the Tji represents the period of waiting for selection of the leaf node.
[0162] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0163] Determine the leaf node corresponding to the maximum candidate cycle as the target leaf node; or,
[0164] When the video segment reference number is within a preset number range, determining at least one to-be-selected leaf node from among all leaf nodes of the current leaf set, the to-be-selected period of which is less than or equal to the video segment reference number and greater than a preset value;
[0165] The target leaf node is determined among the at least one to-be-selected leaf node.
[0166] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0167] Determine the waiting period for selection of the parent node corresponding to each of the leaf nodes to be selected;
[0168] The to-be-selected leaf node corresponding to the parent node with the largest to-be-selected period is determined as the target leaf node.
[0169] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0170] The number of each leaf node in the current leaf set whose number is greater than the number of the target leaf node is increased by a target value; the target value is equal to the second number minus one.
[0171] Based on any of the foregoing embodiments, the second determining unit 1003 is further specifically configured to:
[0172] When the number of leaf nodes corresponding to the maximum candidate cycle is greater than 1, the leaf node with the smallest number among each leaf node corresponding to the maximum candidate cycle is determined as the target leaf node.
[0173] Based on any of the above embodiments, the device further includes:
[0174] A fourth determining unit, configured to determine a carousel start point of a video segment corresponding to each leaf node in the current leaf set;
[0175] The arrangement unit 1005 is specifically used for:
[0176] For each target leaf node, the video segment reference number, the arrangement period of the video segment, the number of the carousel channel, and the carousel starting point of the video segment corresponding to the target leaf node are determined as the arrangement mode of the target video segment; the arrangement period of the video segment is the waiting period of the target leaf node;
[0177] The number of the target video segment corresponds to the video segment reference number; and the at least one video segment is numbered based on a playback order.
[0178] Based on any of the foregoing embodiments, the fourth determining unit is specifically configured to:
[0179] Determine the carousel starting point of the video segment corresponding to each leaf node in the current leaf set based on formula (3);
[0180] Sp=Sp0+Tflj*k (3)
[0181] Among them, Sp represents the carousel starting point of the video segment corresponding to the leaf node, Sp0 represents the carousel starting point of the video segment corresponding to the parent node of the leaf node, Tflj represents the waiting period of the parent node of the leaf node, and k represents the kth new leaf node added by the parent node of the leaf node.
[0182] The video carousel device provided by the present invention is described below. The video carousel device described below and the video carousel method described above can be referenced to each other.
[0183] Figure 11 FIG is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Figure 11As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other via the communication bus 1140. The processor 1110 may call logic instructions in the memory 1130 to execute a video carousel method, which includes: determining a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each of the carousel channels is equal to the playback rate of the target video;
[0184] constructing an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0185] Determining an arrangement of the video segments based on the initial tree structure, and determining a first number of the video segments based on the initial tree structure;
[0186] Based on the first number of portions, the target video is equally divided into at least one video segment;
[0187] Based on the arrangement of the video segments, the at least one video segment is periodically arranged and broadcasted on the first number of carousel channels.
[0188] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0189] On the other hand, the present invention further provides a computer program product, comprising a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the video carousel method provided by each of the above methods, the method comprising: determining a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each of the carousel channels being equal to the playback rate of the target video;
[0190] constructing an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0191] Determining an arrangement of the video segments based on the initial tree structure, and determining a first number of the video segments based on the initial tree structure;
[0192] Based on the first number of portions, the target video is equally divided into at least one video segment;
[0193] Based on the arrangement of the video segments, the at least one video segment is periodically arranged and broadcasted on the first number of carousel channels.
[0194] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program is implemented to perform the video carousel method provided by the above methods, the method comprising: determining a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each of the carousel channels being equal to the playback rate of the target video;
[0195] constructing an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; each leaf node corresponds to one of the carousel channels;
[0196] Determining an arrangement of the video segments based on the initial tree structure, and determining a first number of the video segments based on the initial tree structure;
[0197] Based on the first number of portions, the target video is equally divided into at least one video segment;
[0198] Based on the arrangement of the video segments, the at least one video segment is periodically arranged and broadcasted on the first number of carousel channels.
[0199] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0200] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A video carousel method, characterized in that: include: Determining a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each of the carousel channels is equal to the playback rate of the target video; constructing an initial tree structure based on the first number; the initial tree structure includes the first number of leaf nodes; Each of the leaf nodes corresponds to one of the carousel channels; Determining an arrangement of the video segments based on the initial tree structure, and determining a first number of the video segments based on the initial tree structure; Based on the first number of portions, the target video is equally divided into at least one video segment; Based on the arrangement of the video slices, periodically arrange the at least one video slice on the first number of carousel channels for broadcasting; The determining a first number of video segments based on the initial tree structure includes: Step a: for a video slice reference number i, traverse each leaf node in a current leaf set, determine a candidate period for each leaf node in the current leaf set, determine a target leaf node based on the candidate period for each leaf node, and assign the video slice reference number i to the target leaf node; the initial value of i is equal to 1; Step b, adding a second number of new leaf nodes to the target leaf node, deleting the target leaf node from the current leaf set, adding the second number of new leaf nodes to the current leaf set, and updating the numbers of the previous leaf nodes in the current leaf set; the second number includes the candidate multiple of the target leaf node minus one; Increment i by 1, and repeat step a and step b until the current leaf set is empty, and determine the current value of i as the first number of the video fragments.
2. The video carousel method according to claim 1, wherein: The step of determining a candidate period for each leaf node in the current leaf set includes: For each leaf node, determining a candidate multiple of the leaf node based on a preset delay coefficient, the video segment reference number, and the candidate period of the parent node of the leaf node; the candidate period of the parent node of the initial tree structure is equal to 1; The waiting period for selection of the leaf node is determined based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node.
3. The video carousel method according to claim 2, wherein: The determining the candidate multiple of the leaf node based on the preset delay coefficient, the video slice reference number and the candidate period of the parent node of the leaf node includes: Determine the candidate multiples of the leaf node based on formula (1); mji=(i+delay) / Tflj (1) Wherein, mji represents the multiple to be selected of the leaf node, i represents the reference number of the video segment, delay represents the preset delay coefficient, and Tflj represents the period to be selected of the parent node of the leaf node; The determining the waiting period for selection of the leaf node based on the waiting multiple of the leaf node and the waiting period for selection of the parent node of the leaf node includes: Determine the candidate period of the leaf node based on formula (2); Tji=mji*Tflj (2) Wherein, the Tji represents the period of waiting for selection of the leaf node.
4. The video carousel method according to claim 1, wherein: The step of determining a target leaf node based on the candidate period of each leaf node includes: Determine the leaf node corresponding to the maximum candidate cycle as the target leaf node; or, When the video segment reference number is within a preset number range, determining at least one to-be-selected leaf node from among all leaf nodes of the current leaf set, the to-be-selected period of which is less than or equal to the video segment reference number and greater than a preset value; The target leaf node is determined among the at least one to-be-selected leaf node.
5. The video carousel method according to claim 4, characterized in that: The step of determining the target leaf node from the at least one to-be-selected leaf node comprises: Determine the waiting period for selection of the parent node corresponding to each of the leaf nodes to be selected; The to-be-selected leaf node corresponding to the parent node with the largest to-be-selected period is determined as the target leaf node.
6. The video carousel method according to claim 1, wherein: The updating of the numbers of the previous leaf nodes in the current leaf set includes: The number of each leaf node in the current leaf set whose number is greater than the number of the target leaf node is increased by a target value; the target value is equal to the second number minus one.
7. The video carousel method according to claim 4, characterized in that: The step of determining the leaf node corresponding to the maximum candidate cycle as the target leaf node includes: When the number of leaf nodes corresponding to the maximum candidate cycle is greater than 1, the leaf node with the smallest number among each leaf node corresponding to the maximum candidate cycle is determined as the target leaf node.
8. The video carousel method according to claim 1, wherein: The method further comprises: Determine a carousel start point of the video segment corresponding to each leaf node in the current leaf set; The determining of an arrangement of the video segments based on the initial tree structure includes: For each target leaf node, the video segment reference number, the arrangement period of the video segment, the number of the carousel channel, and the carousel starting point of the video segment corresponding to the target leaf node are determined as the arrangement mode of the target video segment; the arrangement period of the video segment is the waiting period of the target leaf node; The number of the target video segment corresponds to the video segment reference number; and the at least one video segment is numbered based on a playback order.
9. The video carousel method according to claim 8, characterized in that: Determining the carousel starting point of the video segment corresponding to each leaf node in the current leaf set includes: Determine the carousel starting point of the video segment corresponding to each leaf node in the current leaf set based on formula (3); Sp=Sp0+Tflj*k (3) Among them, Sp represents the carousel starting point of the video segment corresponding to the leaf node, Sp0 represents the carousel starting point of the video segment corresponding to the parent node of the leaf node, Tflj represents the waiting period of the parent node of the leaf node, and k represents the kth new leaf node added by the parent node of the leaf node.
10. A video carousel device, characterized in that: include: A first determining unit is configured to determine a first number of carousel channels based on a preset total carousel bandwidth and a playback rate of a target video; the bandwidth of each carousel channel is equal to the playback rate of the target video; A construction unit, configured to construct an initial tree structure based on the first quantity; The initial tree structure includes the first number of leaf nodes; Each of the leaf nodes corresponds to one of the carousel channels; a second determining unit, configured to determine an arrangement of the video segments based on the initial tree structure, and determine a first number of the video segments based on the initial tree structure; a third determining unit, configured to determine at least one video segment of the target video based on the first number; an arranging unit, configured to periodically arrange the at least one video segment on the first number of carousel channels for broadcasting based on the arrangement of the video segments; The second determining unit is specifically configured to: Step a: for a video slice reference number i, traverse each leaf node in a current leaf set, determine a candidate period for each leaf node in the current leaf set, determine a target leaf node based on the candidate period for each leaf node, and assign the video slice reference number i to the target leaf node; the initial value of i is equal to 1; Step b, adding a second number of new leaf nodes to the target leaf node, deleting the target leaf node from the current leaf set, adding the second number of new leaf nodes to the current leaf set, and updating the numbers of the previous leaf nodes in the current leaf set; the second number includes the candidate multiple of the target leaf node minus one; Increment i by 1, and repeat step a and step b until the current leaf set is empty, and determine the current value of i as the first number of the video fragments.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the video carousel method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the video carousel method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the video carousel method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
A method, an apparatus and a computer readable storage medium for video streaming
CN107113476A
Video information carousel method and device and video information receiving method and device
CN111263221A