The above needs are at least partially met through provision of the method and apparatus for facilitating efficient processing of XML documents described in the following detailed description, particularly when studied in conjunction with the drawings, wherein:
Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions and/or relative positioning of some of the elements in the figures may be exaggerated relative to other elements to help to improve understanding of various embodiments of the present invention. Also, common but well-understood elements that are useful or necessary in a commercially feasible embodiment are often not depicted in order to facilitate a less obstructed view of these various embodiments of the present invention. It will further be appreciated that certain actions and/or steps may be described or depicted in a particular order of occurrence while those skilled in the art will understand that such specificity with respect to sequence is not actually required. It will also be understood that the terms and expressions used herein have the ordinary meaning as is accorded to such terms and expressions with respect to their corresponding respective areas of inquiry and study except where specific meanings have otherwise been set forth herein.
A compressed XML instance table wherein the XML instance data is made separate from the XML schema and a related method are provided. The instance table and related method provide substantial savings with respect to processing the XML instance document on the sender, sending the compressed XML instance table from the sender to recipient, and processing the compressed XML instance table on the recipient.
At least one significant advantage of the compressed XML instance table can arise when the verbose schema information is presented by a single numerical number (i.e., a node code). This can yield a substantial resultant savings in compression and decompression processing. Since the schema information is no longer a part of the compressed bitstream and can be obtained separately at the recipient, a higher efficient compression and decompression algorithm can be achieved.
By one approach, the XML instance table comprises at least one node that represents actual XML value information. By this approach, each node can also be associated with corresponding instance path information.
Another advantage of the disclosed compressed XML instance table is the ability to use different compression algorithms for a node's instance path information, which is represented by integer-based codes, and the node's value information, which is represented by text-based values. There are available algorithms, for example, that are distinctly better at compressing and decompressing integer-based codes as opposed to text-based values, and vice-versa. Separating the integer-based codes from the text-based values enable one to effectively utilize the most efficient algorithm for a particular component of the XML instance table.
Another advantage of the disclosed compressed XML instance table is the incorporation of an error detector within the table de-compressor. Since the XML instance table is encoded into isolated groups, this error detector can detect data corruption within one group and signal to the sender for re-transmission without having to retransmit the other isolated groups within the binary instance table.
As yet another benefit, the introduction and use of both an XML schema information table and an XML instance table can facilitate metadata retrieval in an SQL-type of database application setting.
These and other benefits may become clearer upon making a thorough review and study of the following detailed description. Referring now to the drawings, and in particular to
Those skilled in the art will appreciate that the above-described structures are readily processed using any of a wide variety of available and/or readily configured processes, including partially or wholly programmable processes as are known in the art or dedicated purpose platforms as may be desired for some applications. Referring now to
In one embodiment of this invention, the corresponding XML instance table comprises at least one node code with corresponding node instance path information and node value information. In the case where there is a plurality of node codes, each node code can be differentially coded prior to being compressed if so desired. Such node codes serve, at least in part, to make an association with a corresponding XML schema information table and permit a relatively effective degree of XML instance table compression to be attained when employed as described. Those skilled in the art will further appreciate that such node codes can be readily independently regenerated if necessary when the XML schema itself is available (for example, as may be obtained from binary schema information as discussed herein).
It can be desirable in some circumstances, before compressing 304 the XML instance table, to separate the XML instance data into two distinct parts: node instance path information and node value information. The node instance path information can be generated, in part, by the associated XML schema in the form of node code in order to ensure that the XML instance data is separated from the XML schema. Each part of the XML instance data, the node instance path information, and the node value information can then be compressed using a different compression technique, with the technique for compressing the node instance path information being different than the technique for compressing the node value information. It may be desirable to select the corresponding compression techniques from a plurality of compression techniques, which take into account, at least in part, the quantity of information to be compressed.
It may also desirable in some circumstances to partition the XML instance table into groups and to relay error check information regarding those groups. The advantage in this embodiment is that each group can be independently verified using a checksum procedure, and if a group is found to be corrupt then only that group will need to be re-processed or re-transmitted, as opposed to re-processing or re-transmitting the entire XML instance table.
It can be desirable in some circumstances, for example in mobile environments, to transmit the compressed XML instance table 305. The reduction in size due to the compression techniques described in this method 300 provides efficiencies in bandwidth usage and in processing time performance by the recipient. Furthermore, it may be desirable to also transmit an identification of the corresponding XML schema information. This would be advantageous, in particular, in mobile environments where the receiving mobile device may not know of the XML instance table's associated schema information, but where the mobile device has access to the schema. Furthermore, transmitting schema identification rather than the entire schema results in less data to transfer from sender to recipient, resulting in an increased efficiency of network bandwidth use.
Referring now to
By another approach, the provided XML schema may be in the form of a discernable identification of the XML schema. In which case, by this approach, the method can provide for retrieving the associated XML schema information as it corresponds to the provided identification.
By yet another approach, the provided compressed XML instance table is received by any form of transmission, such as a wireless transmission of data. Furthermore, the received compressed XML instance table can be partitioned into groups and thus it is possible to receive transmission of one group independent of or in combination with any other group or groups. It can be desirable then to verify the contents of each compressed XML instance table group by any checksum procedure. Therefore, if an error in transmission of one of the groups is detected, only that group will need to be retransmitted.
An embodiment of decompressing the compressed XML instance table to provide a resultant XML instance table comprises of separately decompressing the node instance path information and the node value information. Furthermore, it may be desirable to use a decompression technique for decompressing the node value information and a separate decompression technique for decompressing the node instance path information.
An illustrative example of an XML schema information table is provided in Table 2 below.
Referring now to
An illustrative example of XML source code for the schema associated with the example set forth in
An illustrative example of the Schema Information Table associated with the example described in
The following Table 5 is an illustrative example of an XML instance document associated with the XML schema described in Table 3.
The following Table 6 is an illustrative example of the full version of an XML instance table possibly used for insertion into a database, based on the XML instance document described in Table 5.
Table 6. Full version of XML instance table based on XML instance document described in Table 5
The following Table 7 is an illustrative example of a simplified version of an XML instance table possibly used for transmission as described in Table 6.
The following Tables 8, 9, 10, and 11 are illustrative examples of the process of compressing the contents of Table 7.
2 2 0 1 0 1 1 1 4 1
1 0 0 0 0 0 0 0 0 0 0 1
Those skilled in the art will recognize and understand that such an apparatus 700 may be comprised of a plurality of physically distinct elements as is suggested by the illustration shown in
The following Table 12 is an illustrative example of the binary definition of Stream Header 801 as defined in
The following Table 13 is an illustrative example of the binary definition of Group Header 804 as defined in
The following Table 14 is an illustrative example of the binary definition of the run-length coding process shown in Table 10 for Node Code 805 as defined in
The following Table 15 is an illustrative example of the binary definition of the run-length coding process shown in Table 10 for Instance Path 806 as defined in
The following Table 16 is an illustrative example of the binary definition of the Value String 807 as defined in
Referring now to
In this illustrative example, a given XML document 1001 is characterized by both XML schema information as well as XML instance information. For purposes of this example, such information is presumed to assume textual form. The XML schema information is processed by a schema binarizer 1002 that effectively compresses the XML schema information and expresses the compressed result as binary schema information 1003. Such a schema binarizer 1002 may comprise, for example, the teachings set forth in a pending U.S. patent application entitled A COMPRESSED SCHEMA REPRESENTATION FOR BINARY METEADATA PROCESSING as was filed on Dec. 21, 2005 and which has been assigned application Ser. No. 11/275,276 (the contents of which are hereby incorporated herein by this reference).
The XML schema information is also processed by a schema processor and node code generator 1004 to yield corresponding node codes as correspond to that XML schema information. These node codes then serve to instantiate a corresponding schema information table 1005 that is stored, in this illustrative embodiment, in a server-side database 1006 of choice. These node codes are also provided to an XML instance document processor 1007 that also receives the aforementioned XML instance information.
This XML instance document as a function, at least in part, of the XML schema-based node codes to yield the aforementioned instance table 1008. This instance table 1008 is stored in the aforementioned database 1006 and is also provided to an instance table compressor 1009. In this illustrative embodiment the instance table compressor 1009 compresses the instance table 1008 to yield a corresponding binary instance table 1010.
In this illustrative embodiment, both the binary schema 1003 and the binary instance table 1010 are transmitted via at least one intervening network 1011 to a receiving client. This network 1011 may comprise, at least in part, a wireless network of choice. In such an application setting, the receiving client can comprise, for example, a cellular telephone, a handheld computer, or the like.
The receiving client comprises a schema decoder 1012 that recovers the XML schema information in textual form, which is then used, in part, to provide a corresponding reconstructed XML document 1013 as corresponds to the original XML document 1001. The scheme decoder 1012 also provides corresponding output to a schema processor and node code generator 1014 to thereby facilitate creation of a corresponding schema information table 1015. A client-side database 1016 can receive this schema information table 1015 for local retention.
An instance table de-compressor 1017 receives and processes the binary instance table 1010 to provide a resultant recovered instance table 1018. The aforementioned client-side database 1016 can receive this instance table 1018 if desired. In any event, an instance decoder 1019 uses both this instance table 1018 and the previously mentioned schema information table 1015 to recover the XML instance information in textual form. The latter is then used to reconstruct the XML document 1013 itself.
These teachings therefore define a unique method and apparatus that creatively and effectively reduces processing time for both the sender and receiver, and that provides substantial savings in network bandwidth upon sending XML data from sender to receiver.
Those skilled in the art will recognize that a wide variety of modifications, alterations, and combinations can be made with respect to the above described embodiments without departing from the spirit and scope of the invention, and that such modifications, alterations, and combinations are to be viewed as being within the ambit of the inventive concept.