CN114461855A - Data tree dynamic construction method based on xml template and electronic equipment - Google Patents
Data tree dynamic construction method based on xml template and electronic equipment Download PDFInfo
- Publication number
- CN114461855A CN114461855A CN202011134836.2A CN202011134836A CN114461855A CN 114461855 A CN114461855 A CN 114461855A CN 202011134836 A CN202011134836 A CN 202011134836A CN 114461855 A CN114461855 A CN 114461855A
- Authority
- CN
- China
- Prior art keywords
- tree
- data
- xml
- node
- class
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
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/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
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
- G06F40/154—Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses a data tree dynamic construction method based on an xml template and electronic equipment. The data tree dynamic construction method based on the xml template comprises the following steps: analyzing a storage mode and a data structure of the data; generating tree nodes based on a storage mode and a data structure of data, and defining attribute types of the tree nodes, wherein each tree node corresponds to a unique identifier; defining a public class, wherein the public class is used for storing attribute values of all items of tree nodes; defining a data reading class, wherein the reading class is used for storing tree node data. The method comprises the steps of generating tree nodes based on a storage mode and a data structure of data, and defining a public class and a data reading class related to the tree nodes in sequence, wherein the public class is used for storing various attribute values of the tree nodes, and the data reading class is used for storing the data of the tree nodes. Thus, the purpose of converting the hierarchical data in the database into the corresponding hierarchical structure character strings is achieved.
Description
Technical Field
The invention belongs to the technical field of big data processing, and particularly relates to a data tree dynamic construction method based on an xml template and electronic equipment.
Background
With the remarkable development of computer technology and electronic information technology, the development of geophysical exploration technology has stepped into a more brilliant development era. The geophysical exploration technology plays a significant role in oil and gas development, provides scientific and reliable seismic data for oil field developers, and provides very key exploration data for reservoir delineation, reservoir description and reservoir detection in oil field development. The current geophysical exploration technology is mainly divided into two types, namely exploration geophysical technology and oil reservoir geophysical technology, wherein the latter technology obtains more remarkable development and promotes the modernized development of the geophysical exploration technology. These two physical exploration techniques are specifically analyzed below. The research objects of exploration geophysical technology are macroscopic and mainly comprise geological structures, traps, geological rock layers, rock layer oil storage characteristics and the like, while the research objects of reservoir geophysical technology are microscopic in comparison and mainly aim at the physical properties of rocks, residual oil distribution and the like, and are mainly used for solving the problem of reservoir characteristics. Seismic surveying has made a prominent contribution to the amount and reserves of oil and gas found, and includes primarily reflection seismic techniques, digital seismic techniques, and three-dimensional seismic techniques. With the development of computer technology, new and more advanced seismic surveying technologies, such as high-resolution seismic technology, reservoir description technology, thinking seismic monitoring technology and the like, are developed, and the technologies effectively improve the development reserves of new and old oil zones, so that the geophysical exploration technology has more and more prominent roles in oil and gas development.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
when big data is processed in the existing oil and gas geophysical exploration, the problem that hierarchical data in a database cannot be converted into corresponding hierarchical structure character strings exists.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data tree dynamic construction method and an electronic device based on an xml template, which at least solve the problem in the prior art that hierarchical data in a database cannot be converted into corresponding hierarchical structure character strings.
In a first aspect, an embodiment of the present invention provides a method for dynamically constructing a data tree based on an xml template, including:
analyzing a storage mode and a data structure of the data;
generating tree nodes based on a storage mode and a data structure of data, and defining attribute types of the tree nodes, wherein each tree node corresponds to a unique identifier;
defining a public class, wherein the public class is used for storing attribute values of all items of tree nodes;
defining a data reading class, wherein the reading class is used for storing tree node data.
Optionally, the tree node attribute type is an XML file.
Optionally, generating tree nodes based on the storage mode of the data and the data structure, and defining attribute types of the tree nodes, including:
compiling an XML hierarchical structure, and constructing an ordered multi-branch tree structure based on the XML hierarchical structure;
writing an XML file of tree nodes in a multi-way tree structure,
a unique identifier for each tree node is generated based on the XML file.
Optionally, the XML file includes:
a node identifier of a tree node, an attribute identifier of a tree node, and/or a menu identifier of a tree node.
Optionally, the defined public class is a ndataobject class.
Optionally, the defining a common class, where the common class is used to store attribute values of each item of a tree node, includes:
accessing the tree nodes through the unique identifier of the tree node, and setting various attribute symbols of the tree node to obtain various attribute values of the tree node;
and storing each attribute value of the tree node.
Optionally, the attribute characters include a node attribute character and a mouse attribute character.
Optionally, the data reading class includes: ndbdinterface and/or nDbDataChangeService class.
Optionally, the tree node data stored in the read class is: and refreshing the node data through the unique identification number of each node.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory storing executable instructions;
a processor executing the executable instructions in the memory to implement the method for dynamically constructing an xml-template-based data tree according to any one of the first aspect.
The tree node is generated based on the storage mode and the data structure of the data, and the public class and the data reading class which are related to the tree node are sequentially defined, wherein the public class is used for storing various attribute values of the tree node, and the data reading class is used for storing the data of the tree node. Thus, the purpose of converting the hierarchical data in the database into the corresponding hierarchical structure character strings is achieved.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a flow diagram illustrating a method for dynamic construction of an xml template-based data tree, according to an embodiment of the present invention;
FIG. 2 shows a schematic diagram of a data storage structure of one embodiment of the present invention;
FIG. 3 illustrates a schematic diagram of a structurally ordered multi-way tree structure according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating attributes of an equivalent XML file according to one embodiment of the invention;
FIG. 5 is a diagram illustrating system registration, generating a unique identifier for each node, according to one embodiment of the invention;
FIG. 6 is a diagram illustrating a one-time tree structure, dynamically showing data, according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of an apparatus for dynamically building an xml template-based data tree according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below. While the following describes preferred embodiments of the present invention, it should be understood that the present invention may be embodied in various forms and should not be limited by the embodiments set forth herein.
Big data is an industry which rises in recent years, the big data is developed rapidly, some technologies related to the big data become relatively mature through iteration in recent years, and meanwhile new technologies are emerging continuously, such as distributed computing and query, distributed scheduling and management, persistent storage, contents of a programming language commonly used by the big data and the like, and a plurality of open-source tools exist under each big class.
XML extensible markup language (a subset of the standard generalized markup language) is a simple data storage language.
XML extensible markup language is different from databases such as Access, Oracle, SQL Server, etc., and the databases provide more powerful data storage and analysis capabilities, such as: data indexing, sorting, searching, correlation consistency and the like, wherein XML is mainly used for transmitting data, and HTML which belongs to a standard general markup language is mainly used for displaying data.
XML is extremely simple to distinguish from other forms of data presentation.
The technical problem to be solved by this implementation is to convert the hierarchical data in the database into a character string in an XML format of a corresponding hierarchical structure and return the character string to the tree control of the client.
The embodiment relates to analysis management of massive seismic data, which is used for searching calculation, query and storage of big data, and the big data is analyzed, scheduled and managed by adopting a data tree dynamic construction technology based on an XML template.
The first embodiment is as follows:
as shown in fig. 1, a method for dynamically constructing a data tree based on an xml template includes:
step S101: analyzing a storage mode and a data structure of the data;
step S102: generating tree nodes based on a storage mode and a data structure of data, and defining attribute types of the tree nodes, wherein each tree node corresponds to a unique identifier;
step S103: defining a public class, wherein the public class is used for storing attribute values of all items of tree nodes;
step S104: defining a data reading class, wherein the reading class is used for storing tree node data.
Optionally, the tree node attribute type is an XML file.
Optionally, generating tree nodes based on the storage mode of the data and the data structure, and defining attribute types of the tree nodes, including:
compiling an XML hierarchical structure, and constructing an ordered multi-branch tree structure based on the XML hierarchical structure;
writing an XML file of tree nodes in a multi-way tree structure,
a unique identifier for each tree node is generated based on the XML file.
Optionally, the XML file includes:
a node identifier of a tree node, an attribute identifier of a tree node, and/or a menu identifier of a tree node.
Optionally, the defined public class is a ndataobject class.
Optionally, the defining a common class, where the common class is used to store attribute values of each item of a tree node, includes:
accessing the tree nodes through the unique identifier of the tree node, and setting various attribute symbols of the tree node to obtain various attribute values of the tree node;
and storing each attribute value of the tree node.
Optionally, the attribute characters include a node attribute character and a mouse attribute character.
Optionally, the data reading class includes: ndbninterface and/or nDbDataChangeService class.
Optionally, the tree node data stored in the read class is: and refreshing the node data through the unique identification number of each node.
Example two:
a data tree dynamic construction method based on an xml template comprises the following steps:
the first step is as follows: analyzing the storage mode of the data, and the data structure, the data storage structure is shown in figure 2,
the second step is that: generating all tree nodes at one time, defining node attribute type (XML file)
Compiling an XML hierarchical structure and constructing an ordered multi-branch tree structure; writing tree node mark, attribute symbol, menu XML file, system registering and generating each node unique mark. The structured ordered multi-branch tree structure is shown in fig. 3, the tree node identifiers, attribute characters and menus are shown in fig. 4, and the codes of the XML hierarchical structure are written as follows:
the system registers and generates a code of a unique identifier of each node as follows:
the third step: defining a common class ndataobject
As shown in fig. 5, the node is accessed through the unique identifier of the node, the attribute symbol of the node is set, the mouse attribute symbol of the node is set, and the values of the nodes are saved.
The fourth step: defining data reading class nDbInterface, nDbDataChangeservice, refreshing node data (deleting, adding and modifying) through the unique identification number of each node.
And obtaining a one-time tree structure as shown in FIG. 6, and dynamically displaying the data.
The tree form is constructed at one time, data hierarchical display is achieved, full sorting of different form columns is achieved (the full sorting means sorting of data of all pages, not only sorting of data of a current page), complete paging of the tree form is achieved (only a fixed number of first-layer nodes are taken during paging each time, then a tosting method is called, a complete number of hierarchical data are displayed), and the nodes are high in coupling degree and rapid in positioning.
Example three:
as shown in fig. 7, an apparatus for dynamically constructing a data tree based on an xml template includes:
an analysis module: a storage schema and data structures for analyzing data;
a generation module: the system comprises a data storage module, a data processing module and a data processing module, wherein the data storage module is used for storing data;
a common class definition module: the system comprises a public class used for defining the public class, wherein the public class is used for storing attribute values of various items of tree nodes;
the data reading class definition module: for defining a data read class for storing tree node data.
Optionally, the tree node attribute type is an XML file.
Optionally, generating tree nodes based on the storage mode of the data and the data structure, and defining attribute types of the tree nodes, including:
compiling an XML hierarchical structure, and constructing an ordered multi-branch tree structure based on the XML hierarchical structure;
writing an XML file of tree nodes in the multi-way tree structure,
a unique identifier for each tree node is generated based on the XML file.
Optionally, the XML file includes:
a node identifier of a tree node, an attribute identifier of a tree node, and/or a menu identifier of a tree node.
Optionally, the defined public class is a ndataobject class.
Optionally, the defining a common class, where the common class is used to store attribute values of each item of a tree node, includes:
accessing the tree nodes through the unique identifier of the tree node, and setting various attribute symbols of the tree node to obtain various attribute values of the tree node;
and storing each attribute value of the tree node.
Optionally, the attribute characters include a node attribute character and a mouse attribute character.
Optionally, the data reading class includes: ndbninterface and/or nDbDataChangeService class.
Optionally, the tree node data stored in the read class is: and refreshing the node data through the unique identification number of each node.
Example four:
an embodiment of the invention provides an electronic device comprising a memory and a processor,
a memory storing executable instructions;
and the processor runs the executable instructions in the memory to realize the data tree dynamic construction method based on the xml template.
The memory is to store non-transitory computer readable instructions. In particular, the memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of the invention, the processor is configured to execute the computer readable instructions stored in the memory.
Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures are also included in the protection scope of the present invention.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
The embodiment of the invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program realizes the data tree dynamic construction method based on an xml template.
A computer-readable storage medium according to an embodiment of the present invention has non-transitory computer-readable instructions stored thereon. The non-transitory computer readable instructions, when executed by a processor, perform all or a portion of the steps of the methods of embodiments of the invention previously described.
The computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or removable disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.
Claims (10)
1. A data tree dynamic construction method based on an xml template is characterized by comprising the following steps:
analyzing a storage mode and a data structure of the data;
generating tree nodes based on a storage mode and a data structure of data, and defining attribute types of the tree nodes, wherein each tree node corresponds to a unique identifier;
defining a public class, wherein the public class is used for storing attribute values of all items of tree nodes;
defining a data reading class, wherein the reading class is used for storing tree node data.
2. The XML-template-based data tree dynamic construction method according to claim 1, wherein the tree node attribute type is an XML file.
3. The xml-template-based data tree dynamic construction method according to claim 2, wherein the tree nodes are generated based on a storage mode and a data structure of data, and the tree node attribute types are defined, and the method comprises the following steps:
compiling an XML hierarchical structure, and constructing an ordered multi-branch tree structure based on the XML hierarchical structure;
writing an XML file of tree nodes in a multi-way tree structure,
a unique identifier for each tree node is generated based on the XML file.
4. The XML-template-based data tree dynamic construction method according to claim 3, wherein the XML file comprises:
a node identifier of a tree node, an attribute identifier of a tree node, and/or a menu identifier of a tree node.
5. The xml-template-based data tree dynamic construction method according to claim 1, wherein the defined public class is a ndataobject class.
6. The xml-template-based data tree dynamic construction method according to claim 5, wherein the defining a common class, the common class being used for storing attribute values of items of tree nodes, comprises:
accessing the tree nodes through the unique identifier of the tree node, and setting various attribute symbols of the tree node to obtain various attribute values of the tree node;
and storing each attribute value of the tree node.
7. The xml-template-based data tree dynamic construction method according to claim 6, wherein the attribute characters comprise node attribute characters and mouse attribute characters.
8. The xml-template-based data tree dynamic construction method according to claim 1, wherein the data reading class comprises: ndbninterface and/or nDbDataChangeService class.
9. The xml-template-based data tree dynamic construction method according to claim 1 or 8, wherein the tree node data stored in the read class is: and refreshing the node data through the unique identification number of each node.
10. An electronic device, characterized in that the electronic device comprises:
a memory storing executable instructions;
a processor executing the executable instructions in the memory to implement the xml template based data tree dynamic building method of any one of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011134836.2A CN114461855A (en) | 2020-10-21 | 2020-10-21 | Data tree dynamic construction method based on xml template and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011134836.2A CN114461855A (en) | 2020-10-21 | 2020-10-21 | Data tree dynamic construction method based on xml template and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114461855A true CN114461855A (en) | 2022-05-10 |
Family
ID=81404725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011134836.2A Pending CN114461855A (en) | 2020-10-21 | 2020-10-21 | Data tree dynamic construction method based on xml template and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114461855A (en) |
-
2020
- 2020-10-21 CN CN202011134836.2A patent/CN114461855A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3365810B1 (en) | System and method for automatic inference of a cube schema from a tabular data for use in a multidimensional database environment | |
US11907203B2 (en) | Path encoded tree structures for operations | |
CA2957674C (en) | Testing insecure computing environments using random data sets generated from characterizations of real data sets | |
US20170351656A1 (en) | Method of preparing documents in markup languages | |
ZA200503578B (en) | Adaptively interfacing with a data repository | |
US20160292275A1 (en) | System and method for extracting and searching for design | |
Cornillon et al. | R for Statistics | |
US10776351B2 (en) | Automatic core data service view generator | |
Thao et al. | Using versioned tree data structure, change detection and node identity for three-way xml merging | |
CN111427577A (en) | Code processing method and device and server | |
CN116841536B (en) | Component reference relation reconstruction method, device, system and storage medium | |
US9990271B2 (en) | Automatically generating object locators for automation test generation | |
Kingdon et al. | A geodata warehouse: Using denormalisation techniques as a tool for delivering spatially enabled integrated geological information to geologists | |
CN105824976A (en) | Method and device for optimizing word segmentation banks | |
JP2003281149A (en) | Method of setting access right and system of structured document management | |
CN114461855A (en) | Data tree dynamic construction method based on xml template and electronic equipment | |
Polášek et al. | Information and knowledge retrieval within software projects and their graphical representation for collaborative programming | |
WO2010147453A1 (en) | System and method for designing a gui for an application program | |
JP6870454B2 (en) | Analytical equipment, analytical programs and analytical methods | |
US11921797B2 (en) | Computer service for indexing threaded comments with pagination support | |
US20180113575A1 (en) | Gesture based semantic enrichment | |
CN113918576B (en) | Metadata management platform and management method | |
Naik et al. | JSP Custom Tag for Displaying Master-Detail Relationship in a Hierarchical Grid Control–A Case Study | |
de Carvalho et al. | Discovering frequent itemsets on uncertain data: a systematic review | |
Mahmud | Towards a data generation tool for NoSQL data stores |
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 |