CN103137168A - Code stream fixed point searching method, device and player - Google Patents

Code stream fixed point searching method, device and player Download PDF

Info

Publication number
CN103137168A
CN103137168A CN2011103989394A CN201110398939A CN103137168A CN 103137168 A CN103137168 A CN 103137168A CN 2011103989394 A CN2011103989394 A CN 2011103989394A CN 201110398939 A CN201110398939 A CN 201110398939A CN 103137168 A CN103137168 A CN 103137168A
Authority
CN
China
Prior art keywords
timestamp
document location
searched
time
obtains
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
CN2011103989394A
Other languages
Chinese (zh)
Other versions
CN103137168B (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.)
Ju Li (Zhuhai) Microelectronics Co., Ltd
Original Assignee
Actions Semiconductor 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 Actions Semiconductor Co Ltd filed Critical Actions Semiconductor Co Ltd
Priority to CN201110398939.4A priority Critical patent/CN103137168B/en
Publication of CN103137168A publication Critical patent/CN103137168A/en
Application granted granted Critical
Publication of CN103137168B publication Critical patent/CN103137168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a code stream fixed point searching method, a device and a player and is applied to the technical field of numeric code stream playing. The method includes the following steps: acquiring a preselection file position corresponding to to-be-searched time and a time stamp corresponding to the to-be-searched time; when the absolute value of the difference between the time stamp and the to-be-searched time is larger than a preset error value, positions of the file and the preselection file are corrected so as to acquire a new position of the file, and correcting times are recorded; when the new position of the file is different from the position of the preselection file and the correcting times do not exceed the preset times, the position of the preselection file is updated as the new position of the file; and a time stamp corresponding to the new position of the file is acquired, whether the absolute value of the difference between the time stamp and the to-be-searched time is larger than the preset error value is judged again until the preset condition is met, and the search is quit. Compared with an existing fixed point searching method, the code stream fixed point searching method has the advantages of being short in search time and high in searched file position accuracy.

Description

