CN106649428A - Analyzing method and apparatus of storage files - Google Patents

Analyzing method and apparatus of storage files Download PDF

Info

Publication number
CN106649428A
CN106649428A CN201610648942.XA CN201610648942A CN106649428A CN 106649428 A CN106649428 A CN 106649428A CN 201610648942 A CN201610648942 A CN 201610648942A CN 106649428 A CN106649428 A CN 106649428A
Authority
CN
China
Prior art keywords
storage file
data structure
format data
file
logic
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.)
Pending
Application number
CN201610648942.XA
Other languages
Chinese (zh)
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201610648942.XA priority Critical patent/CN106649428A/en
Priority to PCT/CN2016/113344 priority patent/WO2018028127A1/en
Publication of CN106649428A publication Critical patent/CN106649428A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Abstract

The invention discloses an analyzing method and apparatus of storage files. The analyzing method of the storage files comprises the steps of reading a storage file, wherein the storage file comprises an analytic logic identifier corresponding to the format of the storage file; based on a preset analytic logic corresponding to the analytic logic identifier, parsing the storage file into an intermediate format data structure, wherein, the intermediate format data structure includes element identification codes corresponding to each content element in the storage file; based on the preset transformation logic corresponding to all the element identification codes, converting the intermediate format data structure into a memory storage file, wherein, the memory storage file is the mapping of the storage file in the memory. The analyzing method and apparatus of storage files can enhance the compatibility of equipment to file formats, and make the process of achieving the file format compatibility simpler and easier.

Description

The analysis method and device of storage file
Technical field
The present invention relates to field of computer technology, more particularly to a kind of analysis method and device of storage file.
Background technology
In existing technical scheme, the content of storage file is shown on the UI of interactive electric whiteboard, is to pass through The form of the storage file is directly resolved to a kind of data structure format in internal memory, i.e. memory model from storage format, and Memory model is rendered to realize.Because resolving of the prior art is that the form of file is straight from storage format Connect and resolve to memory model, therefore, the storage format of either file changes, or is that memory model changes, Need to realize that logic is modified to resolving.For example, the content of xml document is being shown to interactive electric whiteboard When on UI, the xml document is resolved to into memory model using resolution logic a, and increase a kind of json types in storage file File after, when the content of json files is shown to the UI of interactive electric whiteboard, then need resolution logic a first After being revised as resolution logic b that can parse xml document and json files, then it is memory model by the json document analysis. Again for example, when storage file is resolved to into memory model A, resolution logic c is used, but newly-increased one in memory model After individual memory model B is to realize new function, then need to modify resolution logic c so that part storage file can be by Memory model A is resolved to, while another part storage file can be resolved to memory model B.Therefore, existing technical scheme Cause the poor compatibility of the software on interactive electric whiteboard, realize that the process of format compatible is complicated and difficult.
The content of the invention
The present invention proposes a kind of analysis method and device of storage file, it is possible to increase compatibility of the equipment to file format Property, and cause to realize the compatible process of file format easily, simply.
A kind of analytic method of storage file that the present invention is provided, specifically includes:
Read storage file;Wherein, the storage file includes the parsing corresponding to the form with the storage file Logic identification code;
Resolution logic according to corresponding to pre-setting with the resolution logic identification code, by storage file parsing For intermediate format data structure;Wherein, the intermediate format data structure includes and each content in the storage file Element distinguishes corresponding element identification codes;
According to pre-setting and the common corresponding conversion logic of element identification codes institute, by the intermediate format data Structure is converted to core file;Wherein, the core file is mapping of the storage file in internal memory.
Further, the basis pre-set with the resolution logic corresponding to the resolution logic identification code, by institute State storage file and resolve to intermediate format data structure, specifically include:
According to the resolution logic identification code, the resolution logic identification code is obtained from the parsing manager for pre-setting The corresponding resolution logic;
According to the resolution logic, the storage file is resolved to into the intermediate format data structure.
Further, the resolution logic includes the first resolution logic and the second resolution logic;
It is described that the storage file is resolved to by the intermediate format data structure according to the resolution logic, concrete bag Include:
According to first resolution logic, the format parser corresponding to the form with the storage file is called, by institute State storage file and resolve to corresponding format data structure;
According to second resolution logic, the node adduction relationship of the format data structure is modified, will be described Format data structure resolves to the intermediate format data structure.
Further, the basis pre-set with the common corresponding conversion logic of element identification codes institute, by institute State intermediate format data structure and be converted to core file, specifically include:
According to the element identification codes, the element identification codes institute is obtained from the conversion manager for pre-setting common right The conversion logic answered;
According to the conversion logic, recurrence is carried out to the intermediate format data structure, by intermediate format data knot Structure is converted to the core file.
Further, the basis pre-set with the common corresponding conversion logic of element identification codes institute, will The intermediate format data structure is converted to after core file, is also included:
Each content element in the core file is rendered to show in display screen.
Correspondingly, present invention also offers a kind of resolver of storage file, specifically includes:
Storage file read module, for reading storage file;Wherein, the storage file includes and the storage text Resolution logic identification code corresponding to the form of part;
Storage file parsing module, for being patrolled with the parsing corresponding to the resolution logic identification code according to what is pre-set Volume, the storage file is resolved to into intermediate format data structure;Wherein, the intermediate format data structure include with it is described Each content element in storage file distinguishes corresponding element identification codes;And,
Intermediate format data structure modular converter, for jointly corresponding with element identification codes institute according to pre-setting Conversion logic, the intermediate format data structure is converted to into core file;Wherein, the core file is institute State mapping of the storage file in internal memory.
Further, the storage file parsing module, specifically includes:
Resolution logic acquiring unit, for according to the resolution logic identification code, from the parsing manager for pre-setting Obtain the resolution logic corresponding to the resolution logic identification code;And,
Document analysis unit, for according to the resolution logic, the storage file being resolved to into the intermediate form number According to structure.
Further, the resolution logic includes the first resolution logic and the second resolution logic;
The document analysis unit, specifically includes:
First parsing subelement, it is right with the form of storage file institute for according to first resolution logic, calling The format parser answered, by the storage file corresponding format data structure is resolved to;And,
Second parsing subelement, for according to second resolution logic, quoting to the node of the format data structure Relation is modified, and the format data structure is resolved to into the intermediate format data structure.
Further, the intermediate format data structure modular converter, specifically includes:
Conversion logic acquiring unit, for according to the element identification codes, obtaining from the conversion manager for pre-setting The common corresponding conversion logic of element identification codes institute;And,
Format conversion unit, for according to the conversion logic, to the intermediate format data structure recurrence being carried out, will The intermediate format data structure is converted to the core file.
Further, the resolver of the storage file, also includes:
Display module is rendered, for rendering to each content element in the core file to show in display screen Show.
Implement the present invention, have the advantages that:
The analysis method and device of the storage file that the present invention is provided, it is corresponding with the form of storage file by basis Resolution logic, by storage file intermediate format data structure is resolved to, and according to the intermediate format data structure in Hold the corresponding conversion logic of element, the intermediate format data structure is converted to into core file, so that storage text The change of the form of part is mutually isolated with the change of the content of storage file, i.e., can be to various different-formats in resolving Storage file is parsed, but regardless of which kind of content element is the storage file include, can be included to various in transfer process The intermediate format data structure of different content element is changed, but regardless of which kind of form is corresponding storage file be.Therefore, The analytic method of storage file provided in an embodiment of the present invention can improve compatibility of the equipment to file format.Simultaneously as New resolution logic need to only be added when the form of storage file changes, when the content element of storage file changes New conversion logic need to only be added, therefore realize the process of format compatible easily, simply.
Description of the drawings
Fig. 1 is the schematic flow sheet of one embodiment of the analytic method of the storage file that the present invention is provided;
Fig. 2 be the present invention provide storage file analytic method one embodiment integer X attributes corresponding in Between form schematic diagram;
Fig. 3 is that the coordinate points Point attribute institute of one embodiment of the analytic method of the storage file that the present invention is provided is right The schematic diagram of the intermediate form answered;
Fig. 4 is the background Background attribute of one embodiment of the analytic method of the storage file that the present invention is provided The schematic diagram of type intermediate form corresponding when being color;
Fig. 5 is the background Background attribute of one embodiment of the analytic method of the storage file that the present invention is provided The schematic diagram of type intermediate form corresponding when being picture;
Fig. 6 is the coordinate points array Points attribute of one embodiment of the analytic method of the storage file that the present invention is provided The schematic diagram of corresponding intermediate form;
Fig. 7 is the intermediate format data knot of the tree-shaped of one embodiment of the analytic method of the storage file that the present invention is provided The schematic diagram of structure;
Fig. 8 is that the flow process of the resolving of one embodiment of the analytic method of the storage file that the present invention is provided is illustrated Figure;
Fig. 9 is that the flow process of the transfer process of one embodiment of the analytic method of the storage file that the present invention is provided is illustrated Figure;
Figure 10 is the structural representation of one embodiment of the resolver of the storage file that the present invention is provided.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
It is the schematic flow sheet of one embodiment of the analytic method of the storage file that the present invention is provided referring to Fig. 1, including Step S11 to S13, it is specific as follows:
S11:Read storage file;Wherein, the storage file is included corresponding to the form with the storage file Resolution logic identification code;
S12:Resolution logic according to corresponding to pre-setting with the resolution logic identification code, by the storage file Resolve to intermediate format data structure;Wherein, the intermediate format data structure includes and each in the storage file Content element distinguishes corresponding element identification codes;
S13:According to pre-setting and the common corresponding conversion logic of element identification codes institute, by the intermediate form Data structure is converted to core file;Wherein, the core file is mapping of the storage file in internal memory.
It should be noted that method provided by the present invention is mainly made up of resolving and transfer process, i.e., by certain When one storage file is parsed and is converted to core file, it is right first to be resolved to the storage file according to corresponding resolution logic After the intermediate format data structure answered, the intermediate format data structure is converted to into memory storage further according to corresponding conversion logic File.The resolution logic that resolving is adopted by the storage file for being parsed format determination.What transfer process was adopted turns Change logic to be together decided on by the content element in the intermediate format data structure changed.
Need it is further noted that the form of storage file can be xml forms, json forms or svg forms etc.. Intermediate format data structure can be tree, or the other kinds of data structure such as chained list, storehouse.
The node adduction relationship in intermediate format data structure is illustrated by taking the intermediate format data structure of tree-shaped as an example.In this Between include tri- items of Name, Value and Children in each node in format data structure, the name of node is represented respectively The child node of title, the value of node and node.
When the attribute that a certain node is represented is the base data types such as integer, decimal, character string, the Name values of the node For the title of the attribute, the Value values of the node are the value of the attribute, and the Children values of the node are sky.For example:Work as attribute For X=100 when, the intermediate form corresponding to the attribute is as shown in Figure 2.
When the attribute that a certain node is represented is by being combined that some single attributes are constituted for composite data type, the i.e. attribute During attribute, the Name values of the node are the title of the attribute, and the Value values of the node are sky, and the Children of the node is pointed to Represent the node of each single attribute.For example, when attribute is that (100, when 200), the attribute is by single attribute cx for coordinate points Point =100 and single attribute cy=200 composition, therefore the intermediate form corresponding to the attribute is as shown in Figure 3.
When the attribute that a certain node is represented is probably base data type, it is also possible to during composite data type, the node Name values for the attribute title, the Value values of the node are sky, and the Children of the node points to the tool of the expression attribute The data type of body and the node of content.For example, when attribute is background Background, the type of the attribute is probably face Color, it is also possible to picture.When the type of the attribute is color, the intermediate form corresponding to the attribute is as shown in Figure 4.
When the type of the attribute is picture, the intermediate form corresponding to the attribute is as shown in Figure 5.
When the attribute that a certain node is represented is array type, the Name values of the node are the title of the attribute, the node Value values be sky, the Children of the node points to the node of the attribute for representing each array element in the attribute.Example Such as, when attribute is the Points arrays being made up of two coordinate points Point, the such as Fig. 6 of the intermediate form corresponding to attribute institutes Show.
In one preferred embodiment, when needing to parse and be converted to core file by a certain storage file When, computer reads the storage file, and the resolution logic corresponding to the version number of the resolution logic in the storage file, Resolution logic i.e. corresponding to resolution logic identification code, by the storage file intermediate format data structure is resolved to.Subsequently, calculate Machine travels through the intermediate format data structure, and according to the common corresponding conversion of element identification codes institute of each content element therein Logic, by the intermediate format data structure core file is converted to.Core file is storage file in internal memory Mapping.Wherein, intermediate format data structure can be tree, or the other kinds of data knot such as chained list, storehouse Structure.When intermediate form data structure is tree, storage file is after parsing, and each content element therein is right respectively Each subtree with common parent in the tree should be resolved to, the root node of each subtree includes corresponding to respectively Content element element identification codes, each child node in each subtree is respectively the attribute of its father node.
For example, it is assumed that the storage file of a certain xml forms is as follows:
Including content element<iwb:shape>And content element<iwb:magnifier>, an ellipse is represented respectively With a magnifying glass.When needing to parse and be converted to core file the storage file, computer reads the storage text Part, and the resolution logic identification code in the storage file obtains the parsing of the corresponding file that can parse xml forms Logic, and storage file is resolved to according to the resolution logic for the intermediate format data structure of tree-shaped as shown in Figure 7.
Wherein, content element<iwb:shape>And content element<iwb:magnifier>Correspond to respectively and resolve to common parent Node is two stalk trees of elements nodes.Content element<iwb:shape>Node in the root node of corresponding subtree Entitled content element<iwb:shape>Element identification codes, i.e. iwb:Shape, content element<iwb:shape>Attribute pair The child node or Sun Jiedian of the root node should be resolved to.Content element<iwb:magnifier>The root section of corresponding subtree Nodename in point is content element<iwb:magnifier>Element identification codes, i.e. iwb:Magnifier, content element< iwb:magnifier>Attribute correspondence resolve to the child node or Sun Jiedian of the root node.
When the intermediate format data structure is converted to into core file, computer travels through the intermediate format data knot Structure, according to all of element identification codes therein, i.e. iwb:Shape and iwb:Magnifier obtains common corresponding conversion and patrols Volume, the conversion logic can either converted contents element<iwb:shape>Corresponding subtree, again being capable of converted contents element< iwb:magnifier>Corresponding subtree.According to the conversion logic, the intermediate format data structure is converted in corresponding Storage file is deposited, the core file includes a shape content element and its corresponding attribute, and one Magnifier content elements and its corresponding attribute.
As can be seen here, by the resolution logic that basis is corresponding with the form of storage file, during storage file is resolved to Between format data structure, and according to the conversion logic corresponding with the content element in the intermediate format data structure, by this Intermediate format data structure is converted to core file, so that the change of the form of storage file is interior with storage file The change of appearance is mutually isolated, i.e., the storage file of various different-formats can be parsed in resolving, but regardless of this is deposited Which kind of content element storage file includes, can be to various knots of the intermediate format data comprising different content element in transfer process Structure is changed, but regardless of which kind of form is corresponding storage file be.Therefore, storage file provided in an embodiment of the present invention Analytic method can improve compatibility of the equipment to file format.Simultaneously as when the form of storage file changes only New resolution logic need to be added, new conversion logic need to be only added when the content element of storage file changes, you can will Storage file with format or with new content element parses and is converted to corresponding core file, therefore realizes The compatible process of file format is easily, simply.
Further, the basis pre-set with the resolution logic corresponding to the resolution logic identification code, by institute State storage file and resolve to intermediate format data structure, specifically include:
According to the resolution logic identification code, the resolution logic identification code is obtained from the parsing manager for pre-setting The corresponding resolution logic;
According to the resolution logic, the storage file is resolved to into the intermediate format data structure.
It should be noted that resolution logic is stored by parsing manager and managed, each solution in parsing manager Analysis logic is respectively provided with unique version number, i.e. resolution logic identification code.Whenever a kind of form of new storage file is increased, need To add corresponding resolution logic in parsing manager in advance.When need by storage file resolve to intermediate format data knot During structure, computer finds resolution logic corresponding to the resolution logic identification code in the storage file simultaneously in parsing manager The resolution logic is obtained, and storage file is resolved to by intermediate format data structure according to the resolution logic.
For example, the schematic flow sheet of the resolving of present embodiment is illustrated in figure 8, is stored with parsing manager 81 Resolution logic A and resolution logic B.When needing for form to resolve to intermediate format data structure 82 for storage file A of A, then Resolution logic A is analytically obtained in manager 81, and storage file A is parsed according to resolution logic A.When needing lattice When formula resolves to intermediate format data structure 82 for storage file B of B, then resolution logic B is analytically obtained in manager 81, and Storage file B is parsed according to resolution logic B.When newly increase in storage file a kind of form be C storage file C When, then addition can parse resolution logic C of storage file C in parsing manager 81.
Further, the resolution logic includes the first resolution logic and the second resolution logic;
It is described that the storage file is resolved to by the intermediate format data structure according to the resolution logic, concrete bag Include:
According to first resolution logic, the format parser corresponding to the form with the storage file is called, by institute State storage file and resolve to corresponding format data structure;
According to second resolution logic, the node adduction relationship of the format data structure is modified, will be described Format data structure resolves to the intermediate format data structure.
It should be noted that resolution logic is divided into two parts, i.e. the first resolution logic and the second resolution logic.First solution The form of analysis logical AND storage file is corresponding, for calling the format parser corresponding with the form of storage file, so as to Storage file is resolved to into corresponding format data structure.Second resolution logic is used to carry out recurrence to the format data structure, So as to traveling through the format data structure and changing node adduction relationship therein, the format data structure is further resolved to Intermediate format data structure.Wherein, format data structure can be tree, or the other types such as chained list, storehouse Data structure.The node adduction relationship of the format data structure corresponding to the form of different storage files may be identical, May differ.
For example, when the storage file of a certain xml forms is resolved to into intermediate format data structure, first according to resolution logic In the first resolution logic, call xml format parsers, the storage file is resolved to into xml format data structures, i.e. xml trees. Subsequently, the second resolution logic in resolution logic, to the xml format data structures recurrence is carried out, so as to travel through the xml lattice Formula data structure and node adduction relationship therein is changed, the xml format data structures are further resolved to into intermediate form Data structure.
Another preferred embodiment in, the basis pre-set with the element identification codes institute it is jointly corresponding Conversion logic, the intermediate format data structure is converted to into core file, specifically include:
According to the element identification codes, the element identification codes institute is obtained from the conversion manager for pre-setting common right The conversion logic answered;
According to the conversion logic, recurrence is carried out to the intermediate format data structure, by intermediate format data knot Structure is converted to the core file.
It should be noted that conversion logic is stored by conversion manager and managed, each in conversion manager turns Change in logic and be respectively provided with the element identification codes of its all the elements element that can be changed.Content element in storage file is sent out To realize during new function, needs add in advance corresponding conversion logic to changing in conversion manager.When needs are by Between format data structure when being converted to core file, during the intermediate format data structure is found in conversion manager The common corresponding conversion logic of element identification codes institute of each content element simultaneously obtains the conversion logic, and patrol according to the conversion Volume, recurrence is carried out to the intermediate format data structure, so as to the intermediate format data structure is converted to into core file.
For example, the schematic flow sheet of the transfer process of present embodiment as shown in Figure 9, stores in conversion manager 92 There is conversion logic A and conversion logic B.Assume that conversion logic A therein can be changed including content element a's and content element b Intermediate format data structure, conversion logic B can change the middle layout including content element a, content element b and content element c Formula data structure.When intermediate form data structure 91 includes content element a and content element b, then from conversion manager 92 Middle acquisition conversion logic A, and the intermediate format data structure 91 is converted to by corresponding memory storage text according to conversion logic A Part A, the core file A obtained by conversion include content element a and its corresponding attribute, and content element b and its phase The attribute answered.When needing, the increase content element d in the storage file including content element a and content element b is new to realize During function, then addition can change the centre including content element a, content element b and content element d in conversion manager 92 The conversion logic C of format data structure.
Further, the basis pre-set with the common corresponding conversion logic of element identification codes institute, will The intermediate format data structure is converted to after core file, is also included:
Each content element in the core file is rendered to show in display screen.
It should be noted that after storage file being parsed and is converted to core file, to the memory storage Content element in file is rendered, and is allowed to be shown in display screen.
For example, a certain storage file includes representing the oval content element a and content element b for representing magnifying glass, then Corresponding core file includes content element a and its corresponding attribute, and content element b and its corresponding Attribute.After rendering to the core file, one ellipse of display screen display of equipment and a magnifying glass.
The analytic method of storage file provided in an embodiment of the present invention, it is corresponding with the form of storage file by basis Resolution logic, by storage file intermediate format data structure is resolved to, and according to the intermediate format data structure in Hold the corresponding conversion logic of element, the intermediate format data structure is converted to into core file, so that storage text The change of the form of part is mutually isolated with the change of the content of storage file, i.e., can be to various different-formats in resolving Storage file is parsed, but regardless of which kind of content element is the storage file include, can be included to various in transfer process The intermediate format data structure of different content element is changed, but regardless of which kind of form is corresponding storage file be.Therefore, The analytic method of storage file provided in an embodiment of the present invention can improve compatibility of the equipment to file format.Simultaneously as New resolution logic need to only be added when the form of storage file changes, when the content element of storage file changes New conversion logic need to only be added, therefore realize the process of format compatible easily, simply.
Correspondingly, the present invention also provides a kind of resolver of storage file, can realize the storage in above-described embodiment All flow processs of the analytic method of file.
It is the structural representation of one embodiment of the resolver of the storage file that the present invention is provided referring to Figure 10, has Body is as follows:
Storage file read module 01, for reading storage file;Wherein, the storage file includes and the storage Resolution logic identification code corresponding to the form of file;
Storage file parsing module 02, pre-set for the basis and parsing corresponding to the resolution logic identification code Logic, by the storage file intermediate format data structure is resolved to;Wherein, the intermediate format data structure includes and institute Each content element stated in storage file distinguishes corresponding element identification codes;And,
Intermediate format data structure modular converter 03, for common right with element identification codes institute according to pre-setting The conversion logic answered, by the intermediate format data structure core file is converted to;Wherein, the core file is Mapping of the storage file in internal memory.
Further, the storage file parsing module 02, specifically includes:
Resolution logic acquiring unit, for according to the resolution logic identification code, from the parsing manager for pre-setting Obtain the resolution logic corresponding to the resolution logic identification code;And,
Document analysis unit, for according to the resolution logic, the storage file being resolved to into the intermediate form number According to structure.
Further, the resolution logic includes the first resolution logic and the second resolution logic;
The document analysis unit, specifically includes:
First parsing subelement, it is right with the form of storage file institute for according to first resolution logic, calling The format parser answered, by the storage file corresponding format data structure is resolved to;And,
Second parsing subelement, for according to second resolution logic, quoting to the node of the format data structure Relation is modified, and the format data structure is resolved to into the intermediate format data structure.
Another preferred embodiment in, the intermediate format data structure modular converter 03 is specifically included:
Conversion logic acquiring unit, for according to the element identification codes, obtaining from the conversion manager for pre-setting The common corresponding conversion logic of element identification codes institute;And,
Format conversion unit, for according to the conversion logic, to the intermediate format data structure recurrence being carried out, by institute State intermediate format data structure and be converted to the core file.
Further, the resolver of the storage file, also includes:
Display module is rendered, for rendering to each content element in the core file to show in display screen Show.
The resolver of storage file provided in an embodiment of the present invention, it is corresponding with the form of storage file by basis Resolution logic, by storage file intermediate format data structure is resolved to, and according to the intermediate format data structure in Hold the corresponding conversion logic of element, the intermediate format data structure is converted to into core file, so that storage text The change of the form of part is mutually isolated with the change of the content of storage file, i.e., can be to various different-formats in resolving Storage file is parsed, but regardless of which kind of content element is the storage file include, can be included to various in transfer process The intermediate format data structure of different content element is changed, but regardless of which kind of form is corresponding storage file be.Therefore, The analytic method of storage file provided in an embodiment of the present invention can improve compatibility of the equipment to file format.Simultaneously as New resolution logic need to only be added when the form of storage file changes, when the content element of storage file changes New conversion logic need to only be added, therefore realize the process of format compatible easily, simply.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (10)

