CN101534408A - Method for storing and playing dynamic code rate transport stream and media stream and for detecting exception - Google Patents

Method for storing and playing dynamic code rate transport stream and media stream and for detecting exception Download PDF

Info

Publication number
CN101534408A
CN101534408A CN 200910082825 CN200910082825A CN101534408A CN 101534408 A CN101534408 A CN 101534408A CN 200910082825 CN200910082825 CN 200910082825 CN 200910082825 A CN200910082825 A CN 200910082825A CN 101534408 A CN101534408 A CN 101534408A
Authority
CN
China
Prior art keywords
time
file
data
index
point
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
CN 200910082825
Other languages
Chinese (zh)
Other versions
CN101534408B (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.)
Sumavision Technologies Co Ltd
Original Assignee
Sumavision Technologies 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 Sumavision Technologies Co Ltd filed Critical Sumavision Technologies Co Ltd
Priority to CN 200910082825 priority Critical patent/CN101534408B/en
Publication of CN101534408A publication Critical patent/CN101534408A/en
Application granted granted Critical
Publication of CN101534408B publication Critical patent/CN101534408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for storing dynamic code rate transport stream and media stream, comprising the following steps of receiving data and recording the time point when the data comes; when the time fragmented file, where the time point is located, is established, judging whether the interval between the time point and the former recorded time point reaches the interval time of the index time density, if so, storing the current byte quantity of the time fragmented file and the deviation value of the time point corresponding to the starting time of the time fragmented file in an index file of the time fragmented file as a data pair, and storing the data in a storage file, otherwise, continuously receiving the stream media data. The invention solves the problem that the prior art stores the dynamic code rate TS media stream by filling empty packet and causes the filled empty packet to waste much storage space.

Description

Storage, broadcast and the method for detecting abnormality of dynamic code rate transport stream Media Stream
Technical field
The present invention relates to the security monitoring field, in particular to a kind of storage, broadcast and method for detecting abnormality of dynamic code rate transport stream Media Stream.
Background technology
TS (Transport Stream transmits stream) Media Stream storage system is widely used in the application case of security monitoring and television program designing.Usually carrying out structure when building, can use storage server cooperate disk array to tens the tunnel so that thousands of roads TS Media Stream record so that when going wrong, check at that time videograph or in the file of storage intercepting wish the video clips that obtains.That this storage system of will seeking survival can provide the stored information of huge size like this is accurate and effective, location fast, and searches, obtains and playing function.
To the application of the file after the storage, promptly the playback function of storage file affects the design and the performance performance of storage system to a great extent.The broadcast that begins to carry out recorded content according to fixed time point is exactly a very critical function.
In the TS Media Stream that adopts constant code rate,,, can carry out level time point location second to recorded content exactly by data volume is converted into the time because the code check of TS stream is constant.Concrete grammar is to obtain two adjacent PCR (Program ClockReference, program clock reference) from top of file, obtains the difference t of the time value that writes down among the PCR, and at interval data volume d between two PCR, calculates the code check that d/t promptly obtains file.In the time of will accurately locating, multiply by code check after the file zero-time and promptly obtain the data volume skew with deducting positioning time.
But in the application of dynamic code rate TS Media Stream, it is just so uneasy to solve.If also be to use PCR to carry out time location, so, can only travel through file content, resolve the time interocclusal record of PCR bag successively because the code check dynamic change can not rely on code check to calculate, up to find one recently like shift time.Doing topmost shortcoming like this is exactly that server will carry out the analysis of whole file, and its workload and the resource that takies are all quite huge, and expense can't be accepted.
At present the solution master who uses adopts the method for filling empty bag, promptly makes its code check constant by fill empty bag in TS, this way can settling time orientation problem.
In realizing process of the present invention, the inventor finds that prior art stores dynamic code rate TS Media Stream by filling empty bag, and the sky bag that causes inserting has been wasted more memory space.
Summary of the invention
The present invention aims to provide a kind of storage, broadcast and method for detecting abnormality of dynamic code rate transport stream Media Stream, can solve prior art and dynamic code rate TS Media Stream be stored, the problem that the sky bag that causes inserting has been wasted more memory space by filling empty bag.
In an embodiment of the present invention, provide a kind of storage means of dynamic code rate transport stream Media Stream, may further comprise the steps:
Receive the time point that data and record data arrive;
When the residing time slicing file of time point had been created, whether the interval of judgement time point point writing time last with it reached blanking time of index time density,
If, the byte number that the time slicing file is current, and time point as the index file of data to the access time slicing files, deposits data in storage file with respect to the deviant of time slicing file zero-time;
Otherwise, continue the receiving stream media data.
In the above-described embodiments, by in dynamic code rate transport stream Media Stream storing process, setting up index file, thereby can accurately locate dynamic code rate TS Media Stream storage file, the advantage that makes full use of dynamic code rate has simultaneously been saved memory space, overcome prior art and dynamic code rate TS Media Stream has been stored, the problem that the sky bag that causes inserting has been wasted more memory space by filling empty bag.
In an embodiment of the present invention, also provide a kind of player method of dynamic code rate transport stream Media Stream, may further comprise the steps:
Play the file that the end retrieval will be play;
Play the absolute time request storage end of holding with initial broadcast and carry out the data transmission;
The offset of the above-mentioned absolute time time corresponding slicing files in storage end location;
The above rheme offset of storage end moves from the time slicing file reading of data and sends to and play end and play.
In the above-described embodiments, in the time will locating the time of carrying out the dynamic code rate TS Media Stream of storage, index information can accurately indicate the time point searched corresponding data position hereof, after thereby solution is carried out real-time recording to dynamic code rate TS Media Stream, be difficult to recorded content is carried out second a level time point location and the problem of carrying out Play Control on its basis.
A kind of method for detecting abnormality of dynamic code rate transport stream Media Stream also is provided in an embodiment of the present invention:
Obtain the index file in the time period that to detect;
According to the zero-time of each index file, the shift time that wherein writes down is converted into absolute time.Obtain the absolute time list index;
Read the time point of absolute time list index successively, judge whether the time interval of adjacent point-to-point transmission satisfy requirement blanking time of index time density;
If the time interval of adjacent point-to-point transmission is not satisfied requirement blanking time, will be to be recorded as unusually time period of time terminal with adjacent 2;
Gathering all unusual time periods obtains the exception reporting of storage file in institute's section detection time.
In the dynamic code rate TS of the foregoing description Media Stream storing process, when cutout took place, the record of index stopped, and index is proceeded when cutout recovers.The detection method that the dynamic code rate transport stream media stream content of the foregoing description is unusual is passed through the inspection to index file, the time point that can clearly obtain to stop and stop and recover, thereby solve the dynamic code rate Media Stream carried out real-time recording after, be difficult to by recorded content accurately stop, the problem of the detection of abnormal conditions such as recovery.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 shows the storage means flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention;
Fig. 2 shows the player method flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention;
Fig. 3 shows the method for detecting abnormality flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
Fig. 1 shows the storage means flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention, may further comprise the steps:
S102 receives the time point that data and record data arrive;
S104, when the residing time slicing file of time point had been created, whether the interval of judgement time point point writing time last with it reached blanking time of index time density,
S106, if, the byte number that the time slicing file is current, and time point as the index file of data to the access time slicing files, deposits data in storage file with respect to the deviant of time slicing file zero-time;
Otherwise, forward step S102 to.
In the above-described embodiments, by in dynamic code rate transport stream Media Stream storing process, setting up index file, thereby can accurately locate dynamic code rate TS Media Stream storage file, the advantage that makes full use of dynamic code rate has simultaneously been saved memory space, overcome prior art and dynamic code rate TS Media Stream has been stored, the problem that the sky bag that causes inserting has been wasted more memory space by filling empty bag.
For example, the length of setting-up time burst is 20 minutes, and be 1 second the blanking time of index time density, then can carry out level time point location second exactly to dynamic code rate TS Media Stream storage file.
Preferably, the above-mentioned storage means that is used for dynamic code rate transport stream storage flow is further comprising the steps of:
When the residing time slicing file of data is not created, the storage file of creation-time burst and index file;
When the interval of the zero-time of time point and time slicing file reaches the blanking time of index time density, the current byte number of slicing files writing time;
With byte number and time point as data to depositing index file in;
Deposit data in storage file.
The foregoing description makes full use of the temporal information in the real-time recording process, and temporal information is stored as the time point index that the TS Media Stream is recorded destination file.For each storage file is set up an index, with the byte number of the skew of putting the relative file start time point actual time in the recording process and this moment file storage as index to storing.
Fig. 2 shows the player method flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention, may further comprise the steps:
S202 plays the file that the end retrieval will be play;
S204 plays the absolute time request storage end of holding with initial broadcast and carries out the data transmission;
S206, the offset of the above-mentioned absolute time time corresponding slicing files in storage end location;
S208, the above rheme offset of storage end moves from the time slicing file reading of data and sends to and play end and play.
In the above-described embodiments, in the time will locating the time of carrying out the dynamic code rate TS Media Stream of storage, index information can accurately indicate the time point searched corresponding data position hereof, after thereby solution is carried out real-time recording to dynamic code rate TS Media Stream, be difficult to recorded content is carried out second a level time point location and the problem of carrying out Play Control on its basis.
The dynamic code rate TS Media Stream player method of the foregoing description can be the broadcast under the push-model, is promptly initiated by server; Also can be the broadcast under the pull-mode, promptly initiate request by client.
Preferably, the offset of the above-mentioned absolute time time corresponding slicing files in storage end location specifically comprises:
The storage end uses the timeslice length of the file allocation of oneself to navigate to the time slicing file at initial data place of playing;
The storage end uses the time started of above-mentioned absolute time and storage file record to calculate the skew of above-mentioned absolute time with respect to the time slicing file time started;
The storage end is inquired about the index file of time slicing file according to the time migration that calculates, and obtains the offset of above-mentioned absolute time in the time slicing file.
Preferably, in the player method of above-mentioned dynamic code rate transport stream Media Stream, the local timing of storage end and the time synchronized of index file send the speed of data in order to control, effectively prevent because transmission is too fast or to send the broadcast that causes slowly unusual.
Preferably, the player method of above-mentioned dynamic code rate transport stream Media Stream is further comprising the steps of:
After the time, slicing files finished playing, storage end nothing interruptedly was transferred to data read next time slicing file, and enables the index file of next time slicing file.
Preferably, the player method of above-mentioned dynamic code rate transport stream Media Stream is further comprising the steps of:
When running into the index of skipping owing to cutout, the real time length of end missing data is play in prompting, and behind the missing data normal play.
Adjust playing progress rate when playing end, when promptly selecting new time point, S204 restarts playing process by step.
In the prior art, dynamic code rate TS Media Stream carried out real-time recording after, be difficult to by recorded content accurately stop, the detection of abnormal conditions such as recovery.
Fig. 3 shows the method for detecting abnormality flow chart of dynamic code rate transport stream Media Stream according to an embodiment of the invention, may further comprise the steps:
S302 obtains the index file in the time period that will detect;
S304 according to the zero-time of each index file, is converted into absolute time with the shift time that wherein writes down.Obtain the absolute time list index;
S306 reads the time point of absolute time list index successively, judges whether the time interval of adjacent point-to-point transmission satisfy requirement blanking time of index time density;
S308 if the time interval of adjacent point-to-point transmission is not satisfied requirement blanking time, will be to be recorded as unusually time period of time terminal with adjacent 2;
S310 gathers all unusual time periods to obtain the exception reporting of storage file in institute's section detection time.
In the dynamic code rate TS of the foregoing description Media Stream storing process, when cutout took place, the record of index stopped, and index is proceeded when cutout recovers.The detection method that the dynamic code rate transport stream media stream content of the foregoing description is unusual is passed through the inspection to index file, the time point that can clearly obtain to stop and stop and recover, thereby solve the dynamic code rate Media Stream carried out real-time recording after, be difficult to by recorded content accurately stop, the problem of the detection of abnormal conditions such as recovery.
As can be seen from the above description, the above embodiments of the present invention have realized following technique effect:
1, can solve the time orientation problem of dynamic code rate TS Media Stream storage, thereby make dynamic code rate TS Media Stream go for applied environment more widely;
2, promoted the performance space of storage system significantly, a part of system configuration has been freed to pursue higher efficient and fail safe;
3, provide the foundation for the exploitation of on the basis of precise time retrieval and precise abnormal detection, carrying out new application.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. the storage means of a dynamic code rate transport stream Media Stream is characterized in that, may further comprise the steps:
Receive data and write down the time point that described data arrive;
When the residing time slicing file of described time point has been created, judged the interval of a described time point point writing time last with it, whether reach the blanking time of index time density,
If, with the current byte number of described time slicing file, and described time point to depositing the index file of described time slicing file in, deposits described data in described storage file as data with respect to the deviant of described time slicing file zero-time;
Otherwise, continue the receiving media flow data.
2. storage means according to claim 1 is characterized in that, and is further comprising the steps of:
When the residing time slicing file of described data is not created, create the storage file and the index file of described time slicing;
When the interval of the zero-time of described time point and described time slicing file reaches the blanking time of described index time density, write down the current byte number of described time slicing file;
With described byte number and described time point as data to depositing described index file in;
Deposit described data in described storage file.
3. the player method of a dynamic code rate transport stream Media Stream is characterized in that, may further comprise the steps:
Play the file that the end retrieval will be play;
Described broadcast end carries out data with the described storage end of the absolute time request of initial broadcast and sends;
Described storage end is located the offset of described absolute time time corresponding slicing files;
Described storage end sends to described broadcast end with described offset reading of data from described time slicing file and plays.
4. player method according to claim 3 is characterized in that, the offset that described storage end is located described absolute time time corresponding slicing files specifically comprises:
Described storage end uses the timeslice length of the file allocation of oneself to navigate to the time slicing file at initial data place of playing;
Described storage end uses the time started of described absolute time and storage file record to calculate the skew of described absolute time with respect to the described time slicing file time started;
The storage end is inquired about the index file of described time slicing file according to the time migration that calculates, and obtains the offset of described absolute time in described time slicing file.
5. player method according to claim 3 is characterized in that, the local timing of described storage end and the time synchronized of described index file.Control sends the speed of data, effectively prevents because send too fast or to send the broadcast that causes slowly unusual.
6. player method according to claim 3 is characterized in that, and is further comprising the steps of:
After described time slicing file finished playing, described storage end did not have and interruptedly data read is transferred to next time slicing file, and enables the index file of described next time slicing file.
7. player method according to claim 3 is characterized in that, and is further comprising the steps of:
When running into the index of skipping owing to cutout, point out the real time length of described broadcast end missing data, and behind the described missing data normal play.
8. the method for detecting abnormality of a dynamic code rate transport stream Media Stream is characterized in that, may further comprise the steps:
Obtain the index file in the time period that to detect;
According to the zero-time of each described index file, the shift time that wherein writes down is converted into absolute time.Obtain the absolute time list index;
Read the time point of described absolute time list index successively, judge whether the time interval of adjacent point-to-point transmission satisfy requirement blanking time of index time density;
If the time interval of adjacent point-to-point transmission is not satisfied described requirement blanking time, will be to be recorded as unusually time period of time terminal with described adjacent 2;
Gathering all unusual time periods obtains the exception reporting of storage file in the described time period.
CN 200910082825 2009-04-22 2009-04-22 Method for storing and playing dynamic code rate transport stream and media stream, and abnormity decting method Active CN101534408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910082825 CN101534408B (en) 2009-04-22 2009-04-22 Method for storing and playing dynamic code rate transport stream and media stream, and abnormity decting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910082825 CN101534408B (en) 2009-04-22 2009-04-22 Method for storing and playing dynamic code rate transport stream and media stream, and abnormity decting method

Publications (2)

Publication Number Publication Date
CN101534408A true CN101534408A (en) 2009-09-16
CN101534408B CN101534408B (en) 2011-06-08

Family

ID=41104761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910082825 Active CN101534408B (en) 2009-04-22 2009-04-22 Method for storing and playing dynamic code rate transport stream and media stream, and abnormity decting method

Country Status (1)

Country Link
CN (1) CN101534408B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204272A (en) * 2010-12-31 2011-09-28 华为技术有限公司 A processing method after a playing timepoint in streaming media jumps and a device thereof
CN102902715A (en) * 2012-08-22 2013-01-30 中国铁道科学研究院 Rapid data processing method and device applied to playback system
CN102984600A (en) * 2012-12-12 2013-03-20 成都索贝数码科技股份有限公司 Method for non-linear editing software to access file according to time slices, based on internet HTTP
CN106131588A (en) * 2016-07-12 2016-11-16 乐视控股(北京)有限公司 The order method of a kind of carousel platform multimedia programming and device
CN106210803A (en) * 2016-07-12 2016-12-07 乐视控股(北京)有限公司 The player method of a kind of media program and device
CN108574856A (en) * 2017-06-30 2018-09-25 北京金山云网络技术有限公司 Determine that video file tries the method, apparatus, equipment and medium of cut off
CN109120989A (en) * 2018-10-08 2019-01-01 四川长虹电器股份有限公司 The method of retrospect positioning when TS stream broadcasting
CN112019869A (en) * 2020-08-21 2020-12-01 广州欢网科技有限责任公司 Live broadcast data processing method and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204272A (en) * 2010-12-31 2011-09-28 华为技术有限公司 A processing method after a playing timepoint in streaming media jumps and a device thereof
CN102204272B (en) * 2010-12-31 2012-12-19 华为技术有限公司 A processing method after a playing timepoint in streaming media jumps and a device thereof
CN102902715A (en) * 2012-08-22 2013-01-30 中国铁道科学研究院 Rapid data processing method and device applied to playback system
CN102902715B (en) * 2012-08-22 2016-01-20 中国铁道科学研究院 A kind of quick data processing method and device being applied to playback system
CN102984600A (en) * 2012-12-12 2013-03-20 成都索贝数码科技股份有限公司 Method for non-linear editing software to access file according to time slices, based on internet HTTP
CN102984600B (en) * 2012-12-12 2015-03-11 成都索贝数码科技股份有限公司 Method for non-linear editing software to access file according to time slices, based on internet HTTP
CN106131588A (en) * 2016-07-12 2016-11-16 乐视控股(北京)有限公司 The order method of a kind of carousel platform multimedia programming and device
CN106210803A (en) * 2016-07-12 2016-12-07 乐视控股(北京)有限公司 The player method of a kind of media program and device
CN108574856A (en) * 2017-06-30 2018-09-25 北京金山云网络技术有限公司 Determine that video file tries the method, apparatus, equipment and medium of cut off
CN109120989A (en) * 2018-10-08 2019-01-01 四川长虹电器股份有限公司 The method of retrospect positioning when TS stream broadcasting
CN109120989B (en) * 2018-10-08 2021-06-29 四川长虹电器股份有限公司 Method for tracing and positioning during TS stream playing
CN112019869A (en) * 2020-08-21 2020-12-01 广州欢网科技有限责任公司 Live broadcast data processing method and device

Also Published As

Publication number Publication date
CN101534408B (en) 2011-06-08

Similar Documents

Publication Publication Date Title
CN101534408B (en) Method for storing and playing dynamic code rate transport stream and media stream, and abnormity decting method
CN105338297B (en) A kind of storage of video data and playback system, device and method
CN101636726B (en) Video distribution system including progressive playback
CN102413358B (en) Storage and playing method, device and system of streaming media file
CN1609984B (en) Method and apparatus for recording data and recovering recorded data
CN1692433B (en) Method and apparatus for reproducing data recorded on an interactive recording medium in conjunction with associated auxiliary data
CN100583278C (en) Data processing apparatus
CN100399830C (en) Data structure of metadata and reproduction method of the same
WO2003107343A1 (en) System and method for playing content information using an interactive disc player
CN102291256B (en) A kind of querying method of monitor data and equipment
EP1741105A1 (en) Method and sreams in distributed storage systems
CN103092848A (en) Method for storing and retrieving pictures
CN103929609A (en) Video replaying method and device
CN103369351A (en) Streaming media fast-forward and fast-backward processing method, video server and system
RU2011141854A (en) ONLINE CONTENT SERVICE WITH CATALOG-BASED INTERACTION
CN109240607A (en) A kind of file reading and device
CN101237571A (en) A video coding storage method and device in monitoring system
CN101895736B (en) Media stream data processing method and device thereof
US8230125B2 (en) Methods for reserving index memory space in AVI recording apparatus
CN105068761A (en) Easy-to-retrieve video screenshot storing method and system
JP2007522696A5 (en)
EP1563395B1 (en) Method for reproducing contents information in interactive optical disc device and method for providing contents information in contents provider server
EP2083421B1 (en) Video recording device, video recording method, video recording program, and integrated circuit
CN110072123A (en) A kind of recovery playback method, video playing terminal and the server of video
CN114564460B (en) Parameter tuning method, device, equipment and medium based on distributed storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190422

Address after: 100085 No. 9001, 901, 9th floor, No. 5 Building, No. 1 Hospital, Shangdi East Road, Haidian District, Beijing

Patentee after: Beijing Digital Video Technology Co., Ltd.

Address before: 100085 Digital Video Building No. 15, Pioneer Road, Shangdi Information Industry Base, Haidian District, Beijing

Patentee before: BEIJING SUMAVISION TECHNOLOGIES CO., LTD.

TR01 Transfer of patent right