Panoramic video distribution method and system based on user characteristics
Technical Field
The invention relates to the technical field of panoramic video distribution, in particular to a panoramic video distribution method and a panoramic video distribution system based on user characteristics.
Background
The panoramic video can provide dynamic real-time video information while providing omnidirectional visual information, so that people can see the whole dynamic scene surrounding the camera. Panoramas are typically large resolution images, the generation of which requires a significant amount of computational effort. Compared with a panoramic image, the panoramic video adds a new time dimension. Therefore, the amount of computation and data will be tens of times larger than that of the panoramic view, which is a great challenge to the processing power of the hardware system and the working efficiency of the software system. When the code stream of the panoramic video is distributed and transmitted, great pressure is exerted on the bandwidth of the network, and the mobile network with extremely limited bandwidth is extremely challenging.
Disclosure of Invention
The embodiment of the invention aims to provide a panoramic video distribution method based on user characteristics, and aims to solve the problem that in the prior art, when the code stream of a panoramic video is distributed and transmitted, the network bandwidth pressure is overlarge.
The embodiment of the invention is realized in such a way that a panoramic video distribution method based on user characteristics comprises the following steps:
step A: arranging the multi-path spliced code streams of the panoramic video according to the order of the collection visual angles of the cameras, and recording the sequence of the multi-path spliced code streams of the panoramic video after the ordering as { stream1,stream2,...,streamN-1,streamNAnd recording the corresponding camera acquisition view angle sequence as { theta }1,θ2,...,θN-1,θN};
And B: sending const second panoramic video multi-path code streamn;
And C: within the const second time window, the mark visual angle in the time window is sent
Step D: if the panoramic video multi-path code streamnE, if the code stream in the nt +1 time window exists, entering the step E; otherwise, ending the distribution of the multi-path code stream of the panoramic video;
step E: if it is not
If yes, entering step F; otherwise, let nt be nt +1, determine const,
re-entering the step B;
step F: if user inertia parameter signuseThe absolute value is equal to 1, the inertial parameter sign of the user is not calculateduseDirectly entering step G; otherwise, firstly calculating the inertial parameter sign of the useruseThen entering step G;
step G: according to inertial parameters sign of useruseAdaptively distributing multi-path code streams of the panoramic video;
step H: let nt be nt +1, determine const,
re-enter step C.
Wherein, streamnThe method comprises the steps that the nth spliced code streams are arranged according to the order of camera collecting visual angles, N represents the number of the spliced code streams, and N is 1, 2. ThetanRepresents streamnA corresponding camera collects a visual angle;
const represents a time window duration parameter; nt denotes a time window index;
referred to as the nth time window marks the view angle,
referred to as the nt-1 st time window marks the view angle;
respectively representing the upper time limit and the lower time limit of the nth time window.
Another objective of an embodiment of the present invention is to provide a panoramic video distribution system based on user characteristics, where the system includes:
a splicing code stream arrangement module for arranging the multi-path splicing code streams of the panoramic video according to the sequence of the collection visual angles of the cameras, and recording the multi-path splicing code stream sequence of the panoramic video after sequencing as a sequence
{stream1,stream2,...,streamN-1,streamNAnd recording the corresponding camera acquisition view angle sequence as { theta }1,θ2,...,θN-1,θN};
A code stream sending module for sending const second panoramic video multi-path code streamn;
A mark visual angle sending module for sending the mark visual angle in the time window in the const second time window
A first judgment processing module for judging if the panoramic video multi-path code stream is streamnIf the code stream in the nt +1 time window exists, entering a second judgment processing module; otherwise, ending the distribution of the multi-path code stream of the panoramic video;
a second judgment processing module for judging if
If yes, entering a third judgment processing module; otherwise, entering a first setting module;
a first setting module, configured to set nt to nt +1, determine const,
re-entering the code stream sending module;
a third judgment processing module for judging if the user inertia parameter signuseIf the absolute value is equal to 1, directly entering a code stream self-adaptive distribution device; otherwise, entering a user inertia parameter calculation module;
a user inertia parameter calculation module for firstly calculating a user inertia parameter signuseThen entering a code stream self-adaptive distribution device;
a code stream self-adaptive distribution device for distributing the code stream according to the user inertia parameter signuseAdaptively distributing multi-path code streams of the panoramic video;
a second setting module, configured to make nt equal to nt +1, determine const,
re-entering the mark visual angle sending module;
wherein, streamnThe method comprises the steps that the nth spliced code streams are arranged according to the order of camera collecting visual angles, N represents the number of the spliced code streams, and N is 1, 2. ThetanRepresents streamnA corresponding camera collects a visual angle;
const represents a time window duration parameter; nt denotes a time window index;
referred to as the nth time window marks the view angle,
referred to as the nt-1 st time window marks the view angle;
respectively representing the upper time limit and the lower time limit of the nth time window.
The invention has the advantages of
The invention provides a panoramic video distribution method and system based on user characteristics. The method of the invention utilizes the continuity of the watching characteristics of the user to carry out self-adaptive distribution on the multi-path code stream spliced by the panoramic video. Therefore, the panoramic video can distribute the code stream as required when the network is congested, the watching effect of audiences is not influenced, and the smoothness of playing the panoramic video is improved.
Drawings
Fig. 1 is a flowchart of a panoramic video distribution method based on user characteristics according to a preferred embodiment of the present invention;
FIG. 2 is a flowchart of the detailed method of Step6 in FIG. 1;
fig. 3 is a diagram of a panoramic video distribution system architecture based on user characteristics in accordance with a preferred embodiment of the present invention;
fig. 4 is a detailed structural diagram of the code stream adaptive distribution apparatus in fig. 3.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples, and for convenience of description, only parts related to the examples of the present invention are shown. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a panoramic video distribution method and system based on user characteristics. The method of the embodiment of the invention utilizes the continuity of the watching characteristics of the user to carry out self-adaptive distribution on the multi-channel code stream spliced by the panoramic video. Therefore, the panoramic video can distribute the code stream as required when the network is congested, the watching effect of audiences is not influenced, and the smoothness of playing the panoramic video is improved.
Example one
Fig. 1 is a flowchart of a panoramic video distribution method based on user characteristics according to a preferred embodiment of the present invention; the method comprises the following steps:
step 0: arranging multi-path spliced code streams of the panoramic video according to the sequence of the acquisition visual angles of the cameras, and recording the sequence of the multi-path spliced code streams of the panoramic video after the sequence as
{stream1,stream2,...,streamN-1,streamNAnd recording the corresponding camera acquisition view angle sequence as { theta }1,θ2,...,θN-1,θN}。
Wherein, streamnThe method comprises the steps that the nth spliced code streams are arranged according to the order of camera collecting visual angles, N represents the number of the spliced code streams, and N is 1, 2. ThetanRepresents streamnA corresponding camera collects a visual angle; the arrangement according to the camera collection visual angle sequence can be arranged in an ascending order or a descending order, and for the convenience of expression, the text adopts an ascending arrangement mode, namely theta1<θ2<......<θN-1<θN。
Step 1: sending const second panoramic video multi-path code streamn,n=1,2,...,N。
Wherein the content of the first and second substances,
const represents a time window duration parameter; t is t
0The initial buffering time of the sending code stream is shown, and can be 3-6 seconds generally; t is t
cRepresenting the buffering time of the sending code stream; nt denotes a time window index and has an initial value of 1.
Step 2: within the const second time window, the mark visual angle in the time window is sent
Wherein the content of the first and second substances,
referred to as the nth time window marks the view angle,
indicating the upper and lower visual angle limits for the nth time window,
max (variable | condition) represents minimum and maximum values of variables satisfying the condition; t tableShowing a time variable;
respectively representing the upper time limit and the lower time limit of the nth time window,
step 3: if the panoramic video multi-path code streamnIf the code stream in the nt +1 time window exists, the Step4 is entered; otherwise, ending the distribution of the panoramic video multi-path code stream.
Step 4: if it is not
If yes, go to Step 5; otherwise, let nt be nt +1, determine const,
re-enters
Step 1.
Wherein the content of the first and second substances,
the nt-1 th time window marks the view angle.
Step 5: if user inertia parameter signuseThe absolute value is equal to 1, the inertial parameter sign of the user is not calculateduseDirectly to Step 6; otherwise, firstly calculating the inertial parameter sign of the useruseAnd then proceeds to Step 6.
"calculating user inertial parameters signuseThe method comprises the following steps:
step 1: if it is not
And is
Let tempu be tempu + 1; otherwise if it is not
And is
Let temp + 1; otherwise, directly entering the
step 2;
Wherein, Thres1、Thres2Respectively representing a first and a second decision threshold; abs (variable) means the absolute value of a variable; tempu and tempd respectively represent a first angle transformation statistic and a second angle transformation statistic, and the initial values are 0; signuseRepresenting the user inertial parameter, and the initial value is 0.
Step 6: according to inertial parameters sign of useruseAnd adaptively distributing multi-path code streams of the panoramic video.
FIG. 2 is a flowchart of the detailed method of Step6 in FIG. 1; the method specifically comprises the following steps:
step 61: calculate the sequence of angular differences, note
Step 62: first, d θ is calculatedminu=min(dθn|dθn>0, N ═ 1,2,. cndot., N), and then find d θminuCorresponding camera acquisition angle, noted as θnowAnd the corresponding code stream is marked as streamnow;dθminuIs a temporary variable;
step 63: will streamnowAnd streamnowThe subsequent code stream is sequentially put into a right code stream sequence table, and is marked as table (stream) ═ streamnow,streamnow+1,streamnow+2,...,streamNThen stream is addednowThe former code stream is put into the left code stream sequence table in reverse order and is marked as available ═ streamnow-1,streamnow-2,streamnow-3,...,stream1}
Step 64: if signuseIf the video is 1, constructing a multi-path code stream distribution sequence table of the panoramic video according to the first direction; otherwise, if signuseIf the panoramic video is-1, constructing a panoramic video multi-path code stream distribution sequence table according to a second direction; otherwise, constructing a panoramic video multi-path code stream distribution sequence table according to a third direction.
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the first direction comprises the following steps:
according to the structural rule that numu tableu code streams are firstly generated and then numd tabled code streams are generated, a panoramic video multi-path code stream distribution sequence table is constructed, wherein numu > numd is required, and the following steps are exemplified: numu-2, numd-1
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the second direction comprises the following steps:
according to the structural rule that num d tabled code streams are firstly arranged and num u tableu code streams are secondly arranged, a panoramic video multi-path code stream distribution sequence table is constructed, wherein num d is required to be greater than num, for example: numd-2, numu-1
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the third direction comprises the following steps:
according to the structural rule of 1 tabled code stream first and 1 tableu code stream later, a multi-path code stream distribution sequence table of the panoramic video is constructed, or according to the structural rule of 1 tableu code stream first and 1 tabled code stream later, a multi-path code stream distribution sequence table of the panoramic video is constructed; for example, the following steps are carried out:
step 65: and sequentially transmitting the code streams in nt +1 time windows corresponding to the multi-path code streams of the panoramic video according to the sequence of the multi-path code stream distribution sequence table of the panoramic video.
Step 7: let nt be nt+1, determining the const,
re-enters Step 2.
Example two
Fig. 3 is a diagram of a panoramic video distribution system architecture based on user characteristics in accordance with a preferred embodiment of the present invention; the system comprises:
a splicing code stream arrangement module for arranging the multi-path splicing code streams of the panoramic video according to the sequence of the collection visual angles of the cameras, and recording the multi-path splicing code stream sequence of the panoramic video after sequencing as a sequence
{stream1,stream2,...,streamN-1,streamNAnd recording the corresponding camera acquisition view angle sequence as { theta }1,θ2,...,θN-1,θN}。
Wherein, streamnThe method comprises the steps that the nth spliced code streams are arranged according to the order of camera collecting visual angles, N represents the number of the spliced code streams, and N is 1, 2. ThetanRepresents streamnA corresponding camera collects a visual angle; the arrangement according to the camera collection visual angle sequence can be arranged in an ascending order or a descending order, and for the convenience of expression, the text adopts an ascending arrangement mode, namely theta1<θ2<......<θN-1<θN。
A code stream sending module for sending const second panoramic video multi-path code streamn,n=1,2,...,N。
Wherein the content of the first and second substances,
const represents a time window duration parameter; t is t
0The initial buffering time of the sending code stream is shown, and can be 3-6 seconds generally; t is t
cRepresenting the buffering time of the sending code stream; nt denotes a time window index and has an initial value of 1.
A mark view sending module for sending the mark view in the const second time window
Wherein the content of the first and second substances,
referred to as the nth time window marks the view angle,
indicating the upper and lower visual angle limits for the nth time window,
max (variable | condition) represents minimum and maximum values of variables satisfying the condition; t represents a time variable;
respectively representing the upper time limit and the lower time limit of the nth time window,
a first judgment processing module for judging if the panoramic video multi-path code stream is streamnIf the code stream in the nt +1 time window exists, entering a second judgment processing module; otherwise, ending the distribution of the panoramic video multi-path code stream.
A second judgment processing module for judging if
If yes, entering a third judgment processing module; otherwise, entering a first setting module;
wherein the content of the first and second substances,
referred to as the nt-1 time windowAnd marking the visual angle.
A first setting module, configured to set nt to nt +1, determine const,
and re-entering the code stream sending module.
A third judgment processing module for judging if the user inertia parameter signuseIf the absolute value is equal to 1, directly entering a code stream self-adaptive distribution device; otherwise, entering a user inertia parameter calculation module;
a user inertia parameter calculation module for firstly calculating a user inertia parameter signuseAnd then entering a code stream self-adaptive distribution device.
"calculating user inertial parameters signuseThe method comprises the following steps:
step 1: if it is not
And is
Let tempu be tempu + 1; otherwise if it is not
And is
Let temp + 1; otherwise, directly entering the
step 2;
Wherein, Thres1、Thres2Respectively representing a first and a second decision threshold; abs (variable) means the absolute value of a variable; tempu and tempd respectively represent a first angle transformation statistic and a second angle transformation statistic, and the initial values are 0; signuseRepresenting the user inertial parameter, and the initial value is 0.
A code stream self-adaptive distribution device for distributing the code stream according to the user inertia parameter signuseAnd adaptively distributing multi-path code streams of the panoramic video.
A second setting module, configured to make nt equal to nt +1, determine const,
re-entering the mark view angle sending module.
Further, fig. 4 is a detailed structure diagram of the code stream adaptive distribution apparatus in fig. 3, where the code stream adaptive distribution apparatus further includes:
an angle difference sequence calculating module for calculating the angle difference sequence and recording as
n=1,2,...,N;
A temporary camera acquisition angle and corresponding code stream acquisition module for firstly calculating d thetaminu=min(dθn|dθn>0, N ═ 1,2,. cndot., N), and then find d θminuCorresponding camera acquisition angle, noted as θnowAnd the corresponding code stream is marked as streamnow;dθminuIs a temporary variable;
a code stream sequence list setting module for streamnowAnd streamnowThe subsequent code stream is sequentially put into a right code stream sequence table and recorded as
tableu={streamnow,streamnow+1,streamnow+2,...,streamNThen stream is addednowThe former code stream is put into the left code stream sequence table in reverse order and is recorded as
tabled={streamnow-1,streamnow-2,streamnow-3,...,stream1}
A code stream distribution sequence table construction module used for sign ifuseIf the video is 1, constructing a multi-path code stream distribution sequence table of the panoramic video according to the first direction; otherwise, if signuseIf the panoramic video is-1, constructing a panoramic video multi-path code stream distribution sequence table according to a second direction; otherwise, constructing a panoramic video multi-path code stream distribution sequence table according to a third direction.
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the first direction comprises the following steps:
according to the structural rule that numu tableu code streams are firstly generated and then numd tabled code streams are generated, a panoramic video multi-path code stream distribution sequence table is constructed, wherein numu > numd is required, and the following steps are exemplified: numu-2, numd-1
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the second direction comprises the following steps:
according to the structural rule that num d tabled code streams are firstly arranged and num u tableu code streams are secondly arranged, a panoramic video multi-path code stream distribution sequence table is constructed, wherein num d is required to be greater than num, for example: numd-2, numu-1
The method for constructing the panoramic video multi-path code stream distribution sequence table according to the third direction comprises the following steps:
according to the structural rule of 1 tabled code stream first and 1 tableu code stream later, a multi-path code stream distribution sequence table of the panoramic video is constructed, or according to the structural rule of 1 tableu code stream first and 1 tabled code stream later, a multi-path code stream distribution sequence table of the panoramic video is constructed; for example, the following steps are carried out:
table={streamnow,streamnow-1,
streamnow+1,streamnow-2,
,...,}
and the code stream sending module is used for sequentially sending the code streams in nt +1 time windows corresponding to the multi-path code streams of the panoramic video according to the sequence of the multi-path code stream distribution sequence table of the panoramic video.
It will be understood by those skilled in the art that all or part of the steps in the method according to the above embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, such as ROM, RAM, magnetic disk, optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.