Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses the picture switching methods and picture switching device when a kind of broadcasting of picture video, can
The switching mode of picture when abundant picture video plays, the picture improved in picture video are related to background music in switching
Degree.It is described in detail separately below.
Referring to Fig. 1, Fig. 1 is the stream of picture switching method when a kind of picture video disclosed by the embodiments of the present invention plays
Journey schematic diagram.Wherein, method shown in Fig. 1 can be applied to smart phone (such as Android phone, iOS mobile phone), plate electricity
Brain, palm PC and mobile internet device (Mobile Internet Devices, MID), personal digital assistant
(Personal Digital Assistant, PDA), media player, smart television, smartwatch, intelligent glasses, intelligent hand
The terminals such as ring.As shown in Figure 1, the picture switching method when picture video plays may comprise steps of:
S101, picture switching device obtain the background music of Target Photo video, and obtain the Target Photo video and include
Playing pictures.
In the embodiment of the present invention, when production has the picture video of background music, picture switching device is firstly the need of true
The background music of Target Photo video and all playing pictures of composition Target Photo video are made in customization, then control again all
Playing pictures played according to certain playing sequence and specific playing interval, to realize broadcasting for Target Photo video
It puts.
Therefore, which can obtain the background music of Target Photo video first, and obtains and form the target
All playing pictures of picture video.Wherein, which can be the system default sound that picture switching device is locally stored
It is happy, it is also possible to the snatch of music that user intercepts from certain a piece of music as needed, the embodiment of the present invention is without limitation.
The playing pictures that the Target Photo video includes can be the system default picture of the picture switching device, be also possible to user from
The photo chosen in local data base can also be that user passes through the photo that camera is shot immediately, and the embodiment of the present invention is not made
It limits.
Wherein, the duration of the background music is less than or equal to the playing duration of the Target Photo video, the Target Photo video
The quantity for the playing pictures for including is N, and wherein N is the integer more than or equal to 2.
As an alternative embodiment, the picture switching device can obtain the background of the Target Photo video simultaneously
Music and it includes playing pictures, can also be and background music and determine to obtain the mesh again after characteristic time obtaining
The playing pictures for marking picture video, can also be the broadcasting figure of the Target Photo video obtained before obtaining background music
Piece, the embodiment of the present invention is without limitation.
When S102, the picture switching device determine the feature that the background music includes according to the characteristic information of the background music
It carves.
In the embodiment of the present invention, after the background music for getting the Target Photo video, the picture switching device meeting
The characteristic information of the background music is analyzed, so that it is determined that going out the characteristic time of the background music.Wherein, background music packet
The quantity of the characteristic time contained is more than or equal to the quantity for the playing pictures that the Target Photo video includes.
It should be noted that the characteristic information of the background music can be the decibel for including in music, frequency, tone, section
It plays, the embodiment of the present invention is without limitation.Therefore, which determines according to the characteristic information of the background music
At the time of characteristic time can be decibel value in default decibel section;At the time of being also possible to each rhythm point and correspond to;Also
At the time of frequency be can be in predeterminated frequency section etc..
S103, the picture switching device are chosen (N-1) a characteristic time from the characteristic time that the background music includes and are made
For the switching moment for switching the playing pictures in the Target Photo video.
In the embodiment of the present invention, in order to which multiple playing pictures are fabricated to picture video, need by every playing pictures by
It is arranged according to specific playing sequence, then resets the play time of every playing pictures, that is, currently playing picture playing
At the time of next playing pictures will be switched to after specified duration.Therefore, switch the playing pictures in Target Photo video
Switching moment it is to be understood that at the time of adjacent two playing pictures of triggering switch over.
Specifically, when the picture switching device according to the characteristic information of the background music select multiple characteristic times it
Afterwards, which will choose the characteristic time of 1 quantity fewer than playing pictures quantity from these characteristic times.?
That is the picture switching device will be from the background music if the Target Photo video bag contains N playing pictures
In the characteristic time for including, (N-1) a characteristic time is selected as switching cutting for the playing pictures in the Target Photo video
Change the moment.
Further, after determining switching moment, which can be according to a playing pictures pair
The rule for answering a switching moment, by playing pictures in conjunction with background music, to be fabricated to the target figure including background music
Piece video.
It should be noted that every playing pictures all correspond to a switching moment, then currently playing picture is corresponding
After switching moment cuts out (disappearance), it can be incision (display) next playing pictures at once, be also possible to slowly cutting out
While currently playing picture, next playing pictures are slowly cut, switching animation, this hair can be set in handoff procedure
Bright embodiment is without limitation.
That is, in order to increase interest of the Target Photo video when playing, which may be used also
Certain switching animation (also referred to as transition effect or effect steering effect) is arranged, then in currently playing picture playing to cutting
It can be cut out according to preset switching animation when changing the moment, then next playing pictures can also be cut according to preset switching animation
Enter.
S104, the picture switching device carry out the playing pictures according to switching moment when playing the Target Photo video
Switching.
In the embodiment of the present invention, after the switching moment for selecting Target Photo video switching playing pictures, the figure
Piece switching device can be fabricated to Target Photo according to the switching moment of selection according to the background music and playing pictures and regard
Frequently.Therefore, for the picture switching device when playing the Target Photo video, each playing pictures are in its corresponding switching moment
Next playing pictures will be switched to.
It, can also be with it should be noted that the duration of Target Photo video of production can be consistent with the duration of background music
It is default duration of the picture switching device when generating picture video, can also be that duration set by user, the present invention are implemented
Example is without limitation.
As an example it is assumed that the Target Photo video bag contains 6 playing pictures, and the characteristic time in background music divides
It Wei not the 2nd second, the 7th second, the 13rd second, the 20th second, the 28th second, the 33rd second, the 37th second, the 42nd second, the 44th second, the 52nd second, the 56th
Second, the 63rd second, the 67th second, the 71st second, the 78th second, then the picture switching device can according to the quantity of playing pictures, from
5 switching moments, such as the 13rd second, the 28th second, the 42nd second, the 56th second, the 71st second are chosen in characteristic time.Therefore, it broadcasts for first
Putting picture will cut out when playing to 13 seconds, and second playing pictures was also cut at 13 seconds simultaneously, when playing to 28 seconds,
Second picture will be cut out, and so on.
As it can be seen that in the method depicted in fig. 1, the spy which passes through the background music of Target Photo video
Reference ceases the characteristic time for determining that the background music includes, and selection (N-1) is a from the characteristic time that the background music includes
Characteristic time is as the switching moment for switching playing pictures in the Target Photo video, then when playing the Target Photo video
The switching of picture is played out according to determining switching moment.Through the embodiment of the present invention, picture switching device can be according to back
The characteristic time of scape music determines its switching time, so that picture switching when picture video plays can be with background music depth
Degree combines, and enhances the degree of correlation of background music and picture switching, and picture video is when playing out, picture switching mode
It is no longer single, to promote user experience.
Referring to Fig. 2, Fig. 2 is picture switching method when another picture video disclosed by the embodiments of the present invention plays
Flow diagram.Wherein, method shown in Fig. 2 can be applied to smart phone (such as Android phone, iOS mobile phone), plate electricity
Brain, palm PC and mobile internet device, personal digital assistant, media player, smart television, smartwatch, intelligence
The terminals such as glasses, Intelligent bracelet.As shown in Fig. 2, the picture switching method when picture video plays may comprise steps of:
S201, picture switching device obtain the background music of Target Photo video, and obtain the Target Photo video and include
Playing pictures.
When S202, the picture switching device determine the feature that the background music includes according to the characteristic information of the background music
It carves.
In the embodiment of the present invention, which determines the background music packet according to the characteristic information of the background music
The concrete mode of the characteristic time contained may comprise steps of:
Step 11) parses the rhythm point that the background music includes;
Step 12) is determined as the characteristic time of the background music at the time of corresponding to each rhythm point.
In the specific implementation, the picture switching device can parse after the background music for getting Target Photo video
At the time of all rhythm points and each rhythm point that the background music includes correspond to, at the time of then each rhythm point is corresponded to
It is determined as the characteristic time of the background music.That is, the characteristic time that the background music includes is each of which rhythm point
At the time of corresponding.
S203, the picture switching device obtain the broadcasting total duration T of the Target Photo video, and determine the broadcasting total duration
In object time set T'.
In the embodiment of the present invention, the broadcasting total duration T of the Target Photo video can be system default duration, be also possible to
Duration set by user can also be the total duration of the background music, and the embodiment of the present invention is without limitation.Therefore, when the picture
When the broadcasting total duration of switching device acquisition Target Photo video is T, when will determine multiple targets from broadcasting total duration
It carves, each object time t'kIt indicates, t'k=(T/N) * k, wherein 1≤k≤N-1, and k is integer, N is Target Photo video
The quantity for the playing pictures for including.That is, the picture switching device, which can will play total duration T, is divided into N parts, every part of table
Show an object time, shares (N-1) a object time, and this (N-1) a object time is in object time set T'
Element.That is, the first aim moment is T/N in object time set T', the second target moment is (T/N) * 2,
Third object time is (T/N) * 3, and (N-1) a namely the last one object time is (T/N) * (N-1).
As an example it is assumed that the Target Photo video includes 8 playing pictures, and when the broadcasting of the Target Photo video is total
A length of 24 seconds, then the picture switching device will will play total duration in determine object time set T'=[3,6,9,12,
15,18,21]。
It should be noted that the picture switching device determines object time from the broadcasting total duration of Target Photo video
Set, can be and execute before the characteristic time for determining background music, be also possible in the characteristic time for determining background music
It executes later, can also be and be performed simultaneously with the characteristic time of background music is determined, the embodiment of the present invention is without limitation.Wherein,
The quantity of object time of the quantity for the characteristic time that background music includes than including in object time set T' is more.
S204, the picture switching device are chosen and object time t' from the characteristic time that the background music includeskMost
Switching moment t of the close characteristic time as kth playing picturesk。
In the embodiment of the present invention, determine characteristic time that object time set T' and the background music include it
Afterwards, the picture switching device can from these characteristic times respectively choose with the immediate characteristic time of each object time,
To obtain switching moment of (N-1) a characteristic time as the playing pictures from first playing pictures to (N-1).Also
It is to say, the picture switching device is in the switching moment t for choosing kth playing pictureskWhen, it is include multiple from the background music
Characteristic time is from selecting away from object time t'kNearest characteristic time.
Further, switching moment t is being determinedkLater, which can be according to a playing pictures
The Target Photo video that the rule production of a corresponding switching moment is made of background music and N playing pictures.
As an example it is assumed that the broadcasting total duration of the Target Photo video is 24 seconds, the total duration of background music is also 24
Second, wherein the collection of all characteristic times that the background music includes composition be combined into [2,3,5,8,11,12,14,17,18,20,
21,23,24], and the picture switching device from play the object time collection determined in total duration 24 seconds be combined into T'=[3,6,9,
12,15,18,21].Therefore, which will choose and the immediate spy of object time respectively from characteristic time
The switching moment of each playing pictures when levying moment [3,5,8,12,14,18,21] as Target Photo video playing.
S205, the picture switching device are when playing the Target Photo video according to switching moment tkKth is carried out to play
The switching of picture.
In the embodiment of the present invention, in the switching moment t for selecting kth playing pictures respectively from characteristic timekLater,
The switching moment of first playing pictures of Target Photo video is just t1, the switching moment of second playing pictures is just t2, and
The switching moment of (N-1) playing pictures is just tN-1.That is, the picture switching device is playing Target Photo video
When, when first playing pictures is played to t1tkIt will be cut out when the moment, and second playing pictures incision, it is played when second
Picture playing is to t2Can also be cut out when the moment, thus third playing pictures incision, until (N-1) playing pictures play to
tN-1N playing pictures are switched to when the moment.
As it can be seen that in the method depicted in fig. 2, the broadcasting total duration of Target Photo video can be averaged by picture switching device
It is divided into N parts, then (N-1) a object time before therefrom choosing is chosen and each mesh respectively from the characteristic time determined
Moment immediate characteristic time is marked, as switching moment of the Target Photo video when playing out picture switching.In this way
Both can guarantee that the playing duration of each playing pictures was close, be not in part playing pictures play time it is too short, and part
The too long situation of the play time of playing pictures, and every playing pictures can be allowed to switch according to the rhythm of background music, thus
In conjunction with background music depth, improve playing pictures switching when and background music the degree of correlation, enrich picture video broadcasting
When playing pictures switching mode.
Referring to Fig. 3, Fig. 3 is picture switching method when another picture video disclosed by the embodiments of the present invention plays
Flow diagram.Wherein, method shown in Fig. 3 can be applied to smart phone (such as Android phone, iOS mobile phone), plate electricity
Brain, palm PC and mobile internet device, personal digital assistant, media player, smart television, smartwatch, intelligence
The terminals such as glasses, Intelligent bracelet.As shown in figure 3, the picture switching method when picture video plays may comprise steps of:
S301, picture switching device obtain the background music of Target Photo video, and obtain the Target Photo video and include
Playing pictures.
When S302, the picture switching device determine the feature that the background music includes according to the characteristic information of the background music
It carves.
S303, the picture switching device obtain the broadcasting total duration T of the Target Photo video, and determine the broadcasting total duration
In object time set T'.
S304, the picture switching device are chosen and object time t' from the characteristic time that the background music includeskMost
Switching moment t of the close characteristic time as kth playing picturesk。
S305, the picture switching device determine that the playing pictures switch to down according to the switching moment of every playing pictures
The playing duration s of switching animation between one playing picturesk。
In the embodiment of the present invention, between adjacent two playing pictures, switching animation can be set, cut in currently playing picture
When out, switching animation is first played, then cuts next playing pictures again.Therefore, determining that every playing pictures are corresponding
After switching moment, which can determine whether the switching animation between every playing pictures and next playing pictures
Playing duration sk。
Specifically, switching moment of the picture switching device according to every playing pictures, determines that the playing pictures switch to
The playing duration s of switching animation between next playing pictureskConcrete mode may comprise steps of:
The rhythm point that the background music includes is ranked up by step 21) according to the broadcasting timing of the background music, is obtained
The arrangement serial number of each rhythm point.
In the specific implementation, the picture switching device can include to the background music according to the broadcasting timing of the background music
Rhythm point be ranked up, to obtain the arrangement serial number of each rhythm point, such as first rhythm point, second rhythm point, y
A rhythm point, its corresponding arrangement serial number of m-th rhythm point is respectively 1,2, y, M.
Step 22) determines switching moment tkArrangement serial number a of the corresponding rhythm point in the rhythm pointk。
In the specific implementation, due to switching moment tkAnd the corresponding characteristic time of rhythm point that background music includes, therefore,
The picture switching device is after the arrangement serial number for determining each rhythm point, so that it may determine that each switching moment is corresponding
The arrangement serial number of rhythm point, so that it is determined that switching moment t outkThe arrangement serial number of corresponding rhythm point, is denoted as ak.That is, cutting
Change moment t1The arrangement serial number a of corresponding rhythm point1It indicates, switching moment t2The arrangement serial number a of corresponding rhythm point2Table
Show, switching moment tN-1The arrangement serial number a of corresponding rhythm pointN-1It indicates.
For example, the switching moment that picture switching device is determined is respectively [4,7,11,16,21,24], and first is cut
Changing arrangement serial number of the moment corresponding rhythm point in all rhythm points that background music includes may be 10, and second switching
Arrangement serial number of the moment corresponding rhythm point in all rhythm points that background music includes may be 21.As k=2, then
Switching moment t2The arrangement serial number of corresponding rhythm point is just a2=21.
Step 23) obtains (ak+ m) the corresponding characteristic time of a rhythm point, and calculate (ak+ m) a rhythm point and ak
Target duration between a rhythm point.
In the specific implementation, m is the maximum rhythm point amount threshold for including, rhythm points in the playing duration for switch animation
Amount threshold value can be set by user, be also possible to the picture switching device system default, the embodiment of the present invention is without limitation.
Therefore, when determining the arrangement serial number of corresponding rhythm point of each switching moment, which will be according to every
Playing pictures corresponding switching moment determines the playing duration of the corresponding switching animation of the playing pictures.That is, for
Kth playing pictures, the picture switching device are determining that its corresponding switching moment is tkWhen, so that it may when determining the switching
Carve tkThe arrangement serial number a of corresponding rhythm pointk.Therefore, which will be with akA rhythm point is starting point, from
(a is searched in the background musick+ m) the corresponding characteristic time of a rhythm point, then calculate (ak+ m) a rhythm point is corresponding
Characteristic time and switching moment are tkBetween time difference, the as target duration between the two rhythm points.
It should be noted that in same first background music, it is understood that there may be when interval between the rhythm point of various pieces
Between inconsistent situation, then the switching animation between adjacent two playing pictures passes through (ak+ m) a rhythm point feature when
It carves and akThe characteristic time of a rhythm point may also be also different come the target duration determined.If only by obtaining any phase
The mode at the interval moment between adjacent two rhythm points determines that the playing duration of switching animation, possibility will have certain broadcastings
Picture may be mismatched in incision with the rhythm point of background music.Therefore, a is calculated in this waykA rhythm point
With (ak+ m) the target duration between a rhythm point is more accurate.Certainly, if the picture switching device determines the background
Interval time between two rhythm points of arbitrary neighborhood of music is identical, when can also first obtain the interval between adjacent rhythm point
Between, interval time is multiplied with m then and can be obtained by the playing duration of each switching animation, arbitrary neighborhood two obtained from
The playing duration for opening the switching animation between playing pictures is identical.
As an example it is assumed that 5 seconds switching moments for first playing pictures, the switching for second playing pictures in 12 seconds
Moment, 18 seconds switching moments for third playing pictures, the playing duration of the switching animation of setting include up to 5 rhythm
Point, the characteristic time of the 5th rhythm point after first switching moment corresponding rhythm point are 7 seconds, second switching moment
The characteristic time of the 5th rhythm point after corresponding rhythm point is 13 seconds, after third switching moment corresponding rhythm point
The 5th rhythm point characteristic time be 19.2 seconds, therefore, obtained target duration is respectively 2 seconds, 1 second, 1.2 seconds.
Default playing duration threshold value t of the step 24) from switching animationmaxWith the minimum duration conduct of selection in the target duration
Kth playing pictures switch to the playing duration s of the switching animation between (k+1) playing picturesk。
In the specific implementation, tmaxFor picture switching device or it is set by user it is each switching animation maximum playing duration, i.e.,
Default playing duration threshold value.Therefore, (a is being obtainedk+ m) the corresponding characteristic time of a rhythm point, and calculate (ak+ m) it is a
Rhythm point and akAfter target duration between a rhythm point, which can be directed to every playing pictures, from meter
The target duration of the switching animation of calculating and default playing duration threshold value tmaxBetween choose the smallest duration as the playing pictures
The playing duration s of corresponding switching animationk.That is, when determining the broadcasting of the corresponding switching animation of kth playing pictures
When long, which can calculate its switching moment t firstkCorresponding akA rhythm point and (ak+ m) a rhythm point
Between target duration, minimum duration is then chosen from target duration and the default playing duration threshold value of switching animation as the
The playing duration s of the corresponding switching animation of k playing picturesk。
It for example, should if Target Photo video does not set switching animation when playing out picture switching
Picture switching device is after the characteristic time according to background music determines every playing pictures corresponding switching moment, the mesh
Mark the play time of every playing pictures in picture video are as follows: 0~3 second play time for first playing pictures, the 3rd~7
Second is the play time of second playing pictures, and 7~12 seconds play times for third playing pictures.
Again for example, it if Target Photo video is set with switching animation when playing out picture switching, and sets
The playing duration of switching animation include up to 4 rhythm points, the default playing duration for switching animation is 1.5 seconds.So basis
The switching moment of available first playing pictures of the play time of above-mentioned playing pictures is 3 seconds, second playing pictures
Switching moment is 7 seconds.If the 4th rhythm point after the switching moment of first playing pictures corresponding rhythm point is corresponding
Characteristic time be 4 seconds, the 4th rhythm point after the switching moment of second playing pictures corresponding rhythm point is corresponding
Characteristic time is 8.9 seconds, then a length of 1 second when can be obtained by first aim, when second target is 1.9 seconds a length of, and is cut
The default playing duration of picture of moving is to compare for 1.5 seconds, which is assured that out that first playing pictures is corresponding
Switching animation playing duration be 1 second, and second playing pictures it is corresponding switching animation playing duration be 1.5 seconds.
S306, picture switching device control kth playing pictures open the switching moment t of playing pictures in kthkIt switches to
Switch animation, and controls the switching animation in (tk+sk) moment switches to (k+1) playing pictures.
In the embodiment of the present invention, in the playing duration s for determining the corresponding switching animation of every playing pictures respectivelykIt
Afterwards, which can control kth playing pictures in tkMoment cuts out, and cuts switching animation in synchronization,
And in switching animation play skIt, will be in (t when durationk+sk) moment cuts out, so that (k+1) playing pictures are in same a period of time
Carve incision.
For example, the switching moment of first playing pictures is 3 seconds, and the playing time of corresponding switching animation is
1.2 the second, the switching moment of second playing pictures is 7 seconds, and the playing time of corresponding switching animation is 0.9 second, then
When playing the Target Photo video, first playing pictures is switched to the switching animation of setting when playing to 3 seconds, and switching animation is broadcast
It is switched to second playing pictures when putting to 4.2 seconds, correspondingly, being switched to setting when second playing pictures was played to 7 seconds
Switching animation, and third playing pictures are switched to when the switching animation play was to 7.9 seconds.
As it can be seen that in the method depicted in fig. 3, which can set every playing pictures in handoff procedure
The switching animation of setting is played, to increase picture video in the interest for playing out picture switching.Further, switching is dynamic
The playing duration of picture was determined according to the switching moment of every playing pictures and the corresponding characteristic time of each rhythm point
, in this way can to avoid each playing pictures play time due to background music each section rhythm point interval time and phase
Difference is farther out, that is to say, that the play time that every playing pictures can be adjusted by adjusting the playing duration of switching animation, from
And picture video is enhanced when carrying out picture switching and the degree of correlation of background music.
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of picture switching device disclosed by the embodiments of the present invention.Wherein, scheme
Picture switching device 400 shown in 4 can be applied to smart phone (such as Android phone, iOS mobile phone), tablet computer, the palm
Upper computer and mobile internet device, personal digital assistant, media player, smart television, smartwatch, intelligent glasses,
The terminals such as Intelligent bracelet.As shown in figure 4, the picture switching device 400 may include with lower unit:
Acquiring unit 401 for obtaining the background music of Target Photo video, and obtains the Target Photo video and includes
Playing pictures.
In the embodiment of the present invention, production have background music picture video when, picture switching device 400 firstly the need of
It determines the background music of production Target Photo video and all playing pictures of composition Target Photo video, then controls institute again
Some playing pictures are played according to certain playing sequence and specific playing interval, to realize broadcasting for Target Photo video
It puts.
Therefore, acquiring unit 401 can obtain the background music of Target Photo video first, and obtain and form the Target Photo
All playing pictures of video.Wherein, which can be the system default music that picture switching device is locally stored,
It can be the snatch of music that user intercepts from certain a piece of music as needed, the embodiment of the present invention is without limitation.The mesh
The playing pictures that piece video includes of marking on a map can be the system default picture of the picture switching device 400, be also possible to user from
The photo chosen in local data base can also be that user passes through the photo that camera is shot immediately, and the embodiment of the present invention is not made
It limits.
Wherein, the duration of the background music is less than or equal to the playing duration of the Target Photo video, the Target Photo video
The quantity for the playing pictures for including is N, and wherein N is the integer more than or equal to 2.
As an alternative embodiment, acquiring unit 401 can obtain the background sound of the Target Photo video simultaneously
It is happy and it includes playing pictures, can also be and obtaining background music and determining to obtain the target again after characteristic time
The playing pictures of picture video can also be the playing pictures of the Target Photo video obtained before obtaining background music,
The embodiment of the present invention is without limitation.
First determination unit 402 determines the feature that the background music includes for the characteristic information according to the background music
Moment.
In the embodiment of the present invention, after the background music that acquiring unit 401 gets the Target Photo video, first really
Order member 402 can analyze the characteristic information of the background music, so that it is determined that going out the characteristic time of the background music.Its
In, the quantity for the characteristic time that background music includes is more than or equal to the quantity for the playing pictures that the Target Photo video includes.
It should be noted that the characteristic information of the background music can be the decibel for including in music, frequency, tone, section
It plays, the embodiment of the present invention is without limitation.Therefore, the first determination unit 402 is determined according to the characteristic information of the background music
Characteristic time at the time of can be decibel value and be located in default decibel section;At the time of being also possible to each rhythm point and correspond to;
Can also be at the time of frequency is in predeterminated frequency section etc..
Selection unit 403, should for choosing (N-1) a characteristic time conduct from the characteristic time that the background music includes
Switch the switching moment of the playing pictures in Target Photo video.
In the embodiment of the present invention, in order to which multiple playing pictures are fabricated to picture video, need by every playing pictures by
It is arranged according to specific playing sequence, then resets the play time of every playing pictures, that is, currently playing picture playing
At the time of next playing pictures will be switched to after specified duration.Therefore, switch the playing pictures in Target Photo video
Switching moment it is to be understood that at the time of adjacent two playing pictures of triggering switch over.
Specifically, when the first determination unit 402 according to the characteristic information of the background music select multiple characteristic times it
Afterwards, selection unit 403 will choose the characteristic time of 1 quantity fewer than playing pictures quantity from these characteristic times.Also
It is to say, if the Target Photo video bag contains N playing pictures, selection unit 403 will include from the background music
Characteristic time in, when selecting (N-1) a characteristic time as the switching of the playing pictures is switched in the Target Photo video
It carves.
Further, after selection unit 403 determines switching moment, which can be according to
The rule of one playing pictures corresponding switching moment, by playing pictures in conjunction with background music, to be fabricated to including back
The Target Photo video of scape music.
It should be noted that every playing pictures all correspond to a switching moment, then currently playing picture is corresponding
After switching moment cuts out (disappearance), it can be incision (display) next playing pictures at once, be also possible to slowly cutting out
While currently playing picture, next playing pictures are slowly cut, switching animation, this hair can be set in handoff procedure
Bright embodiment is without limitation.
That is, the picture switching device 400 is also in order to increase interest of the Target Photo video when playing
Certain switching animation (also referred to as transition effect or effect steering effect) can be set, then currently playing picture playing extremely
It can be cut out according to preset switching animation when switching moment, then next playing pictures also can be according to preset switching animation
Incision.
Switch unit 404, when for when playing the Target Photo video according to the switching of above-mentioned selection unit 403 selection
Carve the switching for carrying out the playing pictures.
In the embodiment of the present invention, when selection unit 403 selects the switching of Target Photo video switching playing pictures
After quarter, which can be according to the background music and playing pictures according to the switching moment system of selection
It is made Target Photo video.Therefore, for switch unit 404 when playing the Target Photo video, each playing pictures are right at its
The switching moment answered will switch to next playing pictures.
It, can also be with it should be noted that the duration of Target Photo video of production can be consistent with the duration of background music
It is default duration of the picture switching device 400 when generating picture video, can also be that duration set by user, the present invention are real
Apply example without limitation.
As an example it is assumed that the Target Photo video bag contains 6 playing pictures, and the characteristic time in background music divides
It Wei not the 2nd second, the 7th second, the 13rd second, the 20th second, the 28th second, the 33rd second, the 37th second, the 42nd second, the 44th second, the 52nd second, the 56th
Second, the 63rd second, the 67th second, the 71st second, the 78th second, then selection unit 403 can be according to the quantity of playing pictures, from feature
5 switching moments, such as the 13rd second, the 28th second, the 42nd second, the 56th second, the 71st second are chosen in moment.Therefore, switch unit 404 is just
First playing pictures can be controlled respectively to be cut out when playing to 13 seconds, and second playing pictures was also cut at 13 seconds simultaneously
Enter, when playing to 28 seconds, the second picture will be cut out, and so on.
As it can be seen that the picture switching device passes through the background of Target Photo video in the picture switching device described in Fig. 4
The characteristic information of music determines the characteristic time that the background music includes, and chooses from the characteristic time that the background music includes
(N-1) then a characteristic time is playing the target figure as the switching moment for switching playing pictures in the Target Photo video
The switching of picture is played out when piece video according to determining switching moment.Through the embodiment of the present invention, picture switching device can
To determine its switching time according to the characteristic time of background music, so that picture switching when picture video plays can be with back
Scape music depth combines, and enhances the degree of correlation of background music and picture switching, and picture video is when playing out, and picture is cut
It is also no longer single to change mode, to promote user experience.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of another picture switching device disclosed by the embodiments of the present invention.Wherein,
Picture switching device 400 shown in fig. 5 is to optimize on the basis of picture switching device 400 shown in Fig. 4 to obtain.Such as Fig. 5
Shown, which may include:
Second determines that subelement 405 determines that the playing pictures switch to for the switching moment according to every playing pictures
The playing duration s of switching animation between next playing picturesk。
In the embodiment of the present invention, between adjacent two playing pictures, switching animation can be set, cut in currently playing picture
When out, switching animation is first played, then cuts next playing pictures again.Therefore, every broadcasting is determined in selection unit 403
After picture corresponding switching moment, second determine subelement 405 can determine whether every playing pictures and next playing pictures it
Between switching animation playing duration sk。
In the embodiment of the present invention, above-mentioned first determination unit 402 may include that parsing subunit 4021 and first determine
Subelement 4022, in which:
Parsing subunit 4021, the rhythm point for including for parsing the background music.
First determines subelement 4022, when being determined as the feature of the background music at the time of for corresponding to each rhythm point
It carves.
In the specific implementation, after the background music that acquiring unit 401 gets Target Photo video, parsing subunit
4021 can parse all rhythm points that the background music includes and at the time of each rhythm point corresponds to, first determines subelement
4022 are determined as the characteristic time of the background music at the time of then corresponding to each rhythm point.That is, the background sound
At the time of the characteristic time that pleasure includes is that each of which rhythm point corresponds to.
In the embodiment of the present invention, above-mentioned selection unit 403 may include that the first acquisition subelement 4031 and first is chosen
Subelement 4032, in which:
First obtains subelement 4031, for obtaining the broadcasting total duration T of the Target Photo video, and determines that the broadcasting is total
Object time set T' in duration.
In the specific implementation, the broadcasting total duration T of the Target Photo video can be system default duration, it is also possible to user
The duration of setting can also be the total duration of the background music, and the embodiment of the present invention is without limitation.Therefore, when first obtains son
When the broadcasting total duration of the acquisition Target Photo video of unit 4031 is T, when will determine multiple targets from broadcasting total duration
It carves, each object time t'kIt indicates, t'k=(T/N) * k, wherein 1≤k≤N-1, and k is integer, N is Target Photo video
The quantity for the playing pictures for including.That is, the first acquisition subelement 4031, which can will play total duration T, is divided into N parts, often
Part indicates an object time, shares (N-1) a object time, and this (N-1) a object time is object time set T'
In element.That is, the first aim moment is T/N in object time set T', the second target moment is (T/
N) * 2, third object time is (T/N) * 3, and (N-1) a namely the last one object time is (T/N) * (N-1).
As an example it is assumed that the Target Photo video includes 8 playing pictures, and when the broadcasting of the Target Photo video is total
A length of 24 seconds, then first acquisition subelement 4031 will will play total duration in determine object time set T'=[3,6,
9,12,15,18,21]。
It should be noted that the first acquisition subelement 4031 determines target from the broadcasting total duration of Target Photo video
Moment set, can be and execute before the characteristic time that the first determination unit 402 determines background music, be also possible to first
Determination unit 402 determines that the characteristic time of background music executes later, can also be and the first determination unit 402 determines background sound
Happy characteristic time is performed simultaneously, and the embodiment of the present invention is without limitation.Wherein, the quantity ratio for the characteristic time that background music includes
The quantity for the object time for including in object time set T' is more.
First chooses subelement 4032, for choosing and the object time from the characteristic time that the background music includes
t'kSwitching moment t of the nearest characteristic time as kth playing picturesk。
In the specific implementation, determining object time set T' and the first determination unit in the first acquisition subelement 4031
After 402 determine the characteristic time that the background music includes, first, which chooses subelement 4032, to divide from these characteristic times
It Xuan Qu not be broadcast to obtain (N-1) a characteristic time and be used as from first with the immediate characteristic time of each object time
Put the switching moment of picture to (N-1) playing pictures.That is, the first selection subelement 4032 is broadcast in selection kth
Put the switching moment t of picturekWhen, it is multiple characteristic times for including from the background music from selecting away from object time t'kRecently
Characteristic time.
Further, switching moment t is determined in the first acquisition subelement 4031kLater, first subelement 4032 is chosen
It can be made of according to the rule production of an a playing pictures corresponding switching moment background music and N playing pictures
Target Photo video.
As an example it is assumed that the broadcasting total duration of the Target Photo video is 24 seconds, the total duration of background music is also 24
Second, wherein the collection of all characteristic times that the background music includes composition be combined into [2,3,5,8,11,12,14,17,18,20,
21,23,24], and the first acquisition subelement 4031 from play the object time collection determined in total duration 24 seconds be combined into T '=[3,
6,9,12,15,18,2].Therefore, the first selection subelement 4032 will be chosen respectively from characteristic time most connects with object time
The switching moment of each playing pictures when close characteristic time [3,5,8,12,14,18,21] is as Target Photo video playing.
As a kind of feasible embodiment, above-mentioned second determines that subelement 405 may include sorting subunit 4051, the
Two determine that subelement 4052, second obtains subelement 4053 and the second selection subelement 4054, in which:
Sorting subunit 4051, rhythm point for including by the background music according to the background music broadcasting timing into
Row sequence, obtains the arrangement serial number of each rhythm point.
In the specific implementation, sorting subunit 4051 can include to the background music according to the broadcasting timing of the background music
Rhythm point be ranked up, to obtain the arrangement serial number of each rhythm point, such as first rhythm point, second rhythm point, y
A rhythm point, its corresponding arrangement serial number of m-th rhythm point is respectively 1,2, y, M.
Second determines subelement 4052, for determining switching moment tkArrangement sequence of the corresponding rhythm point in the rhythm point
Number ak。
In the specific implementation, due to switching moment tkAnd the corresponding characteristic time of rhythm point that background music includes, therefore,
Second determines subelement 4052 after the arrangement serial number for determining each rhythm point, so that it may determine each switching moment pair
The arrangement serial number for the rhythm point answered, so that it is determined that switching moment t outkThe arrangement serial number of corresponding rhythm point, is denoted as ak.Namely
It says, switching moment t1The arrangement serial number a of corresponding rhythm point1It indicates, switching moment t2The arrangement serial number of corresponding rhythm point is used
a2It indicates, switching moment tN-1The arrangement serial number a of corresponding rhythm pointN-1It indicates.
For example, the switching moment that selection unit 403 is determined is respectively [4,7,11,16,21,24], then sorting
Arrangement of first switching moment that subelement 4051 obtains corresponding rhythm point in all rhythm points that background music includes
Serial number may be 10, and arrangement sequence of second switching moment corresponding rhythm point in all rhythm points that background music includes
Number may be 21.As k=2, second determines the switching moment t that subelement 4052 is determined2The arrangement sequence of corresponding rhythm point
Number just be a2=21.
Second obtains subelement 4053, for obtaining (ak+ m) the corresponding characteristic time of a rhythm point, and calculate (ak+
M) a rhythm point and akTarget duration between a rhythm point.
In the specific implementation, m is the maximum rhythm point amount threshold for including, rhythm points in the playing duration for switch animation
Amount threshold value can be set by user, be also possible to 400 system default of picture switching device, the embodiment of the present invention does not limit
It is fixed.Therefore, when second determines that subelement 4052 determines the arrangement serial number of corresponding rhythm point of each switching moment, second is obtained
Take subelement 4053 that will determine the corresponding switching animation of the playing pictures according to every playing pictures corresponding switching moment
Playing duration.That is, determining that its corresponding switching moment is t in selection unit 403 for kth playing picturesk
When, the second acquisition subelement 4053 is assured that switching moment tkThe arrangement serial number a of corresponding rhythm pointk.Therefore,
Two obtain subelement 4053 will be with akA rhythm point is starting point, and (a is searched from the background musick+ m) a rhythm point pair
Then the characteristic time answered calculates (ak+ m) the corresponding characteristic time of a rhythm point and switching moment be tkBetween time difference,
Target duration as between the two rhythm points.
It should be noted that in same first background music, it is understood that there may be when interval between the rhythm point of various pieces
Between inconsistent situation, then the switching animation between adjacent two playing pictures passes through (ak+ m) a rhythm point feature when
It carves and akThe characteristic time of a rhythm point may also be also different come the target duration determined.If only by obtaining any phase
The mode at the interval moment between adjacent two rhythm points determines that the playing duration of switching animation, possibility will have certain broadcastings
Picture may be mismatched in incision with the rhythm point of background music.Therefore, a is calculated in this waykA rhythm point
With (ak+ m) the target duration between a rhythm point is more accurate.Certainly, if second determines that subelement 4052 determines this
Interval time between two rhythm points of arbitrary neighborhood of background music is identical, and the second acquisition subelement 4053 can also be obtained first
Interval time between adjacent rhythm point, then interval time is multiplied with m can be obtained by it is each switching animation broadcasting when
Long, the playing duration that the arbitrary neighborhood two obtained from opens the switching animation between playing pictures is identical.
As an example it is assumed that 5 seconds switching moments for first playing pictures, the switching for second playing pictures in 12 seconds
Moment, 18 seconds switching moments for third playing pictures, the playing duration of the switching animation of setting include up to 5 rhythm
Point, the characteristic time of the 5th rhythm point after first switching moment corresponding rhythm point are 7 seconds, second switching moment
The characteristic time of the 5th rhythm point after corresponding rhythm point is 13 seconds, after third switching moment corresponding rhythm point
The 5th rhythm point characteristic time be 19.2 seconds, therefore, obtained target duration is respectively 2 seconds, 1 second, 1.2 seconds.
Second chooses subelement 4054, for the default playing duration threshold value t from switching animationmaxIn the target duration
Choose the playing duration for the switching animation that minimum duration is switched to as kth playing pictures between (k+1) playing pictures
sk。
In the specific implementation, tmaxWhen being played for the maximum of picture switching device 400 or each switching animation set by user
It is long, i.e., default playing duration threshold value.Therefore, subelement 4053 is obtained second obtain (ak+ m) the corresponding feature of a rhythm point
Moment, and calculate (ak+ m) a rhythm point and akAfter target duration between a rhythm point, second chooses subelement
4054 can be directed to every playing pictures, target duration and default playing duration threshold value t from calculated switching animationmaxBetween
Choose playing duration s of the smallest duration as the corresponding switching animation of the playing picturesk.That is, being broadcast determining that kth is opened
When putting the playing duration of the corresponding switching animation of picture, the second acquisition subelement 4053 can calculate its switching moment t firstkIt is corresponding
AkA rhythm point and (ak+ m) target duration between a rhythm point, then second when choosing subelement 4054 from target
Minimum duration is chosen in long and switching animation default playing duration threshold value as the corresponding animation that switches of kth playing pictures
Playing duration sk。
For example, if Target Photo video does not set switching animation when playing out picture switching,
After selection unit 403 determines every playing pictures corresponding switching moment according to the characteristic time of background music, the target
The play time of every playing pictures in picture video are as follows: 0~3 second play time for first playing pictures, the 3rd~7 second
For the play time of second playing pictures, and 7~12 seconds play times for third playing pictures.
Again for example, it if Target Photo video is set with switching animation when playing out picture switching, and sets
The playing duration of switching animation include up to 4 rhythm points, the default playing duration for switching animation is 1.5 seconds.So basis
The switching moment of available first playing pictures of the play time of above-mentioned playing pictures is 3 seconds, second playing pictures
Switching moment is 7 seconds.If the 4th rhythm point after the switching moment of first playing pictures corresponding rhythm point is corresponding
Characteristic time be 4 seconds, the 4th rhythm point after the switching moment of second playing pictures corresponding rhythm point is corresponding
Characteristic time is 8.9 seconds, then a length of 1 second when can be obtained by first aim, when second target is 1.9 seconds a length of, and is cut
The default playing duration of picture of moving is to compare for 1.5 seconds, and the second selection subelement 4054 is assured that out first playing pictures
The playing duration of corresponding switching animation is 1 second, and the playing duration of the corresponding switching animation of second playing pictures is 1.5
Second.
In the embodiment of the present invention, above-mentioned switch unit 404 is selected when playing the Target Photo video according to selection unit 403
The concrete mode that the switching moment taken plays out the switching of picture can be with are as follows:
Kth playing pictures are controlled in the switching moment t of kth playing pictureskSwitching animation is switched to, and controls this and cuts
Move and is drawn in (tk+sk) moment switches to (k+1) playing pictures.
In the specific implementation, determining broadcasting for the corresponding switching animation of every playing pictures respectively in the second determination unit 405
Put duration skLater, switch unit 404 can control kth playing pictures in tkMoment cuts out, and cuts and switches in synchronization
Animation, and in switching animation play skIt, will be in (t when durationk+sk) moment cuts out, so that (k+1) playing pictures exist
Synchronization incision.
For example, the switching moment of first playing pictures is 3 seconds, and the playing time of corresponding switching animation is
1.2 seconds, the switching moment of second playing pictures was 7 seconds, and the playing time of corresponding switching animation is 0.9 second, then
When playing the Target Photo video, first playing pictures is switched to the switching animation of setting when playing to 3 seconds, and switching animation is broadcast
It is switched to second playing pictures when putting to 4.2 seconds, correspondingly, being switched to setting when second playing pictures was played to 7 seconds
Switching animation, and third playing pictures are switched to when the switching animation play was to 7.9 seconds.
As it can be seen that picture switching device can be total by the broadcasting of Target Photo video in the picture switching device described in Fig. 5
Duration is equally divided into N parts, therefrom choose before (N-1) a object time, then from the characteristic time determined respectively choose with
The immediate characteristic time of each object time, as the Target Photo video play out picture switching when switching when
It carves.Can both guarantee that the playing duration of each playing pictures was close in this way, be not in part playing pictures play time it is too short,
And the situation that the play time of part playing pictures is too long, and every playing pictures can be allowed to cut according to the rhythm of background music
It changes, to enrich playing pictures switching mode when picture video plays in conjunction with background music depth.Further, the figure
Piece switching device can also set every playing pictures and play the switching animation of setting in handoff procedure, to increase picture view
Frequency is in the interest for playing out picture switching.Meanwhile the picture switching device can by adjusting switching animation broadcasting when
It is long to adjust the play time of every playing pictures, to enhance picture video when carrying out picture switching and background music
The degree of correlation.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.