CN101937426A - Method and device for processing incompatible data - Google Patents

Method and device for processing incompatible data Download PDF

Info

Publication number
CN101937426A
CN101937426A CN 201010268741 CN201010268741A CN101937426A CN 101937426 A CN101937426 A CN 101937426A CN 201010268741 CN201010268741 CN 201010268741 CN 201010268741 A CN201010268741 A CN 201010268741A CN 101937426 A CN101937426 A CN 101937426A
Authority
CN
China
Prior art keywords
document
data
incompatible data
embedded object
incompatible
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
CN 201010268741
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.)
BEIJING REDFLAG CH2000 SOFTWARE Co Ltd
Original Assignee
BEIJING REDFLAG CH2000 SOFTWARE 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 BEIJING REDFLAG CH2000 SOFTWARE Co Ltd filed Critical BEIJING REDFLAG CH2000 SOFTWARE Co Ltd
Priority to CN 201010268741 priority Critical patent/CN101937426A/en
Publication of CN101937426A publication Critical patent/CN101937426A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and device for processing incompatible data. The method comprises the following steps: while loading a document format based on XML description, identifying incompatible data in the document format, and generating related information of incompatible data aming at the document; and converting the identified incompatible data and the generated related information into an embedded object. The invention avoids document data missing during interaction application in different processing softwares, thereby enhancing the document compatibility.

Description

A kind of disposal route of incompatible data and device
Technical field
The present invention relates to document processing technology, be specifically related to a kind of disposal route and device of incompatible data.
Background technology
In the document process software field, each manufacturer and developer handle the data element in the document format standard as possible in the software of oneself, but for the element that can not resolve and handle is not that to ignore be exactly arbitrarily to abandon, and has caused document loss of data during interactive application in different process softwares.And up to now, also not having a kind of method of practicality to keep in xenogenesis document data form can not compatible data and then recover original document format.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of disposal route and device of incompatible data, so that incompatible data realize is safeguarded, avoids document loss of data during interactive application in different process softwares.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of disposal route of incompatible data, this method comprises:
When being written into the document format of describing based on XML, discerning incompatible data wherein and generate the related information of incompatible data at document; The incompatible data that identifies and the related information of generation are converted to embedded object.
This method further comprises:
When the loaded described document of storage, at the Doctype that will store whether for it the type during the front opening document carry out corresponding follow-up preservation and handle.
Described preservation is handled and is comprised:
During type before the Doctype that will store is during opening document, analyze the related information in the embedded object, again according to the related information specified data that the analyzes validity of original position also; And when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position;
During type before the Doctype that will store is not during opening document, utilize general embedded object form, directly use storage format reservation incompatible data embedded object.
Described preservation is handled and is realized in the mode of setting up expanding node.
Described document is:
Based on UOF, the ODF of XML document standard or the document of OOXML form.
A kind for the treatment of apparatus of incompatible data, this device comprise incompatible data resolution unit, embedded object load units; Wherein,
Described incompatible data resolution unit is used for when the document that is written into based on XML, identification wherein incompatible data and generate the related information of incompatible data at document;
Described embedded object load units is used for the incompatible data that the incompatible data resolution unit is identified and the related information of generation and is converted to embedded object.
This device further comprises incompatible data preservation unit, is used for:
When the loaded described document of storage, at the Doctype that will store whether for it the type during the front opening document carry out corresponding follow-up preservation and handle.
When described incompatible data is preserved the unit and carried out described preservation and handle, be used for:
During type before the Doctype that will store is during opening document, analyze the related information in the embedded object, again according to the related information specified data that the analyzes validity of original position also; And when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position;
During type before the Doctype that will store is not during opening document, utilize general embedded object form, directly use storage format reservation incompatible data embedded object.
Described preservation is handled and is realized in the mode of setting up expanding node.
Described document is:
Based on the UOF, the ODF that comprise the embedded object definition of XML document standard to describe or the document of OOXML form.
The inventive method and device are avoided document loss of data during interactive application in different process softwares, and then have improved the compatibility of document.
Description of drawings
Fig. 1 is the incompatible data handling principle synoptic diagram of one embodiment of the invention;
Incompatible data processing flow chart when Fig. 2 is written into for the document of one embodiment of the invention;
Incompatible data processing flow chart when Fig. 3 is the document storage of one embodiment of the invention;
Fig. 4 is an incompatible data treatment scheme sketch of the present invention;
Fig. 5 is the incompatible data treating apparatus figure of one embodiment of the invention.
Embodiment
At present, provide the treatment technology of XML label description, can be supported in the operation that adds EXPANDING DISPLAY AREA in the XML document and do not influence original interpretation process program based on the ODF of XML.
In general, can utilize unified method to realize in the document format transfer process or in the document process process in document format standard rooms such as UOF, ODF, OOXML, utilize the growth data object to keep the document elements that current document can't correctly resolve or handle, to guarantee the electronic data property finished of document.The growth data object that is retained can be used for other process softwares recovery incompatible datas to be handled again, or the document content review process.
Popular office software is substantially all supported document format OOXML, ODF and the UOF based on the XML standard at present.But in function is not under the identical situation, has incompatible data when carrying out data-switching between the different office softwares and loses, and therefore, need solving with the XML form is data retention issue in the document format conversion of benchmark.
If in a kind of document process software, (be assumed to be software A) when reading file layout, for example: the OOXML form, after can data converted being converted to document format A self inter-process structure, can utilize the device of supporting embedded object to create that embedded object stores can not compatible data, after the user revises document with document process software A, continue to save as the document of OOXML form, with the reduction of data that can not handle before is original form, and writes in the document of generation and go.When needs are stored as extended formatting, for example: UOF or ODF, then utilize the embedded object descriptor format of supporting in UOF or the ODF form that embedded object is stored in the document.So for document process software A, can not cause document data to lose owing to design is different for the document format of OOXML standard.
The principal feature of aforesaid operations mode is exactly to add embedded object to guarantee the data integrity in the former document on the basis of former document.Can utilize indexing means such as XPath and XPoint and version to guarantee the corresponding relation of incompatible data and document.And provide the standard handovers module that the data that keep are carried out processing at object format in transfer process.
Certainly, the growth data of above-mentioned special preservation can not made amendment by normal situation by other software, though so still can some difference that shows when different software reads document, document data but can not destroyed owing to the operation between the different software.In this case, different software is when opening the non-XML format file of self supporting fully, the form shfft of self software support only need be provided and filter out the data that self can't resolve by filtrator, just can obtain the data that self can resolve, and can carry out the processing that needs to the data that filter out simultaneously.
For OOXML, UOF, these three kinds of document formats of ODF, when its standard formulation, all considered the extendability of data; In other words, these three kinds of document formats being supported in and adding the growth data that may not possess practical significance in separately the document in various degree all.On this basis, when document format B opens the ODF document, if run into the function that to support, so after resolving the data that to use, can with out of use data (as, incompatible data) is mapped in the extended area according to the rule of resolving, when saving as ODF, will writes the data in the extended area are write the ODF correspondence according to original rule position; Can also when saving as OOXML, the data in the extended area be write in the extended area of OOXML format file, so just can solve the data loss problem when two kinds of document format conversions.
In addition, can use following method and preserve the data that will be stored in the extended area:
XML document is by element (Element) and attribute (Attribute) definition, so can be as accurate as each element and attribute for incompatible data, and then can define the node of incompatible part according to these two kinds of standards, and these two kinds of nodes can accurately navigate to original documents location by the mapping of XPath.
At first, the data that may lose can be taken out, and set up the node of expansion in destination document, this node comprises:
1, the definition (name) of element in the former document: the Schema type of quoting former document definition.
2, path indexing (XPath): the target localization of element in former document is used for locating at the XML file.
3, method (method): be application process (mapping relations), exist as enumeration type to this EXPANDING DISPLAY AREA, provide in the former document to the processing mode of the data by the path location, mode such as comprise replacement, increase, ignore.
4, value (value): the data that record may be lost, according to the method that method provides data are handled accordingly.
Next, after joint structure is finished, can incompatible data be stored in the extended area, finishing the storing process of document, thereby realize based on OOXML, the ODF of XML standard document, lossless data conversion between the UOF three according to joint structure.
Sum up the aforesaid operations content, the handling principle that the present invention is directed to incompatible data can be represented as shown in Figure 1.Referring to Fig. 1, Fig. 1 is the incompatible data handling principle synoptic diagram of one embodiment of the invention.Among Fig. 1, based on XML document standard (as: UOF, ODF, OOXML) might comprise in the document of form other form document can not be compatible data or attribute, when being written into the document, need identify the incompatible data in the document, and be encapsulated as specific embedded object, make document process structure in the application program show as and comprise the index of host object or the embedded object of association (showing as related information).
When described document is preserved,, can carry out different preservations and handle at the identical or different document classification that will preserve.As:
When carrying out preserving with kind, need to resolve the index and the related information of embedded object, according to the related information that parses incompatible data is reduced to original form; Make the final XML document standard that is based on of preserving (as: UOF, ODF, the OOXML) document of form, comprising the document institute of other form can not compatibility data or attribute.
When carrying out the preservation of xenogenesis classification, can use the embedded object form and directly be stored in destination document; Make that final what preserve is that (as: document OOXML) wherein comprises the embedded object that is packaged with incompatible data for UOF, ODF for the form of opening before being different from.
As seen, Fig. 1 described document be written into storing process in the reserving model of incompatible data:
1, when being written into the document that contains the handling procedure incompatible data, handling procedure is collected the related information of incompatible data and other document objects, and together is described as embedded object with incompatible data;
2, when document storing during for the identical file layout of type when being written into, according to the related information that is kept in the embedded object the original document data in the embedded object is reverted in the document, guarantee that other handling procedures that can handle this partial data can normally resolve, handle this segment data;
If 3 save as the different form of type when being written into, then directly the form of embedded object with embedded object in the object format is stored in the destination document.
In above-mentioned technical description, can be divided into substantially at the operation of document and to be written into and to store, below application drawing 2, Fig. 3 concrete operating process is described respectively.
Referring to Fig. 2, the incompatible data processing flow chart when Fig. 2 is written into for the document of one embodiment of the invention, this flow process may further comprise the steps:
Step 201: when document is written into, document elements is resolved.
Step 202: judge that whether the document elements parse is can compatible type,, directly enter step 210 if can compatible type; Otherwise, enter step 203.
Step 203: document elements that collection can not be compatible and the related information between the document.
Step 204: create the extensible element object, as embedded object.
Step 205: the legacy data information of the document elements that encapsulation can not be compatible in embedded object, comprising can not compatible document elements and described related information.
Step 206: the embedded object that will encapsulate legacy data information embeds document, returns step 202.
Step 210: compatible document elements is carried out normal process or conversion, return step 202.
Aforesaid operations can repeated multiple times carry out, and is written into up to entire document to finish.
As seen, figure two has described the concrete logic implementation when document is written into, and distinguishes that at first the element of being resolved whether can be by compatibility, if can compatible processing, then carries out in the program normal process flow process to document elements; If can't be compatible, then collect the related information between document elements, and utilize the related information of collecting and can't create embedded growth data object (being embedded object) by compatible data slot, again the object of being created is embedded in the middle of the document.
Referring to Fig. 3, the incompatible data processing flow chart when Fig. 3 is the document storage of one embodiment of the invention, this flow process may further comprise the steps:
Step 301: when carrying out document storage, for it whether the Doctype that judgement will be stored the type during the front opening document, if enter step 302; Otherwise, directly enter step 310.
Step 302: analyze the related information in the embedded object.
Step 303: according to the related information specified data that the analyzes validity of original position also.
Step 304: when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position.Process ends.
Step 310: utilize general embedded object form, the storage format of directly using among UOF, ODF, the OOXML embedded object keeps incompatible data.
As seen, concrete logic when figure three has described document storing is carried out, whether the form of at first judge preserving identical when opening, if it is identical, then the related information in the embedded incompatible data object is analyzed, find the original position of going back of this data slot, afterwards the incompatible data fragment in the object is reverted to original position; If preserve form with open different, then utilize the describing method of object format to embedded object, whole embedded object is saved in the destination document.
Need to prove that more than describing is example with UOF, ODF, OOXML just; And during practical application, then can be at based on XML and support the document of embedded object carry out incompatible data and handle that concrete processing procedure does not have big difference.
General thought when in conjunction with above description as can be known, the present invention carries out the incompatible data processing can be represented as shown in Figure 4.Referring to Fig. 4, Fig. 4 is an incompatible data treatment scheme sketch of the present invention, and this flow process may further comprise the steps:
Step 410: when being written into the document format of describing based on XML, discerning incompatible data wherein and generate the related information of incompatible data at document.
Step 420: the incompatible data that identifies and the related information of generation are converted to embedded object.
In order to guarantee that the aforesaid operations thinking can realize smoothly, can be provided with device as shown in Figure 5.Referring to Fig. 5, Fig. 5 is the incompatible data treating apparatus figure of one embodiment of the invention, and this device comprises continuous incompatible data resolution unit, embedded object load units, incompatible data preservation unit.
During concrete the application, the incompatible data resolution unit can be discerned incompatible data wherein and generate the related information of incompatible data at document when be written into the document format of describing based on XML; The incompatible data that the embedded object load units then can identify the incompatible data resolution unit and the related information of generation are converted to embedded object.
Incompatible data is preserved the unit can be when carrying out document storage, at the Doctype that will store whether for it the type during the front opening document carry out corresponding follow-up preservation handle (as, realize in the aforesaid mode of setting up expanding node), as:
If the Doctype of storage be before type during opening document, incompatible data is preserved the unit can analyze related information in the embedded object, again according to the related information specified data that the analyzes validity of original position also; And when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position.
If the Doctype of storage be not before type during opening document, incompatible data is preserved the unit can utilize general embedded object form, directly uses the storage format reservation incompatible data to embedded object.
The operation that each unit shown in Figure 5 can be realized is described in detail in aforementioned each figure, does not repeat them here.
In sum as seen, no matter be method or device, incompatible data treatment technology of the present invention can realize safeguard incompatible data, avoids document loss of data during interactive application in different process softwares, and then improved the compatibility of document.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of 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 (10)

1. the disposal route of an incompatible data is characterized in that, this method comprises:
When being written into the document format of describing based on XML, discerning incompatible data wherein and generate the related information of incompatible data at document; The incompatible data that identifies and the related information of generation are converted to embedded object.
2. method according to claim 1 is characterized in that, this method further comprises:
When the loaded described document of storage, at the Doctype that will store whether for it the type during the front opening document carry out corresponding follow-up preservation and handle.
3. method according to claim 2 is characterized in that, described preservation is handled and comprised:
During type before the Doctype that will store is during opening document, analyze the related information in the embedded object, again according to the related information specified data that the analyzes validity of original position also; And when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position;
During type before the Doctype that will store is not during opening document, utilize general embedded object form, directly use storage format reservation incompatible data embedded object.
4. method according to claim 3 is characterized in that, described preservation is handled and realized in the mode of setting up expanding node.
5. according to each described method of claim 1 to 4, it is characterized in that described document is:
Based on UOF, the ODF of XML document standard or the document of OOXML form.
6. the treating apparatus of an incompatible data is characterized in that, this device comprises incompatible data resolution unit, embedded object load units; Wherein,
Described incompatible data resolution unit is used for when the document that is written into based on XML, identification wherein incompatible data and generate the related information of incompatible data at document;
Described embedded object load units is used for the incompatible data that the incompatible data resolution unit is identified and the related information of generation and is converted to embedded object.
7. device according to claim 6 is characterized in that, this device further comprises incompatible data preservation unit, is used for:
When the loaded described document of storage, at the Doctype that will store whether for it the type during the front opening document carry out corresponding follow-up preservation and handle.
8. device according to claim 7 is characterized in that, when described incompatible data is preserved the unit and carried out described preservation and handle, is used for:
During type before the Doctype that will store is during opening document, analyze the related information in the embedded object, again according to the related information specified data that the analyzes validity of original position also; And when effective, incompatible data packaged in the embedded object is saved in assigned address in the reduction of data position;
During type before the Doctype that will store is not during opening document, utilize general embedded object form, directly use storage format reservation incompatible data embedded object.
9. device according to claim 8 is characterized in that, described preservation is handled and realized in the mode of setting up expanding node.
10. according to each described device of claim 6 to 9, it is characterized in that described document is:
Based on the UOF, the ODF that comprise the embedded object definition of XML document standard to describe or the document of OOXML form.
CN 201010268741 2010-08-31 2010-08-31 Method and device for processing incompatible data Pending CN101937426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010268741 CN101937426A (en) 2010-08-31 2010-08-31 Method and device for processing incompatible data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010268741 CN101937426A (en) 2010-08-31 2010-08-31 Method and device for processing incompatible data

Publications (1)

Publication Number Publication Date
CN101937426A true CN101937426A (en) 2011-01-05

Family

ID=43390760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010268741 Pending CN101937426A (en) 2010-08-31 2010-08-31 Method and device for processing incompatible data

Country Status (1)

Country Link
CN (1) CN101937426A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227713A (en) * 2016-08-31 2016-12-14 广州视睿电子科技有限公司 The processing method and processing device of document
CN106599066A (en) * 2016-11-16 2017-04-26 广州视源电子科技股份有限公司 Document loading method and system
CN108038747A (en) * 2017-11-29 2018-05-15 商派软件有限公司 A kind of e-commerce order commodity and the incompatible processing method of warehouse article
CN108459998A (en) * 2018-01-25 2018-08-28 广州视源电子科技股份有限公司 Document update, format conversion method, device and equipment, readable storage medium storing program for executing
CN114218895A (en) * 2021-11-22 2022-03-22 慧之安信息技术股份有限公司 Method for converting UOF document
CN114218896A (en) * 2021-11-22 2022-03-22 慧之安信息技术股份有限公司 Method for block conversion of UOF document

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615174A (en) * 2008-06-24 2009-12-30 北京信息科技大学 Conversion method based on the documents in various formats of XML
CN101751461A (en) * 2009-12-30 2010-06-23 中兴通讯股份有限公司 Document conversion method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615174A (en) * 2008-06-24 2009-12-30 北京信息科技大学 Conversion method based on the documents in various formats of XML
CN101751461A (en) * 2009-12-30 2010-06-23 中兴通讯股份有限公司 Document conversion method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227713A (en) * 2016-08-31 2016-12-14 广州视睿电子科技有限公司 The processing method and processing device of document
WO2018040439A1 (en) * 2016-08-31 2018-03-08 广州视睿电子科技有限公司 Document processing method and apparatus
CN106599066A (en) * 2016-11-16 2017-04-26 广州视源电子科技股份有限公司 Document loading method and system
CN108038747A (en) * 2017-11-29 2018-05-15 商派软件有限公司 A kind of e-commerce order commodity and the incompatible processing method of warehouse article
CN108459998A (en) * 2018-01-25 2018-08-28 广州视源电子科技股份有限公司 Document update, format conversion method, device and equipment, readable storage medium storing program for executing
CN108459998B (en) * 2018-01-25 2022-04-15 广州视源电子科技股份有限公司 Document updating method, document updating device, document format converting method, document updating format converting device, document format converting device and readable storage medium
CN114218895A (en) * 2021-11-22 2022-03-22 慧之安信息技术股份有限公司 Method for converting UOF document
CN114218896A (en) * 2021-11-22 2022-03-22 慧之安信息技术股份有限公司 Method for block conversion of UOF document
CN114218896B (en) * 2021-11-22 2022-09-02 慧之安信息技术股份有限公司 Method for block conversion of UOF document

Similar Documents

Publication Publication Date Title
CN101937426A (en) Method and device for processing incompatible data
CN102004744B (en) Data extraction system and method from one source table to table of at least one object database
US20040015840A1 (en) Mechanism for converting between JAVA classes and XML
US8418053B2 (en) Division program, combination program and information processing method
US9032002B2 (en) Single file serialization for physical and logical meta-model information
CN103559323B (en) Database implementation method
CN107391153B (en) Code generation method and device based on Spring and MyBatis framework integration
US7730099B2 (en) Storage and retrieval of richly typed hierarchical network models
JP2008537259A (en) Efficient description of relationships between resources
CN107168695B (en) Excel data analysis method and system
US9021455B2 (en) Packed data objects
CN101751461A (en) Document conversion method and device
CN110825385B (en) Method for constructing read Native offline package and storage medium
CN106775824A (en) A kind of application file packaging system and method with channel information
CN103500206A (en) Storage method and device based on file storage data
CN108241720B (en) Data processing method, device and computer readable storage medium
CA2593187C (en) Format description for a navigation database
CN106155832A (en) Method, device and the Android device that a kind of data are recovered
CN109408050A (en) The code generating method and device of appliance applications interface for rail vehicle
CN101770367B (en) Compressing method and compressing device of .NET file
CN101996251B (en) Rapid processing method of large SCL (substation configuration language) document
CN111475150B (en) Cross-language binding method, device, equipment and storage medium
CN101369953B (en) Font network distribution method and system
CN102446206B (en) A kind of cross-platform switch and method of three-dimensional data
CN101739391A (en) Method for generating electronic book with binary file format and electronic book generated by same

Legal Events

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

Application publication date: 20110105