A kind of code stream geographic search method, device and player
Technical field
The invention belongs to digital code stream play-back technology field, relate in particular to a kind of code stream geographic search method, device and player.
Background technology
In digital code stream (as music, video etc.) is play, the demand that begins to play from certain particular point in time is often arranged, be also that the code stream fixed point is play, need the first search ASCII stream file ASCII position corresponding with this particular point in time, thereby from this document position broadcast, further realize the synchronous of audio, video data, want to watch since the 5th minute video as the user, need to find in code stream the image timestamp near 5 minutes, and jump to this position and begin to play, and this timestamp has shown the output time of each two field picture.For the code stream that location index is arranged, can pass through concordance list, leap to the time that needs and play, but imperfect or during without the digital code stream of concordance list to concordance list, can't carry out precise search by the method for searching concordance list.For the code stream without concordance list, the step of a kind of searching method of using at present is as follows, as shown in Figure of description 1:
In step S101, always big or small according to default time to be searched, code stream T.T. and code stream, obtain the qualifying code stream file position corresponding with this time to be searched.
Particularly, utilize always size of default time to be searched, code stream T.T. and code stream, calculate ASCII stream file ASCII position corresponding to time to be searched according to following formula:
Pos=Tseek*Stotal/Ttotal.
Wherein, Tseek is the time to be searched, and Ttotal is code stream T.T., is also video code flow T.T., and Stotal is always size of code stream, is also always size of video code flow, the qualifying code stream file position that Pos obtains for estimation.
In step S102, code stream is jumped to this qualifying code stream file position, obtain the timestamp corresponding with this ASCII stream file ASCII position, and record the number of times of this redirect.
Particularly, code stream is jumped to the preliminary election document location Pos that calculates, find near the time stamp T found in this position, and record the number of times of this redirect.
In step S103, judge that this timestamp deducts the difference of this time to be searched and whether surpasses default accuracy value scope, be, execution in step S104, no, and execution in step S109, finish search.
In step S104, this ASCII stream file ASCII position is deducted default side-play amount, to obtain new ASCII stream file ASCII position.
In step S105, judge that whether the difference that this time to be searched deducts this timestamp surpasses this default accuracy value scope, be, execution in step S106, no, and execution in step S109, finish search.
In step S106, this ASCII stream file ASCII position is added the side-play amount that this is default, to obtain new ASCII stream file ASCII position.
Particularly, the time stamp T found that relatively finds and time T seek to be searched, if Tfound greater than/surpass setting accuracy less than Tseek to be searched, accordingly Pos is subtracted/adds certain side-play amount.
Step S107, upgrading this qualifying code stream file position is new ASCII stream file ASCII position.
Step S108 judges whether the number of times of this redirect surpasses default number of times, is that execution in step S109, finish to search element, and is no, returns to execution in step S102.
The prerequisite that this searching method can reach precise search is: the code check of whole code stream changes less, be that shared file size was basic identical p.s. during code stream was play, and when the code check of code stream changes greatly, be difficult to reach certain precision in less file number of hops, the time of file redirect repeatedly and searching code stream can be reduced the efficient of search greatly.
Summary of the invention
The purpose of the embodiment of the present invention is to provide a kind of code stream geographic search method, device and player, is intended to solve when utilizing existing code stream geographic search method to carry out geographic search the low problem of document location precision that grow, search search time.
The embodiment of the present invention is achieved in that a kind of code stream geographic search method, and described method comprises the steps:
Obtain the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
When the absolute value of the difference of described timestamp and described time to be searched during greater than default error amount, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
When and described number of corrections not identical with described preliminary election document location do not have to surpass default number of times when described new document location, upgrading described preliminary election document location was described new document location;
Obtain the timestamp corresponding with described new document location, whether rejudge the absolute value of difference of described timestamp and described time to be searched greater than default error amount, until satisfy default condition, withdraw from this search.
Another purpose of the embodiment of the present invention is to provide a kind of code stream geographic search device, and described device comprises:
Acquiring unit is used for obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
Correcting unit, be used for when the absolute value of the difference of described timestamp and described time to be searched during greater than the error amount preset, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
Updating block, when not having to surpass default number of times for and described number of corrections not identical with described preliminary election document location when described new document location, upgrading described preliminary election document location is described new document location; And
Timestamp obtains and judging unit, be used for obtaining the timestamp corresponding with described new document location, and the absolute value of difference that rejudges described timestamp and described time to be searched until satisfy default condition, withdraws from this search whether greater than default error amount.
Another purpose of the embodiment of the present invention is to provide a kind of player that comprises above-mentioned code stream geographic search device.
the embodiment of the present invention is by obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with it, when the absolute value of the difference of this timestamp and this time to be searched during greater than the error amount preset, further according to the number of times of the timestamp that obtains, the position relationship of this timestamp and the last timestamp that obtains and this time to be searched, this preliminary election document location is carried out correction calculation, to obtain new document location, and the number of times of record correction, when and this number of corrections not identical with this preliminary election document location do not have to surpass default number of times when this new document location, upgrading this preliminary election document location is this new document location, and obtain the timestamp corresponding with this new document location, whether rejudge the absolute value of difference of this timestamp and this time to be searched greater than the error amount of presetting, until satisfy default condition, withdraw from this search, thereby get the document location with degree of precision, solved when utilizing existing code stream geographic search method to carry out geographic search to the code stream without concordance list, search time is long, the low problem of document location precision that searches, shortened search time, improved the document location precision that searches.
Description of drawings
Fig. 1 is the realization flow figure of existing code stream searching method;
Fig. 2 is the realization flow figure of the code stream geographic search method that provides of first embodiment of the invention;
Fig. 3 is the realization flow figure of the code stream geographic search method that provides of second embodiment of the invention;
Fig. 4 is the structural drawing of the code stream geographic search device that provides of third embodiment of the invention;
Fig. 5 is the concrete structure figure of correcting unit in the code stream geographic search device that provides of third embodiment of the invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention is obtained the document location of initial ranging by the time to be searched, and according to the timestamp corresponding with this document position, timestamp and the position relationship between the time to be searched that the last time obtains, to this document position proofreading and correct, until satisfy default condition, make be reduced search time, the precision of search is improved.
The embodiment of the present invention provides a kind of code stream geographic search method, and described method comprises the steps:
Obtain the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
When the absolute value of the difference of described timestamp and described time to be searched during greater than default error amount, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
When and described number of corrections not identical with described preliminary election document location do not have to surpass default number of times when described new document location, upgrading described preliminary election document location was described new document location;
Obtain the timestamp corresponding with described new document location, whether rejudge the absolute value of difference of described timestamp and described time to be searched greater than default error amount, until satisfy default condition, withdraw from this search.
The embodiment of the present invention also provides a kind of code stream geographic search device, and described device comprises:
Acquiring unit is used for obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
Correcting unit, be used for when the absolute value of the difference of described timestamp and described time to be searched during greater than the error amount preset, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
Updating block, when not having to surpass default number of times for and described number of corrections not identical with described preliminary election document location when described new document location, upgrading described preliminary election document location is described new document location; And
Timestamp obtains and judging unit, be used for obtaining the timestamp corresponding with described new document location, and the absolute value of difference that rejudges described timestamp and described time to be searched until satisfy default condition, withdraws from this search whether greater than default error amount.
The embodiment of the present invention also provides a kind of player that comprises above-mentioned code stream geographic search device.
the embodiment of the present invention is obtained the document location of initial ranging by the time to be searched, and according to the timestamp corresponding with this document position, the timestamp that last time obtains and the position relationship between the time to be searched, this document location that searches is proofreaied and correct, until satisfy default condition, solved when utilizing existing code stream geographic search method to carry out geographic search to the code stream without concordance list, search time is long, the low problem of document location precision that searches, reduced search time used when fixed point is play, improved the precision of fixing a point to play required document location.
Below in conjunction with specific embodiment, specific implementation of the present invention is described in detail:
Embodiment one:
Fig. 2 shows the realization flow of the code stream geographic search method that first embodiment of the invention provides, and details are as follows:
In step S201, obtain the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with this preliminary election document location.
In specific implementation process, utilize always size of known time to be searched, code stream T.T. and code stream, calculate preliminary election document location corresponding to time to be searched according to formula (1):
Pos=Tseek*Stotal/Ttotal;(1)
In formula (1), Tseek is the time to be searched, and Ttotal is code stream T.T., is also video code flow T.T., and Stotal is always size of code stream, is also always size of video code flow, the preliminary election document location that Pos obtains for estimation.
Further, code stream jumps to the Pos place, this document position that obtains, and finds near the timestamp in this document position, and the number of times of this code stream redirect equates with the number of times of acquisition time stamp.
In step S202, when the absolute value of the difference of this timestamp and this time to be searched during greater than the error amount preset, further according to number of times, this timestamp and the last timestamp that obtains of the timestamp that obtains and the position relationship of this time to be searched, this preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record.
Wherein, this step S202 specifically comprises the following steps:
During greater than default error amount, continue to judge whether the number of times of the timestamp that obtains is 1 when the absolute value of the difference of judgement this timestamp and this time to be searched;
Greater than 1, and this timestamp utilizes linearity correction to calculate and obtains new document location when being positioned at the both sides of time to be searched with the last timestamp that obtains when this number of times;
When this number of times is 1, perhaps when this timestamp is positioned at the homonymy of time to be searched with the last timestamp that obtains, utilizes gamma correction to calculate and obtain new document location;
The number of times that record is proofreaied and correct.
Wherein, the both sides that this timestamp and the last timestamp that obtains are positioned at this time to be searched refer to this timestamp and the last timestamp that obtains one of them less than time to be searched or one of them greater than the time to be searched, and the homonymy that this timestamp and the last timestamp that obtains are positioned at the time to be searched refer to this timestamp and the last timestamp that obtains simultaneously greater than or simultaneously less than the time to be searched.
Shown in the following formula of this gamma correction formula (2):
Pos_new=Tseek*Pos/Tfound;(2)
Wherein, Pos_new is new document location, and Tseek is the time to be searched, and Pos for this ASCII stream file ASCII position that searches, is also the preliminary election document location, and Tfound is the timestamp corresponding with Pos.
Shown in the following formula of this linear correction equation (3):
Pos_new=((Tseek-Tfound)*Pos_old+(Tfound_old-Tseek)*Pos)/(Tfound_old-Tfound).(3)
Wherein, Pos_new is new document location, and Tseek is the time to be searched, Pos is the document location of this search, is also the preliminary election document location, and Tfound is the timestamp corresponding with Pos, Pos_old is the document location of last search, and Tfound_old is the timestamp corresponding with Pos_old.
In embodiments of the present invention, when the absolute value of the difference of this time stamp T found and this time T seek to be searched is less than or equal to default error amount, withdraw from search, the preliminary election document location Pos that obtain this moment is the ASCII stream file ASCII position corresponding with the time to be searched that utilizes this code stream geographic search method to obtain, thereby from this document position broadcast code flow file, to realize the synchronous broadcast of audio frequency and video.
In step S203, when and this number of corrections not identical with this preliminary election document location do not have to surpass default number of times when this new document location, more this preliminary election document location was this new document location.
In specific implementation process, when this new document location Pos_new is identical with this preliminary election document location Pos, withdraw from search; And when not identical, continue to judge whether this number of corrections surpasses default number of times, when this number of corrections has surpassed default number of times, also withdraw from search, otherwise more this preliminary election document location is this new document location, simultaneously, the document location that also last time is obtained is updated to the preliminary election document location, is specially Pos_old=Pos; Pos=Pos_new, herein, "=" expression assignment, in search procedure, the requirement that can consider search time and search precision presets error amount and the number of corrections of above-mentioned timestamp.
In step S204, obtain the timestamp corresponding with this new document location, whether rejudge the absolute value of difference of this timestamp and this time to be searched greater than default error amount, until satisfy the condition of presetting, withdraw from this search.
Wherein, this default condition refers to the absolute value of this timestamp and the difference of this time to be searched less than default error amount, and perhaps this new document location is identical with this preliminary election document location, and perhaps this number of corrections is over the number of times of presetting.
In specific implementation process, when obtaining the timestamp corresponding with this new document location, Tfound_old=Tfound ("=" expression assignment,), whether repeat to judge the absolute value of this timestamp and the difference of this time to be searched greater than the error amount of presetting, particularly, after obtaining the timestamp corresponding with this new document location, return to execution in step S202, withdraw from this search until satisfy condition.
in embodiments of the present invention, at first this code stream geographic search method utilizes the document location that simply calculates initial ranging, then according to the timestamp that finds in this document position, to this document position carrying out gamma correction, and when surrounding target time time that occurs finding shakes (this timestamp that finds is distributed in time both sides to be searched with the last timestamp that finds), think that gamma correction can't further play a role, adopt in this case the method for linearity correction to adjust document location, thereby reduced the consuming time of pinpoint broadcast, improved the precision that pinpoint is play.
Embodiment two:
Fig. 3 shows the realization flow of the code stream geographic search method that second embodiment of the invention provides, the process that realizes to illustrate this code stream geographic search method, and details are as follows:
In step S301, obtain the preliminary election document location corresponding with the time to be searched.
In step S302, this code stream is jumped to this position, record the number of times of this redirect, and obtain the timestamp corresponding with this preliminary election document location.
In specific implementation process, utilize always size of time to be searched, code stream T.T. and code stream, calculate preliminary election document location corresponding to time to be searched according to above-mentioned formula (1).
Further, jump to the Pos place, this document position that obtains, record the times N of this redirect or the number of times that record obtains the timestamp corresponding with document location, both are worth equally herein, find near the time stamp T found this document position.
In step S303, whether judge the absolute value of difference of this timestamp and this time to be searched greater than the error amount of presetting, no, execution in step S311 is, execution in step S304.
In specific implementation process, compare Tfound and Tseek, if both poor absolute values are when being less than or equal to default error amount, such as 2s, withdraw from search, thereby the preliminary election document location Pos that this obtains is the accurate ASCII stream file ASCII position that searches, otherwise continues to carry out subsequent step, wherein should set according to actual needs by default error amount.
In step S304, judge whether the number of times of this redirect is 1, be, execution in step S305; No, execution in step S306.
In specific implementation process, when the number of hops of record is 1, also during i.e. redirect for the first time, directly execution in step S305, if greater than 1 time, go to execution in step S306.
In step S305, utilize the gamma correction formula to obtain new document location.
This gamma correction formula is as shown in above-mentioned formula (2).
In step S306, judge whether this timestamp and the last timestamp that obtains are positioned at the homonymy of time to be searched, are, return to step S305, no, execution in step S307.
Wherein, the not homonymy (both sides) that is positioned at time T seek to be searched as this time stamp T found and the last time stamp T found_old that obtains refer to this timestamp and the last timestamp that obtains one of them less than the time to be searched or one of them is greater than the time to be searched, i.e. (Tfound<Tseek<Tfound_old) or (Tfound_old<Tseek<Tfound), utilize linear formula to proofread and correct this moment, obtain new document location Pos_new, and preservation Tfound, Pos are Tfound_old, Pos_old;
The homonymy that is positioned at the time to be searched when this timestamp and the last timestamp that obtains refer to this timestamp and the last timestamp that obtains simultaneously greater than or simultaneously less than time to be searched, i.e. (Tfound<Tseek﹠amp; ﹠amp; Tfound_old<Tseek) or (Tseek<Tfound_old﹠amp; ﹠amp; Tseek<Tfound), utilize the gamma correction formula to proofread and correct this moment recomputate new document location Pos_new, and preservation Tfound, Pos is Tfound_old, Pos_old.
In step S307, utilize linear correction equation to upgrade this position, and execution in step S208.
This linear correction equation such as above-mentioned formula (3) institute.
In step S308, judge whether this new document location is identical with the preliminary election document location, is, execution in step S311, no, execution in step S309.
In specific implementation process, judge whether Pos_new equates with Pos, if equate, withdraw from this search procedure, otherwise continue execution in step S309.
In step S309, judge whether this number of corrections surpasses default number of times, be that execution in step S311, no, execution in step S310.
Particularly, when the Pos_new that obtains is not identical with Pos, further judge this number of corrections, namely whether cycle index surpasses default number of times, such as default number of times is 30 times.
In step S310, upgrading the preliminary election document location is new document location, and returns to step S302.
Specifically the content of renewal is, Pos_old=Pos; Pos=Pos_new, thus after execution in step S302, obtain the time stamp T found corresponding with this new document location, be also Tfound_old=Tfound, continue to carry out subsequent step, withdraw from this search until satisfy condition, herein, "=" expression assignment.
In step S311, withdraw from search.
In embodiments of the present invention, take without the rmvb video code flow of concordance list as example, the searching method that the existing searching method of mentioning in the contrast background technology and the embodiment of the present invention are mentioned, come by experiment advantage more of the present invention, wherein, the method, the absolute value of setting time to be searched and the difference of the timestamp that obtains is no more than default error range 2s, and default number of corrections is 30 times.Concrete outcome such as following table one are depicted as the Search Results of prior art scheme or searching method, and following table two is depicted as the result of the geographic search method search of embodiment of the present invention proposition.
Table one
Figure BDA0000116199230000111
Table two
Figure BDA0000116199230000121
From error result, the search plan that the embodiment of the present invention proposes, Search Results (shown in table one) is all in the error range of setting, and the error of prior art scheme has 19 times to have surpassed error range, and search precision can't ensure; Consuming time from number of corrections and search, the search plan (shown in table two) that the embodiment of the present invention proposes, number of corrections is few, searches for consuming time short, the number of corrections of prior art scheme has and has all reached the upper limit of setting for 19 times, and searching for consuming time is approximately 5 times of search plan of the present invention.Compare with the technical scheme of existing searching method, the code stream geographic search method search that the embodiment of the present invention proposes is consuming time obviously to be reduced, and search precision significantly improves.
In embodiments of the present invention, this code stream geographic search method can be applied in the geographic search of all digital code streams without concordance list (as music, video etc.), the convergence computing that constantly approaches has been carried out in linearity correction when utilizing the concussion of the gamma correction of time feedbacking and time of occurrence to document location, the file redirect by less number of times obtains accurate search time.Simultaneously, in the method, can consider the requirement of searching for consuming time and search precision, error range and the number of corrections upper limit are set.Can find out from experimental result, the scheme search that the embodiment of the present invention proposes is consuming time obviously to be reduced, and search precision significantly improves, and has the characteristics simple, that system overhead is lower.
One of ordinary skill in the art will appreciate that all or part of step that realizes in above-described embodiment method is to come the relevant hardware of instruction to complete by program, the program of being somebody's turn to do can be stored in a computer read/write memory medium, the storage medium that is somebody's turn to do is as ROM/RAM, disk, CD etc.
Embodiment three:
Fig. 4 shows the structure of the code stream geographic search device that third embodiment of the invention provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention.
This code stream geographic search device can be used for player, it can be also the software unit that runs in player, also can be used as independently, suspension member is integrated in player or runs in the application system of player, this code stream geographic search device comprises that acquiring unit 41, correcting unit 42, updating block 43 and timestamp obtain and judge 44, wherein:
Acquiring unit 41 is used for obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with this preliminary election document location.
In embodiments of the present invention, utilize always size of known time to be searched, code stream T.T. and code stream, calculate preliminary election document location corresponding to time to be searched according to above-mentioned formula (1), and further, code stream jumps to this document position that obtains, find near the timestamp in this document position, the number of times of this code stream redirect equates with the number of times of acquisition time stamp.
Correcting unit 42 is used for when the absolute value of this timestamp and the difference of this time to be searched during greater than the error amount preset, further according to number of times, this timestamp and the last timestamp that obtains of the timestamp that obtains and the position relationship of this time to be searched, this preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record.
Wherein, this correcting unit 42 specifically comprises number of times judging unit 421, linearity correction unit 422, non-linear correction unit 423 and number of corrections record cell 424, as shown in Figure 5, and wherein:
Number of times judging unit 421 is used for when the absolute value of this timestamp of judgement and the difference of this time to be searched during greater than default error amount, and continuation judges whether the number of times of the timestamp that obtains is 1;
Linearity correction unit 422 be used for when these number of times judging unit 421 Output rusults be no, and this timestamp utilizes linearity correction to calculate and obtains new document location when being positioned at the both sides of time to be searched with the last timestamp that obtains;
It is yes that non-linear correction unit 423 is used for working as these number of times judging unit 421 Output rusults, perhaps when this timestamp is positioned at the homonymy of time to be searched with the last timestamp that obtains, utilizes gamma correction to calculate and obtains new document location; And
Number of corrections record cell 424 is used for the number of times that record is proofreaied and correct.
Wherein, the both sides that this timestamp and the last timestamp that obtains are positioned at the time to be searched refer to this timestamp and the last timestamp that obtains one of them less than time to be searched or one of them greater than the time to be searched, and the homonymy that this timestamp and the last timestamp that obtains are positioned at the time to be searched refer to this timestamp and the last timestamp that obtains simultaneously greater than or simultaneously less than the time to be searched.
This gamma correction formula is as shown in above-mentioned formula (2), also namely:
Pos_new=Tseek*Pos/Tfound;(2)
Wherein, Pos_new is new document location, and Tseek is the time to be searched, and Pos for this ASCII stream file ASCII position that searches, is also the preliminary election document location, and Tfound is the timestamp corresponding with Pos.
This linear correction equation is as shown in above-mentioned formula (3), also namely:
Pos_new=((Tseek-Tfound)*Pos_old+(Tfound_old-Tseek)*Pos)/(Tfound_old-Tfound).(3)
Wherein, Pos_new is new document location, and Tseek is the time to be searched, Pos is the document location of this search, Tfound is the timestamp corresponding with Pos, and Pos_old is the document location of last search, and Tfound_old is the timestamp corresponding with Pos_old.
In embodiments of the present invention, when the absolute value of the difference of this time stamp T found and this time T seek to be searched is less than or equal to default error amount, withdraw from search, the preliminary election document location Pos that obtain this moment is the ASCII stream file ASCII position corresponding with the time to be searched that utilizes this code stream geographic search method to obtain, thereby from this document position broadcast code flow file, to realize the synchronous broadcast of audio frequency and video.
Updating block 43 be used for not identical with this preliminary election document location when this new document location and this number of corrections when not having over the number of times preset, upgrading this preliminary election document location is this new document location.
In specific implementation process, when this new document location Pos_new is identical with this preliminary election document location Pos, withdraw from search; And when not identical, continue to judge whether this number of corrections surpasses default number of times, when this number of corrections has surpassed default number of times, also withdraw from search, otherwise more this preliminary election document location is this new document location, simultaneously, the document location that also last time is obtained is updated to the preliminary election document location, is specially Pos_old=Pos; Pos=Pos_new, herein, "=" expression assignment, in search procedure, the requirement that can consider search time and search precision presets error amount and the number of corrections of above-mentioned timestamp.
Timestamp obtains and judging unit 44 is used for obtaining the timestamp corresponding with this new document location, and whether the absolute value that rejudges this timestamp and the difference of this time to be searched until satisfy the condition preset, withdraws from this search greater than default error amount.
Wherein, this default condition refers to the absolute value of this timestamp and the difference of this time to be searched less than default error amount, and perhaps this new document location is identical with this preliminary election document location, and perhaps this number of corrections is over the number of times of presetting.And when obtaining the timestamp corresponding with this new document location, Tfound_old=Tfound, repeat to judge that whether the absolute value of this timestamp and the difference of this time to be searched is greater than the error amount of presetting, particularly, after obtaining the timestamp corresponding with this new document location, whether rejudge the absolute value of difference of this timestamp and this time to be searched less than the error amount of presetting, withdraw from this search until satisfy condition.
In embodiments of the present invention, this code stream geographic search device also comprises:
Timestamp number of times acquiring unit is used for the number of times that record obtains the timestamp corresponding with document location.
This timestamp number of times acquiring unit is used in judgement when the absolute value of this timestamp and the difference of this time to be searched during greater than the error amount preset, record obtains the number of times of the timestamp corresponding with document location, thereby further selects the preliminary election document location is carried out linearity or gamma correction calculating.
In embodiments of the present invention, a kind of code stream geographic search device that comprises that acquiring unit, correcting unit, updating block and timestamp obtain and judge is provided, by constantly the document location that searches being proofreaied and correct, until satisfy default condition, finally can get the ASCII stream file ASCII position that effectively have degree of precision corresponding with the time to be searched.
the embodiment of the present invention is by obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with it, when the absolute value of the difference of this timestamp and this time to be searched during greater than the error amount preset, this preliminary election document location is carried out correction calculation, to obtain new document location, and the number of times of record correction, when and this number of corrections not identical with this preliminary election document location do not have to surpass default number of times when this new document location, upgrading this preliminary election document location is this new document location, and obtain the timestamp corresponding with this new document location, whether rejudge the absolute value of difference of this timestamp and this time to be searched greater than the error amount of presetting, until satisfy default condition, withdraw from this search, realized when the code stream without concordance list is carried out geographic search, shorten search time, the purpose that the document location precision that searches improves.
The above is only preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a code stream geographic search method, is characterized in that, described method comprises the steps:
Obtain the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
When the absolute value of the difference of described timestamp and described time to be searched during greater than default error amount, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
When and described number of corrections not identical with described preliminary election document location do not have to surpass default number of times when described new document location, upgrading described preliminary election document location was described new document location;
Obtain the timestamp corresponding with described new document location, whether rejudge the absolute value of difference of described timestamp and described time to be searched greater than default error amount, until satisfy default condition, withdraw from this search.
2. the method for claim 1, it is characterized in that, described default condition refers to the absolute value of difference of described timestamp and described time to be searched less than default error amount, and perhaps described new document location is identical with the preliminary election document location, and perhaps described number of corrections surpasses the number of times of presetting.
3. the method for claim 1, is characterized in that, described obtain the preliminary election document location corresponding with the time to be searched and with the step of timestamp corresponding to described preliminary election document location after, described method also comprises:
Record obtains the number of times of the timestamp corresponding with document location.
4. method as claimed in claim 3, it is characterized in that, the absolute value of described difference when described timestamp and described time to be searched is during greater than default error amount, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the step of the number of times proofreaied and correct of record specifically comprises the following steps:
During greater than default error amount, judge whether the number of times of the timestamp that obtains is 1 when the absolute value of judgement described timestamp and the difference of described time to be searched;
Greater than 1, and described timestamp utilizes linearity correction to calculate and obtains new document location when being positioned at the both sides of time to be searched with the last timestamp that obtains when described number of times;
When described number of times is 1, perhaps when described timestamp is positioned at the homonymy of time to be searched with the last timestamp that obtains, utilizes gamma correction to calculate and obtain new document location;
The number of times that record is proofreaied and correct.
5. method as claimed in claim 4, it is characterized in that, the both sides that described timestamp and the last timestamp that obtains are positioned at the time to be searched refer to described timestamp and the last timestamp that obtains one of them less than time to be searched or one of them greater than the time to be searched, the homonymy that described timestamp and the last timestamp that obtains are positioned at the time to be searched refer to described timestamp and the last timestamp that obtains simultaneously greater than or simultaneously less than the time to be searched.
6. a code stream geographic search device, is characterized in that, described device comprises:
Acquiring unit is used for obtaining the preliminary election document location corresponding with the time to be searched and the timestamp corresponding with described preliminary election document location;
Correcting unit, be used for when the absolute value of the difference of described timestamp and described time to be searched during greater than the error amount preset, further according to the number of times of the timestamp that obtains, described timestamp and the last timestamp that obtains and the position relationship of described time to be searched, described preliminary election document location is carried out correction calculation, obtaining new document location, and the number of times proofreaied and correct of record;
Updating block, when not having to surpass default number of times for and described number of corrections not identical with described preliminary election document location when described new document location, upgrading described preliminary election document location is described new document location; And
Timestamp obtains and judging unit, be used for obtaining the timestamp corresponding with described new document location, and the absolute value of difference that rejudges described timestamp and described time to be searched until satisfy default condition, withdraws from this search whether greater than default error amount.
7. device as claimed in claim 6, it is characterized in that, described default condition refers to the absolute value of difference of described timestamp and described time to be searched less than default error amount, and perhaps described new document location is identical with the preliminary election document location, and perhaps described number of corrections surpasses the number of times of presetting.
8. device as claimed in claim 6, is characterized in that, described device also comprises:
Timestamp number of times acquiring unit is used for the number of times that record obtains the timestamp corresponding with document location.
9. device as claimed in claim 8, is characterized in that, described correcting unit specifically comprises:
The number of times judging unit is used for during greater than the error amount preset, judging whether the number of times of the timestamp that obtains is 1 when the absolute value of the described timestamp of judgement and the difference of described time to be searched;
The linearity correction unit, it is no being used for working as described number of times judging unit Output rusults, and when described timestamp is positioned at the both sides of time to be searched with the last timestamp that obtains, utilizes linearity correction to calculate and obtain new document location;
Non-linear correction unit, it is yes being used for working as described number of times judging unit Output rusults, perhaps when described timestamp is positioned at the homonymy of time to be searched with the last timestamp that obtains, utilizes gamma correction to calculate and obtains new document location; And
The number of corrections record cell is used for the number of times that record is proofreaied and correct.
10. a player, is characterized in that, described player comprises digital code stream geographic search device as described in claim 6 to 9 any one.
CN201110398939.4A 2011-12-05 2011-12-05 A kind of code stream geographic search method, device and player Active CN103137168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110398939.4A CN103137168B (en) 2011-12-05 2011-12-05 A kind of code stream geographic search method, device and player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110398939.4A CN103137168B (en) 2011-12-05 2011-12-05 A kind of code stream geographic search method, device and player

Publications (2)

Publication Number Publication Date
CN103137168A true CN103137168A (en) 2013-06-05
CN103137168B CN103137168B (en) 2015-08-26

Family

ID=48496890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110398939.4A Active CN103137168B (en) 2011-12-05 2011-12-05 A kind of code stream geographic search method, device and player

Country Status (1)

Country Link
CN (1) CN103137168B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559899A (en) * 2013-10-31 2014-02-05 广东欧珀移动通信有限公司 Searching method and device for designated playing position of code stream
CN103873891A (en) * 2014-03-20 2014-06-18 深圳创维-Rgb电子有限公司 TS streaming media file fast positioning method and system
CN106653070A (en) * 2016-12-30 2017-05-10 深圳天珑无线科技有限公司 Audio node insertion method and apparatus, and terminal device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (en) * 2006-05-18 2006-12-06 北京中星微电子有限公司 Method for processing video file, method for indexing video, and video indexing unit
CN101820331A (en) * 2010-03-23 2010-09-01 北京蛙视通信技术有限责任公司 Optical fiber data transmission method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (en) * 2006-05-18 2006-12-06 北京中星微电子有限公司 Method for processing video file, method for indexing video, and video indexing unit
CN101820331A (en) * 2010-03-23 2010-09-01 北京蛙视通信技术有限责任公司 Optical fiber data transmission method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559899A (en) * 2013-10-31 2014-02-05 广东欧珀移动通信有限公司 Searching method and device for designated playing position of code stream
CN103559899B (en) * 2013-10-31 2016-01-20 广东欧珀移动通信有限公司 Code stream fixed point play position searching method and device
CN103873891A (en) * 2014-03-20 2014-06-18 深圳创维-Rgb电子有限公司 TS streaming media file fast positioning method and system
CN103873891B (en) * 2014-03-20 2017-02-22 深圳创维-Rgb电子有限公司 TS streaming media file fast positioning method and system
CN106653070A (en) * 2016-12-30 2017-05-10 深圳天珑无线科技有限公司 Audio node insertion method and apparatus, and terminal device
CN106653070B (en) * 2016-12-30 2019-12-20 广州恒一工程技术有限公司 Audio node insertion method and device and terminal equipment

Also Published As

Publication number Publication date
CN103137168B (en) 2015-08-26

Similar Documents

Publication Publication Date Title
CN1767424B (en) Broadcast station synchronization method and mobile terminal
TW201211568A (en) Position locating method and mobile device of global navigation satellite system
CN102123323B (en) Method for rapidly updating television program of single-tuner set top box
US20120295641A1 (en) Wireless communication device, information processing device, communication system, and location determination method
CN101483767A (en) Method, apparatus and program for recording and playing back content data
CN103780974A (en) Scene clip playing system and method thereof
CN103137168A (en) Code stream fixed point searching method, device and player
CN103702212A (en) Program navigation method and system of electronic playing equipment
CN104065989A (en) Playing terminal and voice control method thereof
CN102741793B (en) Object image display device, object image display method, object image display program
JP2005160114A (en) Content preference updating method and content receiving apparatus
US20150100986A1 (en) Controlling method for recording digital television programs
KR100807096B1 (en) Method and device for correcting time information received from broadcasting system
TW201232204A (en) Electronic device with clock regulating function and a clock regulating method thereof
JP2005346828A (en) Information processing device, method and program therefor, recording medium with the program recorded thereon, and information recording device
KR101727316B1 (en) Video playing apparatus and location search method thereof
CN103873891B (en) TS streaming media file fast positioning method and system
JP2012211840A (en) Position information correction system
CN102867529B (en) Multimedia video time shaft displaying method, device, playing method and player
EP2393084B1 (en) Apparatus for playing AVI (Audio Visual Interleaving) files
US10680731B2 (en) Methods and apparatus to facilitate local time-based digital audio measurement
CA2972051C (en) Use of program-schedule text and closed-captioning text to facilitate selection of a portion of a media-program recording
JP2005204265A (en) Time-measuring apparatus and program-recording apparatus
JP5783886B2 (en) Program reservation apparatus and program processing method
CN103559899B (en) Code stream fixed point play position searching method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: JUXIN(ZHUHAI) TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: JULI INTEGRATED CIRCUIT DESIGN CO., LTD.

Effective date: 20150104

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20150104

Address after: 519085 C District, 1# workshop, No. 1, science and technology No. four road, hi tech Zone, Zhuhai, Guangdong, China

Applicant after: ACTIONS (ZHUHAI) TECHNOLOGY CO., LTD.

Address before: 519085 hi tech Zone, Guangdong, Zhuhai science and Technology Innovation Coast Road, No. four, No. 1

Applicant before: Juli Integrated Circuit Design Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181212

Address after: Room 105-1023, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Torch (Zhuhai) Microelectronics Co., Ltd.

Address before: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee before: JUXIN (ZHUHAI) SCIENCE & TECHNOLOGY CO., LTD.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 105-1023, No.6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Ju Li (Zhuhai) Microelectronics Co., Ltd

Address before: 519085 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105 -1023

Patentee before: JUXIN (ZHUHAI) MICROELECTRONICS Co.,Ltd.