CN105302883B - A kind of management method and system of time-based media file - Google Patents

A kind of management method and system of time-based media file Download PDF

Info

Publication number
CN105302883B
CN105302883B CN201510669585.0A CN201510669585A CN105302883B CN 105302883 B CN105302883 B CN 105302883B CN 201510669585 A CN201510669585 A CN 201510669585A CN 105302883 B CN105302883 B CN 105302883B
Authority
CN
China
Prior art keywords
file
data cell
time
media file
tidx
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.)
Active
Application number
CN201510669585.0A
Other languages
Chinese (zh)
Other versions
CN105302883A (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.)
Shenzhen Lewei Technology Development Co.,Ltd.
Original Assignee
SHENZHEN LEWEI TECHNOLOGY DEVELOPMENT 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 SHENZHEN LEWEI TECHNOLOGY DEVELOPMENT Co Ltd filed Critical SHENZHEN LEWEI TECHNOLOGY DEVELOPMENT Co Ltd
Priority to CN201510669585.0A priority Critical patent/CN105302883B/en
Publication of CN105302883A publication Critical patent/CN105302883A/en
Application granted granted Critical
Publication of CN105302883B publication Critical patent/CN105302883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method and systems of time-based media file, including receiving media file, the media file is stored in the file of the media file respective file type, obtain the information of the media file, the information includes the filename of the media file, time span, file type, determine the position being stored in the data cell indexed file TIDX of the index file TIDX of the information, calculate the time offset of the data cell, the time offset be the data cell before all data cells in the sum of the time span that stores, the information and the time offset are stored in the data cell, the media file is managed according to the index file TIDX;By the time offset of media file and the file information linear memory in index file at the same time, uniformly it is managed by the time index file is time-based to media file progress, it is easy to operate intuitive.

Description

A kind of management method and system of time-based media file
Technical field
The present invention relates to the administrative skill field of media file more particularly to a kind of management of time-based media file Method and system.
Background technique
Smart phone is popularized so that the generation of the media files such as picture, audio and video is very easy to, how to these File organize just at a difficult problem, traditional organization and administration mode is located respectively by different file types Reason, it is not convenient intuitive enough, it cannot achieve the temporal serialization processing of any media file, such as random playback, dynamic additions and deletions Deng.
Summary of the invention
It is an object of the invention to propose the management method and system of a kind of time-based media file, by media file Time offset and the file information linear memory in index file at the same time, by the time index file to media text Part progress is time-based to be uniformly managed, easy to operate intuitive.
To achieve this purpose, the present invention adopts the following technical scheme:
On the one hand, the present invention proposes a kind of management method of time-based media file, comprising:
Media file is received, the media file is stored in the file of the media file respective file type;
The information of the media file is obtained, the information includes filename, time span, the file of the media file Type;
It determines the position being stored in the data cell indexed file TIDX of the index file TIDX of the information, calculates institute State the time offset of data cell, the time offset be the data cell before all data cells in store when Between the sum of length, the information and the time offset are stored in the data cell;
The media file is managed according to the index file TIDX.
Wherein it is determined that the position being stored in the data cell indexed file TIDX of the index file TIDX of the information it Afterwards, further includes: judge whether the position in other data cell indexed files TIDX of index file TIDX changes, if It is the time offset for calculating changed data cell, the time offset of changed data cell is to become The sum of the time span stored in all data cells before the data cell changed is stored in the time offset and occurs The data cell of variation.
Wherein, the position in the data cell indexed file TIDX of the determining index file TIDX for being stored in the information It sets, calculates the time offset of the data cell, comprising:
Determine the front position being stored in the data cell indexed file TIDX of the index file TIDX of the information, institute The time offset for stating data cell is 0;
The position for the data of other data cells in index file TIDX being moved back a data cell, changes The time offset of data cell increase the time span being stored in front position data cell;Or
Confirmation is stored in the terminal position in the data cell indexed file TIDX of the index file TIDX of the information, institute The time offset for stating data cell be terminal position before all data cells in the sum of the time span that stores.
Wherein it is determined that be stored in the data cell indexed file TIDX of the index file TIDX of the information position it Afterwards, further includes:
The location information of the data cell where information described in the filename and index file TIDX in the information It is stored in the data cell of mapped file FMAT;
The media file is managed according to the mapped file FMAT.
Wherein, the data format of the data cell of the index file TIDX are as follows: TIDX=[d1,d2,d3,d4,d5], In, d1For the time offset of media file, d2For the filename of media file, d3For the time span of media file, d4For matchmaker The file type of body file, d5For user-defined feature value, the user-defined feature value includes file color value;
The data format of the data cell of time index file FMAT are as follows: FMAT=[F1,F2], wherein F1For media file Filename, F2For the location information of the data cell where the information of media file described in index file TIDX.
Wherein, the management includes being deleted the media file, play positioning and being played process adjusting;
When the management is deletes media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and deletes media file at the time point of the time shaft, corresponding time offset is found according to the point, Corresponding data cell is found according to the offset;
The filename and file type for reading the media file of the data cell storage, find according to the file type Corresponding file deletes the media file according to the filename;
The data for deleting the data cell, the data of other data cells after the data cell of deletion to The position for the data cell that moves forward, the time offset of changed data cell subtracts deposits in the data cell of deletion The time span entered;
When the management is plays out positioning to media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and plays media file at the time point of the time shaft, corresponding time offset is found according to time point, Corresponding data cell is found according to time offset;
The filename and file type for reading the media file of the data cell storage, find correspondence according to file type File, read the media file and play out;
When the management is adjusted to play out process to media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and plays media file in the time point of the time shaft, mobile classification and need mobile time span;
If the mobile classification is to advance, when the time point is obtained target plus the time span for needing movement Between point;If the mobile classification is to retreat, the time point is subtracted into the time span for needing movement and obtains the object time Point finds corresponding time offset according to the object time point, finds corresponding data sheet according to the time offset Member;
The filename and file type for reading the media file of the data cell storage, find correspondence according to file type File, read the media file and play out;
Wherein, the management includes deleting the media file, specifically:
Obtain the filename for deleting media file;
The data cell that the mapped file FMAT where the filename is found according to filename, reads the data cell In location information, find the data cell of index file TIDX according to the positional information;
The filename and file type for reading the media file of the data cell storage, find according to the file type Corresponding file deletes the media file according to the filename;
The data for deleting the data cell of the mapped file FMAT and the data cell of the index file TIDX, deleting The data of other data cells after the data cell removed to Forward one data cell position, changed number The time span being stored in the data cell of deletion is subtracted according to the time offset of unit.
On the other hand, the present invention also proposes a kind of management system of time-based media file, which is characterized in that packet It includes:
File reception unit, for receiving media file;
File storage unit, for the media file being stored in the file of the media file respective file type;
Acquiring unit, for obtaining the information of the media file, the information include the media file filename, Time span, file type;
Storage location determination unit, for determining the data cell for being stored in the index file TIDX of the information in index text Position in part TIDX;
Computing unit, for calculating the time offset of the data cell, the time offset is the data cell The sum of the time span stored in all data cells before;
Index datastore unit, for the information and the time offset to be stored in the data cell;
Administrative unit, for being managed according to the index file TIDX to the media file.
Wherein, further includes:
Position judging unit, the position in other data cell indexed files TIDX for judging index file TIDX Whether change;If so, the time offset of changed data cell is calculated, the time of changed data cell Offset be the changed data cell before all data cells in the sum of the time span that stores, the time Offset is stored in the changed data cell;
Mapping relations storage unit, for where information described in the filename and index file TIDX in the information Data cell location information deposit mapped file FMAT data cell;
TIDX data format setting unit, for the data format of index file TIDX data cell to be arranged;
FMAT data format setting unit, for the data format of mapped file FMAT data cell to be arranged.
Wherein, the administrative unit is also used to be managed the media file according to the mapped file FMAT, institute Stating administrative unit includes:
Unit is deleted, for deleting media file;
Positioning unit, the play position for located media file;
Process adjusts unit, for adjusting the play position of media file.
Technical solution bring provided by the invention the utility model has the advantages that
The management method and system of media file of the present invention receive media file, the media file are stored in the media The file of file respective file type, obtains the information of the media file, and the information includes the text of the media file Part name, time span, file type determine the data cell indexed file TIDX for being stored in the index file TIDX of the information In position, calculate the time offset of the data cell, the time offset be the data cell before all numbers According to the sum of the time span stored in unit, the information and the time offset are stored in the data cell, according to institute Index file TIDX is stated to be managed the media file;By the time offset of media file and the file information linear memory In index file at the same time, uniformly it is managed by the time index file is time-based to media file progress, It is easy to operate intuitive.
Detailed description of the invention
Fig. 1 is the method flow diagram of media file management method one embodiment provided by the invention.
Fig. 2 is the method flow diagram of second embodiment of media file management method provided by the invention.
Fig. 3 is the system construction drawing of media file management system one embodiment provided by the invention.
Fig. 4 is the system construction drawing of second embodiment of media file management system provided by the invention.
Specific embodiment
To further illustrate the technical scheme of the present invention below with reference to the accompanying drawings and specific embodiments.
Embodiment one
It is the method flow diagram of media file management method one embodiment provided by the invention referring to Fig. 1, Fig. 1.
In the first embodiment, the method for the media file management includes:
S101 receives media file, the media file is stored in the file of the media file respective file type;
Three catalogue files are pre-established, storage audio file, video file and picture file is respectively used to, establishes simultaneously Time index file simultaneously initializes.Time index file is used to store the time index of the media file under these three catalogue files Data, the time index data include time offset, filename, time span, file type and the file color of media file Value, the time index data of each media file are stored in the data cell of time index file TIDX in the form of array.
S102, obtains the information of the media file, the information include the filename of the media file, time it is long Degree, file type;
If the file type is video type or audio types, the time span is play time length;If described File type is picture, and the time span is 5 seconds.
S103 determines the position being stored in the data cell indexed file TIDX of the index file TIDX of the information, Calculate the time offset of the data cell, the time offset be the data cell before all data cells in deposit The information and the time offset are stored in the data cell by the sum of time span of storage;
The specified file of the media file deposit that will acquire extracts the information of media file after unique name, including Its filename, time span, file type select a data cell as the storage list of the information in time index file Member, the time offset of the data cell are the time offset of the media file, and the time span of the data cell is the matchmaker The time span of body file, the time offset be the data cell before all data cells in the time span that stores The sum of, the information of the time offset and media file is stored in the data cell.
Preferably, determine that the mode of the position of the storage unit has following two:
Mode one determines the front end being stored in the data cell indexed file TIDX of the index file TIDX of the information Position, the time offset of the data cell are 0;
The position for the data of other data cells in index file TIDX being moved back a data cell, changes The time offset of data cell increase the time span being stored in front position data cell;
Mode two, confirmation are stored in the end in the data cell indexed file TIDX of the index file TIDX of the information Position, the time offset of the data cell be terminal position before all data cells in the time span that stores it With.
S104 is managed the media file according to the index file TIDX.
After the media file of each deposit catalogue file is uniquely named, its time index data, including media are obtained Time offset, filename, file size and the file type of file, and the number of unified linear access time index file TIDX According in unit, the time index data and media file of each data cell are corresponded, settling time index file TIDX with Linking relationship between media file entity, can be by the time index file TIDX to media text all under catalogue file Part is managed collectively.
The management includes being deleted the media file, play positioning and being played process adjusting.
To sum up, the management method of media file of the embodiment of the present invention receives media file and will store after its unique name Under specified catalogue file, obtains the time index data of media file and be linearly stored in time index file;It establishes Linking relationship between time index file and media file entity, due to the time rope of each data cell of time index file Argument is corresponded according to media file, when can be based on to the media file under catalogue file by time index file Between unified management, eliminate the inconvenience of classification processing.
Embodiment two
Referring to fig. 2, Fig. 2 is the method flow diagram of second embodiment of media file management method provided by the invention.
In a second embodiment, the method for the media file management includes:
S201 receives media file, the media file is stored in the file of the media file respective file type;
S202, obtains the information of the media file, the information include the filename of the media file, time it is long Degree, file type;
S203 determines the position being stored in the data cell indexed file TIDX of the index file TIDX of the information;
The data format of the data cell of index file are as follows: TIDX=[d1, d2, d3, d4, d5], wherein TIDX is array Title, d1 are the time offset of the media file, and d2 is the filename of the media file, and d3 is the media file Time span, d4 are the file type of the media file, and d5 is user-defined feature value, and the user-defined feature value includes file Color value.
S204, calculates the time offset of the data cell, and the time offset is the institute before the data cell There is the sum of the time span stored in data cell, the information and the time offset are stored in the data cell;
S205, the position of the data cell where information described in the filename and index file TIDX in the information The data cell of information deposit mapped file FMAT;
Mapped file is established, which is stored between the filename of media file and above-mentioned time index file Mapping relations, the data format of data cell are as follows: FMAT=[F1, F2], wherein F1 is media file name, and F2 is index text The location information of data cell where the information of media file described in part TIDX, if obtaining the filename of media file, The data cell where the information of the media file can be found, to find the time index data of the media file.
S206, by the time offset makeup time axis of the data cell of the index file TIDX;
The time offset of each data cell storage, makeup time axis, first data in extraction time index file The time offset of unit storage is 0, constitutes the starting point of time shaft, and the time offset of each data cell is the data sheet The sum of the time span stored in all data cells before member, constitutes the node of the time shaft;
The period that each media file occupies on the time shaft is the time span of the media file, the period Starting point is the time offset of media file, i.e. the time of data cell where the time index data of the media file is inclined Shifting amount.
S207 identifies operational order corresponding with the management, if the operational order is to delete media file, Enter step S208;If the operational order is to play out positioning to media file, S215 is entered step;If the operation refers to It enables to play out process to media file and adjusting, enters step S217;
Identify to the management category of media file, i.e. operational order, including media file deleted, play positioning and Broadcasting process is adjusted.
If deleting media file, there are two types of approach:
S208 judges deletion mode, if the deletion mode to the media file is the deletion based on time shaft, into step Rapid S209;If the deletion mode to the media file is the deletion based on filename, S211 is entered step;
Mode one, the deletion mode to the media file is the deletion based on time index:
S209 is obtained and is deleted media file at the time point of the time shaft;
S210 finds corresponding time offset according to the time point, is found according to the time offset corresponding Data cell
If user needs the media file to some time point or some period to delete, select the time point or Period, the time point and period correspond to the time offset of media file, are found according to the time offset corresponding Data cell in time index file deletes the matchmaker according to the linking relationship between the data cell and the media file entity Body file.
Mode two, the deletion mode to the media file is the deletion based on filename:
S211 obtains the filename for deleting media file, the mapped file where the filename is found according to filename The data cell of FMAT;
S212 reads the location information of the data cell of index file TIDX in the data cell, according to the position Information finds corresponding data cell;
The filename for obtaining needing the media file deleted, finds data sheet corresponding with file name by mapped file The location information of member, further finds the data cell, reads media file corresponding with file name in the data cell Time index data are deleted according to the linking relationship where the time index data between data cell and the media file entity The media file.
S213 reads the filename and file type of the media file of the data cell storage, is looked for according to file type To corresponding file, the media file is deleted;
S214 deletes the data of the data cell, other data cells after the data cell of deletion Data subtract the data sheet of deletion to the position of one data cell of Forward, the time offset of changed data cell The time span being stored in member;
After the media file is deleted, while the time index data of the media file are deleted, vacates a data sheet Member, the time index data after the data cell are moved along a data cell, while mobile time index data Time offset subtract it is described delete file time span, form new time offset;If being carried out to media file When deletion based on filename, the content of the data cell in mapped file where file name need to be removed simultaneously.
Positioning is played out to media file, i.e., the play position of selected media file, steps are as follows:
S215 obtains and plays media file at the time point of the time shaft, it is inclined to find the corresponding time according to time point Shifting amount finds corresponding data cell according to time offset;
S216 reads the filename and file type of the media file of the data cell storage, is looked for according to file type To corresponding file, reads the media file and play out;
During playback of media files, user can select fixed point to play according to their own needs, according to user's The time point for needing to position when playback of media files on operation acquisition time axis, the time which corresponds to media file are inclined Shifting amount finds the data cell where corresponding time index data according to the time offset, according in the data cell Content finds the catalogue of the media file, and the content for reading the media file plays out;
Since the time index data of all media files under catalogue file are stored in the same mapped file middle line Property storage, the time offset of each media file name and the media file correspond, corresponding with time index file The consecutive order that audio file, video file and picture file may be implemented on time shaft plays.
For example, if there are three media files under catalogue file, successively are as follows: filename is audio1.mp3 audio file, when Between length be 60 seconds, the entitled pic1.jpg picture file of file, time span is fixed as 5 seconds and file entitled video1.mp4 view Frequency file, time span are 180 seconds, the data cell in time index file where the time index data of these three files Content successively are as follows: [0, audio.mp3,60,1, FF0000], [60, pic1.jpg, 5,3,00FF00] and [65, Video.mp4,240,2,0000FF], if the time point for playing positioning is selected as leading zero's, three files are playd in order, point It is not that audio file plays 60 seconds, then picture file plays 5 seconds, and last playing video file simultaneously continues to terminate for 180 seconds.
It is played out in addition it is also possible to be navigated on time shaft by the filename of media file, specifically:
The position of the data cell where the information of media file is found in mapped file according to the filename of media file Confidence breath;
Above-mentioned data cell is found according to the location information, reads the time offset in the data cell, the time is inclined Shifting amount is the time offset of media file on a timeline;
The file type for reading media file in the data cell finds the matchmaker according to this document type and above-mentioned filename Body file reads the media file and plays out.
It plays out process to media file to adjust, i.e. fast forward or rewind, steps are as follows:
S217 is obtained and is played media file in the time point of the time shaft, mobile classification and need the mobile time long Degree
S218 judges that broadcasting process adjusts classification and enters step S219 if the broadcasting process is adjusted to advance;If institute It states broadcasting process to be adjusted to retreat, enters step S220;
The time point is needed mobile time span to obtain object time point by S219 plus described
The time point is subtracted the time span for needing movement and obtains object time point by S220
S221 finds corresponding time offset according to the object time point, is found pair according to the time offset The data cell of the index file TIDX answered;
Continue above-mentioned routine, if playback of media files was to 30 seconds, user selected F.F. to skip to 35 seconds after as newly Broadcast point, obtain and play 30 seconds locating time points at present and need traveling time length 35 seconds, by conduct in 30+35=65 seconds Object time point, the object time point correspond to the time offset that target plays media file, are looked for according to the time offset Into time index file, corresponding data cell [65, video.mp4,240,2,0000FF], read the data cell In filename video.mp4 and file type 2, find the catalogue of media file video.mp4, read the media file The content of video.mp4, playing video file video1.mp4.
To sum up, media file is uniquely named and is stored corresponding by the management method of the media file of the embodiment of the present invention Catalogue under after, extract its characteristic information, determine its time offset in time index file, by the time offset Data cell with characteristic information as the linear access time index file of time index data of the media file, and establishing should Mapping relations between the filename of media file and the data cell, the time of data cell is inclined in extraction time index file Shifting amount, settling time axis are managed media file according to the filename of the time shaft and media file;Due to the time shaft On time offset corresponding time point and media file correspond, can be to the matchmaker under catalogue file by the time shaft Body file carries out time-based unified management, while can also be based on by filename and mapping relations to media file The delete operation of filename eliminates the inconvenience of classification processing, brings better experience to user.
Embodiment three
It is the system construction drawing of media file management system one embodiment provided by the invention referring to Fig. 3, Fig. 3.
In the third embodiment, the system of the media file management includes:
File reception unit 01, for receiving media file.
File storage unit 02, for the media file being stored in the file of the media file respective file type.
It receives media file and stores, catalogue identical with this document type is arrived in storage after received file is uniquely named Under file, catalogue file includes audio file, picture file and video file.
Acquiring unit 03, for obtaining the information of the media file, the information includes the file of the media file Name, time span, file type.
Storage location determination unit 04, for determining that the data cell for being stored in the index file TIDX of the information is indexing Position in file TIDX;
Computing unit 05, for calculating the time offset of the data cell, the time offset is the data sheet The sum of the time span stored in all data cells before member.
Determine that the information of media file will calculate the number after the position of data cell in access time index file According to the time offset of unit, the time offset of the data cell is the time stored in all data cells before it The sum of length, using the time offset as the time offset of the media file in time index file.
Preferably, the position being stored in the data cell indexed file TIDX of the index file TIDX of the information is determined There are two types of modes: by the front position of time index file, i.e. first data cell or terminal position, i.e. first free time Information memory cell of the data cell as the media file.
Index datastore unit 06, for the information and the time offset to be stored in the data cell.
Using the information of the time migration for the media file being calculated and media file as the time rope of the media file The argument data cell selected according to deposit.
Administrative unit 07, for being managed according to the index file TIDX to the media file.
The administrative unit packet 07 includes:
Unit 071 is deleted, for deleting media file;
Positioning unit 072, the play position for located media file;
Process adjusts unit 073, for adjusting the play position of media file.
After the time index data access time index file of media file, each media file corresponds one group Time index data, these time index data unify linear memory in time index file, can pass through the time index Linking relationship between file and media file entity deletes the media file, plays positioning and plays process adjusting.
To sum up, the management system of media file of the embodiment of the present invention receives media file and will store after its unique name Under specified catalogue file, obtains the time index data of media file and be linearly stored in time index file;It establishes Linking relationship between time index file and media file entity, due in time index file time index data and matchmaker Body file correspond, by the time index data in the time index file can to the media file under catalogue file into The time-based unified management of row, eliminates the inconvenience of classification processing.
Example IV
Referring to fig. 4, Fig. 4 is the system construction drawing of second embodiment of media file management system provided by the invention.
On the basis of 3rd embodiment, the system of the media file management further include:
TIDX data format setting unit 08, for the data format of index file TIDX data cell to be arranged;
FMAT data format setting unit 09, for the data format of mapped file FMAT data cell to be arranged.
The format of the format of the data cell of time index file and the data cell of mapped file is set.
Position judging unit 10, the position in other data cell indexed files TIDX for judging index file TIDX It sets and whether changes;If so, calculate the time offset of changed data cell, changed data cell when Between offset be the changed data cell before all data cells in the sum of the time span that stores, it is described when Between offset be stored in the changed data cell.
It, need to will be after the data cell before by the selected data cell of the time index data of media file deposit Non vacuum data unit moves backward the position of a data cell, it is mobile after the time offset of data cell be its it The sum of the time span of preceding all data cells storage, if selected data cell is the terminal position of time index file, That is first idle data cell does not need to move the time index that other non vacuum data units are directly stored in the media file Data.
Mapping relations storage unit 11, for information institute described in the filename and index file TIDX in the information Data cell location information deposit mapped file FMAT data cell;
Time shaft establishes unit 12, for by the time offset makeup time of the data cell of the index file TIDX Axis.
The time offset of each data cell storage, makeup time axis, first data in extraction time index file The time offset of unit storage is 0, constitutes the starting point of time shaft, and the time offset of each data cell is the data sheet The sum of the time span stored in all data cells before member, constitutes the node of the time shaft;Each media file is at this The period occupied on time shaft is the time span of the media file, and the starting point of the period is that the time of media file is inclined Shifting amount, end point are the time offset of next media file.
It, can be by the time shaft to media since on the time shaft, each time point corresponds to a media file File carries out time-based management.
Administrative unit 07 is also used to be managed the media file according to the mapped file FMAT.
The mapping relations between the filename of media file and time index file are established, the filename in the information With the data cell of the location information deposit mapped file FMAT of the data cell where information described in index file TIDX, purport Corresponding data cell in time index file can be being found by filename, is reading the time index number of the media file According to according to the linking relationship between the time index file and media file entity, to be managed to media file, specifically To carry out the delete operation based on filename to media file.
To sum up, media file is uniquely named and is stored corresponding by the management system of the media file of the embodiment of the present invention Catalogue under after, extract its characteristic information, determine its time offset in time index file, by the time offset Data cell with characteristic information as the linear access time index file of time index data of the media file, and establishing should Mapping relations between the filename of media file and the data cell, the time of data cell is inclined in extraction time index file Shifting amount, settling time axis are managed media file according to the filename of the time shaft and media file;Due to the time shaft On time offset corresponding time point and media file correspond, can be to the matchmaker under catalogue file by the time shaft Body file carries out time-based unified management, while can also be based on by filename and mapping relations to media file The delete operation of filename eliminates the inconvenience of classification processing, brings better experience to user.
The technical principle of the invention is described above in combination with a specific embodiment.These descriptions are intended merely to explain of the invention Principle, and shall not be construed in any way as a limitation of the scope of protection of the invention.Based on the explanation herein, the technology of this field Personnel can associate with other specific embodiments of the invention without creative labor, these modes are fallen within Within protection scope of the present invention.

Claims (9)

1. a kind of method of time-based media file characterized by comprising
Media file is received, the media file is stored in the file of the media file respective file type;
The information of the media file is obtained, the information includes filename, time span, the files classes of the media file Type;
It determines the position being stored in the data cell indexed file TIDX of the index file TIDX of the information, calculates the number According to the time offset of unit, the time offset is long for the time stored in all data cells before the data cell The information and the time offset are stored in the data cell by the sum of degree;
The location information of data cell where information described in filename and index file TIDX in the information is stored in The data cell of mapped file FMAT;
The media file is managed according to the mapped file FMAT and the index file TIDX.
2. the method according to claim 1, wherein determining the data for being stored in the index file TIDX of the information After position in unit indexed file TIDX, further includes: judge other data cells of index file TIDX in index text Whether the position in part TIDX changes, if so, the time offset of changed data cell is calculated, it is changed The time offset of data cell be the changed data cell before all data cells in the time span that stores The sum of, the time offset is stored in the changed data cell.
3. the method according to claim 1, wherein the determination is stored in the index file TIDX's of the information Position in data cell indexed file TIDX, calculates the time offset of the data cell, comprising:
Determine the front position being stored in the data cell indexed file TIDX of the index file TIDX of the information, the number Time offset according to unit is 0;
The data of other data cells in index file TIDX are moved back the position of a data cell, changed number Increase the time span being stored in front position data cell according to the time offset of unit;Or
Confirmation is stored in the terminal position in the data cell indexed file TIDX of the index file TIDX of the information, the number The sum of time span according to the time offset of unit to be stored in all data cells before terminal position.
4. the method according to claim 1, wherein the data format of the data cell of the index file TIDX Are as follows: TIDX=[d1,d2,d3,d4,d5], wherein d1For the time offset of media file, d2For the filename of media file, d3For The time span of media file, d4For the file type of media file, d5For user-defined feature value, the user-defined feature value packet Include file color value;
The data format of the data cell of the mapped file FMAT are as follows: FMAT=[F1, F2], wherein F1 For the text of media file Part name, F2For the location information of the data cell where the information of media file described in index file TIDX.
5. the method according to claim 1, wherein it is described management include the media file is deleted, It plays positioning and plays process and adjust;
When the management is deletes media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and deletes media file at the time point of the time shaft, corresponding time offset is found according to the time point, The data cell of corresponding index file TIDX is found according to the time offset;
The filename and file type for reading the media file of the data cell storage, find correspondence according to the file type File, the media file is deleted according to the filename;
The data for deleting the data cell, the data of other data cells after the data cell of deletion to Forward The position of one data cell, the time offset of changed data cell, which subtracts, to be stored in the data cell of deletion Time span;
When the management is plays out positioning to media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and plays media file at the time point of the time shaft, corresponding time offset is found according to the time point, Corresponding data cell is found according to the time offset;
The filename and file type for reading the media file of the data cell storage, find corresponding text according to file type Part folder, reads the media file and plays out;
When the management is adjusted to play out process to media file, comprising:
By the time offset makeup time axis of the data cell of the index file TIDX;
It obtains and plays media file in the time point of the time shaft, mobile classification and need mobile time span;
If the mobile classification is to advance, mobile time span is needed to obtain the object time plus described the time point Point;If the mobile classification is to retreat, the time point is subtracted into the time span for needing movement and obtains object time point, Corresponding time offset is found according to the object time point, corresponding index file is found according to the time offset The data cell of TIDX;
The filename and file type for reading the media file of the data cell storage, find corresponding text according to file type Part folder, reads the media file and plays out.
6. according to the method described in claim 4, it is characterized in that, it is described management include deleting the media file, Specifically:
Obtain the filename for deleting media file;
The data cell that the mapped file FMAT where the filename is found according to filename, reads in the data cell Location information finds the data cell of index file TIDX according to the positional information;
The filename and file type for reading the media file of the data cell storage, find correspondence according to the file type File, the media file is deleted according to the filename;
The data for deleting the data cell of the mapped file FMAT and the data cell of the index file TIDX, deletion The data of other data cells after the data cell to Forward one data cell position, changed data sheet The time offset of member subtracts the time span being stored in the data cell of deletion.
7. a kind of management system of time-based media file characterized by comprising
File reception unit, for receiving media file;
File storage unit, for the media file being stored in the file of the media file respective file type;
Acquiring unit, for obtaining the information of the media file, the information includes the filename of the media file, time Length, file type;
Storage location determination unit, for determining the data cell indexed file for being stored in the index file TIDX of the information Position in TIDX;
Computing unit, for calculating the time offset of the data cell, before the time offset is the data cell All data cells in the sum of the time span that stores;
Index datastore unit, for the information and the time offset to be stored in the data cell;
Mapping relations storage unit, for the number where information described in the filename and index file TIDX in the information According to the data cell of the location information deposit mapped file FMAT of unit;
Administrative unit, for carrying out pipe to the media file according to the mapped file FMAT and the index file TIDX Reason.
8. system according to claim 7, which is characterized in that further include:
Position judging unit, whether the position in other data cell indexed files TIDX for judging index file TIDX It changes;If so, the time offset of changed data cell is calculated, the time migration of changed data cell The sum of the time span stored in all data cells before being the changed data cell is measured, the time migration Amount is stored in the changed data cell;
TIDX data format setting unit, for the data format of index file TIDX data cell to be arranged;
FMAT data format setting unit, for the data format of mapped file FMAT data cell to be arranged;
Time shaft establishes unit, for by the time offset makeup time axis of the data cell of the index file TIDX.
9. system according to claim 7, which is characterized in that the administrative unit is also used to according to the mapped file FMAT is managed the media file, and the administrative unit includes:
Unit is deleted, for deleting media file;
Positioning unit, the play position for located media file;
Process adjusts unit, for adjusting the play position of media file.
CN201510669585.0A 2015-10-13 2015-10-13 A kind of management method and system of time-based media file Active CN105302883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510669585.0A CN105302883B (en) 2015-10-13 2015-10-13 A kind of management method and system of time-based media file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510669585.0A CN105302883B (en) 2015-10-13 2015-10-13 A kind of management method and system of time-based media file