1. a kind of analytic method of storage file, it is characterised in that include:
Read storage file;Wherein, the storage file includes the resolution logic corresponding to the form with the storage file Identification code;
Resolution logic according to corresponding to pre-setting with the resolution logic identification code, during the storage file is resolved to Between format data structure;Wherein, the intermediate format data structure includes and each content element in the storage file The corresponding element identification codes of difference;
According to pre-setting and the common corresponding conversion logic of element identification codes institute, by the intermediate format data structure Be converted to core file;Wherein, the core file is mapping of the storage file in internal memory.
2. the analytic method of storage file as claimed in claim 1, it is characterised in that the basis pre-set with it is described Resolution logic corresponding to resolution logic identification code, by the storage file intermediate format data structure is resolved to, and is specifically included:
According to the resolution logic identification code, the resolution logic identification code institute is obtained from the parsing manager for pre-setting right The resolution logic answered;
According to the resolution logic, the storage file is resolved to into the intermediate format data structure.
3. the analytic method of storage file as claimed in claim 2, it is characterised in that the resolution logic includes the first solution The analysis resolution logic of logical sum second;
It is described that the storage file is resolved to by the intermediate format data structure according to the resolution logic, specifically include:
According to first resolution logic, the format parser corresponding to the form with the storage file is called, deposited described Storage document analysis are corresponding format data structure;
According to second resolution logic, the node adduction relationship of the format data structure is modified, by the form Data structure resolves to the intermediate format data structure.
4. the analytic method of storage file as claimed in claim 1, it is characterised in that the basis pre-set with it is described The common corresponding conversion logic of element identification codes institute, is converted to core file, specifically by the intermediate format data structure Including:
According to the element identification codes, the element identification codes institute is obtained from the conversion manager for pre-setting common corresponding Conversion logic;
According to the conversion logic, recurrence is carried out to the intermediate format data structure, the intermediate format data structure is turned It is changed to the core file.
5. the analytic method of storage file as claimed in claim 1, it is characterised in that the basis pre-set with institute State the common corresponding conversion logic of element identification codes institute, by the intermediate format data structure be converted to core file it Afterwards, also include:
Each content element in the core file is rendered to show in display screen.
6. a kind of resolver of storage file, it is characterised in that include:
Storage file read module, for reading storage file;Wherein, the storage file includes and the storage file Resolution logic identification code corresponding to form;
Storage file parsing module, pre-set for the basis and resolution logic corresponding to the resolution logic identification code, The storage file is resolved to into intermediate format data structure;Wherein, the intermediate format data structure includes being deposited with described Each content element in storage file distinguishes corresponding element identification codes;And,
Intermediate format data structure modular converter, for common corresponding turn with element identification codes institute according to pre-setting Logic is changed, the intermediate format data structure is converted to into core file;Wherein, the core file is deposited for described Mapping of the storage file in internal memory.
7. the resolver of storage file as claimed in claim 6, it is characterised in that the storage file parsing module, tool Body includes:
Resolution logic acquiring unit, for according to the resolution logic identification code, obtaining from the parsing manager for pre-setting The resolution logic corresponding to the resolution logic identification code;And,
Document analysis unit, for according to the resolution logic, the storage file being resolved to into the intermediate format data knot Structure.
8. the resolver of storage file as claimed in claim 7, it is characterised in that the resolution logic includes the first solution The analysis resolution logic of logical sum second;
The document analysis unit, specifically includes:
First parsing subelement, for according to first resolution logic, calling corresponding to the form with the storage file Format parser, by the storage file corresponding format data structure is resolved to;And,
Second parsing subelement, for according to second resolution logic, the node adduction relationship to the format data structure Modify, the format data structure is resolved to into the intermediate format data structure.
9. the resolver of storage file as claimed in claim 6, it is characterised in that the intermediate format data structure conversion Module, specifically includes:
Conversion logic acquiring unit, for according to the element identification codes, obtaining described from the conversion manager for pre-setting The common corresponding conversion logic of element identification codes institute;And,
Format conversion unit, for according to the conversion logic, recurrence being carried out to the intermediate format data structure, in described Between format data structure be converted to the core file.
10. the resolver of storage file as claimed in claim 6, it is characterised in that the resolver of the storage file, Also include:
Display module is rendered, for rendering to each content element in the core file to show in display screen.
CN201610648942.XA 2016-08-09 2016-08-09 Analyzing method and apparatus of storage files Pending CN106649428A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610648942.XA CN106649428A (en) 2016-08-09 2016-08-09 Analyzing method and apparatus of storage files
PCT/CN2016/113344 WO2018028127A1 (en) 2016-08-09 2016-12-30 Method and apparatus for parsing storage files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610648942.XA CN106649428A (en) 2016-08-09 2016-08-09 Analyzing method and apparatus of storage files

Publications (1)

Publication Number Publication Date
CN106649428A true CN106649428A (en) 2017-05-10

Family

ID=58852999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610648942.XA Pending CN106649428A (en) 2016-08-09 2016-08-09 Analyzing method and apparatus of storage files

Country Status (2)

Country Link
CN (1) CN106649428A (en)
WO (1) WO2018028127A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213709A (en) * 2017-06-30 2019-01-15 广东神马搜索科技有限公司 Data transfer device, device and data processing equipment
CN110688343A (en) * 2019-08-26 2020-01-14 天津开心生活科技有限公司 Method and device for converting data format
CN112732643A (en) * 2021-04-01 2021-04-30 南京国睿信维软件有限公司 Method for interconversion of flow chart graphic file data and S1000D standard XML format data

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325217B (en) * 2018-09-19 2023-04-18 深圳市元征科技股份有限公司 File conversion method, system, device and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013436A (en) * 2007-01-25 2007-08-08 无敌科技(西安)有限公司 Method and system for converting text data of different formats to uniform format
CN101247589A (en) * 2007-07-04 2008-08-20 华为技术有限公司 Mobile terminal data conversion/backup method, device and system
CN101436185A (en) * 2007-11-12 2009-05-20 北大方正集团有限公司 Method for implementing multiple-file compatibility by XML memory tree
CN101917520A (en) * 2007-07-04 2010-12-15 华为技术有限公司 Conversion/backup method, equipment and system for mobile terminal data
CN102053952A (en) * 2009-11-10 2011-05-11 英华达(上海)电子有限公司 Method and device for converting data format of electronic book and portable electronic book reader
CN102866986A (en) * 2012-08-30 2013-01-09 中国矿业大学 Document format conversion system
CN104935499A (en) * 2015-05-28 2015-09-23 杭州华三通信技术有限公司 Message format conversion method and equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101055577A (en) * 2006-04-12 2007-10-17 龙搜(北京)科技有限公司 Collector capable of extending markup language
CN102402431A (en) * 2010-09-17 2012-04-04 基信康信息技术(上海)有限公司 Method for designing UI (User Interface) of mobile phone by utilizing XML (Extensive Makeup Language)
CN102243665A (en) * 2011-08-22 2011-11-16 上海梅花信息有限公司 Document online playing system and method thereof
US20140279875A1 (en) * 2013-03-15 2014-09-18 Matthew Pitstick Method and apparatus for converting data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013436A (en) * 2007-01-25 2007-08-08 无敌科技(西安)有限公司 Method and system for converting text data of different formats to uniform format
CN101247589A (en) * 2007-07-04 2008-08-20 华为技术有限公司 Mobile terminal data conversion/backup method, device and system
CN101917520A (en) * 2007-07-04 2010-12-15 华为技术有限公司 Conversion/backup method, equipment and system for mobile terminal data
CN101436185A (en) * 2007-11-12 2009-05-20 北大方正集团有限公司 Method for implementing multiple-file compatibility by XML memory tree
CN102053952A (en) * 2009-11-10 2011-05-11 英华达(上海)电子有限公司 Method and device for converting data format of electronic book and portable electronic book reader
CN102866986A (en) * 2012-08-30 2013-01-09 中国矿业大学 Document format conversion system
CN104935499A (en) * 2015-05-28 2015-09-23 杭州华三通信技术有限公司 Message format conversion method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王克伟 等: "XML解析器的设计与实现", 《电脑编程技巧与维护》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213709A (en) * 2017-06-30 2019-01-15 广东神马搜索科技有限公司 Data transfer device, device and data processing equipment
CN109213709B (en) * 2017-06-30 2021-01-15 阿里巴巴(中国)有限公司 Data conversion method and device and data processing equipment
CN110688343A (en) * 2019-08-26 2020-01-14 天津开心生活科技有限公司 Method and device for converting data format
CN112732643A (en) * 2021-04-01 2021-04-30 南京国睿信维软件有限公司 Method for interconversion of flow chart graphic file data and S1000D standard XML format data
CN112732643B (en) * 2021-04-01 2021-07-20 南京国睿信维软件有限公司 Method for interconversion of flow chart graphic file data and S1000D standard XML format data

Also Published As

Publication number Publication date
WO2018028127A1 (en) 2018-02-15

Similar Documents

Publication Publication Date Title
CN106649428A (en) Analyzing method and apparatus of storage files
CN105302550B (en) The page is switched to the method and system of format data stream file
CN102799592B (en) The parsing method and system of rich text document
CN102982010B (en) The method and apparatus extracting file structure
CN107077474A (en) Rapid color is searched for
CN102609255B (en) A kind of generation method of Spring IOC configuration file
CN105205117A (en) Data table migrating method and device
CN105786526A (en) Web-based efficient flow chart drawing system and method
CN103077185A (en) Object-based user-defined information-expanding method
CN103885764A (en) Network media information display system, method, device and server
CN107861723A (en) Mass data processing method and its system
CN110532280A (en) SQL statement method for visualizing and device
CN103399895B (en) A kind of monitoring display processing system based on SVG and method
CN101146281A (en) A GUI creation model for mobile terminal
CN104731590A (en) Method and device for realizing user interface controls
CN106294299A (en) A kind of report form generation method and device
CN105653510A (en) Electronic homework correction method, device and system
CN104899826A (en) Method of manufacturing mobile phone theme based on PSD analytic technique
CN102831190A (en) Method for browsing current-mode logic (CML) files on low-end equipment
CN104679453A (en) Information input, storage, typesetting and printing general system and information input, storage, typesetting and printing method
CN109977335A (en) A kind of Web configuration method towards industrial equipment
CN101295251B (en) Interface issuing method and device
CN107438194A (en) A kind of intelligent television UI object rendering methods and intelligent television
CN102487353B (en) A kind of data transmission method
CN106095961A (en) Table display processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication