A data management method, system, medium and device of a pipeline device
By constructing a virtualized management model for pipeline equipment, the problem of the lack of a unified data model for pipeline equipment information management was solved, achieving unified data management and flexibility, improving interoperability between systems and reducing maintenance costs.
Patent Information
- Application Number
- CN202310375576.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2043-04-10
AI Technical Summary
The lack of a unified data model and key technologies for pipeline equipment information management both domestically and internationally leads to difficulties in data interoperability and sharing between systems, low overall integrability, and high upgrade and maintenance costs.
A virtualized management model for pipeline equipment is constructed. Meta information is extracted through the data source access service interface, virtual tables are built, application query requests are parsed, query result trees are generated, and subqueries are executed layer by layer to achieve unified data management.
It enables unified management of pipeline equipment data, improves data interoperability and flexibility between systems, and reduces upgrade and maintenance costs.
Smart Images

Figure CN116578614B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of natural gas pipeline network, and particularly relates to a data management method, system, medium and equipment of pipeline equipment. BACKGROUND
[0002] In asset-intensive pipeline transportation enterprises, equipment and facility management is one of the main production and operation activities. With the increasingly fierce market competition, the upgrading of legal regulations on the service time, safety, environmental health of equipment and facilities, each enterprise has carried out research on the integrity technology and application of station equipment and facilities, hoping to ensure the safe, healthy, reliable and effective operation of equipment and facilities in the whole life cycle through optimizing equipment and facility maintenance, and improve the investment return ability.
[0003] Among them, the equipment basic information management is the core of the station equipment and facility integrity management. The basic information is to collect, store and maintain the whole life cycle information data related to the equipment or equipment unit, including the static attribute information of the equipment and the dynamic information such as fault history, inspection and maintenance history. All equipment activities are carried out around the equipment / unit. However, the pipeline equipment information or equipment unit management at home and abroad has not formed a unified data model and its key technology implementation. The data architecture, implementation model, key technology, description interface, management method and data flow adopted are inconsistent, resulting in inconsistent problems such as data interconnection and sharing, process docking between systems, low overall integrability of the system, high upgrade and maintenance cost and the like. SUMMARY
[0004] The technical problem to be solved by the application is to provide a data management method, system, medium and equipment of pipeline equipment.
[0005] The technical solution of the application to solve the above technical problem is as follows: a data management method of pipeline equipment, comprising:
[0006] Step 1, according to the requirement of the equipment virtualization management model for a plurality of pipeline equipment, extracting the meta information of the physical data source corresponding to the requirement through a data source access service interface, and constructing at least one virtual table according to the meta information; wherein the virtual table is a data structure model describing the pipeline virtual equipment object, and the virtual table includes the data attributes of a plurality of pipeline equipment and the set of data mapping relationship between the attributes of a plurality of pipeline equipment;
[0007] Step 2, obtaining an application query request, preprocessing and judging the application query request to obtain a judgment result;
[0008] Step 3, when the judgment result is normal, according to the virtual table corresponding to the application query request, the data structure model of the virtual table corresponding to the application query request is parsed, and a parsing result is generated; according to the data mapping relationship between the attributes corresponding to the parsing result, a subquery for a lower layer reference virtual table is generated layer by layer; and according to the application query request and all subqueries, a query result tree is formed;
[0009] Step 4, according to the hierarchical structure of the query result tree, the subqueries in the query result tree or the application query request are executed layer by layer from bottom to top, and a final query result is generated according to the results of the subqueries or the application query request.
[0010] The application has the advantages that: the application aims at the fact that a unified data model and key technology implementation have not been formed for domestic and foreign pipeline equipment information or equipment unit management; by researching key technologies in pipeline equipment data management, a virtualized equipment data architecture model and an object-oriented data management development method are constructed; common models and methods are provided for establishing a general pipeline equipment data model, standards and methods; by constructing the virtualized management model, unified management of data is realized; in addition, different models can be constructed according to different requirements of construction of each virtualized management model, so that the scheme is more flexible.
[0011] On the basis of the above technical solution, the application can be further improved as follows.
[0012] Further, the meta-information includes:
[0013] The process of pre-processing and judging the application query request to obtain a judgment result is as follows:
[0014] The application query request is subjected to validity checking of query syntax; when there is no exception in the checking, a normal result is generated; and when there is an exception in the checking, an abnormal result is generated.
[0015] Further, the process of generating a subquery for a lower layer reference virtual table layer by layer according to the data mapping relationship between the attributes corresponding to the parsing result is as follows:
[0016] It is judged whether the data mapping relationship between the pipeline equipment corresponding to the parsing result contains a lower layer virtual table or not; a virtual table judgment result is generated; when the virtual table judgment result is no, the parsing is stopped, and a query result tree is generated according to the application query request; when the virtual table judgment result is yes, a subquery is generated for the lower layer virtual table corresponding to the virtual table judgment result being yes; the lower layer virtual table is parsed, a parsing result of the lower layer virtual table is generated, and the parsing result of the lower layer virtual table is processed as the parsing result, until the virtual table judgment result is no.
[0017] Further, the specific process of the layer-by-layer execution of the subquery in the query result tree or the application of the query request is:
[0018] determining whether the query result tree is N layers, N being a positive integer greater than 1, when the determination result is no, directly performing data extraction in a preset physical data source library according to the application query request, when the determination result is yes, obtaining a subquery in the Nth layer of the query result tree, and executing the corresponding data set obtained by accessing the subquery according to the Nth layer of the subquery, executing the subquery, obtaining a subquery in the N-1th layer of the query result tree, repeatedly obtaining subqueries in different layers, and extracting corresponding data according to subqueries in different layers, until the data corresponding to all layers is obtained.
[0019] Another technical solution for solving the above technical problems is as follows: a data management system of a pipeline device, comprising:
[0020] The extraction module is configured to extract meta information of a physical data source corresponding to a requirement for a device virtualization management model of a plurality of pipeline devices through a data source access service interface according to the requirement, and construct at least one virtual table according to the meta information; wherein the virtual table is a data structure model describing a pipeline virtual device object, and the virtual table includes data attributes of a plurality of pipeline devices and a set of data mapping relationships between the attributes of the plurality of pipeline devices;
[0021] The judgment module is configured to obtain an application query request, and pre-process the application query request to obtain a judgment result;
[0022] The query module is configured to, when the judgment result is normal, parse a data structure model of a virtual table corresponding to the application query request according to the virtual table corresponding to the application query request, generate a parsing result, generate a subquery for a lower referenced virtual table layer by layer according to a data mapping relationship between pipeline devices corresponding to the parsing result, and form a query result tree according to the application query request and all subqueries.
[0023] The result module is configured to execute a subquery in the query result tree or the application query request layer by layer from the bottom to the top according to a hierarchical structure of the query result tree, and generate a final query result according to a result of the subquery or the application query request.
[0024] The application has the beneficial effects that: the application aims at the fact that a unified data model and key technology implementation thereof are not formed for domestic and foreign pipeline equipment information or equipment unit management, key technologies in pipeline equipment data management are researched, a virtualized equipment data architecture model and an object-oriented data management development method are constructed, a common model and method are provided for establishing a general pipeline equipment data model, standards and methods, through construction of the virtualized management model, unified management of data is realized, in addition, different models can also make the scheme more flexible according to different requirements of construction of each virtualized management model.
[0025] Further, the process of pre-processing the application query request to obtain a judgment result is:
[0026] The application query request is subjected to validity checking of query syntax, a normal result is generated when there is no exception in checking, and an exception result is generated when there is an exception in checking.
[0027] Further, the process of generating a subquery for a lower layer reference virtual table layer by layer according to the data mapping relationship between the attributes corresponding to the analysis result is:
[0028] It is judged whether the data mapping relationship between the pipeline equipment corresponding to the analysis result contains a lower layer virtual table, a virtual table judgment result is generated, when the virtual table judgment result is no, the analysis is stopped, and a query result tree is generated according to the application query request; when the virtual table judgment result is yes, a subquery is generated for the lower layer virtual table corresponding to the virtual table judgment result as yes, the lower layer virtual table is analyzed to generate an analysis result of the lower layer virtual table, and the analysis result of the lower layer virtual table is processed as an analysis result until the virtual table judgment result is no.
[0029] Further, the specific process of executing the subquery in the query result tree or the application query request layer by layer is:
[0030] It is judged whether the query result tree is N layers, N is a positive integer greater than 1, when the judgment result is no, data extraction is directly performed in a preset physical data source library according to the application query request, when the judgment result is yes, a subquery in the Nth layer of the query result tree is acquired, a corresponding data set is accessed according to the subquery in the Nth layer, the subquery is executed, a subquery in the N-1th layer of the query result tree is acquired, and the subquery in different layers is repeatedly acquired, and corresponding data is extracted according to the subquery in different layers, until acquisition of data corresponding to all layers is completed.
[0031] Another technical solution of the application to solve the above technical problems is as follows: a storage medium, the storage medium stores instructions, when a computer reads the instructions, the computer executes the method according to any one of the above.
[0032] The application has the beneficial effects that: the application aims at that the pipeline equipment information or equipment unit management at home and abroad has not formed a unified data model and its key technology implementation, through the research on the key technology in the pipeline equipment data management, the virtualization equipment data architecture model and the object-oriented data management development method are constructed, the common model and method for establishing the general pipeline equipment data model, standard and method are provided, through the construction of the virtualization management model, the unified management of data is realized, in addition, different models can also make the scheme more flexible according to the different requirements of the construction of each virtualization management model.
[0033] Another technical solution for solving the above technical problems of the application is as follows: an electronic device comprising the above storage medium and a processor for executing instructions in the storage medium.
[0034] The application has the beneficial effects that: the application aims at that the pipeline equipment information or equipment unit management at home and abroad has not formed a unified data model and its key technology implementation, through the research on the key technology in the pipeline equipment data management, the virtualization equipment data architecture model and the object-oriented data management development method are constructed, the common model and method for establishing the general pipeline equipment data model, standard and method are provided, through the construction of the virtualization management model, the unified management of data is realized, in addition, different models can also make the scheme more flexible according to the different requirements of the construction of each virtualization management model. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 A flowchart is provided for the data management method of the pipeline equipment of the application;
[0036] Figure 2 A structural framework diagram is provided for the data management system of the pipeline equipment of the application;
[0037] Figure 3 A device virtualization model display diagram is provided for the data management method of the pipeline equipment of the application;
[0038] Figure 4 A virtualization implementation architecture display diagram of equipment management is provided for the data management method of the pipeline equipment of the application;
[0039] Figure 5 An application access flow example schematic diagram is provided for the data management method of the pipeline equipment of the application;
[0040] Figure 6 A componentized object and flow schematic diagram is provided for the data management method of the pipeline equipment of the application;
[0041] Figure 7 The unit equipment component structure schematic diagram provided for the data management method embodiment of the pipeline equipment of the present application;
[0042] Figure 8 The virtual table generation example schematic diagram provided for the data management method embodiment of the pipeline equipment of the present application. DETAILED DESCRIPTION
[0043] The principles and features of the present application are described below, and the examples are only used to explain the present application, and are not used to limit the scope of the present application.
[0044] As shown in Figure 1 A data management method of pipeline equipment, comprising:
[0045] Step 1, according to the requirement of the equipment virtualization management model for a plurality of pipeline equipment, extracting the meta information of the physical data source corresponding to the requirement through the data source access service interface, and constructing at least one virtual table according to the meta information; wherein the virtual table is a data structure model describing the pipeline virtual equipment object, and the virtual table includes the data properties of a plurality of pipeline equipment and the set of data mapping relationship between the properties of a plurality of pipeline equipment;
[0046] Step 2, obtaining an application query request, preprocessing the application query request to obtain a judgment result;
[0047] Step 3, when the judgment result is normal, according to the virtual table corresponding to the application query request, analyzing the data structure model of the virtual table corresponding to the application query request to generate an analysis result, according to the data mapping relationship between the properties corresponding to the analysis result, generating a subquery for the lower layer reference virtual table layer by layer, and forming a query result tree according to the application query request and all subqueries;
[0048] Step 4, according to the hierarchical structure of the query result tree, from bottom to top, layer by layer executing the subquery in the query result tree or the application query request, and generating the final query result according to the result of the subquery or the application query request.
[0049] In some possible embodiments, the present application does not form a unified data model and key technology implementation for domestic and foreign pipeline equipment information or equipment unit management. By researching the key technologies in pipeline equipment data management, a virtualization equipment data architecture model and object-oriented data management development method are constructed, which provides common models and methods for establishing general pipeline equipment data models, standards and methods. Through the construction of the virtualization management model, the unified management of data is realized. In addition, different models can also make the scheme more flexible according to the different requirements of the construction of each virtualization management model.
[0050] It should be noted that the attributes mentioned in the virtual table include the attributes of the pipe virtual device and also include the attributes of the physical pipe device. For ease of understanding, the overall architecture of the present solution is first described as shown in Figure 3 The device information physical data resource on the pipe network includes the device-related data sources stored in the form of relational databases, file systems, network services, etc., and is uniformly abstracted into a device virtual data model represented by a relational structure based on virtualization computing technology. The virtual data model is a business-oriented data model constructed based on physical data or other virtual data (collections) using SQL computing tools according to the shared or device business data needs of an enterprise or industry. The virtual data models can be mutually referenced and shared in application domains, and the operations and access between the virtual data models fully comply with the SQL standard. This virtual data model mainly solves three key problems:
[0051] Location transparency: The user or application program only needs to specify a unique identifier to access the resource, and the change of the physical location of the resource has no effect on the application program.
[0052] Resource heterogeneity: The resources are virtualized and represented by relational data structures, which solves the heterogeneity of data patterns, data formats, data sequences, and access interfaces, and can fully utilize the simplicity and convenience of relational data operations. For example, network service access and combination can be implemented through SQL-like statements or interfaces.
[0053] Dynamic integration and change: Through the reference and mapping between relational data structures, the data view required by the business is integrated from multiple physical data sources, and integrated information that cannot be provided by a single information source is realized. When the demand changes, attributes can be dynamically added, deleted, or modified, and the mapping between attributes can be adjusted to enable the original program to be normally executed without changing the application code.
[0054] As shown in Figure 4 The virtualization implementation architecture. The architecture includes a data unified acquisition layer, a data processing layer, an application layer, and an interaction layer, i.e., an application portal, through which user requests and feedback are realized. The core purpose of virtualization is to directly connect the physical device information and the data model of the application demand, and to seamlessly integrate.
[0055] Resource layer (device information) - the naked resource of various gas pipeline device types, including the storage of heterogeneous relational databases of various devices, file systems, XML documents, and Web Services network services.
[0056] Access service (data unified acquisition layer) - encapsulating device information resource access interfaces into Web Services to improve the flexibility of resource access to gas application platforms and sharing, and the port security of network-based resource access.
[0057] Virtualization kernel - the virtual kernel supports the management and control of the full life cycle operation process of the general virtual data model, and the specific functions and modules include:
[0058] Metadata management. Distributed location and query, caching, dynamic binding, consistency maintenance, dynamic autonomous change of data mode and reference relationship.
[0059] Preprocessing of input / output data. Assigning default values to null attributes, null references, or attributes whose reference targets do not exist; obtaining required system variables or context; uploading / downloading of attached files.
[0060] Resource binding and access. Binding is to obtain the basic information and current runtime state of the device data resource, and to apply for temporary occupation and use of the resource by the current user.
[0061] Decomposition / analysis of data query requests. According to the reference definition between virtual data, the query of virtual data is decomposed into combined queries of multiple other virtual data sources (physical data sources), and the query results are aggregated into intermediate results or final results.
[0062] Constraint checking. Whether the inserted data belongs to the legal predefined value domain, whether it meets the virtual primary key definition, whether it is allowed to be empty, and whether it meets the uniqueness definition of the virtual layer.
[0063] Access control. Check whether the current user can access the current resource, and the access control conditions and accessible domain definition.
[0064] Data batch processing. Support multi-threaded large batch data segmentation reading and batch writing functions to ensure the efficiency of large batch data reading and writing in limited hardware environment, such as real-time device operation data collection and access.
[0065] Data buffering. Implementing buffering of intermediate results and final results of dynamic aggregation processing of multiple device data sources, improving the sharing degree of data processing results, speeding up user access efficiency, while ensuring user controllable data refresh and consistency processing.
[0066] Runtime management and support system. Runtime session process state management, runtime data maintenance, exception handling, coordination and protection of access to resources.
[0067] Cross-domain access service. In a multi-node collaborative service environment, when it is necessary to bind and access virtual data resources of other application domains, community nodes are located and queried.
[0068] Business demand data specification construction and deployment platform - device data virtualization model and implementation architecture is a general data model and method suitable for pipeline transportation fields such as oil and gas, which has no direct binding relationship with specific application scenarios. For the actual instantiation of application requirements of specific application scenarios, based on the device data virtualization model and implementation architecture support, using the tools and interfaces provided by the business demand data specification construction and deployment platform, the data mode specification and business data mode required by enterprise or industry application are constructed. For example, according to the business needs of each layer of users, the pipeline data virtualization model and the reference relationship are constructed layer by layer, and the basic data model management functions such as data mode construction and registration, shared relationship setting, permission setting, and virtual file system creation are realized.
[0069] So far, the process steps involved in the present scheme are further explained. In step 1, according to the requirements of the device virtualization management model for multiple virtual devices, the meta information of the device physical data source corresponding to the requirements is extracted through the data source access service interface, including database name, data table, table field attribute, attribute type, length, primary key and foreign key constraint conditions, etc. And at least one virtual table is constructed according to the source information; wherein the virtual table represents: the specific process of the reference relationship between the data mapping between each pipeline device corresponding virtual device object and the remaining each pipeline device corresponding virtual device object can refer to the following example:
[0070] Device virtualization management model: the essence of virtualization technology lies in the division and abstraction of computer system hardware and software resources. The high complexity of computer system is controlled through various levels of abstraction, and each layer abstracts the bottom layer through the interface between layers, hides the specific implementation of the bottom layer and provides a simpler interface to the upper layer. The device virtualization management model is to construct the data structure of the corresponding business data model for the data required by the business on the basis of the physical device, and establish a mapping relationship between the attributes of these business data model data structure and the data of the physical device.
[0071] The data source access service interface is an interface program for accessing the physical device database.
[0072] When the system is actually deployed and applied, the physical resources (i.e. device bare resources) of various device information layers of the existing system need to be extracted first, and the data source access service interface in the data unified acquisition layer is used to extract the metadata of the device information.
[0073] Input to the data source access service interface: the database driver of the device source, the database address, the database table, the user and password for access;
[0074] Output of the data source access service interface: Metadata of physical device table information: table name, field name, type, length, primary and foreign key constraints, optional values, etc.
[0075] For example, the requirement of a device virtualization management model is: the current operating status of all devices.
[0076] Extract the basic information of the device corresponding to the requirement (which is a table in the physical database) and the device operating status information (another table in another physical database) through the data source intervention service interface (i.e., the source information of the physical data source mentioned in step 1).
[0077] Based on the requirements of the device virtualization management model, the obtained metadata information is used to construct virtualized device objects (i.e., device virtual tables, also called virtual tables), including the description information (metadata) of the virtual device object table and the reference relationship of data mapping between virtual device objects at each layer.
[0078] For example, building on the previous example, the requirement for equipment virtualization management is to establish a real-time equipment operating status data model. This model involves joining the equipment basic information table (equipment number, name, type, and online date) and the equipment operating status table (operating temperature, pressure, and flow rate) based on the equipment ID number to form a virtual equipment table. (Select basic information table.number, basic information table.name, basic information table.type, basic information table.online date, operating status table.temperature, operating status table.pressure, operating status table.flow rate where basic information table.number = operating status table.number).
[0079] like Figure 5 As shown, step 1 can be summarized as follows: This solution processes data through virtual device table modeling. Based on the output of the data source access service interface, and according to the application requirements of the device virtualization model (including device data models of nested sub-devices and components, and corresponding business data models such as maintenance, operation status, and emergency handling), a device virtual table and its reference relationships are constructed. The metadata information of the device virtual table is stored in the metadata database for parsing and decomposition of queries based on the device virtual table during application query access.
[0080] Step 2: Obtain the application query request, perform preprocessing and judgment on the application query request, and obtain the judgment result. The specific process can be referred to in the following example:
[0081] Accept request: application initiates SQL standard request to the access interface of the virtualization model implementation platform; the SQL request is for the device virtual table, not the device physical layer resource.
[0082] Preprocessing: the platform virtualization access interface preprocesses the access request, including analysis and standardization of the application input query syntax and parameters, validity check, etc.
[0083] For example: in the application query request, for the value type attribute of the query virtual table, check whether the input value is a valid value type; for the date type attribute of the query virtual table, check whether the date format input in the query request conforms to the definition format requirement of the virtual table attribute, etc.
[0084] Determine whether the format of the application query request is consistent with the standard query request, that is, standardize the query syntax in the application query request or perform validity check.
[0085] Step 3, when the determination result is normal, search in the at least one virtual table according to the SQL statement corresponding to the application query request to generate a query result tree. The specific process can be referred to the following example:
[0086] Obtain the metadata of the virtual table object corresponding to the query request and its reference relationship through the access to the metadata database, and bind the virtual table object in the memory to facilitate the cooperative access control between multiple threads; parse the metadata of the device virtual table object to be queried.
[0087] According to the reference relationship of the virtual table object model and the defined constraint check condition, continue to obtain, bind, parse and query optimization decomposition of the metadata of the child virtual table layer by layer downward according to the reference relationship, form the optimized subquery object of each layer, and judge whether the data cache of the subquery object corresponding to the child virtual table exists in the cache database. If the corresponding data result set of the subquery exists in the cache, and the branch corresponding to the child virtual table does not continue to be decomposed.
[0088] That is, in a recursive mode, obtain each referenced child virtual table object and its metadata layer by layer, bind the child virtual table object in the memory, and parse and query optimization analysis. Until all levels of child virtual table objects of the device table accessed by the application are obtained according to the virtual model definition, all involved child virtual table objects are bound, and all optimized subqueries are parsed and decomposed.
[0089] Step 4, according to the hierarchical structure of the query result tree, parse layer by layer, and generate the parsing result of each layer. Integrate the parsing result of each layer to generate the query result.
[0090] For each layer parsed subquery request, the subquery engine starts from the bottom layer, under the condition of meeting the access control, directly access the cache query to obtain the data result set of the sub virtual table. If the cache does not satisfy the corresponding data result set of the query, the data access interface is called directly through the distributed parallel mode (or batch query processing mode) to access the service interface of the local node or other nodes, so as to access the physical layer device resource and obtain each subquery data result set. If necessary, the result set is cached in the cache database.
[0091] The query request parsing / decomposition module further decomposes the virtual table according to the third step of the hierarchical decomposition relationship and the corresponding optimized subquery, and performs summary calculation layer by layer, and caches the summary calculation result of the layer to the cache database, until the final data set required by the application is summarized, and the final result set is returned to the application layer.
[0092] For example, based on the device basic information (i.e. Figure 3 The device information in the physical database is a table) and the device running state information (another table in another physical database); the requirement of device virtualization management is to establish a device running real-time state data model, which is to propose the device basic information table (device number, name, type, online month) and the device running state table (running temperature, pressure, flow) through meta information respectively, to form virtual table 1 and virtual table 2. Based on the two virtual tables, the device ID number is used to join the two tables to form the third device virtual table, which includes the attributes of number, name, type, online month, temperature, pressure, running state and flow. These attributes are respectively mapped to the corresponding attributes of virtual table 1 and virtual table 2.
[0093] The query submitted by the business is for virtual table 3: Select number, name, type, online month, temperature, pressure, flow from virtual table 3 where number = 001;
[0094] After the mapping reference relationship of virtual table 3 is parsed and decomposed, the subquery SQL1 for virtual table 1 is generated: Select number, name, type, online month from virtual table 1 where number = 001;
[0095] And the subquery SQL2 for virtual table 2: Select temperature, pressure, flow from virtual table 2 where number = 001;
[0096] And the subquery SQL3 for virtual table 3:
[0097] Select virtual table 1. number, virtual table 1. name, virtual table 1. type, virtual table 1. online year and month, virtual table 2. temperature, virtual table 2. pressure, virtual table 2. flow where virtual table 1. number = virtual table 2. number.
[0098] When executed, first, the queries SQL1 and SQL2 are executed, which can be executed in parallel, and two corresponding query result sets dataset1 and dataset2 (temporary tables in two cache databases) are obtained, then based on the two result sets, SQL3 is executed, and query result set Dataset3 (also a temporary table) is obtained, based on the temporary table, the query request submitted by the application is executed again, and the final summary result can be obtained; optionally, through the optimization analysis processing of SQL, the query result set equivalent to the query submitted by the application can also be obtained by directly executing SQL3, and it is not necessary to execute the query submitted by the application again.
[0099] As shown in the embodiment, Figure 8 Figure 8 The left side is a virtual table model, each virtual view is a virtual table, which has multiple attributes (each attribute has: attribute name, type, length, and mapping reference to the attributes of other virtual tables), such as the attributes of the virtual view Figure 1 part of the attributes of the virtual view Figure 2 are mapped to the view Figure 8 The right side is a query tree structure generated based on the virtual table tree structure and optimized,
[0100] Preferably, in any of the above embodiments, the source information comprises:
[0101] Basic information, state information, and maintenance records of the pipeline equipment.
[0102] Preferably, in any of the above embodiments, the process of pre-processing and judging the application query request to obtain a judgment result is:
[0103] Performing validity checking on the query syntax of the application query request, generating a normal result when the checking is normal, generating an abnormal result when the checking is abnormal, and issuing a warning information according to the abnormal result.
[0104] Preferably, in any of the above embodiments, the process of searching in the at least one virtual table according to the SQL statement corresponding to the application query request to generate a query result tree is:
[0105] According to the SQL statement, a first virtual table search is performed in the at least one virtual table, and a first judgment is performed on the first search result. If the first judgment result is that the virtual table exists in the cache database, the search is completed, and a query result tree is generated according to the SQL statement and the first search result;
[0106] If the first judgment result is that the virtual table does not exist in the cache database, a second virtual table search of the SQL statement is performed in the virtual table corresponding to the first search result, until the virtual table exists in the cache database, the search is completed, and a query result tree is generated according to the SQL statement and the query result, the query result including the first search result and the second search result.
[0107] It should be noted that, as shown in Figure 6 The object-oriented data management method is an interface method for creating, accessing, managing and controlling data from the perspective of the user interface (including end users and application developers), which is based on the device virtualization model and implementation architecture of the system, and provides an operation method, process and specification for componentized encapsulation of business processes. The traditional DAO is a Data Access Object, which is a service layer provided between business logic and database resources. DAO abstractly encapsulates all access operations to data sources in a public API. In programming language, it is to establish an interface that defines all transaction methods to be used in the application. In this application, when interaction with the data source is needed, the interface is used, and a separate class is written to implement the interface logically corresponding to the specific data storage entity object.
[0108] The business virtual data model is based on object-oriented program development technology, encapsulates business object instances containing a plurality of sub-objects, data attributes, methods and processes, and directly provides data and service interfaces for application development, which will greatly reduce the complexity and cycle cost of application development.
[0109] Wherein: the sub-object set is a referenced sub-object set, each sub-object is a component, device or sub-unit object; the attribute is a data model self-defined attribute item (including geometric elements), which is attribute data obtained based on SQL calculation of underlying physical device information; the method is a defined attribute-based operation function, which realizes an operation of a specific function; the flow is a business self-defined ordered calling process based on a series of virtual data object methods, and the flow embodies a complete business process, which can define methods of ordered calling across multiple virtual business object entities. For example, a business data model instance realizing device monitoring can call the alarm method of the alarm business object entity to start the alarm process when the attribute meets a certain condition (such as the current value of a certain monitoring attribute item meeting the alarm condition); after the alarm, the diagnosis method of the diagnosis business model entity is called to automatically search the most suitable diagnosis report suggestion in the knowledge base, thereby realizing a complete set of business processes of alarm monitoring, alarm and maintenance suggestion.
[0110] The present application realizes homogeneous access of heterogeneous data through virtualization management of device integrity data, and realizes componentization encapsulation of business flow through an object-oriented method. Compared with the prior art, the present application has the following obvious advantages:
[0111] (1) The present application is a general model and method for pipeline device integrity data management, has the characteristics of modularization, standardization and independent expansion, can solve the problems of pipeline data island, inconsistent data format, binding with platform and tool, etc. existing in the existing scheme, can be easily compatible with the existing pipeline operation business at all levels, and is convenient for realizing the replacement and upgrading of the existing technology in a low-cost way.
[0112] (2) The present application is a general implementation model, method and tool set with independent intellectual property rights, which is suitable for various types of business of long-distance and city fuel gas pipelines in China, and is abstracted based on years of domestic pipeline construction service experience and comprehensive requirements of various scenes.
[0113] (3) The present application realizes the digitization of the integrity management of pipelines at all levels in China through a set of specific self-defined model implementation tools, and improves the intelligentization and operation efficiency of the pipeline network as a whole.
[0114] Example 1, as Figure 7The unit device is a business-centered object in the pipeline business of the station type, which is combined and integrated for management. One unit device can be composed of several sub-unit devices (a kind of embedded hierarchical reference relationship, that is, the reference relationship between the device virtual tables in the device virtual data model), each sub-unit device can be composed of several devices, and each device can be composed of several components, thereby forming a hierarchical collection of devices, that is, a device unit. Based on the device virtualization data model, the device virtual table and its reference relationship can be used to construct a complex hierarchical unit device data object model, so as to realize the fine management of various oil and gas pipeline complex devices according to the business needs through the editable data model. For the access of a unit device, the detailed information of the internal nested devices or components, and the corresponding running state, maintenance and emergency information and other multi-dimensional data can be accessed.
[0115] The data structure constructed by the virtualization model and the object-oriented technology can be used to conveniently construct the unit device object required by the business in a component mode, so as to ensure the convenience and flexibility of the business development.
[0116] 1. Customizing unit device object element classes and attributes: The unit device object is a virtualized composite data structure based on physical device information and according to the virtualization hierarchical model. The composition of the device can be expanded, and the attributes of the internal device can be customized.
[0117] 2. Single-mapping device data management: The hierarchical nested reference relationship between the virtual tables is defined, that is, the unit device virtual table, the virtual tables of the other devices and components in the embedded layers, and the data correlation between the virtual tables in each layer is realized through the unit ID (Unit ID). The physical basic information of the device can belong to different business systems, and can be distributed and deployed in a heterogeneous manner in the logical layer. The single-mapping data storage, change and query interfaces are provided.
[0118] The unit device object is a combined composite object composed of multiple basic device element objects, is stored and managed by a unit device object physical table structure, and has a unified unit object number. The same unit object instance is described by a row record in the combined object structure table, and shares the same UnitID identifier with the associated (sub) device object (a record in the corresponding device object table). The unit device combined object is presented as a mapping element in the pipeline map, and the internal constituent element map or topology can be viewed. When an application query is performed, the unit device virtual table is accessed based on the UnitID to obtain unit device information, and the lower-level sub-device virtual table is queried through the UnitID to obtain the corresponding associated sub-device, and the process is repeated to query all embedded component information of a unit device.
[0119] As shown in Figure 2 A data management system of a pipeline device includes:
[0120] The extraction module 100 is configured to extract source information of a physical data source corresponding to a requirement of a device virtualization management model of a plurality of virtual devices through a data source access service interface according to the requirement, and construct at least one virtual table according to the source information; wherein the virtual table represents a reference relationship between data mapping between a virtual device object corresponding to each pipeline device and a virtual device object corresponding to each remaining pipeline device;
[0121] The judgment module 200 is configured to obtain an application query request, pre-process the application query request to obtain a judgment result;
[0122] The query module 300 is configured to, when the judgment result is normal, search in the at least one virtual table according to an SQL statement corresponding to the application query request to generate a query result tree;
[0123] The result module 400 is configured to parse each layer according to a hierarchical structure of the query result tree, generate a parsing result of each layer, integrate the parsing result of each layer, and generate a query result.
[0124] In some possible embodiments, the present application aims at the fact that there is no unified data model and key technology implementation for domestic and foreign pipeline device information or device unit management. By researching key technologies in pipeline device data management, a virtualization device data architecture model and an object-oriented data management development method are constructed, common models and methods are provided for establishing a general pipeline device data model, standards and methods, and by constructing a virtualization management model, unified management of data is realized. In addition, different models can also make the scheme more flexible according to different requirements of construction of each virtualization management model.
[0125] Preferably, in any of the above embodiments, the source information comprises:
[0126] The basic information, state information and maintenance record of the pipeline equipment.
[0127] Preferably, in any of the above embodiments, the virtual table represents a reference relationship of data mapping between the virtual equipment object corresponding to any pipeline equipment and the virtual equipment objects corresponding to other pipeline equipments.
[0128] Preferably, in any of the above embodiments, the process of pre-processing the application query request to obtain a judgment result is as follows:
[0129] The validity of the query syntax of the application query request is checked, and a normal result is generated when the check is normal, and an abnormal result is generated and a warning information is sent according to the abnormal result when the check is abnormal.
[0130] Preferably, in any of the above embodiments, the process of searching in the at least one virtual table according to the SQL statement corresponding to the application query request to generate a query result tree is as follows:
[0131] First virtual table search is performed in the at least one virtual table according to the SQL statement, and first query result is judged, if the first judgment result is that the virtual table exists in the cache database, the search is completed, and a query result tree is generated according to the SQL statement and the first query result;
[0132] If the first judgment result is that the virtual table does not exist in the cache database, second virtual table search of the SQL statement is performed in the virtual table corresponding to the first query result, until the virtual table exists in the cache database, the search is completed, and a query result tree is generated according to the SQL statement and the query result, the query result comprises the first query result and the second query result.
[0133] Another technical solution of the present application to solve the above technical problems is as follows: a storage medium, the storage medium stores instructions, when a computer reads the instructions, the computer executes the method as described in any of the above embodiments.
[0134] In some possible implementations, this invention addresses the lack of a unified data model and key technology implementation for pipeline equipment information or equipment unit management both domestically and internationally. By researching key technologies in pipeline equipment data management, it constructs a virtualized equipment data architecture model and an object-oriented data management development method. This provides common models and methods for establishing general pipeline equipment data models, standards, and methods. Through the construction of a virtualized management model, unified data management is achieved. Furthermore, constructing different models according to the different needs of each virtualized management model can make the solution more flexible.
[0135] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: an electronic device, including the above-mentioned storage medium and a processor that executes the instructions in the above-mentioned storage medium.
[0136] In some possible implementations, this invention addresses the lack of a unified data model and key technology implementation for pipeline equipment information or equipment unit management both domestically and internationally. By researching key technologies in pipeline equipment data management, it constructs a virtualized equipment data architecture model and an object-oriented data management development method. This provides common models and methods for establishing general pipeline equipment data models, standards, and methods. Through the construction of a virtualized management model, unified data management is achieved. Furthermore, constructing different models according to the different needs of each virtualized management model can make the solution more flexible.
[0137] Readers should understand that in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0138] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the method embodiments described above are merely illustrative. For instance, the division of steps is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple steps may be combined or integrated into another step, or some features may be ignored or not executed.
[0139] If the above method is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or all or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0140] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data management method for pipeline equipment, characterized in that, include: Step 1: Based on the requirements of the equipment virtualization management model for multiple pipeline devices, extract the metadata of the physical data source corresponding to the requirements through the data source access service interface, and construct at least one virtual table based on the metadata; wherein, the virtual table is a data structure model describing the pipeline virtual device object, and the virtual table includes a collection of data attributes of multiple pipeline devices and data mapping relationships between attributes; Step 2: Obtain the application query request, preprocess and judge the application query request, and obtain the judgment result; Step 3: When the judgment result is normal, based on the virtual table corresponding to the application query request, parse the data structure model of the virtual table corresponding to the application query request, generate the parsing result, and generate subqueries for the lower-level referenced virtual tables layer by layer according to the data mapping relationship between the attributes corresponding to the parsing result. A query result tree is formed based on the application query request and all subqueries. Step 4: Based on the hierarchical structure of the query result tree, execute the subqueries or application query requests in the query result tree layer by layer from bottom to top, and generate the final query results based on the results of the subqueries or application query requests. The process of generating subqueries for lower-level referenced virtual tables layer by layer based on the data mapping relationship between the attributes corresponding to the parsing results is as follows: Each parsing result is used to determine whether the data mapping relationship between pipeline devices contains a lower-level virtual table. A virtual table determination result is generated. If the virtual table determination result is negative, parsing stops, and a query result tree is generated based on the application query request. If the virtual table determination result is positive, a subquery is generated for the lower-level virtual table corresponding to the virtual table determination result. The lower-level virtual table is parsed to generate a lower-level virtual table parsing result. The lower-level virtual table parsing result is then processed as the parsing result until the virtual table determination result is negative.
2. The data management method for pipeline equipment according to claim 1, characterized in that, The process of preprocessing and judging the application query request to obtain the judgment result is as follows: The query request is checked for the validity of the query syntax. If no abnormality is found, a normal result is generated. If an abnormality is found, an abnormal result is generated.
3. The data management method for pipeline equipment according to claim 1, characterized in that, The specific process of executing subqueries in the query result tree or the application query request layer by layer is as follows: Determine whether the query result tree has N levels, where N is a positive integer greater than 1. If the determination result is negative, directly extract data from the preset physical data source database according to the application query request. If the determination result is positive, obtain the subquery of the Nth level in the query result tree, and execute the corresponding data set obtained by accessing the subquery of the Nth level. Execute the subquery, obtain the subquery of the (N-1)th level in the query result tree, and repeat the process of obtaining subqueries of different levels and extracting corresponding data according to the subqueries of different levels until all data corresponding to all levels are obtained.
4. A data management system for pipeline equipment, characterized in that, include: The extraction module is used to: extract the metadata of the physical data source corresponding to the requirements of the equipment virtualization management model for multiple pipeline devices through the data source access service interface, and construct at least one virtual table based on the metadata; wherein, the virtual table is a data structure model describing the pipeline virtual device object, and the virtual table includes a collection of data attributes of multiple pipeline devices and data mapping relationships between attributes; The judgment module is used to: obtain application query requests, preprocess and judge the application query requests, and obtain judgment results; The query module is used to: when the judgment result is normal, parse the data structure model of the virtual table corresponding to the application query request based on the virtual table corresponding to the application query request, generate the parsing result, generate subqueries for the lower-level referenced virtual tables layer by layer according to the data mapping relationship between the attributes corresponding to the parsing result, and form a query result tree based on the application query request and all subqueries; The results module is used to: execute subqueries or application query requests in the query results tree from bottom to top, according to the hierarchical structure of the query results tree, and generate the final query results based on the results of the subqueries or application query requests; The process of generating subqueries for lower-level referenced virtual tables layer by layer based on the data mapping relationship between the attributes corresponding to the parsing results is as follows: Each parsing result is used to determine whether the data mapping relationship between pipeline devices contains a lower-level virtual table. A virtual table determination result is generated. If the virtual table determination result is negative, parsing stops, and a query result tree is generated based on the application query request. If the virtual table determination result is positive, a subquery is generated for the lower-level virtual table corresponding to the virtual table determination result. The lower-level virtual table is parsed to generate a lower-level virtual table parsing result. The lower-level virtual table parsing result is then processed as the parsing result until the virtual table determination result is negative.
5. A data management system for pipeline equipment according to claim 4, characterized in that, The process of preprocessing and judging the application query request to obtain the judgment result is as follows: The query request is checked for the validity of the query syntax. If no abnormality is found, a normal result is generated. If an abnormality is found, an abnormal result is generated.
6. A data management system for pipeline equipment according to claim 4, characterized in that, The specific process of executing subqueries in the query result tree or the application query request layer by layer is as follows: Determine whether the query result tree has N levels, where N is a positive integer greater than 1. If the determination result is negative, directly extract data from the preset physical data source database according to the application query request. If the determination result is positive, obtain the subquery of the Nth level in the query result tree, and execute the corresponding data set obtained by accessing the subquery of the Nth level. Execute the subquery, obtain the subquery of the (N-1)th level in the query result tree, and repeat the process of obtaining subqueries of different levels and extracting corresponding data according to the subqueries of different levels until all data corresponding to all levels are obtained.
7. A storage medium, characterized in that, The medium stores instructions that, when read by a computer, cause the computer to execute the method as described in any one of claims 1 to 3.
8. An electronic device, characterized in that, Includes the storage medium of claim 7 and a processor that executes instructions within the storage medium.
Citation Information
Patent Citations
Data query method and device for data virtualization server and storage medium
CN114064707A
Query-based searching using a virtual table
US20130254171A1