Publications (2)

Publication Number Publication Date
CN105302883A CN105302883A (en) 2016-02-03
CN105302883B true CN105302883B (en) 2018-12-21

Family

ID=55200153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510669585.0A Active CN105302883B (en) 2015-10-13 2015-10-13 A kind of management method and system of time-based media file

Country Status (1)

Country Link
CN (1) CN105302883B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930504B (en) * 2016-05-10 2019-04-16 烽火通信科技股份有限公司 A kind of network management timing file cocurrent processing system and concurrent processing method
CN108632541B (en) * 2017-03-20 2021-07-20 杭州海康威视数字技术股份有限公司 Multi-video-clip merging method and device
CN107885812A (en) * 2017-11-03 2018-04-06 深圳市沃特沃德股份有限公司 The method and onboard system of onboard system loading medium data file
CN110442308B (en) * 2019-07-05 2022-05-17 厦门四信物联网科技有限公司 Data block storage method, device, equipment and storage medium
CN110968549B (en) * 2019-11-18 2024-03-29 Oppo(重庆)智能科技有限公司 File storage method, device, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287107A (en) * 2008-05-29 2008-10-15 腾讯科技(深圳)有限公司 Demand method, system and device of media file
CN102891997A (en) * 2011-07-20 2013-01-23 深圳市快播科技有限公司 Audio and video frequency multi-media file format for fast play, playing method and playing device
CN103618912A (en) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 Live telecast time shifting method and server
CN103974143A (en) * 2014-05-20 2014-08-06 北京速能数码网络技术有限公司 Method and device for generating media data
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
CN104967862A (en) * 2015-07-22 2015-10-07 东方网力科技股份有限公司 Video storage method and device, and video searching method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287107A (en) * 2008-05-29 2008-10-15 腾讯科技(深圳)有限公司 Demand method, system and device of media file
CN102891997A (en) * 2011-07-20 2013-01-23 深圳市快播科技有限公司 Audio and video frequency multi-media file format for fast play, playing method and playing device
CN103618912A (en) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 Live telecast time shifting method and server
CN103974143A (en) * 2014-05-20 2014-08-06 北京速能数码网络技术有限公司 Method and device for generating media data
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
CN104967862A (en) * 2015-07-22 2015-10-07 东方网力科技股份有限公司 Video storage method and device, and video searching method and device

Also Published As

Publication number Publication date
CN105302883A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN105302883B (en) A kind of management method and system of time-based media file
CN103020281B (en) A kind of data storage and retrieval method based on spatial data numerical index
KR101977768B1 (en) Selectively recording media content
CN105893459A (en) Media content playback system and method
US20130060841A1 (en) Method of synchronising digital media content
CN102999359B (en) A kind of External memory equipment carry response method and electronic equipment
JP2006522400A (en) Method and apparatus for grouping content items
CN105893457A (en) Media content playback system and method
CN103699673B (en) A kind of image processing method of mobile terminal, device and mobile terminal
US11003711B2 (en) Accessing audio files from an online content management system
CN103530326A (en) Method for adding geographical location information into video file and creating index
CN105095458A (en) Method for big data retrieval based on time characteristics and supporting complicated conditions
CN107426183B (en) Method, server and system for eliminating duplication of media file
CN101539884A (en) Method and device for data storage
Agrawal et al. Mobile data sync in a blink
CN102065237A (en) Title generator capable of being convenient to process title files
US20050213656A1 (en) Method and device for online dynamic semantic video compression and video indexing
CN107741968A (en) A kind of method of document retrieval, system, device and computer-readable recording medium
CN102194504A (en) Media file play method, player and server for playing medial file
CN103581051A (en) File buffering storage method and device and system
CN102654848B (en) A kind of method and device realized mobile terminal and kept a diary automatically
CN104424236A (en) Storage method and device in data acquisition
CN105260368A (en) Video data editing method and device, business object pushing method, device and system
CN103514226A (en) Rapid indexing method and device for file storage of digital video recorder
CN114356878A (en) Distributed storage method and device for unstructured data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 405, First Skirt Building, Nanshan Software Industry Base, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Lewei Technology Development Co., Ltd.

Address before: Room 203-206, 205 Tairan Building, Chegongmiao, Shenzhen, Guangdong 518000

Patentee before: Shenzhen Lewei Technology Development Co., Ltd.

CP02 Change in the address of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20190430

Address after: Room 405, First Skirt Building, Nanshan Software Industry Base, Shenzhen, Guangdong 518000

Patentee after: Lewei Technology (Shenzhen) Co., Ltd.

Address before: Room 405, First Skirt Building, Nanshan Software Industry Base, Shenzhen, Guangdong 518000

Patentee before: Shenzhen Lewei Technology Development Co., Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220129

Address after: Room 405, First Skirt Building, Nanshan Software Industry Base, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Lewei Technology Development Co.,Ltd.

Address before: Room 405, First Skirt Building, Nanshan Software Industry Base, Shenzhen, Guangdong 518000

Patentee before: Lewei Technology (Shenzhen) Co.,Ltd.

TR01 Transfer of patent right