CN112328841B - Document processing method and device, electronic equipment and storage medium - Google Patents
Document processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112328841B CN112328841B CN202011382230.0A CN202011382230A CN112328841B CN 112328841 B CN112328841 B CN 112328841B CN 202011382230 A CN202011382230 A CN 202011382230A CN 112328841 B CN112328841 B CN 112328841B
- Authority
- CN
- China
- Prior art keywords
- xpath
- xsd
- node tree
- node
- document
- 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.)
- Active
Links
- 238000003860 storage Methods 0.000 title claims abstract description 26
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000004458 analytical method Methods 0.000 claims abstract description 39
- 238000012545 processing Methods 0.000 claims abstract description 36
- 238000000034 method Methods 0.000 claims description 24
- 238000012795 verification Methods 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 16
- 238000004891 communication Methods 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 6
- 238000012986 modification Methods 0.000 claims description 6
- 230000004048 modification Effects 0.000 claims description 6
- 238000012217 deletion Methods 0.000 claims description 4
- 230000037430 deletion Effects 0.000 claims description 4
- 238000012512 characterization method Methods 0.000 claims description 3
- 230000014759 maintenance of location Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 15
- 238000004590 computer program Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 230000008030 elimination Effects 0.000 description 3
- 238000003379 elimination reaction Methods 0.000 description 3
- 230000002688 persistence Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002708 enhancing effect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000005056 compaction Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000007769 metal material Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000009517 secondary packaging Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/81—Indexing, e.g. XML tags; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/84—Mapping; Conversion
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Document Processing Apparatus (AREA)
Abstract
The application provides a document processing method, a document processing device, electronic equipment and a storage medium, wherein an XSD source document is determined to be an XSD document of a designated interface of a designated IATA version; extracting configuration data and an Xpath path set of an XSD source document; displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set; receiving operation on nodes in the node tree to obtain node tree update information; updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements; and furthermore, the purpose of simplifying the XSD source document into an XSD document conforming to IATA standard is achieved based on the mode of generating the target XSD source document by the target node tree and the configuration data, and the simplified XSD document not only can be used for verifying the XML document, but also can provide convenience for reading the XML document and reduce the analysis difficulty of the XML document.
Description
Technical Field
The present invention relates to the field of computer processing technologies, and in particular, to a document processing method, a document processing device, an electronic device, and a storage medium.
Background
NDC: a data transmission standard for enhancing data transmission capability between an airline and an agent based on XML. NDC is a totally new distribution protocol for international aviation collaborative popularization, and in order to enable more airlines and agents to accept and use the NDC standard, a great deal of compatibility processing is necessary, so that XSD documents facing the NDC standard are continuously expanded (expanded), and a great number of nodes which are only possible to use by specific airlines exist. Wherein the XSD document is a format verification rule document of an XML document, which is a language for marking an electronic document to be structured. Also, in order to be compatible with previous XML versions, XSD documents have a large number of nodes that are discarded.
In order to enable the avionics to meet the IATA (International air transport Association ) standard as soon as possible, the NDC protocol is added, and the node expansion is generally performed on the basis of the original IATA standard document, so that the purpose of quickly accessing the NDC protocol can be achieved, and the customization processing can be conveniently performed. And writing a customized extension node document unique to the airline, and carrying out associated mounting among documents (an original IATA standard document and the customized extension node document) by utilizing XSD Import tags, so as to form an XSD document conforming to the actual situation of the airline. The large and full document structure does not need to modify the original IATA standard document, only needs to maintain a separate custom extended node document, is convenient to manage, but has fatal defects, is difficult to read, and has a large number of unused nodes.
Through practical analysis of an XML document (such as an XML message) of a navigation, it can be found that nodes used in the production of the XML document are relatively concentrated and occupy a very small proportion relative to those of the IATA standard in the whole original IATA standard document, and a large number of useless nodes occupy most of IATA standards, particularly a Request message, which is more obvious. The existence of the useless nodes not only causes the reading difficulty of the XML document, but also increases the analysis difficulty of the XML document, and the expertise and the rigor of the navigation cannot be represented.
Disclosure of Invention
In view of the above, in order to solve the above problems, the present invention provides a document processing method, apparatus, electronic device, and storage medium, so as to implement compaction of an XSD document on the basis of ensuring that the XSD document meets IATA standards, where the compacted XSD document not only can be used for verifying an XML document, but also can provide convenience for reading the XML document, and reduce the parsing difficulty of the XML document, and the technical scheme is as follows:
A document processing method, comprising:
determining an XSD source document, wherein the XSD source document is an XSD document of a designated interface in a designated IATA version;
Extracting configuration data and an Xpath path set of the XSD source document, wherein the Xpath path set comprises all Xpath paths in the XSD source document, the Xpath paths are formed by one or more nodes, and the nodes carry node information;
Displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set;
Receiving operation of nodes in the node tree to obtain node tree update information, wherein the operation comprises any one or more of inquiry operation, addition operation, reservation operation and modification operation;
Updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements;
A target XSD source document is generated based on the target node tree and the configuration data.
A document processing apparatus comprising:
An XSD source document determining unit, configured to determine an XSD source document, where the XSD source document is an XSD document specifying an interface in an IATA version;
An extracting unit, configured to extract configuration data of the XSD source document and an Xpath path set, where the Xpath path set includes all Xpath paths in the XSD source document, and the Xpath path is formed by one or more nodes, where the nodes carry node information;
The node tree generating unit is used for displaying the node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper-lower corresponding relation of the Xpath paths in the Xpath path set;
An updating unit, configured to receive node tree update information obtained by an operation on a node in the node tree, where the operation includes any one or more of a query operation, an add operation, a reserve operation, and a modify operation;
The target node tree generating unit is used for updating the node tree by combining the node tree updating information to generate a target node tree meeting the XSD grammar requirement;
and the target XSD source document generation unit is used for generating a target XSD source document based on the target node tree and the configuration data.
An electronic device, comprising: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing a program for realizing the document processing method.
A computer-readable storage medium having stored therein computer-executable instructions for performing the document processing method.
The application provides a document processing method, a document processing device, electronic equipment and a storage medium, wherein an XSD source document is determined to be an XSD document of a designated interface of a designated IATA version; extracting configuration data and an Xpath path set of an XSD source document; displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set; receiving operation on nodes in the node tree to obtain node tree update information; updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements; and furthermore, the purpose of simplifying the XSD source document into an XSD document conforming to IATA standard is achieved based on the mode of generating the target XSD source document by the target node tree and the configuration data, and the simplified XSD document not only can be used for verifying the XML document, but also can provide convenience for reading the XML document and reduce the analysis difficulty of the XML document.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flowchart of a document processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for extracting configuration data and an Xpath path set of an XSD source document according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for updating a node tree to generate a target node tree meeting XSD grammar requirements in combination with node tree update information according to an embodiment of the present application;
FIG. 4 is a diagram of an overall architecture of a document processing system according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating analysis of source document data according to an embodiment of the present application;
fig. 6 is a schematic diagram of query triggering of a front-end node according to an embodiment of the present application;
FIG. 7 is a schematic diagram of editing and updating a node according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating the triggering of the generation of an XSD document according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a trigger for downloading a document in browsing according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an XSD document management interface according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a document processing apparatus according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of an electronic device to which the document processing method according to the embodiment of the present application is applicable.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
Before describing a document processing method provided by the embodiment of the present application in detail, technical terms related to the embodiment of the present application will be described.
XML, a language used to mark electronic documents for structuring.
Xsd, a format verification rule document for XML documents.
Ndc: a data transmission standard for enhancing data transmission capability between an airline and an agent based on XML.
Xpath: the language of a certain position in the XML document is determined for locating the query in the XML document.
5. Nodes include XSD nodes and XSD attribute nodes, collectively referred to herein as nodes.
6. And the node tree is a tree structure assembled by nodes with upper and lower levels of association relations.
7. And the node library is a data set formed by combining the XSD source document analysis basic library and the data dynamic update library.
FIG. 1 is a flowchart of a document processing method according to an embodiment of the present application.
As shown in fig. 1, the method includes:
S101, determining an XSD source document, wherein the XSD source document is an XSD document of a designated interface in a designated IATA version;
S102, extracting configuration data of an XSD source document and an Xpath path set, wherein the Xpath set comprises all Xpath paths in the XSD source document, and the Xpath paths are formed by one or more nodes which carry node information;
Referring to fig. 2, a flowchart of a method for extracting configuration data and Xpath path sets of an XSD source document according to an embodiment of the present application is shown.
As shown in fig. 2, the method includes:
s201, analyzing the XSD source document by using an Xpath analyzer to obtain configuration data of the XSD source document and a first Xpath path set;
Illustratively, the first Xpath path set includes all Xpath paths of the XSD source document parsed by the Xpath parsing executor, where the Xpath paths include nodes, the nodes carry node information, and the node information may be regarded as node detailed data.
S202, mapping a data structure of an XSD source document into Java analysis data through an analysis execution chain according to an XSD grammar, wherein the Java analysis data comprises a second Xpath path set of the XSD source document;
illustratively, the second set of Xpath paths includes all Xpath paths in the XSD source document determined using the parse execution chain, including nodes in the XSD source document.
S203, determining the corresponding relation between the nodes in the Xpath paths in the second Xpath path set and the nodes in the Xpath paths in the first Xpath set.
In the embodiment of the application, one node in the second Xpath path set corresponds to only one node in the first Xpath path set, and one node in the first Xpath path set can correspond to one or more nodes in the second Xpath path set. For example, where one node is the same node in an XSD source document as another node, the two nodes may be considered to correspond.
By way of example, due to different parsing modes of the XSD source document, a first Xpath path set and a second Xpath path set of the XSD source document are respectively generated, but nodes in the Xpath paths of the first Xpath path set and the second Xpath path set are nodes in the XSD source document, and a corresponding relationship exists between the nodes of the Xpath paths in the first Xpath set and the nodes of the Xpath paths in the second Xpath set. For example, node 1 in Xpath Path 1 in the first Xpath Path set is the same node in the XSD source document as node 2 in Xpath Path 2 in the second Xpath Path set.
According to the embodiment of the application, not only are the XSD source documents analyzed in different modes to respectively generate the first Xpath path set and the second Xpath set, but also the corresponding relation between the nodes in the Xpath set and the nodes in the Xpath set in the second Xpath set is required to be determined.
For example, the first Xpath path set and the second Xpath path set can be stored to a parsing base and the configuration data can be stored to a system configuration library.
S103, displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper-lower corresponding relation of the Xpath paths in the Xpath path set;
in the embodiment of the application, the node tree of the XSD source document can be displayed at the front end, and the node tree of the XSD source document is generated according to the second Xpath path set. For example, the node tree generated by assembling the Xpath paths in the second Xpath path set can be utilized by using the upper-lower correspondence relationship of the Xpath paths in the second Xpath path set.
S104, receiving operation of nodes in the node tree to obtain node tree update information, wherein the operation comprises any one or more of inquiry operation, addition operation, deletion operation and modification operation;
In the embodiment of the application, after the front end displays the node tree, the front end can receive the detail query operation on the nodes in the node tree, determine the corresponding nodes in the first Xpath path set of the nodes in the node tree which are requested to be queried by the detail query operation, acquire the node detail data carried by the determined nodes, and display the acquired node detail data at the front end.
The front end can respond to node detail query operation sent by a user to display node detail data of the node requesting node detail query to the user, and can respond to addition operation, reservation operation or modification operation of the node in the node tree by the user to obtain node tree update information.
The add operation may be an add node operation, the reserve operation may be an operation of a reserve node, the modify node operation may be a node detail data of a modify node, etc., which is not limited herein.
Furthermore, the user can delete the nodes in the node tree by selecting the nodes to be reserved in the node tree. That is, the nodes other than the node selected by the user to be retained in the node tree are regarded as the nodes that the user wants to delete.
In the embodiment of the present application, the node tree update information may be corresponding to the first Xpath path set, and the manner of receiving the node tree update information obtained by the operation on the nodes in the node tree may be: receiving operation on nodes in the node tree to obtain first node tree update information of a second Xpath path set; and converting the first node tree updating information into second node tree updating information of the first Xpath path set according to the corresponding relation between the nodes in the Xpath set and the nodes in the first Xpath set. Thus, the second node tree update information may be considered to be node tree update information resulting from receiving an operation on a node in the node tree.
The foregoing is merely a preferred manner of receiving node tree update information obtained by operating a node tree provided in the embodiments of the present application, and the inventor may set the preferred manner of receiving node tree update information obtained by operating a node tree according to his own needs, which is not limited herein.
S105, updating the node tree by combining the node tree updating information to generate a target node tree meeting the XSD grammar requirement;
FIG. 3 is a flowchart of a method for updating a node tree to generate a target node tree meeting XSD grammar requirements in combination with node tree update information according to an embodiment of the present application.
As shown in fig. 3, the method includes:
s301, performing XSD grammar verification on nodes indicated by the node tree update information based on a first Xpath path set to obtain a verification result of the node tree update information;
According to the embodiment of the application, the nodes in the first Xpath path set indicated by the node tree update information can be determined, and the determined nodes are checked by utilizing the XSD grammar to obtain the node tree update information check result. If the verification result of the node tree update information indicates that all nodes in the first Xpath path set indicated by the node tree update information are legal, second information except the first information reserved by the characterization node in the node tree update information can be determined.
Further, if the check node of the node tree update information characterizes that a certain node in the first Xpath path set indicated by the node tree update information is illegal, a modification operation of the node by the user can be responded, so that the node is legal.
The node tree update information includes two pieces of information, wherein one piece of information characterizes node reservation, the piece of information characterizing node reservation can be called first information, the other piece of information is the rest of all information not characterizing node reservation, and the other piece of information can be called second information. Wherein the operation of receiving the node in the node tree may include a reservation operation, the node tree update information associated with the reservation operation may be regarded as first information, and the node tree update information not associated with the reservation operation may be regarded as second information.
S302, if the verification result represents that the node indicated by the node tree updating information is legal, determining second information except the first information reserved by the represented node in the node tree updating information;
S303, updating the first Xpath path set by using the second information to obtain a target first Xpath set;
For example, the first Xpath path set may be updated with the second information to obtain the target first Xpath path set.
S304, according to the upper-lower corresponding relation of the Xpath paths in the target first Xpath path set, assembling the Xpath paths in the target first Xpath set to generate a first node tree;
For example, because the target first Xpath path set is obtained by updating the first Xpath path set with the second information, and the second information does not relate to deletion of the node, assembling Xpath paths in the target first Xpath path set according to the upper-lower correspondence of Xpath paths in the target first Xpath path set can generate a node tree with more comprehensive nodes, which can be referred to as a first node tree for convenience of distinguishing.
S305, deleting the nodes in the first node tree by using the first information to generate a second node tree.
According to the embodiment of the application, the node of which the first information indicates the reservation can be determined; determining useless nodes in the first node tree based on the XSD grammar in combination with the first information to indicate reserved nodes; and deleting the useless nodes in the first node tree, and calling the first node tree after deleting the useless nodes as a second node tree.
S106, generating a target XSD source document based on the target node tree and the configuration data.
In the embodiment of the application, an XSD source document can be restored by utilizing the target node tree and the configuration data, and the restored XSD source document can be regarded as a reduced XSD source document, and the reduced XSD source document can be called a target XSD source document.
The application provides a document processing method, which is characterized in that an XSD source document is determined to be an XSD document of a designated interface in a designated IATA version; extracting configuration data and an Xpath path set of an XSD source document; displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set; receiving operation on nodes in the node tree to obtain node tree update information; updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements; and furthermore, the purpose of simplifying the XSD source document into an XSD document conforming to IATA standard is achieved based on the mode of generating the target XSD source document by the target node tree and the configuration data, and the simplified XSD document not only can be used for verifying the XML document, but also can provide convenience for reading the XML document and reduce the analysis difficulty of the XML document.
In order to overcome the fatal defects in the large and full XSD document proposed by the prior art, the application supports operations of analyzing the source document in real time, customizing the nodes by users, dynamically generating the XSD document and the like by establishing an XSD source document analysis base library, a node dynamic update library and a system configuration library, and realizes the whole closed-loop business flow from the analysis of the source document to the dynamic generation of the XSD document. Meets the customization requirement of the avionics, accords with IATA standard, is easy to read and manage, and improves the experience friendliness and competitiveness of users.
The document processing method provided by the embodiment of the application is applied to a document processing system, and the whole architecture diagram of the document processing system is shown in fig. 4. As shown in fig. 4, the document processing system involves components including: a source document analysis component, a node real-time query component, a node dynamic editing component, a data persistence cluster (a source document analysis base library, a node dynamic update library, a system configuration library) and an XSD real-time generation component.
The whole processing flow of the document processing system is as follows:
1. And preprocessing and analyzing an IATA standard XSD document, thereby establishing an XSD source document analysis basic library and a system configuration library, establishing a dynamic update library of node data by recording real-time editing operation of a user on a front-end page, combining the source document analysis basic library and the node dynamic update library data, and finally assembling the node library data which accords with the reality of the navigation. And then, the function of an XSD real-time generation component is utilized, and an easy-to-read, fresh and practical XSD document is generated through an Xpath path analysis method and an empty node elimination method.
2. A source document parsing component: is responsible for the syntax parsing of the IATA standard XSD document. And analyzing the source document according to the XSD grammar, obtaining all analysis data, and storing the analysis data in an XSD document analysis base in a classified manner.
3. Node real-time query component: the detailed query processing module facing to the nodes finds out corresponding node detailed data according to the mapping relation between the first Xpath path centralized nodes and the second Xpath centralized nodes, and returns the data to the front-end user after secondary packaging.
4. Node dynamic editing component: the system updates the received data to the node library in real time, establishes node dynamic update library data and stores the update record of the user.
5. Data persistence clusters:
Storing various XSD document parsing data, user node dynamic update data, system operation configuration and the like. The persistence operation is performed by fully utilizing the forms of a cache (ECache), a database, a JSON format document and the like.
1) The XSD document parsing base stores parsing data of various source documents, which is usually only needed to parse once, and is used as source data for other components to call.
2) The node dynamic update library stores various operation data of the user on the node, including changing operation on the original node and the self-defined expansion node. The adjustment data is dynamically updated.
3) The system configuration library stores configuration data required by normal operation of various systems, XSD source document sets and the like.
6. XSD real-time generation component: and the database is responsible for assembling and merging the XSD document analysis base database and the node dynamic update database into final node database data, analyzing all node data to be reserved by utilizing an Xpath path, generating the XSD document by adopting an empty node elimination method, and providing a user downloading window for users.
The following describes the implementation principle of a document processing method provided by the embodiment of the present application in detail with reference to the above detailed description of the document processing system, which specifically includes the following steps:
Step one, analyzing the source document data. Referring to fig. 5, after a user enters a document processing system as shown in fig. 5, selecting an IATA version and an interface of the IATA version according to needs, and further obtaining an XSD source document of the selected interface in the selected IATA version (the file name shown in fig. 5 may be the file name of the XSD source document); after the validity of the XSD source document passes, entering an analysis execution chain constructed by a factory mode and a responsibility chain design mode for processing, and mapping all data structures of the XSD source document into Java analysis data through the analysis execution chain according to XSD analysis grammar, wherein the Java analysis data can be Java class objects with a context relation, and comprises a second Xpath path set of the XSD source document; and analyzing the XSD source document by using the Xpath analyzer according to the XSD analysis grammar to obtain a first Xpath path set and configuration data of the XSD source document.
And storing the Java analysis data and the first Xpath path set into an analysis base library, storing configuration data into a system configuration library, and establishing a mapping relation (namely a corresponding relation) between the nodes in the second Xpath set and the nodes in the first Xpath set in Java.
And step two, the front-end node inquires and triggers. Referring to fig. 6, after a user controls a document processing system to jump to a tree query interface, triggering a node tree query and assembly function of the document processing system by selecting an IATA version and the interface, the document processing system obtains an XSD source document corresponding to the Xpath parameter according to a first Xpath parameter (for example, the IATA version and the interface indicated by the node tree query operation) indicated by a node tree query operation executed by the user in the document processing system, analyzes the XSD source document to obtain a second Xpath path set, assembles Xpath paths in the second Xpath path set by using upper and lower corresponding relations of Xpath paths in the second Xpath path set to obtain a node tree, and displays the node tree at the front end.
After the user triggers the node detail query of the nodes in the node tree, the document processing system analyzes the received node detail query request to obtain a second Xpath parameter (for example, the node identifier of the node in the node tree which is queried by the node detail query operation request) corresponding to the node detail query operation indicated by the node detail query request, analyzes the first Xpath path set according to the second Xpath parameter, obtains the node corresponding to the second Xpath parameter in the first Xpath path set, extracts the node detail data (the node detail data can comprise node name, type, maximum value, minimum value, node description and the like) of the node from the first Xpath path set after the node is found, and returns the node detail data of the node to the document processing front end for display.
And thirdly, editing and updating the nodes. Referring to fig. 7, as shown in fig. 7, after node detailed data of a node is queried, a user can edit the node to obtain operation data of the node, for example, the user can change the node detailed data (such as description, type, minimum value, maximum value, necessary filling, whether the node is used or not, etc.) of the node to achieve a customization effect; the effect of expanding the custom node or deleting the node and the child node of the node is achieved by the mode of adding or deleting the node under the selected node. Note that, the remaining nodes in the node tree other than the node designated for deletion may be regarded as nodes that need to be reserved for the reservation operation.
Correspondingly, after the user triggers the editing and storing operation, node tree updating information is obtained, the document processing system analyzes the Xpath paths in the first Xpath path set again, determines nodes in the first Xpath path set indicated by the second information in the node tree updating information, acquires current node detailed data of the nodes in the first Xpath set indicated by the second information according to the analysis base library and the second information, performs data validity check on the nodes according to the determined node detailed data of the nodes, and establishes a node dynamic updating library record by utilizing the node tree updating information after the data validity check passes. It should be noted that, the first information in the update information of the node tree in this process only relates to the marking operation of the node tree requiring to be reserved, and the unnecessary node is not really deleted from the node tree. Accordingly, the validity check referred to herein relates generally to the checking of add operations, modify operations.
And step four, triggering the generation of the XSD document. Referring to fig. 8, after the user completes all editing and updating operations on the node tree, if node validity verification indicated by the node tree updating information passes, a target first Xpath path set obtained after updating the first Xpath path set according to second information in the node tree updating information, and the Xpath paths in the updated first Xpath path set are assembled to obtain a first node tree.
Manually triggering an XSD real-time generation component function, inquiring corresponding first Xpath path sets and node tree update information from an analysis base library and a node dynamic update library by a document processing system according to transfer parameters (such as IATA version and interface to which a node tree corresponding to a node tree belongs), and combining and sorting out customized node library data by the document processing system, wherein the document processing system is based on the information, and generating a complete XSD document by combining configuration data corresponding to the transfer parameters from a system configuration library (the first information in the node update information in the complete XSD document indicates that deleted nodes are not deleted); and analyzing the generated complete XSD document by using the Xpath analyzer, determining a target first Xpath path set of the complete XSD document, assembling Xpath paths in the target first Xpath path set into a first node tree, analyzing and filtering the first node tree according to first information based on the XSD grammar to obtain useless nodes in the first node tree, deleting the useless nodes by adopting an empty node elimination method to obtain a second node tree, and finally generating a concise and fresh XSD document (namely a target XSD source document) according to the second node tree.
And step five, triggering document browsing and downloading. The business process triggered by the document browsing download is shown in fig. 9. As shown in FIG. 9, after the target XSD source document is generated and stored under the document in the specified format, the user jumps to the document browsing interface, and the data is refreshed according to the query conditions such as version, interface, type, time and the like, and a downloading function is provided for the user to download to the local view and save.
A document processing method according to an embodiment of the present application will be described in further detail with reference to a specific example. Specifically, in order to better understand the technical scheme of the present application, the present application will be described by taking the IATA standard interface-iata_ AirShoppingRQ as an example.
1. And analyzing the source document data. After the information is selected (version) and (file name), triggering a source file analysis component, wherein verification contents comprise but are not limited to:
1) Presence files under current version
2) The file content format can be normally analyzed
3) Corresponding analysis data exists in the document base library
After verification is successful, the source document data is analyzed and stored in a source document analysis basic library and a system configuration library.
2. And (5) assembling a node tree. After the interface name is selected, system configuration library information is acquired, all the Xpath records meeting the requirements are inquired, and the Xpath records are assembled into a tree structure.
For example: 6 Xpath records under IATA_ AirShoppingRQ interface:
According to the father-son node relation of Xpath, all nodes are assembled into the following tree structure from the root node (/).
IATA_AirShoppingRQ
AugmentationPoint
Other
MessageDoc
Name
RefVersionNumber
3. And (5) displaying the details of the front-end nodes. After triggering node detail query by a user, the system acquires the value of Xpath, and invokes the node real-time query component to acquire detail data.
Details under IATA_ AirShoppingRQ, for example:
【Xpath】:/IATA_AirShoppingRQ
[ node name ]: IATA_ AirShoppingRQ
[ Element type ]: element
[ Least value ]: 1
[ Maximum ] the following: 1
[ Description ] A method for producing a composite sheet of a metal material comprises: IATA standard root node entry, XML root node entry
[ If an example ]: is that
4. Editing and updating the nodes.
Newly-built nodes, parameters such as [ node name ] [ element type ] [ node type ] [ minimum value ] [ maximum value ] [ description ] [ whether an example ] and the like are set, and the front end automatically acquires an Xpath path according to the node selected by a user. And pass the complete data information into the background. And adding data nodes.
And deleting the node, calling a node dynamic editing component through triggering the deleting function bound by the node, and deleting the corresponding node.
Updating the node. Parameters such as change [ node type ] [ minimum value ] [ maximum value ] [ description ] [ whether an example ] and the like, the front end packages original node data and user change data into objects and then transmits the objects to the background, and updates the node data.
5. And (6) generating an XSD document. After the interface name is selected, system configuration library information is acquired, and an XSD real-time generation component function is triggered to perform an XSD document generation operation.
6. And (5) managing and downloading the document. After the query condition is selected [ version ] and [ type ], the query operation is triggered, and a default query triggering query function can also be adopted.
Referring to FIG. 10, after a document is selected, a download button is triggered to download the document locally for viewing and saving.
Although the large and full XSD document of the airline is simple and clear in implementation mode, the purpose of meeting IATA standard and adding NDC protocol can be achieved quickly, but the defects that the document is difficult to read and a large number of useless nodes exist are unavoidable.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Based on the above commonalities, a detailed description will be given of a structure of a document processing apparatus provided by an embodiment of the present application. Please refer to fig. 11 in detail.
As shown in fig. 11, the apparatus includes:
An XSD source document determining unit 1101, configured to determine an XSD source document, where the XSD source document is an XSD document specifying an interface in the IATA version;
an extracting unit 1102, configured to extract configuration data of an XSD source document and an Xpath path set, where the Xpath path set includes all Xpath paths in the XSD source document, and the Xpath path is formed by one or more nodes, and the nodes carry node information;
A node tree generating unit 1103, configured to display a node tree generated by assembling Xpath paths in the Xpath path set by using a top-to-bottom correspondence of Xpath paths in the Xpath path set;
an updating unit 1104, configured to receive node tree update information obtained by an operation on a node in the node tree, where the operation includes any one or more of a query operation, an add operation, a reserve operation, and a modify operation;
A target node tree generating unit 1105, configured to update the node tree in combination with the node tree update information to generate a target node tree that meets XSD syntax requirements;
The target XSD source document generation unit 1106 is configured to generate a target XSD source document based on the target node tree and the configuration data.
In an embodiment of the present application, preferably, the extracting unit includes:
the first analysis unit is used for analyzing the XSD source document by using the Xpath analyzer to obtain configuration data of the XSD source document and a first Xpath path set;
The second parsing unit is used for mapping the data structure of the XSD source document into Java parsing data through a parsing execution chain according to the XSD grammar, wherein the Java parsing data comprises a second Xpath path set of the XSD source document;
and the corresponding relation determining unit is used for determining the corresponding relation between the nodes in the Xpath paths in the second Xpath path set and the nodes in the Xpath paths in the first Xpath set.
In the embodiment of the present application, preferably, the node tree generating unit is specifically configured to: and assembling the Xpath paths in the second Xpath path set by using the upper and lower corresponding relation of the Xpath paths in the second Xpath path set to generate a node tree.
In an embodiment of the present application, preferably, the updating unit includes:
the receiving unit is used for receiving the first node tree update information of the second Xpath path set obtained by the operation of the nodes in the node tree;
and the updating subunit is used for converting the first node tree updating information into second node tree updating information of the first Xpath path set according to the corresponding relation between the nodes in the Xpath set and the nodes in the first Xpath set.
In the embodiment of the present application, preferably, the target node tree generating unit includes:
The verification unit is used for performing XSD grammar verification on the nodes indicated by the node tree update information based on the first Xpath path set to obtain a verification result of the node tree update information;
The information determining unit is used for determining second information except the first information reserved by the characterization node in the node tree updating information if the verification result characterizes that the node indicated by the node tree updating information is legal;
The target first Xpath path set generating unit is used for updating the first Xpath path set by using the second information to obtain a target first Xpath path set;
The first node tree generating unit is used for assembling and generating a first node tree of the Xpath paths in the target first Xpath path set according to the upper-lower corresponding relation of the Xpath paths in the target first Xpath path set;
And the second node tree generating unit is used for generating a second node tree by deleting the nodes in the first node tree by using the first information.
In an embodiment of the present application, preferably, the second node tree generating unit includes:
A first determining unit configured to determine that the first information indicates a reserved node;
a second determining unit, configured to determine, based on the XSD syntax, useless nodes in the first node tree in combination with the node reserved by the first information indication;
And the generating unit is used for deleting useless nodes in the first node tree to generate a second node tree.
Further, the document processing device provided by the embodiment of the application further comprises a storage unit, wherein the storage unit is used for storing the target XSD source document and providing a downloading function of the target XSD source document.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The embodiment of the application also provides electronic equipment, which comprises: the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; and a memory for storing a program for the document processing method.
Referring now to fig. 12, a schematic diagram of an electronic device 12 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 12 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 12, the electronic apparatus 1200 may include a processing device (e.g., a central processor, a graphics processor, etc.) 1201, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1202 or a program loaded from a storage device 1206 into a Random Access Memory (RAM) 1203. In the RAM1203, various programs and data required for the operation of the electronic apparatus 1200 are also stored. The processing device 1201, the ROM1202, and the RAM1203 are connected to each other through a bus 1204. An input/output (I/O) interface 1205 is also connected to the bus 1204.
In general, the following devices may be connected to the I/O interface 1205: input devices 1206 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 1207 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 1208 including, for example, magnetic tape, hard disk, etc.; and a communication device 1209. The communication means 1209 may allow the electronic device 1200 to communicate wirelessly or by wire with other devices to exchange data. While fig. 12 shows an electronic device 1200 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 1201.
Further, an embodiment of the present application also provides a computer-readable storage medium having stored therein computer-executable instructions for performing the above-described document processing method.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining an XSD source document, wherein the XSD source document is an XSD document of a specified interface in a specified IATA version; extracting configuration data of an XSD source document and an Xpath path set, wherein the Xpath path set comprises all Xpath paths in the XSD source document, and the Xpath paths are formed by one or more nodes which carry node information; displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set; receiving operation on nodes in the node tree to obtain node tree update information, wherein the operation comprises any one or more of inquiry operation, addition operation, reservation operation and modification operation; updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements; a target XSD source document is generated based on the target node tree and the configuration data.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The application provides a document processing method, a document processing device, electronic equipment and a storage medium, wherein an XSD source document is determined to be an XSD document of a designated interface of a designated IATA version; extracting configuration data and an Xpath path set of the XSD source document; displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set; receiving operation of nodes in the node tree to obtain node tree update information; updating the node tree by combining the node tree updating information to generate a target node tree meeting XSD grammar requirements; and further, based on the mode of generating the target XSD source document by the target node tree and the configuration data, the purpose of simplifying the XSD source document into an XSD document conforming to IATA standard is achieved, and the simplified XSD document not only can be used for verifying the XML document, but also can provide convenience for reading the XML document and reduce the analysis difficulty of the XML document.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The above description is only illustrative of the presently disclosed preferred embodiments and of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be made by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as the above-described features, are mutually replaced with the technical features having similar functions disclosed in the disclosure (but not limited to the disclosure).
Claims (9)
1. A document processing method, comprising:
determining an XSD source document, wherein the XSD source document is an XSD document of a designated interface in a designated IATA version;
Extracting configuration data and an Xpath path set of the XSD source document, wherein the Xpath path set comprises all Xpath paths in the XSD source document, the Xpath paths are formed by one or more nodes, and the nodes carry node information;
Displaying a node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper and lower corresponding relations of the Xpath paths in the Xpath path set;
Receiving operation of nodes in the node tree to obtain node tree update information, wherein the operation comprises any one or more of inquiry operation, addition operation, reservation operation and modification operation;
Performing XSD grammar verification on the node indicated by the node tree update information based on the first Xpath path set to obtain a verification result of the node tree update information;
if the verification result represents that the node indicated by the node tree updating information is legal, determining second information except the first information which represents node retention in the node tree updating information;
Updating the first Xpath path set by using the second information to obtain a target first Xpath set;
according to the upper and lower corresponding relation of the Xpath paths in the target first Xpath path set, a first node tree generated by assembling the Xpath paths in the target first Xpath set is assembled;
Performing deleting operation on the nodes in the first node tree by using the first information to generate a second node tree; the second node tree is a target node tree;
A target XSD source document is generated based on the target node tree and the configuration data.
2. The method of claim 1, wherein the extracting configuration data and Xpath path sets of the XSD source document comprises:
analyzing the XSD source document by using an Xpath analyzer to obtain configuration data and a first Xpath path set of the XSD source document;
Mapping the data structure of the XSD source document into Java analysis data through an analysis execution chain according to XSD grammar, wherein the Java analysis data comprises a second Xpath path set of the XSD source document;
and determining the corresponding relation between the nodes in the Xpath paths in the second Xpath path set and the nodes in the Xpath paths in the first Xpath set.
3. The method of claim 2, wherein the displaying a node tree generated by assembling Xpath paths in the Xpath path set by using a top-bottom correspondence relationship of the Xpath paths, comprises:
And assembling the Xpath paths in the second Xpath path set to generate a node tree by utilizing the upper-lower corresponding relation of the Xpath paths in the second Xpath path set.
4. The method of claim 1, wherein said receiving operation of a node in said node tree results in node tree update information, comprising:
Receiving operation on nodes in the node tree to obtain first node tree update information on a second Xpath path set;
And converting the first node tree updating information into second node tree updating information of the first Xpath path set according to the corresponding relation between the nodes in the Xpath paths in the second Xpath path set and the nodes in the Xpath paths in the first Xpath set.
5. The method of claim 1, wherein the deleting the node in the first node tree with the first information generates a second node tree, comprising:
determining that the first information indicates a reserved node;
Determining useless nodes in the first node tree based on the XSD grammar and the nodes reserved by the first information indication;
Deleting the useless nodes in the first node tree to generate a second node tree.
6. The method as recited in claim 1, further comprising:
Storing the target XSD source document and providing a downloading function of the target XSD source document.
7. A document processing apparatus, comprising:
An XSD source document determining unit, configured to determine an XSD source document, where the XSD source document is an XSD document specifying an interface in an IATA version;
An extracting unit, configured to extract configuration data of the XSD source document and an Xpath path set, where the Xpath path set includes all Xpath paths in the XSD source document, and the Xpath path is formed by one or more nodes, where the nodes carry node information;
The node tree generating unit is used for displaying the node tree generated by assembling the Xpath paths in the Xpath path set by utilizing the upper-lower corresponding relation of the Xpath paths in the Xpath path set;
An updating unit, configured to receive node tree update information obtained by an operation on a node in the node tree, where the operation includes any one or more of a query operation, an add operation, a reserve operation, and a modify operation;
The verification unit is used for performing XSD grammar verification on the nodes indicated by the node tree update information based on the first Xpath path set to obtain a verification result of the node tree update information;
The information determining unit is used for determining second information except the first information reserved by the characterization node in the node tree updating information if the verification result characterizes that the node indicated by the node tree updating information is legal;
The target first Xpath path set generating unit is used for updating the first Xpath path set by using the second information to obtain a target first Xpath path set;
The first node tree generating unit is used for assembling and generating a first node tree of the Xpath paths in the target first Xpath path set according to the upper-lower corresponding relation of the Xpath paths in the target first Xpath path set;
a second node tree generating unit, configured to generate a second node tree by performing a deletion operation on nodes in the first node tree using the first information; the second node tree is a target node tree;
and the target XSD source document generation unit is used for generating a target XSD source document based on the target node tree and the configuration data.
8. An electronic device, comprising: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is configured to store a program for implementing the document processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored therein computer-executable instructions for performing the document processing method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011382230.0A CN112328841B (en) | 2020-11-30 | 2020-11-30 | Document processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011382230.0A CN112328841B (en) | 2020-11-30 | 2020-11-30 | Document processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112328841A CN112328841A (en) | 2021-02-05 |
CN112328841B true CN112328841B (en) | 2024-05-31 |
Family
ID=74309463
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011382230.0A Active CN112328841B (en) | 2020-11-30 | 2020-11-30 | Document processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112328841B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113095044A (en) * | 2021-04-13 | 2021-07-09 | 中国工商银行股份有限公司 | File conversion method, device and equipment |
CN113301160A (en) * | 2021-05-27 | 2021-08-24 | 杭州海康威视数字技术股份有限公司 | Method and device for realizing data message transmission compatibility and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103226558A (en) * | 2012-01-27 | 2013-07-31 | 国际商业机器公司 | Document merge based on knowledge of document schema |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
CN111125439A (en) * | 2019-12-06 | 2020-05-08 | 北京信息科技大学 | XML data processing method, system and storage medium |
CN111259634A (en) * | 2020-01-13 | 2020-06-09 | 陕西心像信息科技有限公司 | XSD format file analyzing method and generating method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10534830B2 (en) * | 2011-06-23 | 2020-01-14 | Microsoft Technology Licensing, Llc | Dynamically updating a running page |
-
2020
- 2020-11-30 CN CN202011382230.0A patent/CN112328841B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103226558A (en) * | 2012-01-27 | 2013-07-31 | 国际商业机器公司 | Document merge based on knowledge of document schema |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
CN111125439A (en) * | 2019-12-06 | 2020-05-08 | 北京信息科技大学 | XML data processing method, system and storage medium |
CN111259634A (en) * | 2020-01-13 | 2020-06-09 | 陕西心像信息科技有限公司 | XSD format file analyzing method and generating method |
Also Published As
Publication number | Publication date |
---|---|
CN112328841A (en) | 2021-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112328841B (en) | Document processing method and device, electronic equipment and storage medium | |
CN111338944B (en) | Remote Procedure Call (RPC) interface testing method, device, medium and equipment | |
CN110780874B (en) | Method and device for generating information | |
CN111177634A (en) | Multi-language supporting file content loading method, device, equipment and medium | |
CN116226189A (en) | Cache data query method, device, electronic equipment and computer readable medium | |
CN113835571A (en) | Terminal device, information display method and storage medium | |
CN111694629A (en) | Information display method and device and electronic equipment | |
CN113641881A (en) | Metadata display method, device, equipment and medium | |
CN115712597A (en) | Information processing method, device, electronic equipment and storage medium | |
CN110442419B (en) | Interface layout method and device for Android application | |
CN109992698B (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN110489326B (en) | IDS-based HTTPAPI debugging method device, medium and equipment | |
CN109669720B (en) | Chain type asynchronous request processing method and device based on Promise and electronic equipment | |
CN116860286A (en) | Page dynamic update method, device, electronic equipment and computer readable medium | |
CN113779952B (en) | Text processing method and device and electronic equipment | |
CN115079873B (en) | Information display method, information display device, electronic equipment and storage medium | |
CN110086880B (en) | Method and apparatus for creating instances of network requests | |
CN113468342A (en) | Data model construction method, device, equipment and medium based on knowledge graph | |
CN111008178A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN111240657A (en) | Method and device for generating SDK and electronic equipment | |
CN115221178B (en) | Data table binding method, device, electronic equipment and computer readable medium | |
US20240330565A1 (en) | Page loading method and apparatus, electronic device, and storage medium | |
US20240095633A1 (en) | Method for determining a project flow, electronic device, and storage medium | |
CN118798143A (en) | Method and device for constructing production task form page, electronic equipment and medium | |
CN116880898A (en) | Document processing method and device, readable medium and electronic equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |