CN107147947A - Key frame recognition methods and device - Google Patents

Key frame recognition methods and device Download PDF

Info

Publication number
CN107147947A
CN107147947A CN201710330148.5A CN201710330148A CN107147947A CN 107147947 A CN107147947 A CN 107147947A CN 201710330148 A CN201710330148 A CN 201710330148A CN 107147947 A CN107147947 A CN 107147947A
Authority
CN
China
Prior art keywords
frame
logical frame
logical
played
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710330148.5A
Other languages
Chinese (zh)
Other versions
CN107147947B (en
Inventor
王杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710330148.5A priority Critical patent/CN107147947B/en
Publication of CN107147947A publication Critical patent/CN107147947A/en
Application granted granted Critical
Publication of CN107147947B publication Critical patent/CN107147947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of key frame recognition methods, this method includes:After the broadcasting of each logical frame terminates, confirm to play first position of the logical frame terminated in the Array for structural body of the logical frame generated, and the second place of next logical frame to be played in Array for structural body is determined according to first position, judge in Array for structural body, whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for first position and the second place, if identical, then confirm to play between the logical frame terminated and next logical frame to be played without key frame, and play next logical frame to be played, if differing, then search the first key frame played between the logical frame terminated and next logical frame to be played, and play first key frame.The invention also discloses a kind of key frame identifying device, the speed for searching key frame can be improved, the time complexity searched is reduced, the fluency that picture is played is improved.

Description

Key frame recognition methods and device
Technical field
The invention belongs to field of terminal technology, more particularly to a kind of key frame recognition methods and device.
Background technology
With the development of network and terminal technology, disparate networks game, the exploitation of single-play game are quickly grown.In game Picture is to be rendered to form by the logical frame of each game example, and each logical frame needs to inquire about next logic after playing Frame.One logical frame of generally existing often occupies the situation of the timeslice of multiple logical frames in game, if occupied time There is key frame in piece, then playing key frame, therefore how to search key frame turns into the key issue that game picture is shown.
In the prior art, key frame is searched by exhaustion, that is, the logical frame corresponding time for enumerating a broadcasting arrives All logical frames in current time is interval, whether be key frame, if running into key frame, play if judging each logical frame Key frame, enumerates end, if not running into key frame, plays the corresponding frame of current time, its linear time of such a technology Complexity is too high, tends not to meet the reading demand of " tens of thousands of frames per second " in game, so as to cause display picture not smooth.
The content of the invention
The present invention provides a kind of key frame recognition methods and device, to by way of construction logic frame structure body array Key frame is searched, the time complexity searched is reduced, the fluency of picture is improved.
A kind of key frame recognition methods that the present invention is provided, including:
After the broadcasting of each logical frame terminates, structure of the logical frame for playing end in the logical frame generated is confirmed First position in body array, and determine next logical frame to be played in the Array for structural body according to the first position In the second place, the Array for structural body includes:The logical frame that is arranged by playing sequence and add up before each logical frame The number of the key frame occurred;
Judge in the Array for structural body, the first position and the second place are corresponding in current logic respectively Whether the number of the accumulative key frame occurred is identical before frame;
If identical, described play between the logical frame terminated and next logical frame to be played without key is confirmed Frame, and play next logical frame to be played;
If differing, the head played between the logical frame terminated and next logical frame to be played is searched Individual key frame, and play the first key frame.
A kind of key frame identifying device that the present invention is provided, including:
First confirms module, for after the broadcasting of each logical frame terminates, confirming the logical frame terminated of playing First position in the Array for structural body of the logical frame of generation, and next logic to be played is determined according to the first position The second place of the frame in the Array for structural body, the Array for structural body includes:The logical frame that is arranged by playing sequence and Add up the number of key frame occurred before each logical frame;
Judge module, for judging in the Array for structural body, the first position and the second place are right respectively Whether the number for the key frame for adding up to occur before current logic frame answered is identical;
Second confirm module, if for the first position and the second place respectively it is corresponding current logic frame it The number of the preceding accumulative key frame occurred is identical, then confirms the logical frame for playing end and described next to be played Without key frame between logical frame;
Playing module, for playing next logical frame to be played;
Searching modul, if for the first position and the second place respectively it is corresponding before current logic frame tire out The number for counting the key frame occurred is differed, then searches the logical frame terminated of playing and patrolled with described next to be played Collect the first key frame between frame;
The playing module, is additionally operable to play the first key frame.
It was found from the embodiments of the present invention, key frame recognition methods and device that the present invention is provided, in each logical frame After broadcasting terminates, by confirming the first position of the logical frame that the broadcasting terminates in the Array for structural body generated and next The second place of logical frame to be played, and judge that first position and the second place are corresponding tired before current logic frame respectively Count whether the number of key frame occurred is identical, to judge logical frame and next logic to be played that the broadcasting terminates It whether there is key frame between frame, if nothing, play next logical frame to be played, terminate if so, then searching the broadcasting Logical frame and next logical frame to be played between first key frame, and play the first key frame, can simplify and sentence Process that is disconnected, searching key frame, improves the speed for searching key frame, reduces the time complexity searched, largely accelerate Calculating time, improve the fluency that picture is played.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those skilled in the art, without having to pay creative labor, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
The schematic flow sheet for the key frame recognition methods that Fig. 1 provides for first embodiment of the invention;
The schematic flow sheet for the key frame recognition methods that Fig. 2 provides for second embodiment of the invention;
The structural representation for the key frame identifying device that Fig. 3 provides for third embodiment of the invention;
The structural representation for the key frame identifying device that Fig. 4 provides for fourth embodiment of the invention
Fig. 5 is the terminal hardware structure chart of execution key frame recognition methods in the present invention.
Embodiment
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described reality It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the art The every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The typical application scenarios of the following embodiment of the present invention are in game running, in each logical frame of game picture After broadcasting terminates, the logical frame may take the playing duration of other logical frames because of reproduction time length, it is therefore desirable to judge It whether there is key frame between the logical frame terminated and next logical frame to be played playing, directly played if without if under this One logical frame to be played, searches if having and plays key frame.The description of concrete technical scheme is referring to following each embodiments.
Refer to Fig. 1, the schematic flow sheet for the key frame recognition methods that Fig. 1 provides for first embodiment of the invention, the pass Key frame recognition methods can be applicable in terminal, and the terminal includes PC (personal computer), mobile phone, tablet personal computer, intelligence Energy game machine etc..This method includes:
S101, after each logical frame is played and terminated, confirm logical frame that the broadcasting terminates in the logical frame generated First position in Array for structural body, and determine next logical frame to be played in the Array for structural body according to the first position In the second place;
The Array for structural body includes:The logical frame (FrameIndex) that is arranged by playing sequence and before each logical frame The number (NumKeyFrame) of the accumulative key frame occurred.Specifically, if logical frame A, logical frame B, logical frame C, logical frame D, logical frame E are by playing sequence, wherein logical frame B continuously broadcasting 2 times, then the specific form of the Array for structural body such as table 1:
Table 1
FrameIndex A B B C D E
NumKeyFrame 0 1 1 1 1 1
The Array for structural body one array element of each row correspondence, two tuples of each array element correspondence (FrameIndex, NumKeyFrame).In order to search conveniently, it is that array element sets array element to index (ArrayIndex), represents logical frame The storage location of playing sequence and logical frame.FrameIndex in ArrayIndex and the Array for structural body and NumKeyFrame corresponding relation such as table 2:
Table 2
ArrayIndex 0 1 2 3 4 5
FrameIndex A B B C D E
NumKeyFrame 0 1 1 1 1 1
The structure of the Array for structural body of the logical frame is described below in detail, the Array for structural body specifically includes following two Point:
Logical frame (FrameIndex), also known as logic frame index, each logical frame are arranged in Array for structural body by playing sequence Row, it is corresponding with the position that array element indexes ArrayIndex instructions, i.e. logical frame A, logical frame B, logical frame C, logical frame D, logical frame E are stored in the Array for structural body by playing sequence, and wherein logical frame B is repeated playing once, using with for the first time Play different another array element storages, the value increase by 1 of array element index.
Add up the number (NumKeyFrame) of key frame that occurred before each logical frame, it is necessary to explanation, when If preceding logical frame key frame, then the corresponding NumKeyFrame stored counts of current logic frame, i.e. by current logic frame NumKeyFrame number increase by 1.For example, logical frame B is key frame in table 1, before without key frame, then by logical frame B's NumKeyFrame records are revised as 1 by 0.When logical frame B is repeated playing again, not repeat count key frame, therefore the structure The NumKeyFrame for each logical frame played in array after logical frame B is recorded as 1.
Position of the logical frame in Array for structural body, can be by the letter of the Array for structural body of the logical frame itself preservation What breath was determined, be stored with its own position in Array for structural body in each logical frame, and the information is in the Array for structural body Record is in each logical frame while generation.For example, playing the logical frame of end for C, its recorded in logical frame C is in table 2 Array for structural body in corresponding ArrayIndex be 3, it is determined that logical frame C first position be 3.
In the embodiment of the present invention, the logical frame that the broadcasting terminates is F, structures of the logical frame F in the logical frame generated First position in array represents that next logical frame to be played is F ', logical frame with array element index ArrayIndex1 The second places of the F ' in the Array for structural body is represented with array element index ArrayIndex2.
Specifically, according to the broadcasting time difference between ArrayIndex1, logical frame F and logical frame F ', the section of each logical frame Duration, determines ArrayIndex2 jointly.
S102, judge in the Array for structural body, the first position and the second place are corresponding in current logic respectively Whether the number of the accumulative key frame occurred is identical before frame;
The corresponding NumKeyFrame of ArrayIndex1 are searched in the Array for structural body, and, search ArrayIndex2 Corresponding NumKeyFrame, judges that ArrayIndex1 corresponding NumKeyFrame and ArrayIndex2 are corresponding Whether NumKeyFrame is identical.
For example, it is specific as shown in table 1, if the first position is 1, the corresponding NumKeyFrame in Array for structural body For 1, if the second place is 4, corresponding NumKeyFrame is 1 in Array for structural body, judges this two Whether NumKeyFrame is identical.
If identical, step S103 is performed;If differing, step S104 is performed.
S103, confirm between logical frame and next logical frame to be played that the broadcasting terminates without key frame, and broadcast Put next logical frame to be played;
If the corresponding NumKeyFrame of ArrayIndex1 NumKeyFrames corresponding with ArrayIndex2 is identical, really Recognize between logical frame F and logical frame F ' without key frame, can all skip, directly play logical frame F '.
S104, first key frame between the logical frame and next logical frame to be played that the broadcasting terminates is searched, And play the first key frame.
If the corresponding NumKeyFrame of ArrayIndex1 NumKeyFrames corresponding with ArrayIndex2 is differed, The first key frame between logical frame F and logical frame F ' can be searched by Predistribution Algorithm, and plays the first key frame.
In an example, referring to table 2, the logical frame that end is played in Array for structural body is B, and logical frame B is first Secondary to play, its corresponding first position is 1, and corresponding NumKeyFrame is 1, next logical frame D to be played second 4 are set to, corresponding NumKeyFrame is 1, and this two NumKeyFrame are identical, therefore, directly play logical frame D.
In another example, referring to table 2, the logical frame that end is played in Array for structural body is A, logical frame A correspondences First position be 0, corresponding NumKeyFrame is 0, and the next logical frame D to be played second place is 4, corresponding NumKeyFrame is 1, this two NumKeyFrame differences, therefore, searches the first key between logical frame A and logical frame D Frame, i.e. logical frames different from logical frame A first NumKeyFrame, is first key frame.In table 2, first Logical frames different from logical frame A NumKeyFrame is B, i.e. logical frame B is the key frame found, plays logical frame B.
In the embodiment of the present invention, after the broadcasting of each logical frame terminates, pass through and confirm in the Array for structural body generated The first position for the logical frame that the broadcasting terminates and the second place of next logical frame to be played, and judge first position and Whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for the second place, to judge that this is broadcast Put and whether there is key frame between the logical frame of end and next logical frame to be played, if nothing, play this next Logical frame to be played, if so, then searching the head between the logical frame and next logical frame to be played that the broadcasting terminates Individual key frame, and the first key frame is played, judgement can be simplified, the process of key frame is searched, the speed for searching key frame is improved, The time complexity searched is reduced, the calculating time is largely accelerated, the fluency that picture is played is improved.
Fig. 2 is referred to, the key frame recognition methods that Fig. 2 provides for second embodiment of the invention can be applied in terminal, should Method includes:
When S201, client terminal start-up loading Initial page, according to reproduction time sequential storage logical frame to be played, and remember Add up the number of key frames occurred before recording each logical frame, obtain the Array for structural body of logical frame;
The client can be game class client, the client terminal start-up, after game initial picture starts to load and rendered Display is on a terminal screen.Game picture is carried in client terminal start-up, while generating the structure of each logical frame of the game picture Array.According to the logical frame that reproduction time sequential storage is to be played in the Array for structural body, and, record each logical frame it The number of key frames of preceding accumulative appearance.
Specifically, the Array for structural body includes:The logical frame that is arranged by playing sequence and add up before each logical frame The number of the key frame occurred.The Array for structural body one array element of each row correspondence, each array element correspondence binary Group (FrameIndex, NumKeyFrame).
The Array for structural body specifically includes following two parts:
Logical frame (FrameIndex), also known as logic frame index, each logical frame are arranged in table by playing sequence, with array Element index is corresponding, i.e. logical frame A, logical frame B, logical frame C, logical frame D, logical frame E are stored in the knot by playing sequence In structure body array, wherein logical frame B is repeated playing once, is stored using different array elements are played from first time, array member Plain index value increase by 1;
Add up the number (NumKeyFrame) of key frame that occurred before each logical frame, it is necessary to explanation, when If preceding logical frame key frame, then perform stored count, the NumKeyFrame of current logic frame number is increased by 1.
Set array element to index (ArrayIndex) for array element, represent the playing sequence and logical frame of logical frame Storage location.
The concrete structure of the Array for structural body of logical frame is identical with the table 1 of aforementioned first embodiment, ArrayIndex with Corresponding relation between FrameIndex, NumKeyFrame is identical with the table 2 of aforementioned first embodiment.
Further, if same logical frame is repeated playing repeatedly, in the Array for structural body, repeated playing according to this The playing sequence of logical frame, the logic repeated playing is stored using the array element of quantity identical with logical frame broadcasting time Frame a, i.e. logical frame plays how many times, just corresponds to according to playing sequence using how many array elements to patrolling for repeating playing Frame is collected to record respectively.For example, in table 2, logical frame B is played 2 times, just according to playing sequence, in ArrayIndex1 and The ArrayIndex2 storage logical frame B of two positions 2 times.
S202, it is each logical frame according to storage location generation array element index, and records logic in each logical frame Position in each comfortable Array for structural body of frame;
Index, can be indexed according to array element rapidly true according to storage location generation array element for the logical frame of storage Position of the logical frame in the Array for structural body is determined, so as to accelerate to judge, search the speed of key frame.
Meanwhile, the position in each comfortable Array for structural body of logical frame is recorded in each logical frame, by inquiring about each logic Frame can know storage location of each logical frame in the Array for structural body.Further improve and confirm logical frame in the structure The convenience of position in array.
S203, after each logical frame is played and terminated, confirm logical frame that the broadcasting terminates in the structure generated First position in array, and determine next logical frame to be played in the Array for structural body according to the first position The second place;
In the embodiment of the present invention, the logical frame that the broadcasting terminates is F, structures of the logical frame F in the logical frame generated First position in array represents that next logical frame to be played is F ', logical frame with array element index ArrayIndex1 The second places of the F ' in the Array for structural body is represented with array element index ArrayIndex2.
The information that can be recorded by query logic frame F, knows ArrayIndex1.For example, in table 2, playing patrolling for end Volume frame is E, and logical frame E corresponding ArrayIndex in Array for structural body are 4, logical frame E Array for structural body generate it is same When also record position from Array for structural body, pass through query logic frame E record information, it may be determined that logical frame E's Position is 4.
After the broadcasting of each logical frame terminates, ArrayIndex2 can be according to ArrayIndex1, logical frame F and logic The broadcasting time difference between frame F ', and, the isochronous surface length of default each logical frame is determined jointly.
Specifically, after logical frame F broadcastings terminate, logical frame F broadcast start time T1, logical frame F ' beginning is obtained Reproduction time T2, each logical frame average time slice length L, wherein logical frame F ' broadcast start time T2 is logic Frame F end reproduction time.The isochronous surface of multiple logical frames may be occupied between time interval [T1, T2], according to patrolling Collect the average duration slice length of frame, the second places of the calculating logic frame F ' in the Array for structural body.
It is ArrayIndex1 to make the first position, and it is ArrayIndex2 to make the second place, then:
ArrayIndex2=ArrayIndex1+ (T2-T1)/L
S204, judge in the Array for structural body, the first position and the second place are corresponding in current logic respectively Whether the number of the accumulative key frame occurred is identical before frame;
The corresponding NumKeyFrame of ArrayIndex1 are searched in the Array for structural body, and, search ArrayIndex2 Corresponding NumKeyFrame, judges that the ArrayIndex1 corresponding NumKeyFrame and ArrayIndex2 searched are corresponding Whether NumKeyFrame is identical.
If identical, step S205 is performed;If differing, step S206 is performed.
S205, confirm between logical frame and next logical frame to be played that the broadcasting terminates without key frame, and broadcast Put next logical frame to be played;
If the corresponding NumKeyFrame of ArrayIndex1 NumKeyFrames corresponding with ArrayIndex2 is identical, really Recognize between logical frame F and logical frame F ' without key frame, can all skip, directly play logical frame F '.
If the probability that key frame occurs is p, by contrasting the key frame for adding up to occur before current logic frame Number, confirm between the logical frame and next logical frame to be played that the broadcasting terminates without key frame, can all skip, Next logical frame to be played is directly played, time complexity can be reduced, the time complexity after reduction is non-key The probability (1-p) of frame is multiplied by query time O (1), i.e. O (1-p).
S206, first key frame between the logical frame and next logical frame to be played that the broadcasting terminates is searched, And play the first key frame.
If the corresponding NumKeyFrame of ArrayIndex1 NumKeyFrames corresponding with ArrayIndex2 is differed, By binary chop algorithm, the position that the first NumKeyFrame between logical frame F and logical frame F ' changes is searched.I.e. The minimum corresponding logical frames of array element of ArrayIndex are searched, and meet the logical frame in the Array for structural body NumKeyFrame value is (F.NumKeyFrame+1), wherein, F.NumKeyFrame is in Array for structural body The number of the key frame for being accumulated to logical frame F of the corresponding position records of ArrayIndex1.
Wherein, binary chop algorithm is also known as binary search algorithm, it is adaptable to infrequently change and search frequently have sequence Table, the binary chop algorithm is in having the array of repeat element, to search the position that object element occurs first, advantage is to compare Number of times is few, searches speed soon, average behavior is good.
Specifically, in the present embodiment, the Array for structural body two positions ArrayIndex1 and ArrayIndex2 are divided Not corresponding NumKeyFrame values compare, if identical, illustrate between ArrayIndex1 and ArrayIndex2 without key Frame, directly plays the logical frame at ArrayIndex2;If it is different, then illustrate ArrayIndex1 and ArrayIndex2 it Between have key frame, now need occur the position of key frame between binary chop ArrayIndex1 and ArrayIndex2 first, That is NumKeyFrame value is patrolling for (F.NumKeyFrame+1) first between lookup ArrayIndex1 and ArrayIndex2 Collect frame.Binary chop algorithm search key frame process be:ArrayIndex1 and ArrayIndex2 average value are taken first Mid, if the NumberKeyFrame values at mid positions are smaller than (F.NumKeyFrame+1), [mid+1, ArrayIndex2] between search NumKeyFrame value first be (F.NumKeyFrame+1) element;If mid positions The NumberKeyFrame values at place are bigger or equal with (F.NumKeyFrame+1) than (F.NumKeyFrame+1), then exist The value that NumKeyFrame is searched between [ArrayIndex1, mid] is the logical frame of (F.NumKeyFrame+1) first, until The left margin of binary chop is more than or equal to right margin, then stops searching.Now, the logical frame at left margin is first NumKeyFrame value is the logical frame of (F.NumKeyFrame+1), so the logical frame at the left margin is appearance for the first time Key frame, the logical frame of lookup is defined as between the logical frame and next logical frame to be played that the broadcasting terminates First key frame, and play the logical frame.
If the probability that key frame occurs is p, then by by binary chop algorithm, searching the logic that the broadcasting terminates First key frame between frame and next logical frame to be played, and the first key frame is played, the time that can reduce answers Miscellaneous degree, the time complexity after reduction is multiplied by query time O (logn), i.e. O (p*logn) for the Probability p of key frame.
In the embodiment of the present invention, after the broadcasting of each logical frame terminates, pass through and confirm in the Array for structural body generated The first position for the logical frame that the broadcasting terminates and the second place of next logical frame to be played, and judge first position and Whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for the second place, to judge that this is broadcast Put and whether there is key frame between the logical frame of end and next logical frame to be played, if nothing, play this next Logical frame to be played, if so, then searching the head between the logical frame and next logical frame to be played that the broadcasting terminates Individual key frame, and the first key frame is played, judgement can be simplified, the process of key frame is searched, the speed for searching key frame is improved, The time complexity searched is reduced, the calculating time is largely accelerated, the fluency that picture is played is improved.
Fig. 3 is referred to, the key frame identifying device that Fig. 3 provides for third embodiment of the invention for convenience of description, is only shown The part related to the embodiment of the present invention is gone out.The device can be built in terminal, and the device includes:
First confirms that module 301, judge module 302, second confirm module 303, playing module 304 and searching modul 305.
Wherein, first confirms module 301, for after the broadcasting of each logical frame terminates, confirming the logic that the broadcasting terminates First position of the frame in the Array for structural body of the logical frame generated, and determined according to the first position next to be played The second place of the logical frame in the Array for structural body, the Array for structural body includes:The logical frame that is arranged by playing sequence and Add up the number of key frame occurred before each logical frame;
The Array for structural body can include:The logical frame arranged by playing sequence and the accumulative appearance before each logical frame The number for the key frame crossed.
Logical frame (FrameIndex), also known as logic frame index, each logical frame are arranged in table by playing sequence, with array Element index is corresponding.
Add up the number (NumKeyFrame) of key frame that occurred before each logical frame, it is necessary to explanation, when If preceding logical frame key frame, then the NumKeyFrame of current logic frame number is increased by 1 by stored count.
In order to search conveniently, it is that array element sets array element to index (ArrayIndex), represents the broadcasting of logical frame The storage location of order and logical frame.
Judge module 302, for judging in the Array for structural body, the first position and the second place distinguish corresponding Whether the number of the accumulative key frame occurred is identical before current logic frame.
Judge that the corresponding NumKeyFrame in first position and the second place are corresponding in the Array for structural body Whether NumKeyFrame is identical.
Second confirms module 303, if being for the result that the judge module judges:The first position and the second place point The number of the not corresponding key frame for adding up to occur before current logic frame is identical, then confirms the logical frame that the broadcasting terminates Without key frame between next logical frame to be played.
If can all be skipped without key frame between logical frame and next logical frame to be played that the broadcasting terminates, Directly play next logical frame to be played.
Playing module 304, for playing next logical frame to be played.
Searching modul 305, if being for the result that the judge module judges:The first position and the second place are right respectively The number of key frame for adding up to occur before current logic frame answered is differed, then search logical frame that the broadcasting terminates with First key frame between next logical frame to be played.
Playing module 304, is additionally operable to play the first key frame.
Device in the embodiment of the present invention is used for the method for performing embodiment described in earlier figures 1, techniques not described details Identical with foregoing embodiment illustrated in fig. 1, here is omitted.
In the embodiment of the present invention, after the broadcasting of each logical frame terminates, pass through and confirm in the Array for structural body generated The first position for the logical frame that the broadcasting terminates and the second place of next logical frame to be played, and judge first position and Whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for the second place, to judge that this is broadcast Put whether to close between the logical frame of end and next logical frame to be played and there is key frame, if nothing, play this next Logical frame to be played, if so, then searching the head between the logical frame and next logical frame to be played that the broadcasting terminates Individual key frame, and the first key frame is played, judgement can be simplified, the process of key frame is searched, the speed for searching key frame is improved, The time complexity searched is reduced, the calculating time is largely accelerated, the fluency that picture is played is improved.
Fig. 4 is referred to, the key frame identifying device that Fig. 4 provides for fourth embodiment of the invention for convenience of description, is only shown The part related to the embodiment of the present invention is gone out.The device can be built in terminal, shown in the device and Fig. 3 shown in the present embodiment Device difference be, the device also one progress include:
Generation module 406, it is to be played according to reproduction time sequential storage for when client terminal start-up loads initial picture Logical frame, and record the number of key frames for adding up before each logical frame to occur, obtain the Array for structural body of logical frame.
Generation module 406, is additionally operable to be each logical frame according to storage location generation array element index.
The client can be game class client, the client terminal start-up, after game initial picture starts to load and rendered Display is on a terminal screen.Game picture is carried in client terminal start-up, while generating the structure of each logical frame of the game picture Array.According to the logical frame that reproduction time sequential storage is to be played in the Array for structural body, and record each logical frame it The number of key frames of preceding accumulative appearance.Meanwhile, indexed for the logical frame of storage according to storage location generation array element, can be with fast Speed indexes the position for determining logical frame in the Array for structural body according to array element, so as to accelerate to judge, search key frame Speed.
The device can further include:
Logging modle 407, for recording the position in each comfortable Array for structural body of logical frame in each logical frame.
It can know storage location of each logical frame in the Array for structural body by inquiring about each logical frame.Further carry Height confirms the convenience of logical frame position in the Array for structural body.
Further, generation module 406, are repeated playing repeatedly if being additionally operable to same logical frame, in the Array for structural body In, according to the playing sequence of the logical frame repeated playing, deposited using the array element of quantity identical with logical frame broadcasting time Store up the logical frame repeated playing.
That is, one logical frame plays how many times, just corresponds to and is replayed according to playing sequence using how many array element counterweights The logical frame put is recorded respectively.For example, in table 2, logical frame B is played 2 times, just according to playing sequence, in ArrayIndex1 and The ArrayIndex2 storage logical frame B of two positions 2 times.
Further, searching modul 305, specifically for by binary chop algorithm, searching the logical frame that the broadcasting terminates Between next logical frame to be played, the number of the first key frame for adding up to occur before current logic frame occurs The position of change.
The device also includes:
Determining module 408, next is treated for the logical frame of the position to be defined as into logical frame that the broadcasting terminates with this First key frame between the logical frame of broadcasting.
The binary chop algorithm is in having the array of repeat element, to search the position that object element occurs first.Specifically Ground, distinguishes corresponding NumKeyFrame values by two position ArrayIndex1 of the Array for structural body and ArrayIndex2 and compares Compared with if it is different, then illustrating there is key frame between ArrayIndex1 and ArrayIndex2, now needing binary chop Occur the position of key frame between ArrayIndex1 and ArrayIndex2 first, that is, search ArrayIndex1 and NumKeyFrame value is the element of (F.NumKeyFrame+1) first between ArrayIndex2.Binary chop algorithm is searched The process of key frame is:ArrayIndex1 and ArrayIndex2 average value mid is taken first, if at mid positions NumberKeyFrame values are smaller than (F.NumKeyFrame+1), then searched between [mid+1, ArrayIndex2] NumKeyFrame value is the logical frame of (F.NumKeyFrame+1) first;If the NumberKeyFrame at mid positions Value is bigger or equal with (F.NumKeyFrame+1) than (F.NumKeyFrame+1), then is looked between [ArrayIndex1, mid] The value for looking for NumKeyFrame is the logical frame of (F.NumKeyFrame+1) first, until the left margin of binary chop is more than or equal to Right margin, then stop searching, the value that now logical frame at left margin is first NumKeyFrame is (F.NumKeyFrame + 1) logical frame, so the logical frame at the left margin is the key frame occurred for the first time, the logical frame of lookup is defined as First key frame between logical frame and next logical frame to be played that the broadcasting terminates, and play the logical frame.
First confirms module 301, specifically for after the broadcasting of each logical frame terminates, obtaining the logical frame that the broadcasting terminates Broadcast start time T1 and next logical frame to be played broadcast start time T2, and, each logical frame Average time slice length L;
It is ArrayIndex1 to make the first position, and it is ArrayIndex2 to make the second place, then:
ArrayIndex2=ArrayIndex1+ (T2-T1)/L.
Techniques not described details in the embodiment of the present invention, it is identical referring to each embodiment shown in 1~Fig. 3 of earlier figures, this Place is repeated no more.
In the embodiment of the present invention, after the broadcasting of each logical frame terminates, pass through and confirm in the Array for structural body generated The first position for the logical frame that the broadcasting terminates and the second place of next logical frame to be played, and judge first position and Whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for the second place, to judge that this is broadcast Put whether to close between the logical frame of end and next logical frame to be played and there is key frame, if nothing, play this next Logical frame to be played, if so, then searching the head between the logical frame and next logical frame to be played that the broadcasting terminates Individual key frame, and the first key frame is played, judgement can be simplified, the process of key frame is searched, the speed for searching key frame is improved, The time complexity searched is reduced, the calculating time is largely accelerated, the fluency that picture is played is improved.
Fig. 5 is the terminal structure schematic diagram provided in an embodiment of the present invention for performing key frame recognition methods.
Terminal described in the present embodiment, including:
At least one input equipment 51;At least one output equipment 52;At least one processor 53, such as center processing Device;And, memory 54.
Above-mentioned input equipment 51, output equipment 52, processor 53 and memory 54 are connected by bus 55.
Wherein, input equipment 51 concretely camera, contact panel, physical button or mouse etc..Output equipment 52 concretely display screens.
Memory 54 can be high random access memory body (RAM, Random Access Memory) memory, also may be used For non-labile memory (non-volatile memory), such as magnetic disk storage.Memory 54 is used for one group of storage can Configuration processor code, processor 53 is coupled with memory 54, and above-mentioned input equipment 51, output equipment 52 and processor 53 are used to lead to The executable program code stored in memory 54 is crossed, following operation is performed:
The code is performed by processor 53, the key frame identification as described in 1~embodiment illustrated in fig. 2 of earlier figures is performed Method.
Specifically, i.e., after the broadcasting of each logical frame terminates, confirm the logical frame terminated of playing in patrolling for having generated The first position in the Array for structural body of frame is collected, and determines next logical frame to be played described according to the first position The second place in Array for structural body, the Array for structural body includes:The logical frame that is arranged by playing sequence and in each logic Add up the number of key frame occurred before frame;Judge in the Array for structural body, the first position and described second Whether the corresponding number of key frame for adding up to occur before current logic frame is identical respectively for position;If identical, confirm It is described to play between the logical frame terminated and next logical frame to be played without key frame, and play described next treat The logical frame of broadcasting;If differing, search it is described play the logical frame and the next logical frame to be played that terminate it Between first key frame, and play the first key frame.
, can be by it in multiple embodiments provided herein, it should be understood that disclosed method and apparatus Its mode is realized.For example, the embodiment of device described above is only schematical, for example, the division of the module, It is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple module or components can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed Coupling each other or direct-coupling or communication linkage can be by some interfaces, the INDIRECT COUPLING of device or module or Communication linkage, can be electrical, machinery or other forms.
The module illustrated as separating component can be or may not be it is physically separate, it is aobvious as module The part shown can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple On mixed-media network modules mixed-media.Some or all of module therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional module in each embodiment of the invention can be integrated in a processing module, can also That modules are individually physically present, can also two or more modules be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated module is realized using in the form of software function module and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It should be noted that for foregoing each method embodiment, for simplicity description, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
It is to key frame recognition methods provided by the present invention and the description of key frame identifying device, for this area above Those skilled in the art, according to the embodiment of the present invention thought, change is had in specific embodiments and applications Place, to sum up, this specification content should not be construed as limiting the invention.

Claims (10)

1. a kind of key frame recognition methods, it is characterised in that including:
After the broadcasting of each logical frame terminates, structure number of the logical frame for playing end in the logical frame generated is confirmed First position in group, and determine next logical frame to be played in the Array for structural body according to the first position The second place, the Array for structural body includes:The logical frame arranged by playing sequence and the accumulative appearance before each logical frame The number for the key frame crossed;
Judge in the Array for structural body, the first position and the second place respectively it is corresponding current logic frame it Whether the number of the preceding accumulative key frame occurred is identical;
If identical, confirm it is described play terminate logical frame and next logical frame to be played between without key frame, And play next logical frame to be played;
If differing, the first pass played between the logical frame terminated and next logical frame to be played is searched Key frame, and play the first key frame.
2. according to the method described in claim 1, it is characterised in that described after the broadcasting of each logical frame terminates, confirm described First position of the logical frame terminated in the Array for structural body of the logical frame generated is played, is included before:
When client terminal start-up loads initial picture, according to reproduction time sequential storage logical frame to be played, and record and each patrol Add up the number of key frames occurred before collecting frame, obtain the Array for structural body of logical frame;
It is that each logical frame is indexed according to storage location generation array element;
The position in each comfortable Array for structural body of logical frame is recorded in each logical frame.
3. method according to claim 2, it is characterised in that methods described also includes:
If same logical frame is repeated playing repeatedly, in the Array for structural body, according to the logical frame repeated playing Playing sequence, uses the logical frame repeated playing described in the array element storage of quantity identical with logical frame broadcasting time.
4. the method according to any one of claims 1 to 3, it is characterised in that the lookup is described to play the logic terminated First key frame between frame and next logical frame to be played, including:
By binary chop algorithm, between the logical frame and next logical frame to be played of searching the broadcasting end, The position that the number of the first key frame for adding up to occur before current logic frame changes;
By the logical frame of the position be defined as it is described play the logical frame and the next logical frame to be played that terminate it Between first key frame.
5. method according to claim 4, it is characterised in that it is described determined according to the first position it is next to be played The second place of the logical frame in the Array for structural body, including:
After each logical frame is played and terminated, the broadcast start time T1, described next of the logical frame played and terminated is obtained The broadcast start time T2 of individual logical frame to be played, and, the average time slice length L of each logical frame;
It is ArrayIndex1 to make the first position, and it is ArrayIndex2 to make the second place, then:
ArrayIndex2=ArrayIndex1+ (T2-T1)/L.
6. a kind of key frame identifying device, it is characterised in that described device includes:
First confirms module, for after the broadcasting of each logical frame terminates, confirming that the logical frame terminated of playing is being generated Logical frame Array for structural body in first position, and determine that next logical frame to be played exists according to the first position The second place in the Array for structural body, the Array for structural body includes:The logical frame that is arranged by playing sequence and each Add up the number of key frame occurred before logical frame;
Judge module, for judging in the Array for structural body, the first position and second place difference are corresponding Whether the number of the accumulative key frame occurred is identical before current logic frame;
Second confirms module, if for the first position and the second place respectively it is corresponding before current logic frame it is tired The number for counting the key frame occurred is identical, then confirms the logical frame and next logic to be played played and terminated Without key frame between frame;
Playing module, for playing next logical frame to be played;
Searching modul, if adding up before current logic frame for the first position and the second place to be corresponding respectively The number for the key frame now crossed is differed, then searches the logical frame and next logical frame to be played played and terminated Between first key frame;
The playing module, is additionally operable to play the first key frame.
7. device according to claim 6, it is characterised in that described device also includes:
Generation module, for when client terminal start-up loads initial picture, according to reproduction time sequential storage logic to be played Frame, and the number of key frames for adding up before each logical frame to occur is recorded, obtain the Array for structural body of logical frame;
The generation module, is additionally operable to be each logical frame according to storage location generation array element index;
Logging modle, for recording the position in each comfortable Array for structural body of logical frame in each logical frame.
8. device according to claim 7, it is characterised in that the generation module, is repeated if being additionally operable to same logical frame Play multiple, then in the Array for structural body, according to the playing sequence of the logical frame repeated playing, using with logical frame The logical frame repeated playing described in the array element storage of the identical quantity of broadcasting time.
9. the device according to any one of claim 6 to 8, it is characterised in that
The searching modul, specifically for by binary chop algorithm, search it is described play the logical frame terminated with it is described next Between individual logical frame to be played, the position that the first number of key frame for adding up to occur before current logic frame changes Put;
Described device also includes:
Determining module, next waits to broadcast for the logical frame of the position to be defined as into the logical frame terminated of playing with described First key frame between the logical frame put.
10. device according to claim 9, it is characterised in that described first confirms module, specifically in each logic After frame broadcasting terminates, the broadcast start time T1 of the logical frame played and terminated, next logic to be played are obtained The broadcast start time T2 of frame, and, the average time slice length L of each logical frame;
It is ArrayIndex1 to make the first position, and it is ArrayIndex2 to make the second place, then:
ArrayIndex2=ArrayIndex1+ (T2-T1)/L.
CN201710330148.5A 2017-05-11 2017-05-11 Key frame recognition methods and device Active CN107147947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710330148.5A CN107147947B (en) 2017-05-11 2017-05-11 Key frame recognition methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710330148.5A CN107147947B (en) 2017-05-11 2017-05-11 Key frame recognition methods and device

Publications (2)

Publication Number Publication Date
CN107147947A true CN107147947A (en) 2017-09-08
CN107147947B CN107147947B (en) 2018-07-13

Family

ID=59777789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330148.5A Active CN107147947B (en) 2017-05-11 2017-05-11 Key frame recognition methods and device

Country Status (1)

Country Link
CN (1) CN107147947B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111744177A (en) * 2020-07-28 2020-10-09 腾讯科技(深圳)有限公司 Game data processing method and device, storage medium and electronic equipment
CN114699767A (en) * 2022-04-15 2022-07-05 北京字跳网络技术有限公司 Game data processing method, device, medium and electronic equipment
CN114845164A (en) * 2021-02-02 2022-08-02 ***通信有限公司研究院 Data processing method, device and equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1520561A (en) * 2001-03-30 2004-08-11 皇家菲利浦电子有限公司 Streaming video bookmarks
CN101841692A (en) * 2010-04-23 2010-09-22 深圳市茁壮网络股份有限公司 Method for fast forwarding and fast rewinding video stream
US8050539B2 (en) * 2004-09-03 2011-11-01 Canon Kabushiki Kaisha Data recording/reproducing apparatus and method
CN102340705A (en) * 2010-07-19 2012-02-01 中兴通讯股份有限公司 System and method for obtaining key frame
CN102611894A (en) * 2012-03-02 2012-07-25 华为技术有限公司 Method, device and system for detecting video transmission packet loss
CN103974061A (en) * 2014-05-27 2014-08-06 合一网络技术(北京)有限公司 Play test method and system
CN104391973A (en) * 2014-12-05 2015-03-04 国家电网公司 Multimedia system for key frame extraction and processing method
CN104869477A (en) * 2015-05-14 2015-08-26 无锡天脉聚源传媒科技有限公司 Method and device for segmented playing of video

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1520561A (en) * 2001-03-30 2004-08-11 皇家菲利浦电子有限公司 Streaming video bookmarks
US8050539B2 (en) * 2004-09-03 2011-11-01 Canon Kabushiki Kaisha Data recording/reproducing apparatus and method
CN101841692A (en) * 2010-04-23 2010-09-22 深圳市茁壮网络股份有限公司 Method for fast forwarding and fast rewinding video stream
CN102340705A (en) * 2010-07-19 2012-02-01 中兴通讯股份有限公司 System and method for obtaining key frame
CN102611894A (en) * 2012-03-02 2012-07-25 华为技术有限公司 Method, device and system for detecting video transmission packet loss
CN103974061A (en) * 2014-05-27 2014-08-06 合一网络技术(北京)有限公司 Play test method and system
CN104391973A (en) * 2014-12-05 2015-03-04 国家电网公司 Multimedia system for key frame extraction and processing method
CN104869477A (en) * 2015-05-14 2015-08-26 无锡天脉聚源传媒科技有限公司 Method and device for segmented playing of video

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111744177A (en) * 2020-07-28 2020-10-09 腾讯科技(深圳)有限公司 Game data processing method and device, storage medium and electronic equipment
CN114845164A (en) * 2021-02-02 2022-08-02 ***通信有限公司研究院 Data processing method, device and equipment
CN114699767A (en) * 2022-04-15 2022-07-05 北京字跳网络技术有限公司 Game data processing method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN107147947B (en) 2018-07-13

Similar Documents

Publication Publication Date Title
US11132346B2 (en) Information processing method and apparatus
CN109657213B (en) Text similarity detection method and device and electronic equipment
CN103548076B (en) Utilize sound signal to identify the apparatus and method of content
US11907659B2 (en) Item recall method and system, electronic device and readable storage medium
CN108197285A (en) A kind of data recommendation method and device
CN110751224A (en) Training method of video classification model, video classification method, device and equipment
CN107864405B (en) Viewing behavior type prediction method, device and computer readable medium
CN111683274B (en) Bullet screen advertisement display method, device and equipment and computer readable storage medium
CN107147947A (en) Key frame recognition methods and device
CN106649696A (en) Information classification method and device
CN104636349A (en) Method and equipment for compression and searching of index data
CN104902292A (en) Television report-based public opinion analysis method and system
CN104778271A (en) Video data caching method and device
CN110751042A (en) Time partition-based portrait and IMSI information association method and system
CN102262660B (en) Method and device implemented by computer and used for obtaining search result
CN111930974A (en) Audio and video type recommendation method, device, equipment and storage medium
CN106021615A (en) Method and device for optimizing title search
CN106933919A (en) The connection method of tables of data and device
CN112148942A (en) Business index data classification method and device based on data clustering
CN105447004A (en) Mining device for query suggestion words, related query method and device
CN110569447B (en) Network resource recommendation method and device and storage medium
CN104834728B (en) A kind of method for pushing and device for subscribing to video
CN104915435A (en) Data query method and device
CN107203550B (en) Data processing method and database server
CN104935647B (en) A kind of sharing files method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant