Exploration meta-model conversion method and equipment based on model mapping layer, and medium

Through the model conversion method based on the model mapping layer, the problem of the integration and management of multi -source heterogeneous data in earthquake exploration in earthquake exploration is solved, and the security and robustness of the data of large seismic exploration systems are realized. Essence

CN119377194APending Publication Date: 2025-01-28BGP INC CHINA NAT PETROLEUM CORP +2

Patent Information

Application Number
CN202411941937.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The field of seismic exploration faces the challenges of integrating and managing multi-source heterogeneous data, especially in the case of large data volume, diverse types and high complexity, how to quickly achieve data access and analysis has become a difficult point.

Method used

Adopt a model conversion method based on the model mapping layer, by establishing a data collector, analyzing the data of the exploration model data, creating a metaphysical model and task tree, a relationship mapping and interface, script, and function mapping. Rendering and merger.

Benefits of technology

The creation and conversion of the metaphysical model with multi -source heterogeneous data has been enhanced, the security and robustness of the data of large seismic exploration systems are enhanced, the needs of complex data processing needs, and promoting the reuse and sharing of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377194A_ABST
    Figure CN119377194A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of seismic exploration data management, and particularly discloses an exploration element model conversion method and device based on a model mapping layer and a medium. The method disclosed by the invention comprises the following steps: firstly, establishing a data collector, and collecting exploration model data; then, traversing exploration model data to obtain a sub-model storage structure, and analyzing and extracting to obtain a sub-model association table; then, based on the sub-model association table, creating a meta-model, and creating a task tree at the same time; then, based on the meta-model, carrying out model mapping on the exploration model; finally, the task tree is rendered, and the rendered header file and the rendered execution file are combined. According to the method, meta-model creation and conversion of multi-source heterogeneous data can be carried out, addition, deletion, modification and check of model mapping codes can be rapidly realized, and the security and robustness of data of a large seismic exploration system are improved. The method can be widely applied to spatial data access and iteration of model mapping codes in the field of geophysical exploration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of seismic exploration data management, and in particular relates to an exploration metamodel conversion method, equipment and medium based on a model mapping layer. Background Art

[0002] In the field of seismic exploration, with the continuous advancement of exploration technology and the continuous expansion of exploration scope, data business will show an explosive growth trend. This growth is not only reflected in the surge in data volume, but also in the diversification of data types and the increase in data complexity.

[0003] The data involved in seismic exploration often have strong spatial characteristics, such as the propagation path of seismic waves and the spatial distribution of geological structures. These data are not only large in volume, but also require efficient spatial indexing and query mechanisms to support fast data access and analysis. With the improvement of exploration accuracy and the expansion of exploration areas, the scale and complexity of spatial data are increasing, and the requirements for spatial data management capabilities are also getting higher and higher. In addition, seismic exploration data often come from a variety of different sensors and equipment, such as seismometers, well logging instruments, satellite remote sensing, etc. These data have differences in format, accuracy, sampling rate, etc. How to effectively integrate these multi-source data to form a unified data view is a major challenge facing seismic exploration.

[0004] In this case, rapid code iteration has become an inevitable choice for the development of seismic exploration software. It is necessary to build a flexible and extensible underlying model to describe and manage the business characteristics, technical characteristics and operational characteristics of geophysical exploration software. Summary of the invention

[0005] The purpose of the present invention is to provide an exploration metamodel conversion method based on a model mapping layer, which can be used to create and convert metamodels of multi-source heterogeneous data, quickly implement the addition, deletion, modification and query of model mapping codes, and improve the security and robustness of data in large-scale seismic exploration systems;

[0006] The second object of the present invention is to provide a terminal device, which can implement an exploration metamodel conversion method based on a model mapping layer when executing its own program;

[0007] The third object of the present invention is to provide a computer-readable storage medium for storing a corresponding computer program of an exploration metamodel conversion method based on a model mapping layer.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0009] A method for transforming an exploration metamodel based on a model mapping layer comprises the following steps performed in sequence:

[0010] S1. Establish a data collector to collect different types of exploration model data;

[0011] S2, traversing the exploration model data to obtain the storage structure of each sub-model in the overall storage structure;

[0012] S3, parsing and extracting the sub-model storage structure to obtain a sub-model association table;

[0013] S4. Create a meta-model based on the sub-model association table and a task tree at the same time;

[0014] S5. Based on the metamodel, the relationship mapping of the exploration model is processed, and then the exploration model structure, metamodel structure and metamodel relationship are traversed;

[0015] S6, performing interface mapping, script mapping and function mapping of the exploration model on the results of the traversal in step S5 respectively;

[0016] S7, based on the result of step S6, using a general rendering template to render the task tree;

[0017] S8. Based on the node relationship of the task tree, the rendered header file and the execution file are merged.

[0018] As a limitation, step S1 includes the following steps performed in sequence:

[0019] S11, design the data acquisition framework and the initialization entry point of the program, obtain the information of the configuration file under the program startup path, define the plug-in loading interface LoadExtend(), and implement the framework to dynamically customize the loading of the plug-in under the execution directory;

[0020] S12, define the extended interface ExtendInterFace() in the framework, and obtain the program path and the plug-in in the file;

[0021] S13. Implement the extended interface ExtendInterFace() in the plug-in to collect exploration model data.

[0022] As a second limitation, the creation of the metamodel in step S4 includes the following steps performed in sequence:

[0023] S41, analyzing the sub-model association table and creating a meta-model that describes the minimum unit tree structure;

[0024] S42, characterizing the metamodel and generating a unit table describing the minimum attributes of the metamodel;

[0025] S43. Traverse the sub-model storage structure, obtain the foreign key association between the sub-models and write it into the unit table.

[0026] As a third limitation, the meta-model includes objects, attributes and activity tasks.

[0027] As a fourth limitation, the relationship mapping of the exploration model in step S5 includes: one-to-one relationship mapping, one-to-many relationship mapping and many-to-many relationship mapping.

[0028] As a fifth limitation, when rendering the task tree in step S7, it is necessary to read the replacement characters in the rendering template and replace the result of the traversal in step S5 into the template.

[0029] As a sixth limitation, when performing the merge process in step S8, it is necessary to traverse the current metamodel through the SQL select script, obtain the maximum existing value of the metamodel, compare the values, remove the smallest one, and complete the deduplication operation.

[0030] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned exploration metamodel conversion method based on a model mapping layer when executing the computer program.

[0031] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program is used to implement the above-mentioned exploration metamodel conversion method based on a model mapping layer.

[0032] Due to the adoption of the above technical solution, the present invention has the following technical advances compared with the prior art:

[0033] (1) By analyzing the exploration data model, the present invention constructs a meta-model that can quickly create and transform multi-source heterogeneous data, which can improve the security and robustness of data in large-scale seismic exploration systems and can be applied to spatial data access and iteration of model mapping codes;

[0034] (2) The present invention realizes exploration model data collection through the plug-in interface, which takes advantage of the modularity and extensibility of the plug-in, is easy to maintain and upgrade, and defines a general interface that supports multiple data collection methods. The same framework and plug-in code can be reused in different projects, reducing the workload of repeated development and improving the quality and stability of the code;

[0035] (3) By creating a metamodel, the present invention clearly defines the model structure and accurately describes the model features, which can enhance the correlation between models, improve the scalability of the model, support complex data processing requirements, and promote the reuse and sharing of models;

[0036] (4) The present invention provides a unified framework and specification for model mapping through the metamodel, which can quickly define and describe the mapping relationship between different models, making the creation, management and maintenance of models more efficient;

[0037] (5) The present invention first performs relationship mapping, which can clarify the association relationship in the exploration model and form a clear model framework. On this basis, the mapping of interfaces, scripts and functions can make the entire mapping process more orderly and easy to manage and maintain;

[0038] (6) The present invention uses a universal rendering template to render the task tree, so that the same rendering logic can be reused in different task trees, avoiding repeated code writing and improving development efficiency. When the rendering logic needs to be modified or updated, it is only necessary to modify these template files without having to modify them separately in each task tree, which simplifies the maintenance process and reduces maintenance costs.

[0039] The present invention belongs to the technical field of seismic exploration data management, can create and convert metamodels of multi-source heterogeneous data, quickly realize the addition, deletion, modification and query of model mapping codes, and improve the security and robustness of data in large-scale seismic exploration systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0041] In the attached picture:

[0042] Figure 1 This is a processing flow chart of Embodiment 1 of the present invention;

[0043] Figure 2 This is a design diagram of the parser solution of Embodiment 1 of the present invention;

[0044] Figure 3 A diagram describing the relationship between metamodel units in Example 1 of the present invention;

[0045] Figure 4 This is the overall structure diagram of the metamodel of Example 1 of the present invention;

[0046] Figure 5 This is a task tree diagram of Example 1 of the present invention. DETAILED DESCRIPTION

[0047] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0048] Example 1

[0049] This embodiment is a method for converting exploration metamodels based on a model mapping layer. Figure 1 As shown, the following steps are performed in sequence:

[0050] S1. Establish a data collector to collect different types of exploration model data.

[0051] In order to deal with different sources and different types of seismic exploration model data, it is necessary to establish a data collector for collection. Specifically, step S1 includes the following steps performed in sequence:

[0052] S11. Design the data acquisition framework and the program's initialization entry point System::Instance(), obtain the configuration file information under the program startup path, define the plug-in loading interface LoadExtend(), and implement the framework's dynamic custom loading of plug-ins under the execution directory.

[0053] S12. Define an extended interface ExtendInterFace() in the framework, obtain the program startup path and configuration file, parse the loading path and configuration file, and obtain the corresponding plug-in.

[0054] S13. Implement the extended interface ExtendInterFace() in the plug-in to collect exploration model data.

[0055] S2. Traverse the exploration model data to obtain the storage structure of each sub-model in the overall storage structure.

[0056] After obtaining different types of exploration model data, the overall storage structure of the exploration model is extracted, and recursive traversal is performed based on the parent-child relationship and set relationship between each model to obtain the storage structure of each child model and store it as a data stream in a format such as JSON as the initial model storage medium.

[0057] S3. Parse and extract the sub-model storage structure to obtain a sub-model association table.

[0058] To parse and extract the acquired sub-model storage structure, it is necessary to build corresponding parsers according to different model structures. The parser design scheme is as follows: Figure 2 As shown in the figure, in the XML sub-model, the sub-model structure is traversed in order to obtain different attributes of the sub-model.

[0059] For example, the character stream of the input XML document is divided into lexical units (Tokens), such as tag names, attribute names, attribute values, text content, and comments. Different sub-model structures are determined by identifying specific character patterns.

[0060] After obtaining the different attributes of the sub-models, describe the one-to-one, one-to-many, integrated and inclusive relationships between the sub-models, create a sub-model association table, and write the parsed sub-model structure into the sqlite database.

[0061] S4. Create a meta-model based on the sub-model association table and create a task tree at the same time.

[0062] With the sub-model association table, the meta-model can be created. Specifically, creating the meta-model includes the following steps in sequence:

[0063] S41. Analyze the sub-model association table and create a meta-model that describes the minimum unit tree structure. The meta-model includes objects (MetaObject), properties (MetaPorperty) and activity tasks (MetaActivity).

[0064] S42, characterize the metamodel and generate a cell table cell describing the minimum attributes of the metamodel.

[0065] S43, traverse the sub-model storage structure, obtain the foreign key association between the sub-models and write it into the unit table. The unit table describes the relationship as follows Figure 3 shown.

[0066] The metamodel constructed is as follows Figure 4 As shown in the figure, the model structure is stored in Meta*, which describes the attributes of each model (type, size, primary key, foreign key, unique key, reference). The metamodel relationship is stored in Cell, which describes the connection relationship of each model, and the method of releasing the interface to the outside world is "get set", and the data format conversion corresponds to "int—>INT".

[0067] When creating the meta-model, create a task tree based on the sub-model association table. When creating a task tree, first create a parent node, then traverse the lower-level child nodes step by step. The created task tree is as follows: Figure 5 shown.

[0068] S5. Based on the metamodel, the relationship mapping of the exploration model is processed, and then the exploration model structure, metamodel structure and metamodel relationship are traversed.

[0069] There are three types of relationship mapping for exploration models:

[0070] One-to-one relationship mapping, such as the mapping of an "ExplorationWell" entity in the model to the corresponding "MetaWell" entity in the exploration metamodel, requires ensuring that the associated attributes of the two entities accurately correspond.

[0071] One-to-many relationship mapping, for example, a "GeologicalStructure" in the model corresponds to multiple "SubLayers", which requires collection attribute processing and association establishment.

[0072] Many-to-many relationship mapping, for example, in exploration, multiple "ExplorationTeams" may participate in multiple "ExplorationProjects", and this cross-relationship needs to be accurately reflected in both the model and the meta-model.

[0073] After processing the relationship mapping, perform a sequential traversal of the exploration model structure to obtain the class name, traverse the metamodel (Meta*) structure to obtain the attribute name, and traverse the cell structure to obtain the association in the Cell.

[0074] S6. Perform interface mapping, script mapping and function mapping of the exploration model based on the results of the traversal in step S5.

[0075] After traversing the exploration model structure, metamodel structure and metamodel relationship, the return value, parameters and conversion relationship are obtained.

[0076] Next, when performing interface mapping, you need to use the return value, parameters, and conversion relationships to splice the interface. For example, get the mapping parameter column: class(Well), meta (Name, Wellname, Owner), cell (get, static string, "string permission", "char*--> string")

[0077] The splicing interface is:

[0078] static string Well::getName(string permission){std::string str(char*);};

[0079] static string Well::getWellname(string permission){std::string str(char*);};

[0080] static string Well::getOwner(string permission){std::string str(char*);};

[0081] When performing script mapping, you need to use the return value, parameters and conversion relationship to splice the script. For example, get the mapping parameter list such as: class(Well), meta (Name, Wellname, Owner), cell (get, static string, "string permission", "char*-->string")

[0082] The spliced ​​script is SELECT Name,Wellname,Owner FROM WELL;

[0083] When performing function mapping, according to the exploration model, define the corresponding preset high-performance optimization function in the Cell, using UUID as the identifier. For example, define the sorting function, id, function ("sort", "10000", " / .sort.c").

[0084] Create a sort.c file in the path and record the algorithm code.

[0085] Sort.c

[0086] int binarySearch(int arr[], int n, int target) {

[0087] int left = 0;

[0088] int right = n - 1;

[0089] while (left <= right) {

[0090] int mid = left + (right - left) / 2; / / Calculate the middle position to prevent integer overflow

[0091] if (arr[mid] == target) {

[0092] return mid;

[0093] } else if (arr[mid] < target) {

[0094] left = mid + 1;

[0095] } else {

[0096] right = mid - 1;

[0097] }

[0098] }

[0099] return -1;

[0100] }

[0101] S7. Based on the result of step S6, the task tree is rendered using a general rendering template.

[0102] The general rendering template selects a .h file or a .cpp file, and reserves the function structure, header file reference, and related macro definitions.

[0103] Take .h file as an example.

[0104] Reference related header files

[0105] #include <iostream>

[0106] #include <posgresql.h>

[0107] #include <string>

[0108] #include <vector>

[0109] #include <map>

[0110] #include <memory>

[0111] Define macro definitions

[0112] #define ORM_PROPERTY(type, name) \

[0113] type name; \

[0114] static std::string _##name##_column_name() { return #name;} \

[0115] type& get_##name() { return name;} \

[0116] const type& get_##name() const { return name;}

[0117] / / Define a base class for handling common operations such as database connections

[0118] class ORMBase {

[0119] public:

[0120] / / Define reserved attribute initialization / *$property$* / , used to process model attributes

[0121] ORMBase( / *$property$* / ) {

[0122] m_conn = sql_init(nullptr);

[0123] if (!m_conn) {

[0124] throw std::runtime_error("SQL initialization error");

[0125] }else{

[0126] throw std::runtime_error("Database connection error");}

[0127] }

[0128] ~ORMBase() {

[0129] sql_close(m_conn);

[0130] }

[0131] protected:

[0132] SQL* m_conn;

[0133] / *$property$* /

[0134] }

[0135] / / Define the subclass to reserve class initialization characters / *$class$* / , attribute initialization / *$property$* / , etc., to handle the functions of the submodel mapping class and interface mapping

[0136] Class / *$class$* / : public ORMBase {

[0137] public:

[0138] ORM_PROPERTY( / *$property$* / )

[0139] / *$class$* / ( / *$property$* / )

[0140] : ORMBase(host, user, password, database) {}

[0141] { bool insert( / *$property$* / ) {};

[0142] bool update( / *$property$* / ) {};

[0143] }

[0144] }

[0145] It should be noted that there are replacement characters in the rendering template. When rendering the task tree, it is necessary to read the replacement characters in the rendering template and replace the result of the traversal in step S5 into the template.

[0146] S8. Based on the node relationship of the task tree, the rendered header file and the execution file are merged.

[0147] When performing the merge process, you need to use the SQL select script to traverse the current metamodel, obtain the maximum existing value of the metamodel, compare the values, remove the smallest one, and complete the deduplication operation.

[0148] In summary, the method used in this embodiment can create and convert metamodels of multi-source heterogeneous data, quickly implement the addition, deletion, modification and query of model mapping codes, and improve the security and robustness of data in large-scale seismic exploration systems.

[0149] Example 2

[0150] This embodiment is a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it is used to implement an exploration metamodel conversion method based on a model mapping layer in Embodiment 1.

[0151] Example 3

[0152] This embodiment is a computer-readable storage medium. The computer-readable storage medium in this embodiment stores a computer program. When the computer program is executed by a processor, it is used to implement an exploration metamodel conversion method based on a model mapping layer in embodiment 1.

[0153] Among them, the computer-readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a computer-readable storage medium is coupled to a processor so that the processor can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can be located in an application-specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the computer-readable storage medium can also exist in a communication device as discrete components. Specifically, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk, etc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.< / memory> < / map> < / vector> < / string> < / iostream>

Claims

1. A method for transforming exploration metamodel based on model mapping layer, characterized in that: The process includes the following steps: S1. Establish a data collector to collect different types of exploration model data; S2, traversing the exploration model data to obtain the storage structure of each sub-model in the overall storage structure; S3, parsing and extracting the sub-model storage structure to obtain a sub-model association table; S4. Create a meta-model based on the sub-model association table and a task tree at the same time; S5. Based on the metamodel, the relationship mapping of the exploration model is processed, and then the exploration model structure, metamodel structure and metamodel relationship are traversed; S6, performing interface mapping, script mapping and function mapping of the exploration model on the results of the traversal in step S5 respectively; S7, based on the result of step S6, using a general rendering template to render the task tree; S8. Based on the node relationship of the task tree, the rendered header file and the execution file are merged.

2. The exploration metamodel conversion method based on the model mapping layer according to claim 1 is characterized in that: Step S1 includes the following steps performed in sequence: S11, design the data acquisition framework and the initialization entry point of the program, obtain the information of the configuration file under the program startup path, define the plug-in loading interface LoadExtend(), and implement the framework to dynamically customize the loading of the plug-in under the execution directory; S12, define the extended interface ExtendInterFace() in the framework, and obtain the program path and the plug-in in the file; S13. Implement the extended interface ExtendInterFace() in the plug-in to collect exploration model data.

3. The exploration metamodel conversion method based on model mapping layer according to claim 1 is characterized in that: The step S4 of creating a meta-model includes the following steps performed in sequence: S41, analyzing the sub-model association table and creating a meta-model that describes the minimum unit tree structure; S42, characterizing the metamodel and generating a unit table describing the minimum attributes of the metamodel; S43. Traverse the sub-model storage structure, obtain the foreign key association between the sub-models and write it into the unit table.

4. The exploration metamodel conversion method based on model mapping layer according to claim 1 or 3, characterized in that: The meta-model includes objects, attributes and activity tasks.

5. The exploration metamodel conversion method based on model mapping layer according to claim 1 is characterized in that: The relationship mapping of the exploration model in step S5 includes: one-to-one relationship mapping, one-to-many relationship mapping and many-to-many relationship mapping.

6. The exploration metamodel conversion method based on model mapping layer according to claim 1, characterized in that: When rendering the task tree in step S7, it is necessary to read the replacement characters in the rendering template, and replace the result of the traversal in step S5 into the template.

7. The exploration metamodel conversion method based on model mapping layer according to claim 1 is characterized in that: When performing the merging process in step S8, it is necessary to traverse the current metamodel through the SQL select script, obtain the maximum existing value of the metamodel, compare the values, remove the smallest one, and complete the deduplication operation.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for converting an exploration metamodel based on a model mapping layer according to any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the exploration metamodel conversion method based on the model mapping layer as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Numerical control system code automatic generation method based on field modeling

    CN101221424A

  • Method for establishing data flow integration model by using UML and XML mapping

    CN105988786A

  • Adaptive service construction system and method, and computer readable medium

    CN111061817A

  • Code modeling method and device

    CN112860314A

  • Conversion of relational databases into triplestores

    US8037108B1

Cited By

  • Reverse generation-based oil-gas exploration data transfer method, equipment and medium

    CN119760008A