CN102223405A - Media type analyzing method, system and media server - Google Patents

Media type analyzing method, system and media server Download PDF

Info

Publication number
CN102223405A
CN102223405A CN201110151871XA CN201110151871A CN102223405A CN 102223405 A CN102223405 A CN 102223405A CN 201110151871X A CN201110151871X A CN 201110151871XA CN 201110151871 A CN201110151871 A CN 201110151871A CN 102223405 A CN102223405 A CN 102223405A
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.)
Granted
Application number
CN201110151871XA
Other languages
Chinese (zh)
Other versions
CN102223405B (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201110151871.XA priority Critical patent/CN102223405B/en
Publication of CN102223405A publication Critical patent/CN102223405A/en
Application granted granted Critical
Publication of CN102223405B publication Critical patent/CN102223405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Method, system and media server that a kind of medium type is analyzed
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, the type of media file also becomes increasingly abundant on the network, comprises text, picture, audio frequency, video etc.And these media files also comprise a plurality of subtypes usually, and for example: video file comprises subtypes such as AVI form, RMVB form.
Prior art is mainly resolved media file by the software in the media server, obtain the type of media file, and the type of the media file that will obtain after will resolving sends to client, and client is classified to described media file according to the type of described media file and shown or handle.Yet, software in the existing media server is all fixed the support of media file type, when occurring the media file of newtype on the network, existing software in the media server can not be discerned the type of this media file, the software that need make new advances at media server exploitation or upgrade existing software and resolve this media file, efficient is lower, and cost is higher.
Summary of the invention
The method that the purpose of the embodiment of the invention is to provide a kind of medium type to analyze is intended to solve the problem that existing software in the media server can not be discerned the type of new media file.
The embodiment of the invention is achieved in that the method that a kind of 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 resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file;
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 is determined the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
Another purpose of the embodiment of the invention is to provide a kind of media server, and described media server comprises:
Resolution unit is used for describing server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file;
Information acquisition unit is used to read media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
The type determining unit is used for determining the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
A purpose again of the embodiment of the invention is to provide a kind of system of medium type analysis, described system comprises that described media server and medium type describe server, described medium type is described server and is used to receive the medium type analysis strategy that the user uploads, 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, corresponding relation between the type of acquisition 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,, determine the type of described media file according to the corresponding relation of characteristic information that obtains and acquisition.After the media file that newtype occurred, only need new media type more to describe medium type description document in the server and can make the new media file type of media server identification, need not develop new software or upgrade existing software at media server, thereby effectively raise the efficient that media file type is analyzed, and reduced the cost that media file type is analyzed.
Description of drawings
Fig. 1 is the realization flow figure of the medium type analytical method that provides of the embodiment of the invention one;
Fig. 2 is the realization flow figure of the medium type analytical method that provides of the embodiment of the invention two;
Fig. 3 is the realization flow figure of the medium type analytical method that provides of the embodiment of the invention three;
Fig. 4 a, 4b are the particular flow sheets of the medium type analytical method that provides of the embodiment of the invention four;
Fig. 5 is the composition structure chart of the media server that provides of the embodiment of the invention five;
Fig. 6 a shows the composition structure of the medium type analytical system that the embodiment of the invention six provides, and Fig. 6 b is the structural representation that the media server that the embodiment of the invention six provides.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the 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, corresponding relation between the type of acquisition 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 characteristic information that obtains and acquisition, determine the type of described media file.After the media file that newtype occurred, the embodiment of the invention only needs new media type more to describe medium type description document in the server can make the new media file type of media server identification, need not develop new software or upgrade existing software at media server, thereby effectively raise the efficient that media file type is analyzed, and reduced the cost that media file type is analyzed.
For technical solutions according to the invention are described, describe below by specific embodiment.
Embodiment one:
Fig. 1 shows the realization flow of the medium type analytical method that the embodiment of the invention one provides, and details are as follows for this procedure:
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, the corresponding relation between the type of acquisition 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 server downloads of media type specification file is described from described medium type, the form of described medium type description document is including, but not limited to the 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 characteristic information of the type of media file and media file in the medium type analysis strategy structure.
Concrete, described medium type analysis strategy structure containing type (type) territory and at least one label (tag) territory, the particular type that comprises media file in the described type field, comprise at least one pair of value (value) territory and skew (offset) territory in the described label field, contain definite value in described codomain and the offset domain, come 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 the described type field.
In the present embodiment, the characteristic information of described media file is the unique identifier of media file, and media server is distinguished dissimilar media files by the characteristic information of media file.For example: the characteristic information of the media file of AVI form is: in deviant is that one 1010 value can appear in the position of OXFFFF.
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 obtains the file signature of media file to be analyzed according to described position.
In step S103, described media server is determined the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
In the present embodiment, file signature in the file signature of the media file to be analyzed that described media server will obtain and the described label field compares, and when comparative result equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
Illustrate as follows: by resolving the medium type description document of downloading, the corresponding relation that obtains is as follows: (1010 and OXFFFF-AVI), the value of codomain and offset domain is respectively 1010 and during OXFFFF in certain label field in certain medium type analysis strategy structure, obtain the value of media file to be analyzed in OXFFFF place codomain, if media file to be analyzed also is 1010 in the value of OXFFFF place codomain, judge that then the type of this media file is specified file type one AVI of type field in this medium type analysis strategy structure.
In the present embodiment, media server is by resolving the medium type description document of downloading, corresponding relation between the type of acquisition 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 not develop new software or upgrade existing software, effectively raise the efficient that media file type is analyzed, and reduce the cost that media file type is analyzed at media server.
Embodiment two:
Fig. 2 shows the realization flow of the medium type analytical method that the embodiment of the invention two provides, and details are as follows for this procedure:
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 server downloads of media type specification file is described from described medium type, the form of described medium type description document is including, but not limited to the 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, comprise the file signature of the file header part of media file in the described label field, the file signature in the described label field is corresponding with the file type in the described type field.
In step S202, described media server is resolved the medium type territory in the described medium type description document, comprises the type of media file and the file header file signature partly of media file in the described medium type territory.
In the present embodiment, media server is resolved described medium type description document and is obtained medium type analysis strategy structure, the 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 the described medium type description document, promptly judges the subdomain in medium type territory one by one, obtains the type of media file and the file header file signature partly of media file.In the present embodiment, the characteristic information of media file is the file signature of the file header part of media file.
In step S203, described media server is set up the corresponding relation between the file signature of file header part of the type of described media file and media file.
At present embodiment, media server is set up the corresponding relation between the file signature of file header part of the type of described media file and media file, the i.e. corresponding relation of the value of codomain and offset domain in file type in the type field and the 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 obtains the file signature of media file to be analyzed according to described position.
In step S205, described media server is determined the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
In the present embodiment, file signature in the file signature of the media file to be analyzed that described media server will obtain and the described label field compares, and when comparative result equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
Embodiment three
Fig. 3 shows the realization flow of the medium type analytical method that the embodiment of the invention three provides, and details are as follows for this procedure:
In step S301, medium type is described server and is received the medium type analysis strategy that the user uploads, 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 comprised a medium type description document at least.This medium type is described server and is used to receive the medium type analysis strategy that the user uploads, and the medium type analysis strategy after will receiving is stored to medium type and describes in the medium type description document of server.Described medium type analysis strategy has comprised the type of media file and the characteristic information of the type media file.Described medium type analysis strategy very little (less than 1M) makes the user can save bandwidth greatly when uploading, and improves the efficient 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, the corresponding relation between the type of acquisition 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 server downloads of media type specification file is described from described medium type, the form of described medium type description document is including, but not limited to the 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, the particular type that comprises media file in the described type field, comprise at least one pair of value (value) territory and skew (offset) territory in the described label field, contain definite value in described codomain and the offset domain, come 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 the described type field.
In the present embodiment, the characteristic information of described media file is the unique identifier of media file, and media server is distinguished dissimilar media files by the characteristic information of media file.For example: the characteristic information of the media file of AVI form is: in deviant is that one 1010 value can appear in the position of OXFFFF.
In the present embodiment, resolve the medium type description document of downloading, corresponding relation between the type of acquisition media file and the characteristic information of media file, comprise: resolve the medium type territory in the described medium type description document, comprise the type of media file and the file header file signature partly of media file in the described medium type territory; Set up the corresponding relation between the file signature of file header part of the type of described media file and 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 obtains the file signature of media file to be analyzed according to described position.
In step S304, described media server is determined the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
In the present embodiment, file signature in the file signature of the media file to be analyzed that described media server will obtain and the described label field compares, and when comparative result equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
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 that the user uploads with described new media file, media server is described server from described medium type and is downloaded the type that this medium type analysis strategy just can analyze described new media file fast, has improved the efficient that media file is analyzed greatly.
Embodiment four:
Fig. 4 a, 4b are the idiographic flows of the medium type analytical method that provides of the embodiment of the 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 is described the medium type description document that download user is uploaded on the server from medium type, resolves described medium type description document, obtains first territory of medium type analysis strategy in the described medium type description document; Wherein, described medium type analysis strategy is including, but not limited to the XML form.
3, judge whether first territory is medium type (mediatype) territory; Wherein, each the mediatype territory in the medium type description document has defined a kind of analysis rule of media file type;
When 4, being the mediatype territory, set up new medium type analysis strategy structure (struct media_analyser) A, when not being the mediatype territory, continue to judge next territory in first territory in first territory.Up to described territory is the mediatype territory;
The example of medium type analysis strategy structure is as follows:
Figure BDA0000066811700000091
Wherein, media_analyser represents the title of this structure, Char type[24] the character array (being the type field in the medium type analysis strategy) of expression 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 the mediatype territory;
6, judge whether second territory is label (tag) territory; Described tag territory is used for the characteristic information of presentation medium file type;
When 7, being the tag territory, set up structure (structanalyse_method) B of a new preservation label field in second territory;
The topology example of preserving label field is as follows:
Figure BDA0000066811700000092
Wherein, analyse_method represents the title of this structure, Valuetable *Header represents to point to the pointer of Valuetable memory address, analyse_method *Next represents to point to the pointer of next analyse_method address.
8, do you judge A->header==null? is the analyse_method that promptly judges the header pointed among this medium type analysis strategy structure A empty?
If 9 is empty, B is deposited in 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 the address of header pointed;
11, continue to obtain next territory, described territory is the territory in the tag territory;
12, judge whether this territory is skew (offset) territory; Value representation in the 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;
When 13, being the offset territory, set up structure (structvaluetable) C who preserves offset territory and value territory, and the value in this offset territory is composed to C->offset in this territory;
The topology example of preserving codomain and offset domain is as follows:
Figure BDA0000066811700000101
Wherein, valuetable represents the title of this structure, Valuetable *Next represents to point to the pointer of next Valuetable address.
14, do you judge B->header==null?
If 15 is empty, C is deposited in 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 the address of header pointed;
17, continue to obtain next territory, this territory also is the subdomain in the tag territory;
18, judge whether this territory is value (value) territory, the value in the described value territory is the value at the offset value place of correspondence;
When 19, being the value territory, the value in this value territory is composed to C->value in this territory;
20, continue to obtain next territory, this territory also is the territory in the tag territory;
21, judge that whether this territory is the offset territory, when judged result is "Yes", returns execution in step 13; When judged result is "No", return execution in step 3, till the whole domain analysiss in the medium type description document are finished.
Media server is through after the analysis of above-mentioned medium type description document, obtain a medium type analysis strategy structure (Struct media_analyser) tabulation, described medium type analysis strategy structure list is the tabulation that Structmedia_analyser forms, comprise at least one medium type analysis strategy structure in the described medium type analysis strategy structure list, 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.The type of the Struct media_analyser tabulation analyzing medium file of media server by obtaining, detailed process is shown in Fig. 4 b:
1, opens 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, each analyse_method structure in the traversal media_analyser structure;
4, each valuetable structure in the traversal analyse_method structure;
5, obtain the value in offset territory and value territory in the valuetable structure;
6, read the value value of media file to be analyzed at offset value place;
7, relatively in the valuetable structure value value of the value in value territory and the media file to be analyzed that reads whether equal, when judged result is "No", return step 3, carry out next analyse_method structure; When judged result is "Yes", execution in step 8;
8, when comparative result equates, judge whether to exist next valuetable structure, when judged result is "No", return step 4, carry out next valuetable structure; When judged result is "Yes", execution in step 9;
9, in judged result when being, the type of determining media file to be analyzed is the file type in the type field in the 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:
Figure BDA0000066811700000121
Wherein, each mediatype territory has all 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 of the value representation correspondence in the value territory, the type attribute in the value territory has two values:
Type=char: appointment is character string type in the expression value territory;
Type=byte: appointment is two to advance to be worth type in the expression value territory.
In the present embodiment, the label field in medium type (mediatype) territory is a relation in parallel, and promptly as long as media file satisfies one of them label field, then the type of this media file of decidable is the file type of type field in this medium type territory; The every pair of codomain and offset domain in the label field then are series relationship, and promptly media file must satisfy every pair of codomain and offset domain, and just the type of this media file of decidable is the type of type field appointment in this medium type territory.
In the present embodiment, each medium type analysis strategy structure in the media server traversal medium type analysis strategy structure list, and travel through each label field structure in each medium type analysis strategy structure, obtain the value of offset domain in the label field (offset) and codomain (value), obtain the value value of media file to be analyzed simultaneously at this offset value place.The value value of any one the label field structure in any one the medium type analysis strategy structure in the value value at media file offset value to be analyzed place and the medium type analysis strategy structure list is compared, the all codomain and the value of offset domain are compared in any one label field structure in any one medium type analysis strategy structure in the value that is about to media file codomain to be analyzed and offset domain and the medium type analysis strategy structure list, when comparative result equates, judge that then the type of 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 invention five provides, and for convenience of explanation, only shows the part relevant with the embodiment of the 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 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 is used for describing server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file.Wherein, described resolution unit 51 also comprises parsing module 511 and concerns sets up module 512,
Described parsing module 511 is used for resolving the medium type territory of described medium type description document, comprises the type of media file and the file header file signature partly of media file in the described medium type territory;
Described relation is set up the corresponding relation between the file signature of file header part that module 512 is used to set up the type of described media file and media file.
Information acquisition unit 52 is used to read 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 used for obtaining according to described corresponding relation the position at the file signature place of media file to be analyzed;
Described signature acquisition module 522 is used for obtaining according to described position the file signature of media file to be analyzed.
Type determining unit 53 is used for determining the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.Wherein, type determining unit 53 also comprises comparison module 531 and determination module 532:
Described comparison module 531 is used for the file signature of the media file to be analyzed that will obtain and the file signature of described label field compares;
When the comparative result that described determination module 532 is used for described comparison module equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
The media server that the embodiment of the invention five provides can use in the medium type analytical method embodiment one, two, three, four of aforementioned correspondence, and details do not repeat them here referring to the associated description of the foregoing description one, two, three, four.
Embodiment six:
Fig. 6 a shows the composition structure of the medium type analytical system that the embodiment of the invention six provides, and Fig. 6 b is the structural representation that the media server that the embodiment of the invention six provides.For convenience of explanation, only show the part relevant with the embodiment of the 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 server 1 and is used to receive the medium type analysis strategy that the user uploads, 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 is used for describing server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file.Wherein, described resolution unit 21 also comprises parsing module 211 and concerns sets up module 212,
Described parsing module 211 is used for resolving the medium type territory of described medium type description document, comprises the type of media file and the file header file signature partly of media file in the described medium type territory;
Described relation is set up the corresponding relation between the file signature of file header part that module 212 is used to set up the type of described media file and media file.
Information acquisition unit 22 is used to read 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 used for obtaining according to described corresponding relation the position at the file signature place of media file to be analyzed;
Described signature acquisition module 222 is used for obtaining according to described position the file signature of media file to be analyzed.
Type determining unit 23 is used for determining the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.Wherein, type determining unit 23 also comprises comparison module 231 and determination module 232:
Described comparison module 231 is used for the file signature of the media file to be analyzed that will obtain and the file signature of described label field compares;
When the comparative result that described determination module 232 is used for described comparison module equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
The medium type analytical system that the embodiment of the invention six provides can be used in the medium type analytical method embodiment one, two, three and four of aforementioned correspondence, and details do not repeat them here referring to the foregoing description one, two, three and four associated description.
One of ordinary skill in the art will appreciate that, realize that all or part of step in the foregoing description method is to instruct relevant hardware to finish by program, described program can be in being stored in a computer read/write memory medium, described storage medium is 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, corresponding relation between the type of acquisition 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,, determine the type of described media file according to the corresponding relation of characteristic information that obtains and acquisition.After the media file that newtype occurred, only need new media type more to describe medium type description document in the server and can make the new media file type of media server identification, need not develop new software or upgrade existing software at media server, thereby effectively raise the efficient that media file type is analyzed, and reduced the cost that media file type is analyzed.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (12)

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 resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file;
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 is determined the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
2. method according to claim 1 is characterized in that,
The characteristic information of described media file is the file signature of the file header part of media file;
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, comprise the file signature of the file header part of media file in the described label field, the file signature in the described label field is corresponding with the file type in the described type field.
3. method as claimed in claim 2 is characterized in that, the medium type description document that described parsing is downloaded, and the corresponding relation between the type of acquisition media file and the characteristic information of media file comprises:
Resolve the medium type territory in the described medium type description document, comprise the type of media file and the file header file signature partly of media file in the described medium type territory;
Set up the corresponding relation between the file signature of file header part of the type of described media file and media file.
4. method as claimed in claim 2 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;
Obtain the file signature of media file to be analyzed according to described position.
5. method as claimed in claim 4 is characterized in that, the type that characteristic information that described media server basis is obtained and described corresponding relation are determined media file comprises:
File signature in the file signature of the media file to be analyzed that described media server will obtain and the described label field compares;
When comparative result equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
6. the method for claim 1 is characterized in that, and is described media server is described server downloads of media type specification file from medium type before, further comprising the steps of:
Medium type is described server and is received the medium type analysis strategy structure that the user uploads, and described medium type analysis strategy structure is stored to medium type describes in the medium type description document of server.
7. a media server is characterized in that, described media server comprises:
Resolution unit is used for describing server downloads of media type specification file from medium type, and resolves the medium type description document of downloading, the corresponding relation between the type of acquisition media file and the characteristic information of media file;
Information acquisition unit is used to read media file to be analyzed, obtains the characteristic information of media file to be analyzed according to described corresponding relation;
The type determining unit is used for determining the type of described media file according to the characteristic information that obtains and the corresponding relation of acquisition.
8. media server as claimed in claim 7 is characterized in that,
The characteristic information of described media file is the file signature of the file header part of media file;
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, comprise the file signature of the file header part of media file in the described label field, the file signature in the described label field is corresponding with the file type in the described type field.
9. media server as claimed in claim 8 is characterized in that, described resolution unit also comprises:
Parsing module is used for resolving the medium type territory of described medium type description document, comprises the file signature of the file header part of the type of media file and media file in the described medium type territory;
Relation is set up module, is used to set up the corresponding relation between the file signature of file header part of the type of described media file and media file.
10. media server as claimed in claim 8 is characterized in that, described information acquisition unit also comprises:
Address acquisition module is used for obtaining according to described corresponding relation the position at the file signature place of media file to be analyzed;
The signature acquisition module is used for obtaining according to described position the file signature of media file to be analyzed.
11. media server as claimed in claim 10 is characterized in that, described type determining unit also comprises:
Comparison module is used for the file signature of the media file to be analyzed that will obtain and the file signature of described label field and compares;
Determination module, when the comparative result that is used for described comparison module equated, the file type of determining described media file to be analyzed was the file type in the type field of described label field correspondence.
12. the system that medium type is analyzed is characterized in that, comprising:
As each described media server of claim 7 to 11;
The system of described medium type analysis comprises that also medium type describes server, described medium type is described server and is used to receive the medium type analysis strategy structure that the user uploads, and described medium type analysis strategy structure is stored to medium type describes in the medium type description document of server.
CN201110151871.XA 2011-06-08 2011-06-08 Media type analyzing method, system and media server Active CN102223405B (en)

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 true CN102223405A (en) 2011-10-19
CN102223405B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899509A (en) * 2014-03-03 2015-09-09 珠海市君天电子科技有限公司 File sample attribute determining method and apparatus
CN105224673A (en) * 2015-10-14 2016-01-06 海信集团有限公司 A kind of media file transfer approach and device
CN111160123A (en) * 2019-12-11 2020-05-15 桂林长海发展有限责任公司 Airplane target identification method and device and storage medium
CN115221453A (en) * 2022-09-20 2022-10-21 太平金融科技服务(上海)有限公司深圳分公司 Media information management method, apparatus, device, medium, and computer program product

Citations (5)

* Cited by examiner, † Cited by third party
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
US20090210550A1 (en) * 2008-02-18 2009-08-20 Michael Canann System and method for media stream monitoring
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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
US20090210550A1 (en) * 2008-02-18 2009-08-20 Michael Canann System and method for media stream monitoring
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899509A (en) * 2014-03-03 2015-09-09 珠海市君天电子科技有限公司 File sample attribute determining method and apparatus
CN104899509B (en) * 2014-03-03 2018-07-10 珠海市君天电子科技有限公司 The determining method and device of paper sample attribute
CN105224673A (en) * 2015-10-14 2016-01-06 海信集团有限公司 A kind of media file transfer approach and device
CN105224673B (en) * 2015-10-14 2020-03-06 海信集团有限公司 Media file transmission method and device
CN111160123A (en) * 2019-12-11 2020-05-15 桂林长海发展有限责任公司 Airplane target identification method and device and storage medium
CN111160123B (en) * 2019-12-11 2023-06-09 桂林长海发展有限责任公司 Aircraft target identification method, device and storage medium
CN115221453A (en) * 2022-09-20 2022-10-21 太平金融科技服务(上海)有限公司深圳分公司 Media information management method, apparatus, device, medium, and computer program product
CN115221453B (en) * 2022-09-20 2023-03-10 太平金融科技服务(上海)有限公司深圳分公司 Media resource management method, device, server and medium

Also Published As

Publication number Publication date
CN102223405B (en) 2014-08-13

Similar Documents

Publication Publication Date Title
CN1988535B (en) Synchronous method, system for file storage and customer terminal
US8997041B2 (en) Method of managing script, server performing the same and storage media storing the same
CN102521280B (en) Loading method and loading device of EPub electronic book
CN101729442B (en) Method and device for realizing content sharing
US20160239387A1 (en) Operation synchronization method, device and storage medium
US20080027920A1 (en) Data processing over very large databases
US20100138387A1 (en) Method, apparatus and computer program product for sub-file level synchronization
CN105138592A (en) Distributed framework-based log data storing and retrieving method
CN102546836A (en) Method, terminal, server and system for uploading files
JP2011520189A (en) Document synchronization via stateless protocol
US9398117B2 (en) Protocol data unit interface
CN102254005A (en) Method for transforming and displaying document on webpage
US20140359066A1 (en) System, method and device for offline downloading resource and computer storage medium
CN103795765A (en) File uploading verification method and system
CN103377053A (en) Method, device and system for controlling application
CN102223405B (en) Media type analyzing method, system and media server
CN103825918B (en) Method of data synchronization, terminal device, server and system
CN105893542A (en) Method and system for redistributing cold data files in cloud storage system
KR20120048525A (en) Method and apparatus for controlling remote device via short messaging service
CN104104972A (en) Multimedia playing method, apparatus and system
US20110093524A1 (en) Access log management method
CN112202862B (en) Method and device for synchronizing cluster data and files based on kafka
CN111930708B (en) Ceph object storage-based object tag expansion system and method
EP2690560B1 (en) Method of benchmarking the behaviour of a replacement information system with the old system
KR101634822B1 (en) Adapter for synchronizing data over different networks

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