CN102768673B - A kind of coding method of extendible XML data node identification number and device - Google Patents

A kind of coding method of extendible XML data node identification number and device Download PDF

Info

Publication number
CN102768673B
CN102768673B CN201210193886.7A CN201210193886A CN102768673B CN 102768673 B CN102768673 B CN 102768673B CN 201210193886 A CN201210193886 A CN 201210193886A CN 102768673 B CN102768673 B CN 102768673B
Authority
CN
China
Prior art keywords
node
integer
string encoding
bit string
xml
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.)
Expired - Fee Related
Application number
CN201210193886.7A
Other languages
Chinese (zh)
Other versions
CN102768673A (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.)
Founder Digital Publishing Technology (Shanghai) Co.,Ltd.
Founder Information Industry Holdings Co Ltd
Peking University Founder Group Co Ltd
Original Assignee
FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD
Founder Information Industry Holdings Co Ltd
Peking University Founder Group 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 FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD, Founder Information Industry Holdings Co Ltd, Peking University Founder Group Co Ltd filed Critical FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO LTD
Priority to CN201210193886.7A priority Critical patent/CN102768673B/en
Publication of CN102768673A publication Critical patent/CN102768673A/en
Application granted granted Critical
Publication of CN102768673B publication Critical patent/CN102768673B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a kind of coding method and device of extendible XML data node identification number, it is characterized in that, comprise: when storing an XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID; When described XML document has newly-increased node city, on the basis that described integer-bit is encoded, expand described identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node.What technical scheme of the present invention can support XML node identification to encode dynamically updates, by generation and the use of decimal place identification code, when keeping original XML nodes encoding constant, achieve the easily extensible of node ID, while saving storage space, improve the efficiency of coding.

Description

A kind of coding method of extendible XML data node identification number and device
Technical field
The present invention relates to field of computer technology, particularly the coding method of extendible XML data node identification number and device.
Background technology
XML (full name ExtensibleMarkupLanguage), be a kind of be specially intemet and a kind of markup language of designing, and due to its ability that there are the various information of effectively expressing, data and make various applicating cooperation work, already became the de facto standard of data publication and exchanges data, therefore, XML to be developed in recent years and to apply widely.The emphasis of XML does not lie in the form of data itself, and is management data information, and therefore, XML makes the unification of disparate databases pattern become possibility, for the integration problem of heterogeneous database provides approach.XML data base management system (XML data base management system) is also development in recent years a kind of novel data base management system (DBMS) rapidly, it to store and retrieval meets the data base management system (DBMS) that the XML document data of W3C standard are target, and can upgrade XML document.Due to its store to as if XML document storehouse, therefore XML data base management system is exactly a kind of XML document storehouse in essence.
XML data base management system (XML data base management system) is a kind of novel data base management system (DBMS) (DBMS) fast-developing in recent years, and it stores and the data of retrieval are XML document, and supports to upgrade XML document.Along with XML standard is adopted as data exchange standard by increasing industry, the management of XML data (stores, retrieval, upgrading) demand can maintain sustained and rapid growth, and particularly XML data base management system is applicable to process text class data and XML document data more than relational database management system.And relational database management system is due to decades in the widespread use of IT industry, no matter can not shake in market or its leading position of technical elements, and compare XML data base management system, relational database management system has superiority more when dealing with relationship data.So above the DBMS market in future, XML data base management system will with relational database management system (relational database management system) Long Coexistence.In various enterprise and other unit, XML data base management system and relational database management system long-term co-existence will be there is and the situation of collaborative work.
In XML data base management system, the storage means of XML document mainly contains two kinds:
One directly XML document is stored in XML data base management system.The advantage of this kind of method is that operation is upper simple, but if the operation of node level will be carried out to XML document, general comparatively difficulty.
Another kind is carried out resolving and storing according to node at the data in XML document.This storage means is beneficial to operation XML document being carried out to node level very much, but implements more complicated.For the storage mode of node level, conveniently the searching and revising of node, when node data stores, needs to identify node and encode.Each node obtains one by coding can uniquely identified code (NODE-ID), just can rapid identification and location when node checks.
Because the XML document content stored in XML data base management system may be very huge, so the number of node also just may be very many.And, by XQUERYUPDATE, between node, also new node may be increased.Therefore, two requirements will be reached to the coded system of node ID: the space taking storage that be as far as possible few; Can download between two nodes in the situation of the identification code not changing existing node and insert some new nodes easily.
Summary of the invention
For solving the problem, the coding method of a kind of extendible XML data node identification number that technical solution of the present invention provides, comprising:
When storing an XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
When described XML document has newly-increased node city, on the basis that described integer-bit is encoded, expand described identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node.
Alternatively, the node ID of described newly-increased node is that integer-bit string encoding adds described decimal place string encoding.
Alternatively, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of previous node at the same level.
Alternatively, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of a rear node at the same level.
Present invention also offers a kind of code device of XML data node identification number, comprising:
Integer-bit string encoding module, for when storage one XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
Decimal place string encoding module, for when described XML document has newly-increased node city, on the basis that described integer-bit is encoded, expand described identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node.
Alternatively, the node ID of described newly-increased node is that integer-bit string encoding adds described decimal place string encoding.
Alternatively, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of previous node at the same level.
Alternatively, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of a rear node at the same level.
Compared with prior art, technique scheme has lower advantage:
What technical scheme of the present invention can support XML node identification to encode dynamically updates, by generation and the use of decimal place identification code, when keeping original XML nodes encoding constant, achieve the easily extensible of node ID, while saving storage space, improve the efficiency of coding.
Accompanying drawing explanation
Fig. 1 be the coding method of the extendible XML data node identification number of embodiment of the present invention process flow diagram;
Fig. 2 is the composition structural framing schematic diagram of the code device of the extendible XML data node identification number of embodiment of the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage more become apparent, and are described in detail the specific embodiment of the present invention below in conjunction with accompanying drawing.Set forth detail in the following description so that fully understand the present invention.But the present invention can be different from alternate manner described here to implement with multiple, those skilled in the art can when without prejudice to doing similar popularization when intension of the present invention.Therefore the present invention is not by the restriction of following public embodiment.
Those skilled in the art will appreciate that one directly XML document is stored in XML data base management system.Another kind is carried out resolving and storing according to node at the data in XML document.
For a kind of front method, the advantage of this kind of method is that operation is upper simple, but if the operation of node level will be carried out to XML document, general comparatively difficulty.For rear a kind of XML document storage means, it is beneficial to operation XML document being carried out to node level, but implements more complicated.
For the storage mode of node level, conveniently the searching and revising of node, when node data stores, needs to identify node and encode.Each node obtains one by coding can uniquely identified code (NODE-ID), just can rapid identification and location when node checks.Because the XML document content stored in XML data base management system may be very huge, so the number of node also just may be very many.And, by XQUERYUPDATE, between node, also new node may be increased.Therefore, two requirements will be reached to the coded system of node ID: the space taking storage that be as far as possible few; Can download between two nodes in the situation of the identification code not changing existing node and insert some new nodes easily.
For solving the problems of the prior art, the present inventor, through research, proposes the method for exchanges data between a kind of relational database management system and XML data base management system.Consult Fig. 1, Fig. 1 is the process flow diagram of the method for exchanges data between the relational database management system of embodiment of the present invention and XML data base management system.The method of exchanges data between the relational database management system of embodiment of the present invention and XML data base management system, comprising:
When storing an XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
When described XML document has newly-increased node city, on the basis that described integer-bit is encoded, expand described identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node.
Below in conjunction with concrete example, elaboration detailed is further carried out to the present invention
In the coding method of a kind of extendible XML data node identification number that the present invention proposes adopt elongated coded format, specific as follows:
" integer-bit " byte length n " integer-bit " string encoding Decimal place string encoding
Length: 1 byte n byte code total length-n-1
XML document such as:
First, according to the embodiment of the present invention, when storing an XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID; The coding that in above-mentioned XML document example, each node is corresponding is as follows:
Node 1:
1 “0” “0”
Node 2:
1 “1” “0”
Node 3:
1 “2” “0”
Node 4:
1 “3” “0”
Above-mentioned XML document is as follows after inserting new node:
When described XML document has newly-increased node city, on the basis that described integer-bit is encoded, described identification code is expanded for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node, also, after namely increasing node newly, the coding that in above-mentioned XML document, each node is corresponding is as follows:
Node 1:
1 “0” “0”
Node 2:
1 “1” “0”
Node 3:
1 “2” “0”
Newly-increased node 1:
1 “2” “1”
Newly-increased node 2:
1 “2” “2”
Node 4:
1 “3” “0”
Wherein, it should be noted that, the integer-bit string encoding of the described newly-increased node of above-mentioned embodiment is identical with the integer-bit string encoding of previous node at the same level, certainly, also can according to the actual needs, the integer-bit string encoding of newly-increased node also can be identical with the integer-bit string encoding of a rear node of peer.
Consult Fig. 2, Fig. 2 is the composition block schematic illustration of the code device of the extendible XML data node identification number of embodiments of the present invention.The code device of the extendible XML data node identification number of embodiments of the present invention, comprising:
Integer-bit string encoding module, for when storage one XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
Decimal place string encoding module, for when described XML document has newly-increased node city, on the basis that described integer-bit is encoded, expand described identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node.
Preferably, the node ID of described newly-increased node is that integer-bit string encoding adds described decimal place string encoding.
Preferably, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of previous node at the same level.
Preferably, the integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of a rear node at the same level.
In sum, technical scheme of the present invention has following advantage:
What technical scheme of the present invention can support XML node identification to encode dynamically updates, by generation and the use of decimal place identification code, when keeping original XML nodes encoding constant, achieve the easily extensible of node ID, while saving storage space, improve the efficiency of coding.
Should be understood that method and system as described herein can realize in hardware in a variety of manners, software, firmware, dedicated processor or their combination.Especially, the application program that a part at least of the present invention comprises programmed instruction preferably realizes.These programmed instruction are positively included in one or more program storage device and (are included but not limited to hard disk, magnetic floppy disc, RAM, ROM, CD, ROM etc.) inner, and can by any equipment or the machine that comprise appropriate configuration, such as a kind of universal digital computer with processor, internal memory and input/output interface performs.It should also be understood that the building block of some systems owing to describing in accompanying drawing and treatment step are preferably with software simulating, so, connection between system module (or logic flow of method step) may be different, and this depends on programming mode of the present invention.According to guidance given here, those of ordinary skill in the related art can design these and similar embodiment of the present invention.
Disclosed above many aspects of the present invention and embodiment, it will be understood by those skilled in the art that other side of the present invention and embodiment.Many aspects disclosed in the present invention and embodiment are just for illustrating, be not limitation of the invention, real protection domain of the present invention and spirit should be as the criterion with claims.

Claims (2)

1. a coding method for extendible XML data node identification number, is characterized in that, comprising:
When storing an XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
When described XML document has newly-increased node city, on the basis of integer-bit coding, expand identification code for described newly-increased node produces decimal place string encoding mode, produce the node ID of described newly-increased node;
The node ID of described newly-increased node is that integer-bit string encoding adds described decimal place string encoding;
The integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of previous node at the same level; Or
The integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of a rear node at the same level.
2. a code device for XML data node identification number, is characterized in that, comprising:
Integer-bit string encoding module, for when storage one XML document, all nodes being described XML document according to relationships between nodes produce an integer-bit string encoding in order as node ID;
Decimal place string encoding module, for when described XML document has newly-increased node city, on the basis of integer-bit coding, expands identification code for described newly-increased node produces decimal place string encoding mode, produces the node ID of described newly-increased node;
The node ID of described newly-increased node is that integer-bit string encoding adds described decimal place string encoding;
The integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of previous node at the same level; Or
The integer-bit string encoding of described newly-increased node is identical with the integer-bit string encoding of a rear node at the same level.
CN201210193886.7A 2012-06-12 2012-06-12 A kind of coding method of extendible XML data node identification number and device Expired - Fee Related CN102768673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210193886.7A CN102768673B (en) 2012-06-12 2012-06-12 A kind of coding method of extendible XML data node identification number and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210193886.7A CN102768673B (en) 2012-06-12 2012-06-12 A kind of coding method of extendible XML data node identification number and device

Publications (2)

Publication Number Publication Date
CN102768673A CN102768673A (en) 2012-11-07
CN102768673B true CN102768673B (en) 2016-04-20

Family

ID=47096077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210193886.7A Expired - Fee Related CN102768673B (en) 2012-06-12 2012-06-12 A kind of coding method of extendible XML data node identification number and device

