Method and device for intelligently accessing data in heterogeneous databases

By dividing the data model into different table types and determining the target table type for operation based on the operation request, code reuse and efficiency improvement are achieved. This solves the problem of low efficiency in managing the same data model with different database storage structures and improves database response speed.

CN113741889BActive Publication Date: 2024-11-19BEIJING DEEPZERO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110990051.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-26
Publication Date
2024-11-19
Estimated Expiration
2041-08-26

AI Technical Summary

Technical Problem

Existing technologies suffer from low development efficiency and non-reusable code when managing the same data model and requiring different database storage structures, and cannot meet the needs of rapid data query.

Method used

The metadata in the data model is divided into different table types, including one key-many values ​​and one key-one value tables. By detecting data operation requests, the target table type is determined and the corresponding operation method is called, thereby achieving code reuse and improving database response speed.

Benefits of technology

By reusing code and intelligent access to table types, development efficiency and database response speed are improved, solving the problem of low efficiency in managing the same data model across different database storage structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113741889B_ABST
    Figure CN113741889B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for intelligently accessing data in a heterogeneous database. The method comprises: dividing metadata in a data model into different table types, wherein the data model is a unique identifier of the data and a collection of non-repetitive description information for describing data attributes; the different table types correspond to different operation methods; when a data operation request is detected, determining a target table type corresponding to the data operation request from the different table types; determining an operation method corresponding to the target table type, and performing an operation corresponding to the operation method on the metadata in the data model. The present invention solves the technical problems of low development efficiency and non-reusability of code when using different databases to store different table types to manage the same data model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of databases, and in particular to a method and device for intelligently accessing data in heterogeneous databases. Background Art

[0002] In the database field, for the same data model, different business needs have different requirements for the storage structure of the data table and the database. For data that needs to be stored for a long time, the number of stored items needs to be compressed, and as much data as possible needs to be placed in a row of records, so there is no requirement for the response speed of the database. In some businesses, projects need to query the corresponding data within 1 second or even more demanding time, so general databases and storage structures cannot meet this requirement, and faster data storage media and key-value storage formats are needed. In response to these requirements, the general solution is to set up a set of corresponding codes for each database and each storage structure, which is complex and difficult to manage. Different data models need to be developed separately, which is inefficient.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiment of the present invention provides a method and device for intelligently accessing data in a heterogeneous database, so as to at least solve the technical problems of low development efficiency and non-reusability of codes when using different databases to store different table types to manage the same data model.

[0005] According to one aspect of an embodiment of the present invention, a method for intelligently accessing data in a heterogeneous database is provided, comprising: dividing metadata in a data model into different table types, wherein the data model is a unique identifier of the data and a non-repetitive collection of descriptive information for describing data attributes; different table types correspond to different operation methods; when a data operation request is detected, determining a target table type corresponding to the data operation request from different table types; determining an operation method corresponding to the target table type, and performing an operation corresponding to the operation method on the metadata in the data model.

[0006] Optionally, the table type includes at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, and the second type is that one key corresponds to one value.

[0007] Optionally, the operation method includes at least one of the following: adding, modifying, deleting, and querying.

[0008] Optionally, determining the operation method corresponding to the target table type includes: calling an interface method corresponding to the target table type; and determining the operation method corresponding to the interface method.

[0009] Optionally, after calling the interface method corresponding to the target table type, the method further includes: creating a factory class, the factory class being used to define a drive class; and calling an operation method corresponding to the table type through the drive class.

[0010] Optionally, determining the operation method corresponding to the interface method includes: encapsulating the operation method into an interface class, wherein the interface class includes an interface class for implementing at least the following: adding, modifying, deleting, and querying methods.

[0011] Optionally, before determining the target table type corresponding to the data operation request from different table types, the method also includes: extracting a task identifier from the data operation request, and determining the task type of the target task corresponding to the task identifier based on the task identifier; judging whether there is a type identical to the task type in the preset list; and if the judgment result is yes, performing the operation corresponding to the data operation request on the data in the specified data model, wherein the specified data model is: a database dedicated to storing data corresponding to the task type, and the database adopts a storage structure corresponding to the task type.

[0012] According to another aspect of an embodiment of the present invention, there is provided a device for intelligently accessing data in a heterogeneous database, comprising: a division module for dividing metadata in a data model into different table types, wherein the data model is a unique identifier of the data and a non-repetitive set of descriptive information for describing data attributes; different table types correspond to different operation methods; a first determination module for determining a target table type corresponding to a data operation request from different table types when a data operation request is detected; a second determination module for determining an operation method corresponding to the target table type; and an operation module for performing operations corresponding to the operation methods on the metadata in the data model.

[0013] According to another aspect of an embodiment of the present invention, there is provided a device for intelligently accessing data in a heterogeneous database, comprising: a memory for storing program instructions; a processor for executing program instructions for implementing the following functions: dividing metadata in a data model into different table types, wherein the data model is a unique identifier of the data and a collection of non-repetitive description information for describing data attributes; different table types correspond to different operation methods; when a data operation request is detected, determining a target table type corresponding to the data operation request from different table types; determining an operation method corresponding to the target table type, and performing an operation corresponding to the operation method on the metadata in the data model.

[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, which includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above method for intelligently accessing data in heterogeneous databases.

[0015] In the embodiment of the present invention, the data is stored as different table types, and the purpose of code reuse is achieved by calling the operation methods of different table types, thereby achieving the technical effect of improving efficiency and database response speed, and further solving the technical problems of low development efficiency and non-code reuse when using different databases to store different table types to manage the same data model. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0017] Figure 1 is a structural diagram of a device for intelligently accessing data from a heterogeneous database according to an embodiment of the present invention;

[0018] Figure 2 is a flow chart of a method for intelligently accessing data in a heterogeneous database according to an embodiment of the present invention;

[0019] Figure 3 is a flow chart of a method for calling an interface according to an embodiment of the present invention;

[0020] Figure 4 is a flowchart of a calling operation method according to an embodiment of the present invention;

[0021] Figure 5 is a structural diagram of a device for intelligently accessing data from a heterogeneous database according to an embodiment of the present invention; DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] The embodiment of the present invention discloses a data access toolkit, which can facilitate users to manage the metadata of the data model under a determined data model. The tool is used to divide the metadata of the confirmed data model into a onekey-many values ​​data compression table type and a one key-one value data query table type. Data stored in these two table types can be added, modified, deleted, and queried in multiple different databases at the same time. When it is necessary to operate on the data, the table type of the data storage is first determined, and the corresponding operation is performed on the data by calling the operation method corresponding to the table type.

[0025] When the deployment environment changes, and the database and data table types used change, you only need to change the configuration file to call different interfaces and implementation methods, without having to update the code, saving time.

[0026] Based on the above principles, an embodiment of the present application provides a device for intelligently accessing data in a heterogeneous database. Figure 1 is a structural diagram of a device for intelligently accessing data from a heterogeneous database according to an embodiment of the present invention. Figure 1 As shown, the device includes:

[0027] The memory 102 is used to store program instructions. In this embodiment, the instructions refer to data access instructions.

[0028] The processor 104 is used to execute the program instructions stored in the memory 102, and the program instructions are used to implement the following functions: divide the metadata in the data model into different table types, wherein the data model is a unique identifier of the data and a collection of non-repetitive description information for describing the data attributes, and the metadata is information describing the data attributes, which refers to the data information stored in the table in the database; different table types correspond to different operation methods, wherein the table type includes at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, corresponding to a one key-manyvalues ​​table, and the second type is one key corresponds to one value, corresponding to a one key-one value table, the key is a unique identifier given to the stored data object in the database, and the value is the data contained in the table in the database; when a data operation request is detected, determine the target table type corresponding to the data operation request from different table types, wherein the operation request includes at least one of the following: add, modify, delete, query; determine the operation method corresponding to the target table type, and perform the operation corresponding to the operation method on the metadata in the data model.

[0029] When the device detects an operation of adding, modifying, deleting, or querying data in a database, it determines from the above two table types in which table type the data is stored. If the data is stored in the format of a first type of table, the first type of table, i.e., the one key-many values ​​table, is called to perform the adding, modifying, deleting, and querying methods corresponding to the table; if the data is stored in the format of a second type of table, the second type of table, i.e., the one key-one value table, is called to perform the adding, modifying, deleting, and querying methods corresponding to the table.

[0030] In the above operating environment, an embodiment of the present invention provides an embodiment of a method for intelligently accessing data in a heterogeneous database. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] Figure 2 is a flow chart of a method for intelligently accessing data in a heterogeneous database according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0032] Step S202, dividing the metadata in the data model into different table types, wherein the data model is a collection of unique identifiers of data and non-repetitive description information for describing data attributes; different table types correspond to different operation methods;

[0033] Step S204, when a data operation request is detected, determining a target table type corresponding to the data operation request from different table types;

[0034] Step S206: determine the operation method corresponding to the target table type, and perform the operation corresponding to the operation method on the metadata in the data model.

[0035] Through the above steps, the data is stored as different table types, and the purpose of code reuse is achieved by calling the operation methods of different table types, thereby achieving the technical effect of improving efficiency and database response speed, and further solving the technical problems of low development efficiency and non-code reuse when using different databases to store different table types to manage the same data model.

[0036] In step S202, the division process includes: obtaining metadata in the data model; writing the metadata into the table one by one. For example, the user attributes include {name; age; gender}, and the data of {Zhang San; 24; male} is written into the one key-one value table, then the user's name "Zhang San" is read first, and the data is stored in the "name" column, then "24" is read, and the data is stored in the "age" column, and finally the user's gender "male" is read, and the data is stored in the "gender" column. All user attributes are stored in the corresponding columns of the table, and a data division is completed.

[0037] In step S202, metadata is information describing data attributes. In a database, it refers to data information stored in a table. For example, when describing the attributes of a user, the information may be the user's name, age, gender, etc. When describing the attributes of an item, the information may be the serial number, production date, production location, etc. A data model is a set of data that describes transaction attributes. For example, in the data model of student grades, the data model consists of the student's student ID and the grades of several subjects, where the student ID is used as a unique identifier. The definition of the data model is a unique identifier of the data and a set of non-repetitive description data attributes.

[0038] In step S202, the table type includes at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, i.e., a one key-many values ​​table, and the second type is a one key corresponding to one value, i.e., a one key-one value table, wherein the key is a unique identifier assigned to a stored data object in the database, and the value is the data contained in the table in the database. For example, when a data model containing student grades is stored in the table, the student's student ID number can be used as the unique identifier of the data model, that is, the student's student ID number column is used as the key of the entire table, and the specific value of the student ID number is used as the value corresponding to the key.

[0039] In step S204, it is detected whether there is an operation request, including: monitoring the interface corresponding to the target table type, if the database accesses the interface corresponding to the target table type and calls the interface method corresponding to the target table type, it is considered that an operation request is made.

[0040] In step S204, determining the target table type corresponding to the data operation request includes: maintaining a mapping relationship between local operations and table types; obtaining an operation type corresponding to the operation request; and matching the operation type with operations corresponding to different table types.

[0041] In step S206, determining the operation method corresponding to the target table type includes: different table types correspond to different methods of adding, modifying, deleting, and querying; obtaining the operation method called by the target table type; and searching for corresponding execution steps according to the called operation method.

[0042] In step S206, the operation method includes at least one of the following: adding, modifying, deleting, and querying.

[0043] When determining the operation method corresponding to the target table type in step S206, Figure 3 As shown, the method also includes:

[0044] Step S302, calling the interface method corresponding to the target table type;

[0045] Step S304: determine the operation method corresponding to the interface method.

[0046] Before calling the interface method corresponding to the target table type in step S302, the operations of adding, modifying, deleting, and querying corresponding to the first type and the second type of tables are first abstracted into interface methods, and the interface methods include the first interface method and the second interface method. Popular databases on the market, such as MySQL, SQL Server, Oracle, Redis, PostgreSQL, HBase, and Hologres, call and implement the above interface methods. When adding, modifying, deleting, and querying the stored data, first determine in which table type the data is stored. If the data is stored in the format of the first type of table, call the first type of table. That is, the first interface method corresponding to the one key-many values ​​table, and then determine the adding, modifying, deleting, and querying methods corresponding to the first interface method. If the data is stored in the format of the second type of table, call the second type of table, that is, the second interface method corresponding to the one key-one value table, and then determine the adding, modifying, deleting, and querying methods corresponding to the second interface method.

[0047] After calling the interface method corresponding to the target table type in step S302, Figure 4 As shown, the method also includes:

[0048] Step S402, creating a factory class, the factory class is used to define the drive class;

[0049] Step S404: calling the operation method corresponding to the table type through the drive class.

[0050] The operation methods include at least one of the following: add, modify, delete, and query. The factory class is used to implement the factory mode. The factory mode mainly provides a transition interface for creating objects in the database so as to shield and isolate the specific process of creating objects to achieve the purpose of improving flexibility. The factory class maps different database types to their applicable table types one by one, generates the drive class, and implements the operation methods of calling data in different table types through the drive class. When the user performs an operation, only drive.select() and drive.update() operations are needed to complete the functions of more than 3,000 lines of code before.

[0051] When determining the operation method corresponding to the interface method in step S304, the method further includes: encapsulating the operation method into an interface class, wherein the interface class includes an interface class for implementing at least the following methods: add, modify, delete, and query. Encapsulation hides the properties and implementation details of the object, only exposes the interface to the outside, and controls the access level of reading and modifying the properties in the program, thereby improving the security of data access.

[0052] In addition, considering that in the implementation of the application, there may be a large number of operation requests accessing the database at the same time. In this case, if there are too many operation requests, the processing speed may be reduced, which may affect the execution efficiency of the task. To solve this technical problem, before determining the target table type corresponding to the data operation request from different table types, the following steps can be performed to screen the data operation request: extract the task identifier from the data operation request, and determine the task type of the target task corresponding to the task identifier based on the task identifier; determine whether there is a type that is the same as the task type in the preset list; if the judgment result is yes, perform the operation corresponding to the data operation request on the data in the specified data model, wherein the specified data model is: a database dedicated to storing data corresponding to the task type, and the database adopts a storage structure corresponding to the task type. Based on the above scheme, a scheme of intelligently storing data in a heterogeneous database can be adopted for specific operation requests, thereby realizing the diversion of operation requests.

[0053] It should be noted that the above-mentioned specified data model and its corresponding storage structure are independently developed using a development method (such as program code) corresponding to the above-mentioned task type.

[0054] In addition, it should be noted that by adopting the above-mentioned scheme, the scheme of "setting a set of corresponding codes for each database and each storage structure" in the related technology can be combined more reasonably with the scheme of intelligent data access for heterogeneous databases provided in the embodiment of the present invention, thereby effectively utilizing existing resources.

[0055] The above preset list can be considered as a whitelist. If the same type as the task type exists in the preset list, the above specified data model is used to access the data. If the same type as the task type does not exist in the preset list, the solution of intelligent data storage in heterogeneous databases (i.e. Figure 2 scheme shown).

[0056] Figure 5 is a structural diagram of a device for intelligently accessing data from a heterogeneous database according to an embodiment of the present invention. Figure 5 As shown, the device comprises:

[0057] A division module 502 is used to divide metadata in a data model into different table types, wherein a data model is a set of metadata identifiers and description information for describing data attributes, metadata is information describing data attributes, and in a database refers to data information stored in a table; different table types correspond to different operation methods; a table type includes at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, and the second type is one key corresponds to one value, a key is a unique identifier given to a stored data object in a database, and a value is data contained in a table in the database;

[0058] A first determination module 504 is used to determine a target table type corresponding to the data operation request from different table types when a data operation request is detected, wherein the operation request includes at least one of the following: add, modify, delete, and query;

[0059] The second determination module 506 is used to determine the operation method corresponding to the target table type; the operation module is used to perform the operation corresponding to the operation method on the metadata in the data model. When the device detects the operation of adding, modifying, deleting, and querying the data in the database, it determines which table type the data is stored in from the above two table types. If the data is stored in the format of the first type of table, the adding, modifying, deleting, and querying methods corresponding to the first type of table are called; if the data is stored in the format of the second type of table, the adding, modifying, deleting, and querying methods corresponding to the second type of table are called.

[0060] It should be noted that Figure 5 The device for intelligently accessing data from heterogeneous databases is used to execute Figure 2-Figure 4The method for intelligently accessing data from a heterogeneous database is shown, so the relevant explanations and instructions in the above method for intelligently accessing data from a heterogeneous database are applicable to the device for intelligently accessing data from a heterogeneous database, and will not be repeated here.

[0061] An embodiment of the present invention further provides a non-volatile storage medium, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the following method for intelligently accessing data in a heterogeneous database:

[0062] Divide the metadata in the data model into different table types, where the data model is a unique identifier of the data and a collection of non-repeated descriptive information used to describe the data attributes; different table types correspond to different operation methods;

[0063] In case a data operation request is detected, determining a target table type corresponding to the data operation request from different table types;

[0064] Determine the operation method corresponding to the target table type, and perform the operation corresponding to the operation method on the metadata in the data model.

[0065] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0066] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0067] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0069] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0070] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0071] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for intelligently accessing data in a heterogeneous database, characterized in that: include: Divide the metadata in the data model into different table types, wherein the data model is a unique identifier of the data and a collection of non-repetitive description information for describing data attributes; the different table types correspond to different operation methods; the table types include at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, and the second type is that one key corresponds to one value; In case a data operation request is detected, determining a target table type corresponding to the data operation request from the different table types; Determine an operation method corresponding to the target table type, and perform an operation corresponding to the operation method on the metadata in the data model; Determining the operation method corresponding to the target table type includes: calling an interface method corresponding to the target table type; and determining the operation method corresponding to the interface method.

2. The method according to claim 1, characterized in that After calling the interface method corresponding to the target table type, the method further includes: creating a factory class, the factory class being used to define a drive class; and calling the operation method corresponding to the table type through the drive class.

3. The method according to claim 1, characterized in that Determining the operation method corresponding to the interface method includes: encapsulating the operation method into an interface class, wherein the interface class includes an interface class for implementing at least the following: adding, modifying, deleting, and querying methods.

4. The method according to claim 1, characterized in that: The operation method includes at least one of the following: adding, modifying, deleting, and querying.

5. The method according to any one of claims 1 to 4, characterized in that: Before determining the target table type corresponding to the data operation request from the different table types, the method further includes: Extracting a task identifier from the data operation request, and determining a task type of a target task corresponding to the task identifier based on the task identifier; Determine whether there is a task type that is the same as the task type in the preset list; When the judgment result is yes, the operation corresponding to the data operation request is performed on the data in the specified data model, wherein the specified data model is: a database dedicated to storing data corresponding to the task type, and the database adopts a storage structure corresponding to the task type.

6. A device for intelligently accessing data in a heterogeneous database, characterized in that: include: A partitioning module is used to partition metadata in a data model into different table types, wherein the data model is a unique identifier of data and a collection of non-repetitive description information for describing data attributes; the different table types correspond to different operation methods; the table types include at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, and the second type is that one key corresponds to one value; A first determining module, configured to determine, when a data operation request is detected, a target table type corresponding to the data operation request from the different table types; The second determination module is used to determine the operation method corresponding to the target table type, including: calling the interface method corresponding to the target table type; determining the operation method corresponding to the interface method; The operation module is used to perform an operation corresponding to the operation method on the metadata in the data model.

7. A device for intelligently accessing data in heterogeneous databases, characterized in that: include: A memory for storing program instructions; A processor that executes program instructions to: Divide the metadata in the data model into different table types, wherein the data model is a unique identifier of the data and a collection of non-repetitive description information for describing data attributes; the different table types correspond to different operation methods; the table types include at least one of the following: a first type and a second type, wherein the first type is used to indicate that one key corresponds to multiple values, and the second type is that one key corresponds to one value; In the case where a data operation request is detected, a target table type corresponding to the data operation request is determined from the different table types; an operation method corresponding to the target table type is determined, and an operation corresponding to the operation method is performed on metadata in the data model; the operation method corresponding to the target table type is determined, including: calling an interface method corresponding to the target table type; and an operation method corresponding to the interface method is determined.

8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method for intelligently accessing data in a heterogeneous database as claimed in any one of claims 1 to 5.