CN102223405B - Media type analyzing method, system and media server - Google Patents
Media type analyzing method, system and media server Download PDFInfo
- Publication number
- CN102223405B CN102223405B CN201110151871.XA CN201110151871A CN102223405B CN 102223405 B CN102223405 B CN 102223405B CN 201110151871 A CN201110151871 A CN 201110151871A CN 102223405 B CN102223405 B CN 102223405B
- Authority
- CN
- China
- Prior art keywords
- file
- type
- media
- media file
- medium type
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention is suitable for the field of information processing, and provides a media type analyzing method, a system and a media server. The method comprises the following steps that the media server downloads a media type description file from a media type description server, and analyzes the downloaded media type description file to obtain the corresponding relationship between the type of a media file and the characteristic information of the media file; the media server reads the media file to be analyzed to obtain the characteristic information of the medial file to be analyzed according to the corresponding relationship; and the media sever determines the type of the media file according to the obtained characteristic information and the obtained corresponding relationship. In the invention, new software does not need to be developed or the existing software does not need to be updated aiming to the media server, so the efficiency of the media file type analysis is effectively improved, and the cost of the media file type analysis is reduced.
Description
Technical field
The invention belongs to field of information processing, relate in particular to method, system and media server that a kind of medium type is analyzed.
Background technology
Along with the development of information technology, on network, the type of media file also becomes increasingly abundant, and comprises text, picture, audio frequency, video etc.For example, and these media files also comprise multiple subtype conventionally: video file comprises the subtype such as AVI form, RMVB form.
Prior art is mainly resolved media file by the software in media server, obtain the type of media file, and the type of the media file obtaining after resolving is sent to client, client is classified and is shown or process described media file according to the type of described media file.But, software in existing media server is all fixed the support of media file type, in the time there is the media file of newtype on network, existing software in media server can not be identified the type of this media file, the software that need to make new advances for media server exploitation or upgrade existing software and resolve this media file, efficiency is lower, and cost is higher.
Summary of the invention
A kind of method that the object of the embodiment of the present invention is to provide medium type to analyze, is intended to solve existing software in media server and can not identifies the problem of the type of new media file.
The embodiment of the present invention is achieved in that a kind of method that medium type is analyzed, and described method comprises the steps:
Media server is described server downloads of media type specification file from medium type, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure is to be uploaded to described medium type by user to describe server, and describes server stores to described medium type description document by described medium type;
Described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
Described media server, according to the characteristic information obtaining and the corresponding relation of acquisition, is determined the type of described media file.
Another object of the embodiment of the present invention is to provide a kind of media server, and described media server comprises:
Resolution unit, for describing server downloads of media type specification file from medium type, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure is to be uploaded to described medium type by user to describe server, and describes server stores to described medium type description document by described medium type;
Information acquisition unit, for reading media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
Type determining unit, for according to the characteristic information obtaining and the corresponding relation of acquisition, determines the type of described media file.
The system that provides a kind of medium type to analyze is provided an object again of the embodiment of the present invention, described system comprises that described media server and medium type describe server, described medium type is described the medium type analysis strategy that server is uploaded for receiving user, and described medium type analysis strategy is stored to medium type describes in the medium type description document of server.
In embodiments of the present invention, from medium type, server downloads of media type specification file is described by media server, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, read media file to be analyzed, obtain the characteristic information of media file to be analyzed according to described corresponding relation, according to the corresponding relation of the characteristic information obtaining and acquisition, determine the type of described media file.After having there is the media file of newtype, only need the medium type description document that more new media type is described in server can make media server identify new media file type, need to not develop new software or upgrade existing software for media server, thereby effectively raise the efficiency that media file type is analyzed, and reduce the cost that media file type is analyzed.
Brief description of the drawings
Fig. 1 is the realization flow figure of the medium type analytical method that provides of the embodiment of the present invention one;
Fig. 2 is the realization flow figure of the medium type analytical method that provides of the embodiment of the present invention two;
Fig. 3 is the realization flow figure of the medium type analytical method that provides of the embodiment of the present invention three;
Fig. 4 a, 4b are the particular flow sheets of the medium type analytical method that provides of the embodiment of the present invention four;
Fig. 5 is the composition structure chart of the media server that provides of the embodiment of the present invention five;
Fig. 6 a shows the composition structure of the medium type analytical system that the embodiment of the present invention six provides, and Fig. 6 b is the structural representation that the media server that the embodiment of the present invention six provides.
Embodiment
In order to make object 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 described server downloads of media type specification file by media server from medium type, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, read media file to be analyzed, obtain the characteristic information of media file to be analyzed according to described corresponding relation, according to the corresponding relation of the characteristic information obtaining and acquisition, determine the type of described media file.After having there is the media file of newtype, the embodiment of the present invention only needs the medium type description document that more new media type is described in server can make media server identify new media file type, need to not develop new software or upgrade existing software for media server, thereby effectively raise the efficiency that media file type is analyzed, and reduce the cost that media file type is analyzed.
For technical solutions according to the invention are described, describe below by specific embodiment.
embodiment mono-:
Fig. 1 shows the realization flow of the medium type analytical method that the embodiment of the present invention one provides, and details are as follows for the method process:
In step S101, media server is described server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, and obtains the corresponding relation between the type of media file and the characteristic information of media file.
In the present embodiment, media server is described server by wired or wireless mode and medium type and is communicated, and from described medium type, server downloads of media type specification file is described, the form of described medium type description document is including, but not limited to TXT form.Media server is resolved the medium type description document of downloading, and obtains medium type analysis strategy structure.Wherein, described medium type description document comprises at least one medium type analysis strategy structure, carries the corresponding relation between the type of media file and the characteristic information of media file in medium type analysis strategy structure.
Concrete, described medium type analysis strategy structure containing type (type) territory and at least one label (tag) territory, in described type field, comprise the particular type of media file, in described label field, comprise at least one pair of value (value) territory and skew (offset) territory, in described codomain and offset domain, contain definite value, carry out the file signature of the file header part of presentation medium file by the value of described codomain and offset domain, be the characteristic information of media file, described characteristic information is corresponding with the file type in described type field.
In the present embodiment, the unique identifier that the characteristic information of described media file is media file, media server is distinguished dissimilar media file by the characteristic information of media file.For example: the characteristic information of the media file of AVI form is: the position that is OXFFFF in deviant there will be 1010 values.
In step S102, described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation.
In the present embodiment, media server reads media file to be analyzed, obtains the position at the file signature place of media file to be analyzed according to described corresponding relation, and according to the file signature of described position acquisition media file to be analyzed.
In step S103, described media server, according to the characteristic information obtaining and the corresponding relation of acquisition, is determined the type of described media file.
In the present embodiment, described media server compares the file signature in the file signature of the media file to be analyzed obtaining and described label field, and in the time that comparative result equates, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
Illustrate as follows: the medium type description document of downloading by parsing, the corresponding relation obtaining is as follows: (1010 and OXFFFF-AVI), in certain label field in certain medium type analysis strategy structure, the value of codomain and offset domain is respectively 1010 and when OXFFFF, obtain the value of media file to be analyzed in OXFFFF place codomain, if media file to be analyzed is also 1010 in the value of OXFFFF place codomain, the type of judging this media file is the specified file type-AVI of type field in this medium type analysis strategy structure.
In the present embodiment, the medium type description document that media server is downloaded by parsing, obtain the corresponding relation between the type of media file and the characteristic information of media file, and obtain the characteristic information of media file to be analyzed according to described corresponding relation, and then the type of definite media file, need to not develop new software or upgrade existing software for media server, effectively raise the efficiency that media file type is analyzed, and reduce the cost that media file type is analyzed.
embodiment bis-:
Fig. 2 shows the realization flow of the medium type analytical method that the embodiment of the present invention two provides, and details are as follows for the method process:
In step S201, media server is described server downloads of media type specification file from medium type.
In the present embodiment, media server is described server by wired or wireless mode and medium type and is communicated, and from described medium type, server downloads of media type specification file is described, the form of described medium type description document is including, but not limited to TXT form.Media server is resolved the medium type description document of downloading, and obtains medium type analysis strategy structure.Wherein, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure containing type territory and at least one label field, in described label field, comprise the file signature of the file header part of media file, the file signature in described label field is corresponding with the file type in described type field.
In step S202, described media server is resolved the medium type territory in described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file.
In the present embodiment, media server is resolved described medium type description document and is obtained medium type analysis strategy structure, medium type description document comprises at least one medium type analysis strategy structure, and each medium type analysis strategy structure comprises a medium type territory.Media server is resolved the medium type territory in described medium type description document, judges one by one the subdomain in medium type territory, obtains the file signature of the type of media file and the file header part of media file.The file signature of the file header part that in the present embodiment, the characteristic information of media file is media file.
In step S203, described media server is set up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
At the present embodiment, media server is set up the corresponding relation between the type of described media file and the file signature of the file header part of media file, the i.e. corresponding relation of the value of codomain and offset domain in file type in type field and label field.For example: 1010 and (OXFFFF-AVI) between corresponding relation.
In step S204, described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation.
In the present embodiment, media server reads media file to be analyzed, obtains the position at the file signature place of media file to be analyzed according to described corresponding relation, and according to the file signature of described position acquisition media file to be analyzed.
In step S205, described media server, according to the characteristic information obtaining and the corresponding relation of acquisition, is determined the type of described media file.
In the present embodiment, described media server compares the file signature in the file signature of the media file to be analyzed obtaining and described label field, and in the time that comparative result equates, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
embodiment tri-
Fig. 3 shows the realization flow of the medium type analytical method that the embodiment of the present invention three provides, and details are as follows for the method process:
In step S301, medium type is described server and is received the medium type analysis strategy uploaded of user, and described medium type analysis strategy is stored to medium type describes in the medium type description document of server.
In the present embodiment, a newly-built medium type is described server, and described medium type is described server and at least comprised a medium type description document.This medium type is described the medium type analysis strategy that server is uploaded for receiving user, and the medium type analysis strategy after receiving is stored to medium type and describes in the medium type description document of server.The type that described medium type analysis strategy has comprised media file and the characteristic information of the type media file.Described medium type analysis strategy very little (being less than 1M), makes user can save greatly bandwidth in the time uploading, and improves the efficiency that medium type is analyzed.Wherein, described medium type is described server and is communicated by wired or wireless mode and media server.
In step S302, media server is described server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, and obtains the corresponding relation between the type of media file and the characteristic information of media file.
In the present embodiment, media server is described server by wired or wireless mode and medium type and is communicated, and from described medium type, server downloads of media type specification file is described, the form of described medium type description document is including, but not limited to TXT form.Media server is resolved the medium type description document of downloading, and obtains medium type analysis strategy structure.Wherein, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure containing type (type) territory and at least one label (tag) territory, in described type field, comprise the particular type of media file, in described label field, comprise at least one pair of value (value) territory and skew (offset) territory, in described codomain and offset domain, contain definite value, carry out the file signature of the file header part of presentation medium file by the value of described codomain and offset domain, it is the characteristic information of media file, described characteristic information is corresponding with the file type in described type field.
In the present embodiment, the unique identifier that the characteristic information of described media file is media file, media server is distinguished dissimilar media file by the characteristic information of media file.For example: the characteristic information of the media file of AVI form is: the position that is OXFFFF in deviant there will be 1010 values.
In the present embodiment, resolve the medium type description document of downloading, obtain the corresponding relation between the type of media file and the characteristic information of media file, comprise: resolve the medium type territory in described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file; Set up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
In step S303, described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation.
In the present embodiment, media server reads media file to be analyzed, obtains the position at the file signature place of media file to be analyzed according to described corresponding relation, and according to the file signature of described position acquisition media file to be analyzed.
In step S304, described media server, according to the characteristic information obtaining and the corresponding relation of acquisition, is determined the type of described media file.
In the present embodiment, described media server compares the file signature in the file signature of the media file to be analyzed obtaining and described label field, and in the time that comparative result equates, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
In the present embodiment, after the media file of newtype occurs, medium type is described server only needs more new media type description document, receive the very little portion medium type analysis strategy corresponding with described new media file that user uploads, media server is described server and downloads this medium type analysis strategy and just can analyze fast the type of described new media file from described medium type, improved greatly the efficiency that media file is analyzed.
embodiment tetra-:
Fig. 4 a, 4b are the idiographic flows of the medium type analytical method that provides of the embodiment of the present invention three, and wherein, Fig. 4 a is the idiographic flow of analyzing medium type specification file, and step is as follows:
1, media server is described server by wired or wireless mode and medium type and is connected;
2, media server describes from medium type the medium type description document that server, download user is uploaded, and resolves described medium type description document, obtains first territory of medium type analysis strategy in described medium type description document; Wherein, described medium type analysis strategy is including, but not limited to XML form.
3, judge whether first territory is medium type (mediatype) territory; Wherein, each the mediatype territory in medium type description document has defined a kind of analysis rule of media file type;
4, while being mediatype territory in first territory, set up new medium type analysis strategy structure (struct media_analyser) A, while not being mediatype territory in first territory, continue to judge next territory.Until described territory is mediatype territory;
The example of medium type analysis strategy structure is as follows:
Wherein, media_analyser represents the title of this structure, Char type[24] represent the character array (being the type field in medium type analysis strategy) of medium type, analyse_method*header represents to point to the pointer of first analyse_method address.
5, obtain second territory, described second territory is the subdomain in mediatype territory;
6, judge whether second territory is label (tag) territory; Described tag territory is for the characteristic information of presentation medium file type;
7,, while being tag territory in second territory, set up structure (struct analyse_method) B of a new preservation label field;
The topology example of preserving label field is as follows:
Wherein, analyse_method represents the title of this structure, and Valuetable*header represents to point to the pointer of Valuetable memory address, and analyse_method*next represents to point to the pointer of next analyse_method address.
8, do you judge A->header==null? does is the analyse_method that judges the header pointed in this medium type analysis strategy structure A empty?
9, empty if, B is deposited in to the address of header pointed;
If 10 is not empty, deposit the analyse_method in the address of header pointed in B->next, B is deposited in to the address of header pointed;
11, continue to obtain next territory, described territory is the territory in tag territory;
12, judge whether this territory is skew (offset) territory; Value representation in described offset domain be the bits of offset of media file file header, i.e. the position at the characteristic information place of media file;
13,, while being offset territory in this territory, setting up structure (struct valuetable) C who preserves offset territory and value territory, and the value in this offset territory is assigned to C->offset;
The topology example of preserving codomain and offset domain is as follows:
Wherein, valuetable represents the title of this structure, and Valuetable*next represents to point to the pointer of next Valuetable address.
14, do you judge B->header==null?
15, empty if, C is deposited in to the address of header pointed;
If 16 is not empty, deposit the valuetable in the address of header pointed in C->next, C is deposited in to the address of header pointed;
17, continue to obtain next territory, the subdomain in Hai Weitag territory, this territory;
18, judge whether this territory is value (value) territory, the value in described value territory is the value at corresponding offset value place;
19,, while being value territory in this territory, the value in this value territory is assigned to C->value;
20, continue to obtain next territory, the territory in Hai Weitag territory, this territory;
21, judge whether this territory is offset territory, in the time that judged result is "Yes", return to execution step 13; In the time that judged result is "No", return to execution step 3, until the whole domain analysiss in medium type description document complete.
Media server is after the analysis of above-mentioned medium type description document, obtain a medium type analysis strategy structure (Struct media_analyser) list, described medium type analysis strategy structure list is the list of Structmedia_analyser composition, in described medium type analysis strategy structure list, comprise at least one medium type analysis strategy structure, each medium type analysis strategy structure comprises a type field and at least one label field structure, and each label field structure comprises at least one valuetable structure.Media server is by the type of the Struct media_analyser list analyzing medium file that obtains, detailed process as shown in Figure 4 b:
1, open media file to be analyzed; Here open the composition information of obtaining media file to be analyzed that refers to;
2, traversal media_analyser structure list;
3, the each analyse_method structure in traversal media_analyser structure;
4, the each valuetable structure in traversal analyse_method structure;
5, obtain the value in offset territory and value territory in valuetable structure;
6, read the value value of media file to be analyzed at offset value place;
7, relatively whether the value value of the value in value territory and the media file to be analyzed that reads is equal in valuetable structure, in the time that judged result is "No", returns to step 3, carries out next analyse_method structure; In the time that judged result is "Yes", execution step 8;
8, in the time that comparative result equates, judge whether to exist next valuetable structure, in the time that judged result is "No", return to step 4, carry out next valuetable structure; In the time that judged result is "Yes", execution step 9;
9, in judged result when being, the type of determining media file to be analyzed is the file type in type field in current media analysis strategy structure, finishes the analysis to this media file.
In the present embodiment, the format sample of medium type analysis strategy is as follows:
Wherein, each mediatype territory has defined a kind of analysis strategy of media file type; The medium type of type domain representation media file; The characteristic information of tag domain representation media file type; The bits of offset of offset domain representation media file head, the i.e. position at the characteristic information place of media file; The value at the offset thresholding place that value representation in value territory is corresponding, the type attribute in value territory has two values:
Type=char: what specify in expression value territory is character string type;
Type=byte: what represent to specify in value territory is two to enter to be worth type.
In the present embodiment, the label field in medium type (mediatype) territory is relation in parallel,, as long as media file meets one of them label field, can judge that the type of this media file is as the file type of type field in this medium type territory; The every pair of codomain and offset domain in label field are series relationship, and media file must meet every pair of codomain and offset domain, just can judge the type that the type of this media file is specified as type field in this medium type territory.
In the present embodiment, each medium type analysis strategy structure in media server traversal medium type analysis strategy structure list, and travel through the each label field structure in each medium type analysis strategy structure, obtain the value of offset domain in label field (offset) and codomain (value), obtain the value value of media file to be analyzed at this offset value place simultaneously.The value value at media file offset value to be analyzed place is compared with the value value of any one the label field structure in any one medium type analysis strategy structure in medium type analysis strategy structure list, compare with codomain all in any one label field structure in any one medium type analysis strategy structure in medium type analysis strategy structure list and the value of offset domain by the value of media file codomain to be analyzed and offset domain, in the time that comparative result equates, the type of judging this media file is the specified file type of type field in this medium type analysis strategy structure.
embodiment five:
Fig. 5 shows the composition structure of the media server that the embodiment of the present invention five provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention.
This media server can be the unit that the software unit, hardware cell or the software and hardware that run on various application systems combines, and also can be used as independently suspension member and is integrated in these application systems.
This media server comprises resolution unit 51, information acquisition unit 52 and type determining unit 53.Wherein, the concrete function of each unit is as follows:
Resolution unit 51, for describe server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, and obtains the corresponding relation between the type of media file and the characteristic information of media file.Wherein, described resolution unit 51 also comprises that parsing module 511 and relation set up module 512,
Described parsing module 511 is for resolving the medium type territory of described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file;
Described relation is set up module 512 for setting up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
Information acquisition unit 52, for reading media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation.Wherein, information acquisition unit 52 also comprises address acquisition module 521 and signature acquisition module 522:
Described address acquisition module 521 is for obtaining the position at the file signature place of media file to be analyzed according to described corresponding relation;
Described signature acquisition module 522 is for according to the file signature of described position acquisition media file to be analyzed.
Type determining unit 53, for according to the characteristic information obtaining and the corresponding relation of acquisition, determines the type of described media file.Wherein, type determining unit 53 also comprises comparison module 531 and determination module 532:
Described comparison module 531 is for comparing the file signature of the file signature of the media file to be analyzed obtaining and described label field;
When described determination module 532 equates for the comparative result of described comparison module, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
The media server that the embodiment of the present invention five provides can use in the medium type analytical method embodiment mono-, two, three, four of aforementioned correspondence, and details, referring to the associated description of above-described embodiment one, two, three, four, do not repeat them here.
embodiment six:
Fig. 6 a shows the composition structure of the medium type analytical system that the embodiment of the present invention six provides, and Fig. 6 b is the structural representation that the media server that the embodiment of the present invention six provides.For convenience of explanation, only show the part relevant to the embodiment of the present invention.
This medium type analytical system comprises that medium type describes server 1 and at least one media server 2, and described type specification server 1 communicates by wired or wireless mode and media server 2.
Described medium type is described the medium type analysis strategy that server 1 is uploaded for receiving user, and described medium type analysis strategy is stored to medium type describes in the medium type description document of server;
Described media server comprises resolution unit 21, information acquisition unit 22 and type determining unit 23.Wherein, the concrete function of each unit is as follows:
Resolution unit 21, for describe server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, and obtains the corresponding relation between the type of media file and the characteristic information of media file.Wherein, described resolution unit 21 also comprises that parsing module 211 and relation set up module 212,
Described parsing module 211 is for resolving the medium type territory of described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file;
Described relation is set up module 212 for setting up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
Information acquisition unit 22, for reading media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation.Wherein, information acquisition unit 22 also comprises address acquisition module 221 and signature acquisition module 222:
Described address acquisition module 221 is for obtaining the position at the file signature place of media file to be analyzed according to described corresponding relation;
Described signature acquisition module 222 is for according to the file signature of described position acquisition media file to be analyzed.
Type determining unit 23, for according to the characteristic information obtaining and the corresponding relation of acquisition, determines the type of described media file.Wherein, type determining unit 23 also comprises comparison module 231 and determination module 232:
Described comparison module 231 is for comparing the file signature of the file signature of the media file to be analyzed obtaining and described label field;
When described determination module 232 equates for the comparative result of described comparison module, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
The medium type analytical system that the embodiment of the present invention six provides can be used in the medium type analytical method embodiment mono-, two, three and four of aforementioned correspondence, and details, referring to the associated description of above-described embodiment one, two, three and four, do not repeat them here.
One of ordinary skill in the art will appreciate that, the all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, described program can be being stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk, CD etc.
In embodiments of the present invention, from medium type, server downloads of media type specification file is described by media server, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, read media file to be analyzed, obtain the characteristic information of media file to be analyzed according to described corresponding relation, according to the corresponding relation of the characteristic information obtaining and acquisition, determine the type of described media file.After having there is the media file of newtype, only need the medium type description document that more new media type is described in server can make media server identify new media file type, need to not develop new software or upgrade existing software for media server, thereby effectively raise the efficiency that media file type is analyzed, and reduce the cost that media file type is analyzed.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.
Claims (9)
1. the method that medium type is analyzed, is characterized in that, described method comprises the steps:
Media server is described server downloads of media type specification file from medium type, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure is to be uploaded to described medium type by user to describe server, and describes server stores to described medium type description document by described medium type; The characteristic information of described media file is the file signature of the file header part of media file; Described medium type analysis strategy structure containing type territory and at least one label field, comprise the file signature of the file header part of media file in described label field, the file signature in described label field is corresponding with the file type in described type field;
Described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
Described media server, according to the characteristic information obtaining and the corresponding relation of acquisition, is determined the type of described media file.
2. the method for claim 1, is characterized in that, the medium type description document that described parsing is downloaded obtains the corresponding relation between the type of media file and the characteristic information of media file, comprising:
Resolve the medium type territory in described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file;
Set up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
3. the method for claim 1, is characterized in that, described media server reads media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation, comprising:
Obtain the position at the file signature place of media file to be analyzed according to described corresponding relation;
According to the file signature of described position acquisition media file to be analyzed.
4. method as claimed in claim 3, is characterized in that, described media server is determined the type of media file according to the characteristic information obtaining and described corresponding relation, comprising:
Described media server compares the file signature in the file signature of the media file to be analyzed obtaining and described label field;
In the time that comparative result equates, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
5. a media server, is characterized in that, described media server comprises:
Resolution unit, for describing server downloads of media type specification file from medium type, and the medium type description document of parsing download, obtain the corresponding relation between the type of media file and the characteristic information of media file, described medium type description document comprises at least one medium type analysis strategy structure, described medium type analysis strategy structure is to be uploaded to described medium type by user to describe server, and describes server stores to described medium type description document by described medium type; The characteristic information of described media file is the file signature of the file header part of media file; Described medium type analysis strategy structure containing type territory and at least one label field, comprise the file signature of the file header part of media file in described label field, the file signature in described label field is corresponding with the file type in described type field;
Information acquisition unit, for reading media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
Type determining unit, for according to the characteristic information obtaining and the corresponding relation of acquisition, determines the type of described media file.
6. media server as claimed in claim 5, is characterized in that, described resolution unit also comprises:
Parsing module, for resolving the medium type territory of described medium type description document, the file signature of the type that comprises media file in described medium type territory and the file header part of media file;
Relation is set up module, for setting up the corresponding relation between the type of described media file and the file signature of the file header part of media file.
7. media server as claimed in claim 5, is characterized in that, described information acquisition unit also comprises:
Address acquisition module, for obtaining the position at the file signature place of media file to be analyzed according to described corresponding relation;
Signature acquisition module, for according to the file signature of described position acquisition media file to be analyzed.
8. media server as claimed in claim 7, is characterized in that, described type determining unit also comprises:
Comparison module, for comparing the file signature of the file signature of the media file to be analyzed obtaining and described label field;
Determination module, while equating for the comparative result of described comparison module, the file type of determining described media file to be analyzed is the file type in type field corresponding to described label field.
9. the system that medium type is analyzed, is characterized in that, comprising:
Media server as described in claim 5 to 8 any one;
The system of described medium type analysis also comprises that medium type describes server, described medium type is described the medium type analysis strategy structure that server is uploaded for receiving user, and described medium type analysis strategy structure is stored to medium type describes in the medium type description document of server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110151871.XA CN102223405B (en) | 2011-06-08 | 2011-06-08 | Media type analyzing method, system and media server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110151871.XA CN102223405B (en) | 2011-06-08 | 2011-06-08 | Media type analyzing method, system and media server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102223405A CN102223405A (en) | 2011-10-19 |
CN102223405B true CN102223405B (en) | 2014-08-13 |
Family
ID=44779831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110151871.XA Active CN102223405B (en) | 2011-06-08 | 2011-06-08 | Media type analyzing method, system and media server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102223405B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104899509B (en) * | 2014-03-03 | 2018-07-10 | 珠海市君天电子科技有限公司 | The determining method and device of paper sample attribute |
CN105224673B (en) * | 2015-10-14 | 2020-03-06 | 海信集团有限公司 | Media file transmission method and device |
CN111160123B (en) * | 2019-12-11 | 2023-06-09 | 桂林长海发展有限责任公司 | Aircraft target identification method, device and storage medium |
CN115221453B (en) * | 2022-09-20 | 2023-03-10 | 太平金融科技服务(上海)有限公司深圳分公司 | Media resource management method, device, server and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051990A (en) * | 2007-05-24 | 2007-10-10 | 中兴通讯股份有限公司 | Medium type matching method and system based on downloading service |
CN101483696A (en) * | 2009-01-16 | 2009-07-15 | 中兴通讯股份有限公司 | Mobile terminal, information file management apparatus and method |
CN101697549A (en) * | 2009-10-23 | 2010-04-21 | 中兴通讯股份有限公司 | Method and system for displaying stream media and stream media management server |
CN102045553A (en) * | 2009-10-09 | 2011-05-04 | 腾讯科技(深圳)有限公司 | Multimedia transcoding device and method and multimedia player |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7966393B2 (en) * | 2008-02-18 | 2011-06-21 | Clear Channel Management Services, Inc. | System and method for media stream monitoring |
-
2011
- 2011-06-08 CN CN201110151871.XA patent/CN102223405B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051990A (en) * | 2007-05-24 | 2007-10-10 | 中兴通讯股份有限公司 | Medium type matching method and system based on downloading service |
CN101483696A (en) * | 2009-01-16 | 2009-07-15 | 中兴通讯股份有限公司 | Mobile terminal, information file management apparatus and method |
CN102045553A (en) * | 2009-10-09 | 2011-05-04 | 腾讯科技(深圳)有限公司 | Multimedia transcoding device and method and multimedia player |
CN101697549A (en) * | 2009-10-23 | 2010-04-21 | 中兴通讯股份有限公司 | Method and system for displaying stream media and stream media management server |
Also Published As
Publication number | Publication date |
---|---|
CN102223405A (en) | 2011-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1988535B (en) | Synchronous method, system for file storage and customer terminal | |
JP4977801B2 (en) | Document synchronization via stateless protocol | |
CN101950312B (en) | Method for analyzing webpage content of internet | |
US8219526B2 (en) | Synchronizing file partitions utilizing a server storage model | |
US20140047329A1 (en) | Network Based Font Subset Management | |
CN103095819A (en) | Data information pushing method and data information pushing system | |
CN102223405B (en) | Media type analyzing method, system and media server | |
CN104123149B (en) | Method for upgrading software, device, client and system | |
CN108900554B (en) | HTTP asset detection method, system, device and computer medium | |
US20140359066A1 (en) | System, method and device for offline downloading resource and computer storage medium | |
CN102438004A (en) | Method and system for acquiring metadata information of media file and multimedia player | |
CN103795765A (en) | File uploading verification method and system | |
US9201754B2 (en) | Recording application consumption details | |
CN103631769A (en) | Method and device for judging consistency between file content and title | |
CN102761628A (en) | Pan-domain name identification and processing device and method | |
CN103559194A (en) | Searching method, server and system | |
CN114817811A (en) | Website analysis method and device | |
CN104104972A (en) | Multimedia playing method, apparatus and system | |
CN111835801B (en) | File downloading method, device, server, edge equipment, terminal and medium | |
CN106790521B (en) | System and method for distributed networking by using node equipment based on FTP | |
Ramachandran et al. | Recommendations to improve downloads of large earth observation data | |
CN112003736B (en) | Multi-node configuration information determining method, device and storage medium | |
CN104796437A (en) | Method, device and system for querying geographical location information based on Nginx | |
US11120211B2 (en) | Combining spreadsheet recorded operations | |
CN110134377B (en) | Data request processing method, device and equipment of power industry management information 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 |