Country Status (1)

Country Link
CN (1) CN102768673B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480151A (en) * 2016-06-07 2017-12-15 福建福昕软件开发股份有限公司 A kind of cross-platform interconnection document id generation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976242A (en) * 2010-09-26 2011-02-16 用友软件股份有限公司 Method for generating internal level coding of service object and system thereof
CN102035836A (en) * 2010-12-13 2011-04-27 北京交通大学 Coding method and system of buffer message in peer-to-peer (P2P) stream media system
CN102456053A (en) * 2010-11-02 2012-05-16 江苏大学 Method for mapping XML document to database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976242A (en) * 2010-09-26 2011-02-16 用友软件股份有限公司 Method for generating internal level coding of service object and system thereof
CN102456053A (en) * 2010-11-02 2012-05-16 江苏大学 Method for mapping XML document to database
CN102035836A (en) * 2010-12-13 2011-04-27 北京交通大学 Coding method and system of buffer message in peer-to-peer (P2P) stream media system

Also Published As

Publication number Publication date
CN102768673A (en) 2012-11-07

Similar Documents

Publication Publication Date Title
KR101994021B1 (en) File manipulation method and apparatus
CN104794123A (en) Method and device for establishing NoSQL database index for semi-structured data
CN108846133B (en) Block chain storage structure based on B-M tree, B-M tree establishment algorithm and search algorithm
CN105740411B (en) A kind of data migration method based on SOA and WebService
DE602006014971D1 (en) CLAUSE ERROR TO REDUCE NETWORK FILE SYSTEM DATA IN A HOST-CLUSTER ENVIRONMENT
CN103810244A (en) Distributed data storage system expansion method based on data distribution
CN104360865A (en) Serialization method, deserialization method and related equipment
CN103853714A (en) Data processing method and device
CN105975502A (en) Method for realizing incremental data extract based on CDC (Change Data Capture) mode
CN105095518A (en) Data conversion method and device
CN104750825A (en) Intelligent substation SCD document rapid analysis method
CN104317864A (en) Automatic identification method of information model based on IEC61850 logical nodes
CN103514291A (en) Method for displaying tree structure data in text
CN104462328A (en) Blended data management method and device based on Hash tables and dual-circulation linked list
CN104166705A (en) Access method and device of database
CN106326040A (en) Method and device for managing snapshot metadata
Izsó et al. IncQuery-D: incremental graph search in the cloud.
CN103345501A (en) Method and device for updating database
CN104182436A (en) Method and device for cleaning databases
CN102760164B (en) A kind of method of exchanges data between relational database management system and XML data base management system
CN102768673B (en) A kind of coding method of extendible XML data node identification number and device
CN102567419A (en) Mass data storage device and method based on tree structure
CN104636327A (en) Distributed type stream data system based on incremental computation
CN104700030A (en) Virus data searching method, device and server
CN103501341A (en) Method and device for establishing Web service

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: BEIDA FANGZHENG GROUP CO. LTD.

Free format text: FORMER OWNER: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO., LTD.

Effective date: 20130118

Owner name: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) C

Effective date: 20130118

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 201203 PUDONG NEW AREA, SHANGHAI TO: 100871 HAIDIAN, BEIJING

TA01 Transfer of patent application right

Effective date of registration: 20130118

Address after: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant after: Peking Founder Group Co., Ltd.

Applicant after: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

Address before: 201203, No. 608, midsummer Road, Zhangjiang hi tech park, Shanghai, Pudong New Area

Applicant before: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: FOUNDER INFORMATION INDUSTRY HOLDING CO., LTD. FOU

Free format text: FORMER OWNER: FOUNDER DIGITAL PUBLISHING TECHNOLOGY (SHANGHAI) CO., LTD.

Effective date: 20131101

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20131101

Address after: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant after: Peking Founder Group Co., Ltd.

Applicant after: Founder Holdings Company Limited (Founder Holdings)

Applicant after: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

Address before: 100871 Beijing, Haidian District into the house road, founder of the building on the 5 floor, No. 298

Applicant before: Peking Founder Group Co., Ltd.

Applicant before: Founder Digital Publishing Technology (Shanghai) Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160420

Termination date: 20170612

CF01 Termination of patent right due to non-payment of annual fee