CN110275890B - Data query method and system - Google Patents

Data query method and system Download PDF

Info

Publication number
CN110275890B
CN110275890B CN201910566928.9A CN201910566928A CN110275890B CN 110275890 B CN110275890 B CN 110275890B CN 201910566928 A CN201910566928 A CN 201910566928A CN 110275890 B CN110275890 B CN 110275890B
Authority
CN
China
Prior art keywords
oilfield
database
data
data table
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910566928.9A
Other languages
Chinese (zh)
Other versions
CN110275890A (en
Inventor
黄文俊
王铁成
王�华
蒋克成
项建
刘景义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunlun Digital Technology Co ltd
China National Petroleum Corp
BGP Inc
Original Assignee
BGP Inc
CNPC Beijing Richfit Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BGP Inc, CNPC Beijing Richfit Information Technology Co Ltd filed Critical BGP Inc
Priority to CN201910566928.9A priority Critical patent/CN110275890B/en
Publication of CN110275890A publication Critical patent/CN110275890A/en
Application granted granted Critical
Publication of CN110275890B publication Critical patent/CN110275890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data query method, which is used for a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oilfield database stores data table structure data, and each secondary oilfield database stores a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data; the method comprises the following steps: the method comprises the steps that a first oil field database sends a first data reading request generated according to data table structure data to a second oil field database; the first data reading request carries an identifier of a first target data table generated according to the data table structure data; the second-level oilfield database searches the first target data table from the data table set of the second-level oilfield database according to the identification of the first target data table; and the second-level oilfield database sends a first target data table to the first-level oilfield database.

Description

Data query method and system
Technical Field
The present application relates to database technologies, and in particular, to a data query method and system.
Background
With the rise of the digital management mode, the digital management is also merged into the management of the oil field development project in the field of oil field development.
In the prior art, for data management in oilfield development projects, a method of creating a data table in a project database of each oilfield development project is adopted, and then respective research and development data are filled in the data table, and data among the project databases are isolated, so that data confidentiality among different oilfield development projects is ensured. However, such a process requires a large number of data tables for the oil field development project, makes it difficult to maintain the database, and requires a large cost to maintain the database.
Disclosure of Invention
In view of this, an object of the present application is to provide a data query method and system, which are used to solve the problem of difficult maintenance caused by the huge number of data tables of the project database in the prior art. The structure maintenance of a plurality of research project databases can be simplified and unified, the requirements that data between the research project databases need to be kept secret and shared are met, the difficulty of maintaining the plurality of research project databases is reduced, and the management efficiency of a multi-research project system is improved.
In a first aspect, an embodiment of the present application provides a data query method, which is applied to a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oilfield databases store data table structure data, and each secondary oilfield database stores a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data;
the method comprises the following steps:
the primary oilfield database sends a first data reading request generated according to data table structure data to the secondary oilfield database; the first data reading request carries an identifier of a first target data table generated according to data table structure data;
the secondary oilfield database searches the first target data table from the data table set of the secondary oilfield database according to the identification of the first target data table;
and the secondary oilfield database sends the first target data table to the primary oilfield database.
According to a first aspect, the present embodiments provide a first possible implementation of the first aspect, wherein the method further comprises establishing a secondary oilfield database as follows:
the multi-level project system creates a second-level oilfield database;
searching a corresponding primary oilfield database according to the newly created secondary oilfield database;
sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database;
and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
According to the first aspect, the present application provides a second possible implementation manner of the first aspect, where when the multi-level project system creates the primary oilfield database and at least two secondary oilfield databases, the multi-level project system enters primary authority information into the primary oilfield database, and enters secondary authority information into each of the secondary oilfield databases; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner; the method further comprises the following steps:
the target secondary oil field database sends a second data reading request to other secondary oil field databases; the second data reading request carries an identifier of a second target data table generated according to the data table structure data;
after the authority owners corresponding to the other secondary oilfield databases confirm the second data reading request and agree to read, the other secondary oilfield databases search the second target data table from the data tables of the other secondary oilfield databases according to the identification of the second target data table;
and the other secondary oilfield databases send the second target data table to the target secondary oilfield database.
According to the first aspect, the present embodiments provide a third possible implementation manner of the first aspect, where the multi-level project system further includes at least one tertiary oilfield database, each tertiary oilfield database stores therein a data table set generated according to the data table structure data, and the data tables in the data table set record tertiary oilfield development data; the second-level oilfield research and development data is data obtained by summarizing the third-level oilfield research and development data;
the method further comprises the following steps:
the secondary oilfield database sends a third data reading request generated according to the data table structure data to the tertiary oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data;
the third-level oilfield database searches a third target data table from the data table set of the third-level oilfield database according to the identifier of the third target data table in the data reading request;
the third-level oilfield database sends the third target data table to the second-level oilfield database;
the secondary oilfield database summarizes the tertiary oilfield research and development data in the acquired third target data table to obtain updated secondary oilfield research and development data;
and storing the updated secondary oilfield development data in a data table with the same structure as the third target data table in the secondary oilfield database.
In a first aspect, an embodiment of the present application provides a data query system, which acts on a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oilfield database comprises a first storage module, a first request module and a first reading module, and the secondary oilfield database comprises a second storage module, a first searching module and a first feedback module;
the first storage module is used for storing data table structure data;
the first request module is used for sending a first data reading request generated according to data table structure data to the secondary oilfield database; the first data reading request carries an identifier of a first target data table generated according to data table structure data;
the first reading module is used for receiving the first target data table sent by the secondary oilfield database;
the second storage module is used for storing a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data;
the first searching module is used for searching the first target data table from the data table set of the secondary oilfield database according to the identification of the first target data table;
the first feedback module is used for sending the first target data table to the primary oilfield database.
According to a second aspect, the present embodiments provide a first possible implementation of the second aspect, wherein the multi-level project system further includes:
the creating module is used for creating a secondary oil field database; searching a corresponding primary oilfield database according to the newly created secondary oilfield database; sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database; and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
According to a second aspect, the present embodiments provide a second possible implementation manner of the second aspect, wherein the multi-level project system further includes a permission module;
the authority module is used for recording primary authority information in the primary oilfield database and recording secondary authority information in each secondary oilfield database by the multi-level project system when the primary oilfield database and at least two secondary oilfield databases are created; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner;
the first secondary oil field database further comprises:
the second request module is used for sending a second data reading request to a second-level oilfield database; the second data reading request carries an identifier of a second target data table generated according to the data table structure data;
the second reading module is used for receiving the second target data table sent by the second secondary oilfield database;
the second level oilfield database further comprises:
the authorization module is used for receiving a second data reading request sent by the first secondary oil field database, wherein the second data reading request carries an identifier of a second target data table generated according to data table structure data; and after the authority owner corresponding to the second secondary oilfield database confirms the second data reading request and agrees to read, the second secondary oilfield database searches the second target data table from the data table set of the second secondary oilfield database according to the identifier of the second target data table and sends the second target data table to the first secondary oilfield database.
According to a second aspect, the present examples provide a third possible implementation of the second aspect, wherein the multi-level project system further comprises at least one tertiary oilfield database; the tertiary oilfield database comprises:
the third storage module is used for storing a data table set generated according to the data table structure data, and three-level oilfield research and development data are recorded in a data table in the data table set; the second-level oilfield research and development data is data obtained by summarizing the third-level oilfield research and development data;
the second searching module is used for searching a third target data table from the data table set of the tertiary oilfield database according to the identifier of the third target data table in the data reading request;
the second feedback module is used for sending the third target data table to the secondary oilfield database;
the secondary oilfield database further comprises:
the third request module is used for sending a third data reading request generated according to the data table structure data to the third-level oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data;
and the third reading module is used for receiving the third target data table sent by the third-level oilfield database.
In a third aspect, an embodiment of the present application provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect and any of its possible implementations when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first aspect and any of its possible implementations.
According to the data query method and the data query system, when the primary oilfield database is established in the multi-level project system, the data table structure data is recorded, and when the secondary oilfield database is established, the data table structure data is sent to the secondary oilfield database to establish the data table set of the secondary oilfield database, namely, the data table structure of the primary oilfield database is inherited, so that data sharing and data table structure updating maintenance can be rapidly carried out according to the data table structure data. According to the data query method and the data query system, the data tables of all the oilfield databases are identical in structure, so that the data table structures of a plurality of research project databases can be maintained uniformly during updating and maintenance, and each oilfield database can quickly use data acquired from other oilfield databases.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a data query method provided in an embodiment of the present application;
FIG. 2 is a schematic flowchart of another data query method provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a data query system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In the oil field exploration and development engineering, a multi-level database is often needed, basic data are collected by a minimum development group, then data are reported upwards step by step, and data reported from a lower level are summarized or processed through data which are required to be reported to a higher level by different levels.
The embodiment of the application provides a data query method, which is used for a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oil field database stores data table structure data, and each secondary oil field database stores a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data.
In the multi-level project system, a first-level oil field database and at least two second-level oil field databases subordinate to the first-level oil field database are provided, the first-level oil field database stores data table structure data, the data table structure data comprises a data composition structure of a plurality of data tables, each second-level oil field database generates a data table set formed by combining a plurality of data tables according to the data table structure data, second-level oil field development data obtained by researching and developing corresponding second-level oil field project groups are stored in corresponding positions in corresponding data tables according to the data table structure, newly added second-level oil field development data are stored in corresponding data tables in the second-level oil field databases, real-time data uploading is not carried out on the first-level oil field database, and only when the first-level oil field database needs to check or use the partial data, data reading requests are sent by the first-level oil field database, and the secondary oil field database uploads a data table required by the primary oil field database.
The primary oil field database can be a headquarter of an oil field exploration and development enterprise, correspondingly, the secondary oil field database is each subsidiary company, and the headquarter generally only collects and uses project data obtained from projects developed by each subsidiary company.
As shown in fig. 1, the above method includes the following steps S101 to S103:
s101, the primary oil field database sends a first data reading request generated according to data table structure data to the secondary oil field database; the first data reading request carries an identifier of a first target data table generated according to the data table structure data.
The first target data table may be one data table or a plurality of data tables.
Specifically, when the primary oilfield database needs data in the first target data table in the secondary oilfield database, the data table set in the secondary oilfield database is generated according to the data table structure data in the primary oilfield database, so that the primary oilfield database only needs to add the identifier of the first target data table needed in the data table structure data in the generated first data reading request.
And S102, the secondary oilfield database searches the first target data table from the data table set of the secondary oilfield database according to the identification of the first target data table.
Specifically, the secondary oilfield database finds the data table corresponding to the identifier from the data table set according to the identifier of the first target data table carried in the first data reading request sent by the primary oilfield database.
And S103, the second oilfield database sends the first target data table to the first oilfield database.
And the second-level oilfield database sends the first target data table found in the step S102 to the oilfield database.
The method is characterized in that a multi-level project system is improved according to the table inheritance characteristic of a PostgreSQL database, a data table set of projects created under a first-level oilfield database is inherited to a second-level oilfield database, so that the first-level oilfield database can efficiently acquire data tables in the second-level oilfield database, the data tables can be directly used due to the uniform format of the data tables, and when any data table in the data table set needs to be structurally modified or the data tables need to be increased or decreased, only the structural data of the data table in the first-level oilfield database needs to be modified, the increased or decreased data is uniformly sent to all the second-level oilfield databases, and the data table set updating of all the second-level oilfield databases can be completed through one-time maintenance.
The data query enjoys the data collection query reverse to inheritance, namely all item data owned by the data query can be queried from the secondary oilfield database, while the item data of all the oilfields can be queried from the primary oilfield database, and each item can only access the data of the item.
In an optional embodiment, the method further includes establishing a secondary oilfield database as follows:
(1) establishing a secondary oil field database by the multi-level project system;
(2) searching a corresponding primary oilfield database according to the newly created secondary oilfield database;
(3) sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database;
(4) and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
Specifically, when the second-level oilfield database is created, a new second-level oilfield database is created under a multi-level project system, and then the data table structure data of the corresponding first-level oilfield database is transmitted to the newly created second-level oilfield database, and the second-level oilfield database generates a data table set according to the data table structure data, so that the second-level oilfield database is associated with the first-level oilfield database.
For example, when creating a primary oilfield database (herein named as CRP), creating all tables involved in oilfield exploration and development (creatable table a (columnAtype, columntype …), creating a table inherited from the primary oilfield database in the secondary oilfield database through data table structure data when creating any secondary oilfield database, thus establishing the association between the primary oilfield database and the secondary oilfield database, and when updating and maintaining data of tableA are needed, only modifying the table a in the oilfield database, and thus uniformly modifying the table a in all the secondary oilfield databases through one-time maintenance.
In an optional embodiment, when the multi-level project system creates the primary oilfield database and at least two secondary oilfield databases, the multi-level project system enters primary authority information into the primary oilfield database and enters secondary authority information into each of the secondary oilfield databases; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner.
Specifically, the data of each secondary oilfield database is independent and needs to be kept secret, but the primary oilfield database also needs to directly call the data of the secondary oilfield database at any time, and can be directly updated and maintained to the database table in the secondary oilfield database, so that authority information corresponding to the levels is respectively added to the primary oilfield database and all the secondary oilfield databases, and the authority information includes an authority owner, the authority owner has the authority level corresponding to the authority level information in the authority information, but for the same authority level, if the authority owner with the same authority level is not the authority owner corresponding to the current secondary oilfield database, the data cannot be directly accessed or called. The rights owner may be one or more of a person in charge of the database or a technician, which is not limited in this application. One authority owner may also be the authority owner of multiple secondary oilfield databases.
The method as shown in fig. 2 further includes the following steps S201 to S203:
s201, the target secondary oil field database sends a second data reading request to other secondary oil field databases; the second data reading request carries an identifier of a second target data table generated according to the data table structure data.
Specifically, when the target secondary oilfield database needs to call data in other secondary oilfield databases of different authority owners, the target secondary oilfield database generates a second data reading request, and because the data table structures in the data table sets of all the secondary oilfield databases are the same, the target secondary oilfield database only needs to add the identifier of the second target data table in the data table structure data into the second data reading request.
And S202, after the authority owners corresponding to the other secondary oilfield databases confirm the second data reading request and agree to read, the other secondary oilfield databases search the second target data table from the data tables of the other secondary oilfield databases according to the identification of the second target data table.
Specifically, after the other secondary oilfield databases receive the second data reading request, the second data reading request is pushed to the authority owner of the other secondary oilfield databases, and after the authority owner agrees to the target secondary oilfield database to acquire data, the other secondary oilfield databases receive the authorization of the authority owner on the second data reading request, and find out the corresponding data table from the data table set according to the identifier of the second target data table carried in the second data reading request.
And S203, the other secondary oilfield databases send the second target data table to the target secondary oilfield database.
Specifically, the other secondary oilfield databases send the second target data table required by the target secondary oilfield database to the target secondary oilfield database, so as to complete data sharing among the same-level databases.
In an optional embodiment, the multi-level project system further includes at least one third-level oilfield database, each third oilfield database stores therein a data table set generated according to the data table structure data, and the data tables in the data table set record third-level oilfield development data; the second-level oil field research and development data is data obtained by summarizing the third-level oil field research and development data.
Specifically, one or more tertiary oilfield databases may be created under each secondary oilfield database, and the set of data tables in the tertiary oilfield databases is generated according to the data table structure data to be inherited from the primary oilfield database by its corresponding secondary oilfield database, which is equivalent to the tertiary oilfield database having inherited the data table structure data from the secondary oilfield database again.
The third-level oil field database is a project group or an exploration and development department of a corresponding subsidiary company (second-level oil field database), the subsidiary company issues each task in the project to each project group or the exploration and development department, each project group or the exploration and development department carries out research, the obtained research data is stored in the third-level oil field database, and the subsidiary company can obtain the research data of each project group or the exploration and development department at any time and collect or process the research data.
The third-level oilfield database stores third-level oilfield development data obtained by research and development of a corresponding third-level oilfield research group in a corresponding position in a corresponding data table according to a data table structure, and after newly added third-level oilfield development data are stored in the data table in the corresponding third-level oilfield database, real-time data uploading is not carried out on the belonging second-level oilfield database, and only when the belonging second-level oilfield database needs to check or use the partial data, the third-level oilfield database uploads the data table required by the belonging second-level oilfield database according to a data reading request sent by the belonging second-level oilfield database.
The method further comprises the following steps:
the second-level oilfield database sends a third data reading request generated according to the data table structure data to the third-level oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data.
The third target data table may be one data table or a plurality of data tables.
Specifically, when the second-level oilfield database needs data in the third target data table in the third-level oilfield database, the data table set in the third-level oilfield database is generated according to the data table structure data in the second-level oilfield database, so that the second-level oilfield database only needs to add the identifier of the third target data table needed in the data table structure data in the generated third data reading request.
And the third-level oilfield database searches the third target data table from the data table set of the third-level oilfield database according to the identifier of the third target data table in the data reading request.
Specifically, the tertiary oilfield database finds the data table corresponding to the identifier from the data table set of the tertiary oilfield database according to the identifier of the third target data table carried in the third data reading request sent by the secondary oilfield database.
And the third target data table is sent to the second-level oilfield database by the third-level oilfield database.
And the secondary oil field database summarizes the tertiary oil field research and development data in the acquired third target data table to obtain updated secondary oil field research and development data.
And storing the updated second-level oilfield research and development data in a data table with the same structure as the third target data table in the second-level oilfield database.
Specifically, the secondary oilfield database merges the data in the third target data table with the data in the data table corresponding to the third target data table in the secondary oilfield database, or performs operations such as replacement to update the secondary oilfield research and development data.
In the multi-level project system, more multi-level oil field databases can be provided, in the embodiment, only the relation between the three-level oil field database and the two-level oil field database is illustrated, and the relation between the lower-level oil field database and the upper-level oil field database can be recurred by referring to the relation between the three-level oil field database and the two-level oil field database.
According to the oilfield project database architecture, each research project corresponds to one secondary oilfield database, independence and safety of data among all levels of oilfield databases are achieved, mouse structure maintenance of a plurality of research projects is unified and simplified after inheritance characteristics of a data table are used, meanwhile, data sharing requirements are met after all levels of databases have corresponding authorities, the requirement that research project data need to be isolated and shared is met, and the harsh requirements of multiple aspects in management and maintenance are reduced.
The embodiment of the present application also provides a data query system, as shown in fig. 3, which acts on a multi-level project system 30; the multi-level project system 30 includes a primary oilfield database 31 and at least two secondary oilfield databases 32; the primary oilfield database 31 comprises a first storage module 311, a first request module 312 and a first reading module 313, and the secondary oilfield database 32 comprises a second storage module 321, a first search module 322 and a first feedback module 323;
a first storage module 311, configured to store data table structure data;
a first request module 312, configured to send a first data reading request generated according to the data table structure data to the secondary oilfield database; the first data reading request carries an identifier of a first target data table generated according to the data table structure data;
a first reading module 313, configured to receive the first target data table sent by the secondary oilfield database;
a second storage module 321, configured to store a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data;
a first searching module 322, configured to search the first target data table from the data table set of the secondary oilfield database according to the identifier of the first target data table;
the first feedback module 323 is configured to send the first target data table to the primary oilfield database.
In an alternative embodiment, the multi-level project system 30 further comprises:
a creating module 301, configured to create a secondary oilfield database; searching a corresponding primary oilfield database according to the newly created secondary oilfield database; sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database; and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
In an alternative embodiment, the multi-level project system 30 further includes a rights module 302;
the authority module 302 is configured to, when the primary oilfield database and at least two secondary oilfield databases are created, enter primary authority information in the primary oilfield database and enter secondary authority information in each of the secondary oilfield databases by the multi-level project system; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner;
the first secondary oil field database further comprises:
a second request module 324, configured to send a second data reading request to the second secondary oilfield database; the second data reading request carries an identifier of a second target data table generated according to the data table structure data;
a second reading module 325, configured to receive the second target data table sent by the second secondary oilfield database;
the second level oilfield database further comprises:
an authorization module 326, configured to receive a second data reading request sent by the first secondary oilfield database, where the second data reading request carries an identifier of a second target data table generated according to data in a data table structure; and after the authority owner corresponding to the second-level oilfield database confirms the second data reading request and agrees to read, the second-level oilfield database searches the second target data table from the data table set of the second-level oilfield database according to the identifier of the second target data table and sends the second target data table to the first-level oilfield database.
In an alternative embodiment, the multi-level project system 30 further includes at least one tertiary oilfield database 33; the tertiary oilfield database 33 includes:
the third storage module 331 is configured to store a data table set generated according to the data table structure data, where three-level oilfield development data are recorded in a data table in the data table set; the second-level oil field research and development data is data obtained by summarizing the third-level oil field research and development data;
a second searching module 332, configured to search, according to an identifier of a third target data table in the data reading request, the third target data table from the data table set of the third-level oilfield database;
a second feedback module 333, configured to send the third target data table to the secondary oilfield database;
the secondary oilfield database 32 further includes:
a third request module 327, configured to send a third data reading request generated according to the data table structure data to the tertiary oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data;
a third reading module 328, configured to receive the third target data table sent by the third-level oilfield database.
Corresponding to the data query method in fig. 1, an embodiment of the present application further provides a computer device 400, as shown in fig. 4, the device includes a memory 401, a processor 402, and a computer program stored on the memory 401 and executable on the processor 402, where the processor 402 implements the data query method when executing the computer program.
Specifically, the memory 401 and the processor 402 can be general memories and processors, which are not specifically limited herein, and when the processor 402 runs a computer program stored in the memory 401, the data query method can be executed, so that the problem of difficulty in maintenance due to a huge number of project database data tables in the prior art is solved.
Corresponding to the data query method in fig. 1, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the data query method.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, when a computer program on the storage medium is run, the data query method can be executed, and the problem of difficulty in maintenance caused by the huge number of project database data tables in the prior art is solved. According to the data query method and the data query system, the data tables of all the oilfield databases are identical in structure, so that the data table structures of a plurality of research project databases can be maintained uniformly during updating and maintenance, and each oilfield database can quickly use data acquired from other oilfield databases.
In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A data query method is characterized in that the method acts on a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oilfield databases store data table structure data, and each secondary oilfield database stores a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data;
the method comprises the following steps:
the primary oilfield database sends a first data reading request generated according to data table structure data to the secondary oilfield database; the first data reading request carries an identifier of a first target data table generated according to data table structure data;
the secondary oilfield database searches the first target data table from the data table set of the secondary oilfield database according to the identification of the first target data table;
and the secondary oilfield database sends the first target data table to the primary oilfield database.
2. The method of claim 1, further comprising building a secondary field database as follows:
the multi-level project system creates a second-level oilfield database;
searching a corresponding primary oilfield database according to the newly created secondary oilfield database;
sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database;
and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
3. The method of claim 1, wherein the multi-level project system enters primary authority information in the primary oilfield database and secondary authority information in each of the secondary oilfield databases when creating the primary oilfield database and at least two secondary oilfield databases; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner; the method further comprises the following steps:
the target secondary oil field database sends a second data reading request to other secondary oil field databases; the second data reading request carries an identifier of a second target data table generated according to the data table structure data;
after the authority owners corresponding to the other secondary oilfield databases confirm the second data reading request and agree to read, the other secondary oilfield databases search the second target data table from the data tables of the other secondary oilfield databases according to the identification of the second target data table;
and the other secondary oilfield databases send the second target data table to the target secondary oilfield database.
4. The method of claim 1, wherein the multi-level project system further comprises at least one tertiary oilfield database, each tertiary oilfield database having stored therein a set of data tables generated from the data table structure data, the data tables in the set of data tables having tertiary oilfield development data recorded therein; the second-level oilfield research and development data is data obtained by summarizing the third-level oilfield research and development data;
the method further comprises the following steps:
the secondary oilfield database sends a third data reading request generated according to the data table structure data to the tertiary oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data;
the third-level oilfield database searches a third target data table from the data table set of the third-level oilfield database according to the identifier of the third target data table in the data reading request;
the third-level oilfield database sends the third target data table to the second-level oilfield database;
the secondary oilfield database summarizes the tertiary oilfield research and development data in the acquired third target data table to obtain updated secondary oilfield research and development data;
and storing the updated secondary oilfield development data in a data table with the same structure as the third target data table in the secondary oilfield database.
5. A data query system, operable on a multi-level project system; the multi-level project system comprises a first-level oilfield database and at least two second-level oilfield databases; the primary oilfield database comprises a first storage module, a first request module and a first reading module, and the secondary oilfield database comprises a second storage module, a first searching module and a first feedback module;
the first storage module is used for storing data table structure data;
the first request module is used for sending a first data reading request generated according to data table structure data to the secondary oilfield database; the first data reading request carries an identifier of a first target data table generated according to data table structure data;
the first reading module is used for receiving the first target data table sent by the secondary oilfield database;
the second storage module is used for storing a data table set generated according to the data table structure data; the data storage formats of the data table sets in each secondary oilfield database are the same, and the data tables in the data table sets record secondary oilfield research and development data;
the first searching module is used for searching the first target data table from the data table set of the secondary oilfield database according to the identification of the first target data table;
the first feedback module is used for sending the first target data table to the primary oilfield database.
6. The system of claim 5, wherein the multi-level project system further comprises:
the creating module is used for creating a secondary oil field database; searching a corresponding primary oilfield database according to the newly created secondary oilfield database; sending the data table structure data of the searched primary oil field database to the newly created secondary oil field database; and the newly created secondary oilfield database generates a data table set of the newly created secondary oilfield database according to the data table structure data.
7. The system of claim 5, wherein the multi-level project system further comprises a rights module;
the authority module is used for recording primary authority information in the primary oilfield database and recording secondary authority information in each secondary oilfield database by the multi-level project system when the primary oilfield database and at least two secondary oilfield databases are created; the first-level authority information and the second-level authority information respectively comprise authority level information and an authority owner;
the first secondary oil field database further comprises:
the second request module is used for sending a second data reading request to a second-level oilfield database; the second data reading request carries an identifier of a second target data table generated according to the data table structure data;
the second reading module is used for receiving the second target data table sent by the second secondary oilfield database;
the second level oilfield database further comprises:
the authorization module is used for receiving a second data reading request sent by the first secondary oil field database, wherein the second data reading request carries an identifier of a second target data table generated according to data table structure data; and after the authority owner corresponding to the second secondary oilfield database confirms the second data reading request and agrees to read, the second secondary oilfield database searches the second target data table from the data table set of the second secondary oilfield database according to the identifier of the second target data table and sends the second target data table to the first secondary oilfield database.
8. The system of claim 5, wherein the multi-level project system further comprises at least one tertiary oilfield database; the tertiary oilfield database comprises:
the third storage module is used for storing a data table set generated according to the data table structure data, and three-level oilfield research and development data are recorded in a data table in the data table set; the second-level oilfield research and development data is data obtained by summarizing the third-level oilfield research and development data;
the second searching module is used for searching a third target data table from the data table set of the tertiary oilfield database according to the identifier of the third target data table in the data reading request;
the second feedback module is used for sending the third target data table to the secondary oilfield database;
the secondary oilfield database further comprises:
the third request module is used for sending a third data reading request generated according to the data table structure data to the third-level oilfield database; the third data reading request carries an identifier of a third target data table generated according to the data table structure data;
and the third reading module is used for receiving the third target data table sent by the third-level oilfield database.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of the preceding claims 1-4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method of any one of the preceding claims 1 to 4.
CN201910566928.9A 2019-06-27 2019-06-27 Data query method and system Active CN110275890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910566928.9A CN110275890B (en) 2019-06-27 2019-06-27 Data query method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910566928.9A CN110275890B (en) 2019-06-27 2019-06-27 Data query method and system

Publications (2)

Publication Number Publication Date
CN110275890A CN110275890A (en) 2019-09-24
CN110275890B true CN110275890B (en) 2021-01-15

Family

ID=67962467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910566928.9A Active CN110275890B (en) 2019-06-27 2019-06-27 Data query method and system

Country Status (1)

Country Link
CN (1) CN110275890B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182080A (en) * 2020-09-22 2021-01-05 中国建设银行股份有限公司 Data integration system and data processing method based on data integration system
CN113590635A (en) * 2021-08-23 2021-11-02 中国银行股份有限公司 Data analysis system and method for overseas multiple banks

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN108280172A (en) * 2018-01-20 2018-07-13 郑州幼儿师范高等专科学校 A kind of science of law inquiry system
CN108399175A (en) * 2017-02-07 2018-08-14 阿里巴巴集团控股有限公司 A kind of storage of data, querying method and its device
CN108563727A (en) * 2018-03-30 2018-09-21 新华三大数据技术有限公司 Data processing method and device
CN109522365A (en) * 2018-10-18 2019-03-26 四川大学 Tables of data and its method of field Distributed access control in information management system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7664795B2 (en) * 2003-09-26 2010-02-16 Microsoft Corporation Apparatus and method for database migration
CN103440290A (en) * 2013-08-16 2013-12-11 曙光信息产业股份有限公司 Big data loading system and method
US10380185B2 (en) * 2016-02-05 2019-08-13 Sas Institute Inc. Generation of job flow objects in federated areas from data structure
CN107562964A (en) * 2017-10-17 2018-01-09 山东省农业科学院玉米研究所 A kind of crops pedigree construction method, database, retroactive method and system
CN108829867A (en) * 2018-06-22 2018-11-16 深圳云之家网络有限公司 A kind of intelligent acquisition method and system of big data
CN109376173A (en) * 2018-11-08 2019-02-22 郑州云海信息技术有限公司 A kind of data query method, apparatus, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399175A (en) * 2017-02-07 2018-08-14 阿里巴巴集团控股有限公司 A kind of storage of data, querying method and its device
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN108280172A (en) * 2018-01-20 2018-07-13 郑州幼儿师范高等专科学校 A kind of science of law inquiry system
CN108563727A (en) * 2018-03-30 2018-09-21 新华三大数据技术有限公司 Data processing method and device
CN109522365A (en) * 2018-10-18 2019-03-26 四川大学 Tables of data and its method of field Distributed access control in information management system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A TRANSFORMATION FROM AN OBJECT DATABASE;Kobchai Niyomthum 等;《IEEE Southeastcon》;20040303;7-11 *
电力行业项目管理***分层架构设计与实现;陈强;《自动化与仪器仪表》;20170125(第1期);59-61 *

Also Published As

Publication number Publication date
CN110275890A (en) 2019-09-24

Similar Documents

Publication Publication Date Title
CN104794123B (en) A kind of method and device building NoSQL database indexes for semi-structured data
CN111459985B (en) Identification information processing method and device
CN105488050B (en) A kind of more indexing means of database, apparatus and system
CN105144159A (en) HIVE table links
CN109683911B (en) System for realizing automatic application deployment and influence analysis
US20210303537A1 (en) Log record identification using aggregated log indexes
CN107807932B (en) Hierarchical data management method and system based on path enumeration
CN103902623A (en) Method and system for accessing files on a storage system
CN102725755A (en) Method and system of file access
CN110275890B (en) Data query method and system
WO2022083436A1 (en) Data processing method and apparatus, and device and readable storage medium
US20190362016A1 (en) Frequent pattern analysis for distributed systems
US11366821B2 (en) Epsilon-closure for frequent pattern analysis
CN112925757A (en) Method, equipment and storage medium for tracking operation log of intelligent equipment
CN112912870A (en) Tenant identifier conversion
CN106649602A (en) Way, device and server of processing business object data
CN111209252A (en) File metadata storage method and device and electronic equipment
CN114840487A (en) Metadata management method and device for distributed file system
KR101171551B1 (en) Event history memory device, event history tracking device, event history memory method, computer-readable recording medium recording event history memory program and computer-readable recording medium recording data structure
CN115329011A (en) Data model construction method, data query method, data model construction device and data query device, and storage medium
Chitti et al. Keeping data inter-related in a Blockchain
CN111339245B (en) Data storage method, device, storage medium and equipment
US20190079987A1 (en) Distributed data storage
GB2524073A (en) Communication method and system for accessing media data
CN113849482A (en) Data migration method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: No. 189, Fanyang West Road, Zhuozhou City, Baoding City, Hebei Province 072750

Patentee after: BGP INC., CHINA NATIONAL PETROLEUM Corp.

Patentee after: Kunlun Digital Technology Co.,Ltd.

Address before: No. 189, Fanyang West Road, Zhuozhou City, Baoding City, Hebei Province 072750

Patentee before: BGP INC., CHINA NATIONAL PETROLEUM Corp.

Patentee before: RICHFIT INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220325

Address after: Room 1501, Gehua building, No.1 Qinglong Hutong, Dongcheng District, Beijing

Patentee after: Kunlun Digital Technology Co.,Ltd.

Patentee after: CHINA NATIONAL PETROLEUM Corp.

Address before: No. 189, Fanyang West Road, Zhuozhou City, Baoding City, Hebei Province 072750

Patentee before: BGP INC., CHINA NATIONAL PETROLEUM Corp.

Patentee before: Kunlun Digital Technology Co.,Ltd.