CN115718631A - Data mounting method, device, equipment, storage medium and program product - Google Patents

Data mounting method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN115718631A
CN115718631A CN202211436364.5A CN202211436364A CN115718631A CN 115718631 A CN115718631 A CN 115718631A CN 202211436364 A CN202211436364 A CN 202211436364A CN 115718631 A CN115718631 A CN 115718631A
Authority
CN
China
Prior art keywords
data
mounting
node
directory
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.)
Pending
Application number
CN202211436364.5A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211436364.5A priority Critical patent/CN115718631A/en
Publication of CN115718631A publication Critical patent/CN115718631A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data mounting method, a data mounting device, data mounting equipment, a storage medium and a program product. The invention relates to the field of cloud computing. The method comprises the following steps: in response to the detection of the data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted; reading mounting configuration data corresponding to the data type and comprising directory structure data and mounting rule data from the configuration file; determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data; and mounting the data to be mounted into the directory based on the mounting position. According to the technical scheme, the data are mounted according to the mounting configuration data which are stored in the configuration file and correspond to the data types of the data to be mounted, the corresponding mounting configuration data in the configuration file are updated based on the changed directory structure and/or mounting rules, the data mounting efficiency and the data mounting flexibility are improved, and the mounting time and the labor consumption of the data mounting are reduced.

Description

Data mounting method, device, equipment, storage medium and program product
Technical Field
Embodiments of the present invention relate to the field of cloud computing, and in particular, to a data mounting method, apparatus, device, storage medium, and program product.
Background
In order to realize the management of the data assets, the data assets need to be mounted on the directory according to a certain rule. Types of data assets include, but are not limited to, databases, database tables, data interfaces, and the like. The directory structures of different types of data assets are different, and the mounting rules adopted during mounting for different directory structures are different.
Therefore, a set of mount programs needs to be developed for each type of data assets, and the mount programs are executed to mount the data assets on the corresponding directories.
However, the above mounting rules are written dead in the mounting program, one mounting program can only apply to one directory structure, and if the directory structure changes, the corresponding change of the mounting rules can only be realized by modifying the code of the mounting program. Therefore, the existing mounting method has poor flexibility, time and labor consumption and low efficiency.
Disclosure of Invention
Embodiments of the present invention provide a data mounting method, apparatus, device, storage medium, and program product, which are used to improve data mounting efficiency and data mounting flexibility, and reduce data mounting time and manpower consumption.
In a first aspect, an embodiment of the present invention provides a data mounting method, where the method includes:
responding to a detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted;
reading mounting configuration data corresponding to the data type from a configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data;
determining the mounting position of the data to be mounted in a directory according to the directory structure data and the mounting rule data;
and mounting the data to be mounted into a directory based on the mounting position.
In a second aspect, an embodiment of the present invention further provides a data mounting apparatus, where the apparatus includes:
the data type determining module is used for responding to the detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted;
a mount configuration data reading module, configured to read mount configuration data corresponding to the data type from a configuration file, where the mount configuration data includes: directory structure data and mounting rule data;
the mounting position determining module is used for determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data;
and the data mounting module is used for mounting the data to be mounted into a directory based on the mounting position.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the data mounting method according to any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data mounting method according to any one of the embodiments of the present invention.
In a fifth aspect, embodiments of the present invention further provide a computer program product, which includes a computer program and when executed by a processor, the computer program implements the data mounting method according to any one of the embodiments of the present invention.
In the embodiment of the invention, in response to the detection of a data mounting instruction, data to be mounted is obtained based on the data mounting instruction, the data type of the data to be mounted is determined, mounting configuration data which correspond to the data type and comprise directory structure data and mounting rule data are read from a configuration file, the mounting position of the data to be mounted in a directory is determined according to the directory structure data and the mounting rule data, and the data to be mounted is mounted in the directory based on the mounting position; and if the directory structure and/or the mounting rule corresponding to the existing data type are/is changed, updating the corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that the corresponding change of the mounting scheme can be realized without modifying the code of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a data mounting method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a root node of a data asset provided by an embodiment of the invention;
FIG. 3 is a diagram illustrating a directory structure according to an embodiment of the present invention;
fig. 4 is another schematic flow chart of a data mounting method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a data mounting method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a data mounting method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data mounting apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
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. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance. In the technical scheme of the invention, the acquisition, storage, use, processing and the like of the data all accord with relevant regulations of national laws and regulations.
Fig. 1 is a schematic flow chart of a data mounting method according to an embodiment of the present invention, where the embodiment is applicable to management of data assets, for example, in a case where data assets are mounted on a directory according to a certain rule, the method may be executed by a data mounting apparatus according to an embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner. In a particular embodiment, the apparatus may be integrated in an electronic device, which may be, for example, a computer or a server. The following embodiments will be described by taking the device integrated in an electronic device as an example, and referring to fig. 1, the method may specifically include the following steps:
s101, responding to the detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted.
Among others, mounting can be understood as a process by which a computer's files and directories on a storage device (e.g., a hard disk or a shared resource) are made available to a user via the computer's file system by an operating system. Data mounting may be understood as a process by which data is made available to a user through the file system of a computer by an operating system.
Specifically, in response to detecting the data mount instruction, the data to be mounted may be obtained based on the identifier of the data to be mounted in the data mount instruction, and the data type of the data to be mounted may be determined.
For example, the data to be mounted may be data assets, and the types of data assets may include, but are not limited to, databases, database tables, data interfaces, and the like. Data assets can be understood as data resources owned or controlled by a group that can be physically or electronically recorded to bring future economic interest to the group, including but not limited to databases (structured, semi-structured, unstructured), tables, fields, data specifications, data tags, indices, reports, data models, data products, and the like. Assuming that the data to be mounted is a and the data to be mounted is B, when a data mounting instruction is detected, the data to be mounted (a) may be obtained based on the data to be mounted identifier (B) in the data mounting instruction, and the data type of the data to be mounted is determined to be a data interface.
S102, reading mounting configuration data corresponding to the data type from the configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data.
The mount configuration data may be understood as configuration data required for mounting data of a corresponding data type, and the mount configuration data may include directory structure data and mount rule data corresponding to the data type. The directory structure may be a tree structure, the directory structure data may be structure data of the tree structure, and the directory structure data may include root node data and the number of levels below the root node. The mounting rule data may include mountable data types respectively corresponding to the levels, and mounting matching conditions respectively corresponding to other levels except the lowest level. The configuration file may be understood as a file storing mounting configuration data corresponding to each data type, and the configuration file may include mounting configuration data corresponding to each data type. As shown in fig. 2, for example, there are three data assets, and the root node in the directory structure corresponding to each data asset is A1, A2, and A3.
Taking node A3 as an example, as shown in fig. 3, node A3 includes 2 nodes, which are node a31 and node a32; node a31 further includes 5 nodes, which are a311, a312, a313, a314, and a315, respectively. Node a32 includes 1 node a321 below; the node a321 includes 3 nodes, which are a3211 and a3212 respectively.
As can be seen from fig. 2 and 3, the directory structure of the data asset is a tree structure, which includes 1 root node, such as root node A3, three levels are included below the root node A3, and the first level S1 includes 2 nodes, which are a31 and a32 respectively; the second level S2 includes 6 nodes, a311, a312, a313, a314, a315, a321; the third level S3 includes 2 nodes, a3211 and a3212 respectively.
Specifically, mounting configuration data corresponding to the data type of the data to be mounted may be read from the configuration file.
For example, if the data type of the data to be mounted is a data interface, directory structure data and mounting rule data corresponding to the data type (data interface) of the data to be mounted may be read from the configuration file.
S103, determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data.
Specifically, determining the mount position of the data to be mounted in the directory according to the directory structure data and the mount rule data includes:
step a1, determining a target level to which data to be mounted is mounted according to mountable data types respectively corresponding to the levels.
The target hierarchy can be understood as a hierarchy successfully matched with the data type identification of the data to be mounted. The types of data that may be suspended may include, but are not limited to, databases, database tables, data interfaces, and the like.
Specifically, the suspendable data types respectively corresponding to the tiers and the data types of the data to be mounted may be matched, and if matching is successful, the tier corresponding to the suspendable data type that is successfully matched may be determined as a target tier to which the data to be mounted is mounted.
Exemplarily, if the data type of the data to be mounted is a mechanism, two hierarchies are provided below a root node of the directory structure, a first hierarchy below the root node of the directory structure is S1, a second hierarchy below the root node of the directory structure is S2, the data type which can be mounted and corresponds to the first hierarchy is a mechanism, and the data type which can be mounted and corresponds to the second hierarchy is a system. The loadable data type (mechanism and system) corresponding to the two hierarchies respectively can be matched with the data type (mechanism) of the data to be loaded, and if it can be determined that the matching of S1 is successful, the hierarchy (S1) corresponding to the loadable data type (mechanism) which is successfully matched can be determined as the target hierarchy to which the data to be loaded is loaded.
Step a2, determining whether a target level is the next level of the root node, if so, determining that the root node is a father node for mounting data to be mounted; otherwise, determining a father node for mounting the data to be mounted in the directory based on mounting matching conditions corresponding to each level above the target level.
Specifically, the mount matching condition may be a condition for determining a node matching the data to be mounted in the corresponding hierarchy, and if the hierarchy in which the node matching the data to be mounted is located is a higher hierarchy than the target hierarchy, the node matching the data to be mounted is determined to be a parent node.
Exemplarily, if the data type of the data to be mounted is a mechanism, it is assumed that there are three levels below a root node of a corresponding directory structure, the first level is S1, the mountable data type of the S1 level is a mechanism, the second level is S2, the mountable data type of the S2 level is a system, the third level is S3, and the mountable data type of the S3 level is a data interface, and by determining the mountable data type corresponding to each level respectively, the target level to which the data to be mounted is S1, and the target level (S1) can also be determined to be the next level of the root node, the root node is determined to be a parent node to which the data to be mounted.
If the data type of the data to be mounted is a data interface, the target level to which the data to be mounted is determined to be S3 according to the mountable data types respectively corresponding to the levels, the target level can be determined to be S3 not to be the next level of the root node, and then the parent node for mounting the data to be mounted in the directory can be determined based on mounting matching conditions corresponding to the S1 level and the S2 level above the target level (S3). Namely, the mount matching condition corresponding to the S1 level is as follows: the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node; the mounting matching conditions corresponding to the S2 level are as follows: and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node. The institution identification is understood to be the name of the institution.
Illustratively, nodes included in the S1 hierarchy are a31 and a32 shown in fig. 3, an organization identifier of the a31 is M1, an organization identifier of the a32 is M2, and an organization identifier corresponding to the data interface to be mounted is M2. Therefore, it can be determined that the node whose mechanism identifier matches the mechanism identifier corresponding to the data interface to be mounted in the S1 hierarchy is a32, but the hierarchy in which a32 is located is S1, and the S1 hierarchy is not a previous level of the target hierarchy, so the node a32 matching the data to be mounted is not a parent node. If the node matching the system identifier of the node in the S2 hierarchy with the system identifier corresponding to the data interface to be mounted is continuously determined to be a321, the hierarchy where the a321 is located is S2, and the S2 hierarchy is the upper level of the target hierarchy, it may be determined that the node matching the data to be mounted (a 321) is a parent node.
In this embodiment, a target level to which data to be mounted is determined according to types of data which can be mounted and correspond to the levels, whether the target level is the next level of a root node is determined, and if yes, the root node is determined to be a parent node on which the data to be mounted is mounted; otherwise, determining the father node for mounting the data to be mounted in the directory based on the mounting matching conditions corresponding to the levels above the target level, and more accurately determining the father node for mounting the data to be mounted according to the level relation of the nodes, thereby improving the mounting efficiency and accuracy of the data mounting.
And S104, mounting the data to be mounted into the directory based on the mounting position.
Specifically, a mount path of the data to be mounted in the directory is generated based on the parent node, and the mount path is saved in the directory node information table.
Continuing with the above example, the data type of the data to be mounted is a data interface, the first hierarchy below the root node is S1, the second hierarchy is S2, the third hierarchy is S3, and the data to be mounted is data corresponding to the node a3211 in fig. 3. If the target level to which the data to be mounted is S3, the node A321 is a father node for mounting the data to be mounted, a mounting path of the data to be mounted in the directory can be generated to be A3-A32-A321-A3211 based on the father node (A321), the mounting path is stored in the directory node information table, and the data to be mounted is mounted in the directory according to the mounting path.
In this embodiment, mount configuration data corresponding to a plurality of data types are pre-stored in a configuration file, and when data to be mounted needs to be mounted in a directory, mount of the data is implemented according to the mount configuration data corresponding to the data type of the data to be mounted, which is stored in the configuration file, so that if a new data type is added, mount configuration data corresponding to the new data type is written into the configuration file, and mount of the data of the new data type can be implemented without re-developing a mount program for the new data type; and if the directory structure and/or the mounting rule corresponding to the existing data type is changed, updating corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that corresponding change of the mounting scheme can be realized without modifying codes of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
In some embodiments, the data type of the data to be mounted may be a database table, the name of the root node may be a "database table," the root node may include three levels below, and the mountable data types respectively corresponding to the levels may be: a database, a data model and a database table; the mounting matching conditions respectively corresponding to other levels except the lowest level are as follows: the field value of the database identification field in the database table to be mounted is consistent with the database identification of the node, and the field value of the data model identification field in the database table to be mounted is consistent with the data model identification of the node, so that when the data type of the data to be mounted is the database table, the parent node for mounting the data to be mounted in the directory can be determined more accurately. The database identifier can be understood as an identity identifier of a database, the database identifier field can be understood as an identity identifier field of the database, and the field value of the database identifier field can be understood as a field value of the identity identifier field of the database, such as the database O-G11, the database O-G11 identifier field is O, and the database O-G11 identifier field is G11; the data MODEL identification can be understood as an identification of the data MODEL, and the data MODEL identification field can be understood as an identification field of the data MODEL, for example, the data MODEL-I11, the data MODEL identification field of the data MODEL-I11 is MODEL, and the field value of the data MODEL-I11 identification field is I11.
Specifically, the parent node for mounting the data to be mounted in the directory may be determined by determining whether a field value of a database identification field in the database table to be mounted is consistent with the database identification of the node and whether a field value of a data model identification field in the database table to be mounted is consistent with the data model identification of the node.
Exemplarily, if the data type of the data to be mounted is a database table, the root node of the directory structure is a database table, and three levels are provided under the database table, where the first level is T1, the T1 level mountable data type is a database, the second level is T2, the T2 level mountable data type is a data model (Schema), the third level is T3, and the T3 mountable data type is a database table, and by determining that the target level to which the data to be mounted is T3 according to the mountable data types respectively corresponding to the levels, it can be determined that the target level is (T3) not the next level of the root node (database table), and then the parent node on which the data to be mounted is mounted in the directory can be determined based on the mounting matching conditions corresponding to the T1 level and the T2 level above the target level (T3).
Assuming that nodes included in a T1 level are B1, B2 and B3, a database identifier of the B1 is G1, a database identifier of the B2 is G2, a database identifier of the B3 is G3, and a field value of a database identifier field in a database table to be mounted is G3; the T2 level comprises nodes B31 and B32, the data model identifier of the B31 is I1, the data model identifier of the B32 is I2, and the field value of the data model identifier field in the database table to be mounted is I2.
It can be determined that a node where the database identifier of the node in the T1 hierarchy matches with the field value of the database identifier field in the database table to be mounted is B3, the hierarchy where B3 is located is T1, and the T1 hierarchy is not the previous level of the target hierarchy, and the node matching with the data to be mounted is not a parent node. And continuing to determine that the node with the data model identification of the node in the T2 level matched with the field value of the data model identification field in the database table to be mounted is B32, the level where the B32 is located is T2, and the T2 level is the previous level of the target level (T3), then determining that the node (B32) matched with the data to be mounted is a parent node.
In some embodiments, the data type of the data to be mounted may be a data interface, the name of the root node may be "data interface", the root node may include three levels below, and the mountable data types respectively corresponding to the levels are: mechanisms, systems and data interfaces; the mounting matching conditions respectively corresponding to other levels except the lowest level are as follows: the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node, and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node, so that when the data type of the data to be mounted is the data interface, the parent node for mounting the data to be mounted in the directory can be determined more accurately. The mechanism identifier can be understood as an identity identifier of the mechanism, and the system identifier can be understood as an identity identifier of the system.
Specifically, the parent node for mounting the data to be mounted in the directory may be determined by determining whether the mechanism identifier corresponding to the data interface to be mounted is consistent with the mechanism identifier of the node, and whether the system identifier corresponding to the data interface to be mounted is consistent with the system identifier of the node.
For example, if the data type of the data to be mounted is a data interface, the root node of the directory structure is a data interface, and three levels are provided below the data interface, where the first level is U1, the U1 level is a mechanism capable of mounting the data type, the second level is U2, the U2 level is a system capable of mounting the data type, the third level is U3, and the U3 capable of mounting the data type is a data interface, and by determining that the target level to which the data to be mounted is U3 according to the mountable data types respectively corresponding to the levels, it can be determined that the target level is (U3) not the next level of the root node, and then the parent node on which the data to be mounted is mounted in the directory can be determined based on mounting matching conditions corresponding to the U1 level and the U2 level above the target level (U3).
The mount matching condition of the U1 level may be: and the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node in the U1 level.
The mount matching condition of the U2 level may be: and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node in the U2 level.
Assuming that nodes included in the U1 hierarchy are C1, C2 and C3, the mechanism identifier of C1 is J1, the mechanism identifier of C2 is J2, the mechanism identifier of C3 is J3, and the mechanism identifier corresponding to the data interface to be mounted is J3; the nodes included in the U2 hierarchy are C31 and C32, the system identifier of C31 is K1, the system identifier of C32 is K2, and the system identifier corresponding to the data interface to be mounted is K2.
It can be determined that a node where the mechanism identifier of the node in the U1 hierarchy matches with the mechanism identifier corresponding to the data interface to be mounted is C3, the hierarchy where C3 is located is U1, and the U1 hierarchy is not the previous level of the target hierarchy, and then the node matching with the data to be mounted is not a parent node. And continuing to determine that the node matched with the system identifier corresponding to the data interface to be mounted in the system identifier of the node in the U2 hierarchy is C32, the hierarchy in which the C32 is located is U2, and the U2 hierarchy is the upper level of the target hierarchy (U3), so that the node (C32) matched with the data to be mounted can be determined to be a parent node.
Fig. 4 is another schematic flow diagram of the data mounting method according to the embodiment of the present invention, and referring to fig. 4, the method specifically includes the following steps:
s401, responding to the detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted.
S402, reading mounting configuration data corresponding to the data type from the configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data. The directory structure is a tree structure, and correspondingly, the directory structure data can comprise root node data and the number of lower levels of the root node; the mounting rule data may include mountable data types respectively corresponding to the levels and mounting matching conditions respectively corresponding to other levels except the lowest level;
and S403, determining a target level to which the data to be mounted is mounted according to the mountable data types respectively corresponding to the levels.
S404, determining whether the target level is the next level of the root node, and if the target level is the next level of the root node, executing the step S405; if the target level is not the next level of the root node, step S406 is performed.
S405, determining the root node as a father node for mounting the data to be mounted.
After step S405 is executed, step S407 is executed.
S406, determining a parent node for mounting the data to be mounted in the directory based on the mounting matching conditions corresponding to the levels above the target level.
Specifically, determining a parent node for mounting data to be mounted in a directory based on mounting matching conditions corresponding to each level above a target level includes:
and b1, taking the next level of the root node as the current level, and taking a set formed by all nodes in the current level as a current node set.
And b2, matching the data to be mounted with each node in the current node set according to the mounting matching conditions corresponding to the current hierarchy, and obtaining the nodes matched with the data to be mounted in the current hierarchy.
Step b3, if the current level is the upper level of the target level, determining a node matched with the data to be mounted as a father node for mounting the data to be mounted in the directory; and if not, taking the next level of the current level as a new current level, taking a set formed by each child node of the node matched with the data to be mounted as a new current child node set, returning to execute mounting matching conditions corresponding to the current level, and performing matching operation on the data to be mounted and each node in the current node set.
For example, if the data type of the data to be mounted is a data interface, the first level below the root node in the directory structure is S1, the S1 level is a mechanism capable of mounting the data type, the second level is S2, the S2 level is a system capable of mounting the data type, the third level is S3, the S3 level is a data interface capable of mounting the data type, and the first level includes nodes a31 and a32.
If the target level is S3, and it can be determined that the target level (S3) is not the next level of the root node, the next level (S1) of the root node may be set as the current level, and the set of nodes in the current level may be set as the current node set { a31, a32}.
The mount matching condition of the S1 level may be: and the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node in the S1 level.
According to the mount matching condition corresponding to the current level S1, it may be determined that a node whose mechanism identifier corresponding to the data interface to be mounted is consistent with the mechanism identifier in the current node set { a31, a32} is a31, the level where the a31 is located is S1, and the S1 level is not the previous level of the target level, and then the next level (S2) of the S1 level is taken as the current level, and a set formed by child nodes under S31 in the current level is taken as the current node set { a311, a312, a313, a314, a315}.
The mount matching condition of the S2 level may be: and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node in the S2 level.
According to the mount matching condition corresponding to the current level S2, it may be determined that a node whose mechanism identifier corresponding to the data interface to be mounted is consistent with the mechanism identifier in the current node set { a311, a312, a313, a314, a315} is a311, the level where the a311 is located is S2, and the S2 level is the previous level of the target level (S3), and then the node a311 matching the data to be mounted is determined as a parent node for mounting the data to be mounted in the directory, and the data to be mounted is mounted below the a 311.
In this embodiment, a next level of a root node is used as a current level, a set formed by nodes in the current level is used as a current node set, data to be mounted is matched with each node in the current node set according to a mounting matching condition corresponding to the current level, a node matched with the data to be mounted in the current level is obtained, and if the current level is a previous level of a target level, the node matched with the data to be mounted is determined as a parent node for mounting the data to be mounted in a directory; otherwise, the next level of the current level is used as a new current level, a set formed by each child node of the node matched with the data to be mounted is used as a new current child node set, the mounting matching condition corresponding to the current level is returned to be executed, and the data to be mounted is matched with each node in the current node set, so that the node matched with the data to be mounted can be obtained by matching the data to be mounted with each node in the current node set of each level according to the mounting matching condition of each level more accurately level by level, the father node of the data to be mounted in the directory is further determined, and the purpose of improving the accuracy of determining the father node of the data to be mounted in the directory is achieved.
S407, generating a mounting path of the data to be mounted in the directory based on the parent node.
Specifically, generating a mount path of data to be mounted in a directory based on a parent node includes:
and c1, forming node pairs by the father nodes and the nodes corresponding to the data to be mounted, and forming node pairs by the nodes matched with the data to be mounted in the adjacent levels.
For example, if the first three levels under the root node are S1, S2, and S3, respectively, the first level includes nodes a31 and a32, and the second level includes nodes: a311, A312, A313, A314, A315, A321. If the parent node is a321, the node corresponding to the data to be mounted is a3211. The parent node a321 and the node a3211 corresponding to the data to be mounted may form a node pair (a 321, a 3211), and nodes matching the data to be mounted in adjacent levels, i.e., S1 and S2 levels, may form a node pair (a 32, a 321).
And c2, for each node pair, taking the node identification of the node at the upper level in the current node pair as a source identification, taking the node identification of the node at the lower level in the current node pair as a target identification, and storing the source identification and the target identification in a preset temporary table in an associated manner. The node identifier may be understood as a node name.
For example, if each node pair is (a 32, a 321), (a 321, a 3211), using the node identifier of the previous level node a32 in the current node pair (a 32, a 321) as a source identifier, using the node identifier of the next level node (a 321) in the current node pair as a target identifier, and storing the source identifier a32 and the target identifier a321 in a preset temporary table in an associated manner; taking the node identifier A321 of the previous level in the current node pair (A321, A3211) as a source identifier, taking the node identifier (A3211) of the next level node in the current node pair as a target identifier, and storing the source identifier A321 and the target identifier A3211 in a preset temporary table in an associated manner.
And c3, generating a mounting path of the data to be mounted in the directory based on the root node data and the data in the preset temporary table.
Specifically, a mount path of the data to be mounted in the directory may be generated according to a hierarchical relationship among the root node identifier in the root node data, the node corresponding to the source identifier and the target identifier stored in the preset temporary table, and the hierarchical relationship.
Illustratively, according to the root node identifier A3 and two records stored in the preset temporary table: (source node a32, target node a 321) and (source node a321, target node a 3211), generating a mount path of the data to be mounted in the directory according to the hierarchical relationship as follows: data asset A3-A32-A321-A3211.
In this embodiment, a node pair is formed by a parent node and a node corresponding to data to be mounted, a node pair is formed by a node matching the data to be mounted in an adjacent level, for each node pair, a node identifier of a node on a previous level in the current node pair is used as a source identifier, a node identifier of a node on a next level in the current node pair is used as a target identifier, the source identifier and the target identifier are stored in a preset temporary table in an associated manner, and a mounting path of the data to be mounted in a directory is generated more accurately based on root node data and data in the preset temporary table.
S408, the mounting path is saved in a directory node information table.
S409, in response to the detection of the trigger operation on any node in the displayed directory, reading the mount path of the triggered node from the directory node information table.
For example, in response to detecting a trigger operation on the node (a 3211) in the exposed directory, the mount path of the triggered node (a 3211) may be read from the directory node information table as: A3-A32-A321-A3211.
S410, acquiring the mounted data corresponding to the triggered node based on the mounting path of the triggered node, and displaying the mounted data.
Illustratively, mounted data corresponding to the triggered node (A3211) is obtained and displayed based on the mounting path (A3-A32-A321-A3211) of the triggered node (A3211).
In the embodiment, the mount path of the triggered node can be quickly read from the directory node information table including the mount path, the mounted data corresponding to the triggered node is obtained based on the mount path of the triggered node, and the mounted data is displayed, so that the display speed of the mounted data is increased, and the convenience and the flexibility for displaying the mounted data are improved.
In this embodiment, mount configuration data corresponding to a plurality of data types are pre-stored in a configuration file, and when data to be mounted needs to be mounted in a directory, mount of the data is implemented according to the mount configuration data corresponding to the data type of the data to be mounted, which is stored in the configuration file, so that if a new data type is added, the mount configuration data corresponding to the new data type is written into the configuration file, and mount of the data of the new data type can be implemented without developing a mount program for the new data type; and if the directory structure and/or the mounting rule corresponding to the existing data type are/is changed, updating the corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that the corresponding change of the mounting scheme can be realized without modifying the code of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
Fig. 5 is a schematic diagram of a data mount method according to an embodiment of the present invention, and as shown in fig. 5, the mount information check required before data mount includes: confirming whether each node automatically mounted by a database exists or not; confirming whether the database is the first class of the configuration group; confirming whether the configuration information of the configuration group is complete, such as matching rules, hierarchy names and the like; because the upper and lower levels can be mounted only between the lower levels on the premise that the aggregation relationship configuration is required, wherein the aggregation relationship can be understood as the level mounting priority between the lower levels, for example, the root node includes three levels, the mountable data type corresponding to the first level is a database, the mountable data type corresponding to the second level is a data model, the mountable data type corresponding to the third level is a database table, the data to be mounted with the target level being the third level can only be mounted under the second level, and the data to be mounted with the target level being the second level can only be mounted under the first level, so that whether the level sequence between the lower levels is correct or not needs to be confirmed; confirming whether a root node mounted by a database exists or not; confirming whether a father node of the data to be mounted is a root node; whether the directory structure data and the mounting rule data are complete or not is confirmed, so that the condition that data mounting fails due to the fact that a root node does not exist or the hierarchical sequence between each hierarchy is incorrect can be avoided in the data mounting process, and the condition that data mounting fails due to the fact that the directory structure data and the mounting rule data are incomplete can also be avoided.
And after the mounting information inspection is finished, determining the data type of the data to be mounted, and reading the mounting configuration data according to the data type. Then, determining a node pair according to the mounting configuration data, which mainly comprises the following steps: determining a father node of a target level of the data to be mounted according to mounting rule data in the mounting configuration data, forming a node pair by the father node and a node corresponding to the data to be mounted, and forming a node pair by a node matched with the data to be mounted in an adjacent level. And taking the node identification of the node of the previous level in the node pair as a source identification, taking the node identification of the node of the next level in the node pair as a target identification, and storing the source identification and the target identification in a preset temporary table in an associated manner. And generating a mounting path of the data to be mounted in the directory based on the root node data and the data in the preset temporary table. And storing the mounting path into a directory node information table, and finally mounting data according to the mounting path.
Fig. 6 is another schematic flow chart of the data mounting method according to the embodiment of the present invention, and referring to fig. 6, the method specifically includes the following steps:
s601, responding to the detected directory configuration instruction, acquiring the data type identification to be configured and the mounting configuration data input through the visual interface based on the directory configuration instruction.
Wherein the data type identification can be understood as the name of the data type.
Specifically, in response to detecting the directory configuration instruction, the data type identifier to be configured and mount configuration data (directory structure data and mount rule data) input through the visual interface may be obtained based on the directory configuration instruction.
For example, when a user inputs mounting configuration data through a visual interface, a data record to be filled in may be respectively displayed in the visual interface according to a hierarchical sequence for each hierarchy, where each data record includes at least four fields to be filled, that is, a data identifier to be mounted, a feature identifier to be mounted, a mounting data identifier, and a mounting feature identifier, where the data identifier to be mounted represents a mountable data type identifier of a current hierarchy, the mounting data identifier represents a mountable data type identifier of a next hierarchy of the current hierarchy, and the feature identifier to be mounted and the mounting feature identifier represent mounting matching conditions of a corresponding hierarchy.
S602, correspondingly writing the data type identification and the mounting configuration data into a configuration file.
Exemplarily, if the data type to be configured is a database table and the data type identifier of the database table is G1, the data type identifier (G1) and the mounting configuration data (directory structure data and mounting rule data) are correspondingly written into the configuration file.
In this embodiment, if a new data type is added, the mounting configuration data corresponding to the new data type is written into the configuration file, so that the mounting of the data of the new data type can be realized without redeveloping a mounting program for the new data type; and if the directory structure and/or the mounting rule corresponding to the existing data type is changed, updating corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that corresponding change of the mounting scheme can be realized without modifying codes of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
Fig. 7 is a schematic structural diagram of a data mounting device according to an embodiment of the present invention. The embodiment may be applicable to management of data assets, for example, in a case of mounting data assets on a directory according to a certain rule, the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in an electronic device, as shown in fig. 7, where the data mounting apparatus specifically includes:
a data type determining module 701, configured to, in response to detecting a data mounting instruction, obtain data to be mounted based on the data mounting instruction, and determine a data type of the data to be mounted;
a mount configuration data reading module 702, configured to read mount configuration data corresponding to the data type from a configuration file, where the mount configuration data includes: directory structure data and mounting rule data;
a mounting position determining module 703, configured to determine a mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data;
a data mounting module 704, configured to mount the data to be mounted into a directory based on the mounting position.
Optionally, the directory structure is a tree structure, and the directory structure data includes root node data and the number of lower levels of the root node; the mounting rule data comprises mountable data types respectively corresponding to all levels and mounting matching conditions respectively corresponding to other levels except the lowest level;
the mounting position determining module 703 is specifically configured to:
determining a target level to which the data to be mounted is mounted according to the types of the data which can be mounted and respectively correspond to the levels;
determining whether the target level is the next level of a root node, if so, determining that the root node is a father node for mounting the data to be mounted; otherwise, determining a father node for mounting the data to be mounted in the directory based on mounting matching conditions corresponding to each level above the target level.
Optionally, the mount position determining module 703 determines, based on the mount matching condition corresponding to each level above the target level, a parent node for mounting the data to be mounted in a directory, including:
taking the next level of the root node as the current level, and taking a set formed by all nodes in the current level as a current node set;
according to mounting matching conditions corresponding to the current hierarchy, matching the data to be mounted with each node in the current node set to obtain nodes matched with the data to be mounted in the current hierarchy;
if the current level is the level higher than the target level, determining a node matched with the data to be mounted as a father node for mounting the data to be mounted in a directory; and if not, taking the next level of the current level as a new current level, taking a set formed by all sub-nodes of the nodes matched with the data to be mounted as a new current sub-node set, returning to execute mounting matching conditions corresponding to the current level, and performing matching operation on the data to be mounted and all nodes in the current node set.
Optionally, the data mounting module 704 is specifically configured to:
generating a mounting path of the data to be mounted in a directory based on the father node;
and storing the mounting path into a directory node information table.
Optionally, the data mount module 704 generates a mount path of the data to be mounted in the directory based on the parent node, including:
forming node pairs by the father node and the nodes corresponding to the data to be mounted, and forming node pairs by the nodes matched with the data to be mounted in the adjacent levels;
for each node pair, taking the node identification of the node at the upper level in the current node pair as a source identification, taking the node identification of the node at the lower level in the current node pair as a target identification, and storing the source identification and the target identification in a preset temporary table in an associated manner;
and generating a mounting path of the data to be mounted in a directory based on the root node data and the data in the preset temporary table.
Optionally, the data mounting module 704 is further specifically configured to:
in response to detecting the triggering operation on any node in the displayed directory, reading the mounting path of the triggered node from the directory node information table;
and acquiring the mounted data corresponding to the triggered node based on the mounting path of the triggered node, and displaying the mounted data.
Optionally, the data type of the data to be mounted is a database table, the root node is the database table, the root node includes three levels below the root node, and the mountable data types respectively corresponding to the levels are: a database, a data model and a database table;
the mounting matching conditions respectively corresponding to other levels except the lowest level are as follows: the field value of the database identification field in the database table to be mounted is consistent with the database identification of the node, and the field value of the data model identification field in the database table to be mounted is consistent with the data model identification of the node.
Optionally, the data type of the data to be mounted is a data interface, the root node includes three levels below the root node, and the data types that can be mounted and correspond to the levels respectively are: mechanisms, systems and data interfaces;
the mount matching conditions respectively corresponding to other levels except the lowest level are as follows: the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node, and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node.
Further, the apparatus further comprises:
the mounting configuration data acquisition module is used for responding to the detection of a directory configuration instruction, and acquiring a data type identifier to be configured and mounting configuration data input through a visual interface based on the directory configuration instruction;
and the data writing module is used for correspondingly writing the data type identifier and the mounting configuration data into the configuration file.
The data mounting device provided by the embodiment of the invention can execute the data mounting method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 8 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 8 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 8, electronic device 12 is in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8 and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. In the electronic device 12 of the present embodiment, the display 24 is not provided as a separate body but is embedded in the mirror surface, and when the display surface of the display 24 is not displayed, the display surface of the display 24 and the mirror surface are visually integrated. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 12 over the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a data mounting method provided by an embodiment of the present invention: in response to the detection of the data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted; reading mounting configuration data corresponding to the data type from the configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data; determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data; and mounting the data to be mounted into the directory based on the mounting position. According to the scheme, mounting configuration data corresponding to various data types are stored in a configuration file in advance, and when the data to be mounted needs to be mounted in a directory, the mounting of the data is realized according to the mounting configuration data corresponding to the data types of the data to be mounted and stored in the configuration file, so that if a new data type is added, the mounting configuration data corresponding to the new data type is written into the configuration file, the mounting of the data of the new data type can be realized, and a mounting program does not need to be re-developed aiming at the new data type; and if the directory structure and/or the mounting rule corresponding to the existing data type is changed, updating corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that corresponding change of the mounting scheme can be realized without modifying codes of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
Embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data mounting method provided in all embodiments of the present invention: responding to the detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted; reading mounting configuration data corresponding to the data type from the configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data; determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data; and mounting the data to be mounted into the directory based on the mounting position. According to the scheme, mounting configuration data corresponding to various data types are stored in a configuration file in advance, and when the data to be mounted needs to be mounted in a directory, the mounting of the data is realized according to the mounting configuration data corresponding to the data types of the data to be mounted and stored in the configuration file, so that if a new data type is added, the mounting configuration data corresponding to the new data type is written into the configuration file, the mounting of the data of the new data type can be realized, and a mounting program does not need to be re-developed aiming at the new data type; and if the directory structure and/or the mounting rule corresponding to the existing data type is changed, updating corresponding mounting configuration data in the configuration file based on the changed directory structure and/or mounting rule, so that corresponding change of the mounting scheme can be realized without modifying codes of the mounting program. In conclusion, the scheme can effectively improve the data mounting efficiency and the data mounting flexibility and reduce the mounting time and the labor consumption of data mounting.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Embodiments of the present invention further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the data mounting method provided in any embodiment of the present invention.
Computer program product in implementing the computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A data mounting method, characterized in that the method comprises:
responding to a detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted;
reading mounting configuration data corresponding to the data type from a configuration file, wherein the mounting configuration data comprises: directory structure data and mounting rule data;
determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data;
and mounting the data to be mounted into a directory based on the mounting position.
2. The method of claim 1, wherein the directory structure is a tree structure, and wherein the directory structure data includes root node data and a number of levels below the root node; the mounting rule data comprises mountable data types respectively corresponding to all the hierarchies and mounting matching conditions respectively corresponding to other hierarchies except the lowest hierarchy;
the determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data includes:
determining a target level to which the data to be mounted is mounted according to the types of the data which can be mounted and respectively correspond to the levels;
determining whether the target level is the next level of a root node, if so, determining that the root node is a father node for mounting the data to be mounted; otherwise, determining a father node for mounting the data to be mounted in the directory based on mounting matching conditions corresponding to each level above the target level.
3. The method according to claim 2, wherein the determining a parent node for mounting the data to be mounted in a directory based on mounting matching conditions corresponding to each level above the target level comprises:
taking the next level of the root node as the current level, and taking a set formed by all nodes in the current level as a current node set;
according to mounting matching conditions corresponding to the current hierarchy, matching the data to be mounted with each node in the current node set to obtain nodes matched with the data to be mounted in the current hierarchy;
if the current level is the previous level of the target level, determining a node matched with the data to be mounted as a father node for mounting the data to be mounted in a directory; and if not, taking the next level of the current level as a new current level, taking a set formed by each child node of the node matched with the data to be mounted as a new current child node set, returning to execute mounting matching conditions corresponding to the current level, and performing matching operation on the data to be mounted and each node in the current node set.
4. The method of claim 3, wherein the mounting the data to be mounted into a directory based on the mounting location comprises:
generating a mounting path of the data to be mounted in a directory based on the father node;
and storing the mounting path into a directory node information table.
5. The method according to claim 4, wherein the generating a mount path of the data to be mounted in a directory based on the parent node comprises:
forming node pairs by the father nodes and the nodes corresponding to the data to be mounted, and forming node pairs by the nodes matched with the data to be mounted in the adjacent levels;
for each node pair, taking the node identification of a node at the upper level in the current node pair as a source identification, taking the node identification of a node at the lower level in the current node pair as a target identification, and storing the source identification and the target identification in a preset temporary table in an associated manner;
and generating a mounting path of the data to be mounted in a directory based on the root node data and the data in the preset temporary table.
6. The method of claim 4, further comprising:
in response to detecting the triggering operation on any node in the displayed directory, reading the mounting path of the triggered node from the directory node information table;
and acquiring the mounted data corresponding to the triggered node based on the mounting path of the triggered node, and displaying the mounted data.
7. The method according to claim 2, wherein the data type of the data to be mounted is a database table, the root node is the database table, the root node comprises three levels below the root node, and the mountable data types respectively corresponding to the levels are: a database, a data model and a database table;
the mounting matching conditions respectively corresponding to other levels except the lowest level are as follows: the field value of the database identification field in the database table to be mounted is consistent with the database identification of the node, and the field value of the data model identification field in the database table to be mounted is consistent with the data model identification of the node.
8. The method according to claim 2, wherein the data type of the data to be mounted is a data interface, the root node comprises three levels below the root node, and the mountable data types respectively corresponding to the levels are: mechanisms, systems and data interfaces;
the mounting matching conditions respectively corresponding to other levels except the lowest level are as follows: the mechanism identification corresponding to the data interface to be mounted is consistent with the mechanism identification of the node, and the system identification corresponding to the data interface to be mounted is consistent with the system identification of the node.
9. The method according to any one of claims 1-8, further comprising:
in response to the detection of a directory configuration instruction, acquiring a data type identifier to be configured and mount configuration data input through a visual interface based on the directory configuration instruction;
and correspondingly writing the data type identification and the mounting configuration data into the configuration file.
10. A data mounting apparatus, characterized in that the apparatus comprises:
the data type determining module is used for responding to the detected data mounting instruction, acquiring data to be mounted based on the data mounting instruction, and determining the data type of the data to be mounted;
a mount configuration data reading module, configured to read mount configuration data corresponding to the data type from a configuration file, where the mount configuration data includes: directory structure data and mounting rule data;
the mounting position determining module is used for determining the mounting position of the data to be mounted in the directory according to the directory structure data and the mounting rule data;
and the data mounting module is used for mounting the data to be mounted into a directory based on the mounting position.
11. The apparatus of claim 10, wherein the directory structure is a tree structure, and wherein the directory structure data comprises root node data and a number of levels below the root node; the mounting rule data comprises mountable data types respectively corresponding to all levels and mounting matching conditions respectively corresponding to other levels except the lowest level;
the mounting position determining module is specifically configured to:
determining a target level to which the data to be mounted is mounted according to the mountable data types respectively corresponding to the levels;
determining whether the target level is the next level of a root node, if so, determining that the root node is a father node for mounting the data to be mounted; otherwise, determining a father node for mounting the data to be mounted in the directory based on mounting matching conditions corresponding to each level above the target level.
12. The apparatus of claim 10, further comprising:
the mounting configuration data acquisition module is used for responding to the detected directory configuration instruction, and acquiring a data type identifier to be configured and mounting configuration data input through a visual interface based on the directory configuration instruction;
and the data writing module is used for correspondingly writing the data type identifier and the mounting configuration data into the configuration file.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data mounting method of any one of claims 1-9.
14. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the data mounting method according to any one of claims 1 to 9.
15. A computer program product comprising a computer program, characterized in that the computer program realizes the data mounting method according to any one of claims 1-9 when being executed by a processor.
CN202211436364.5A 2022-11-16 2022-11-16 Data mounting method, device, equipment, storage medium and program product Pending CN115718631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211436364.5A CN115718631A (en) 2022-11-16 2022-11-16 Data mounting method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211436364.5A CN115718631A (en) 2022-11-16 2022-11-16 Data mounting method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN115718631A true CN115718631A (en) 2023-02-28

Family

ID=85255349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211436364.5A Pending CN115718631A (en) 2022-11-16 2022-11-16 Data mounting method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN115718631A (en)

Similar Documents

Publication Publication Date Title
US7886028B2 (en) Method and system for system migration
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
US11977532B2 (en) Log record identification using aggregated log indexes
US10248680B2 (en) Index management
CN109634587B (en) Method and equipment for generating warehousing script and warehousing data
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
US20200293557A1 (en) Efficient association of related entities
US9390111B2 (en) Database insert with deferred materialization
WO2023098462A1 (en) Improving performance of sql execution sequence in production database instance
CN108763341B (en) Electronic device, automatic table building method and storage medium
US20070112886A1 (en) Method and apparatus for database change management
CN108959454B (en) Prompting clause specifying method, device, equipment and storage medium
US11106526B1 (en) Architecture-based root cause analysis
US11232084B2 (en) Schema agnostic migration of delineated data between relational databases
CN112948396A (en) Data storage method and device, electronic equipment and storage medium
CN113094776A (en) Method and system for constructing visual component model data and electronic equipment
CN113010208A (en) Version information generation method, version information generation device, version information generation equipment and storage medium
CN115718631A (en) Data mounting method, device, equipment, storage medium and program product
US11334600B1 (en) Partial reloading in data synchronization
CN114328524A (en) Document processing method, query method, system, equipment and medium
US9330115B2 (en) Automatically reviewing information mappings across different information models
US11797549B2 (en) Techniques for linking data to provide improved searching capabilities
US11561979B2 (en) Dynamically detecting and correcting errors in queries
US11030168B2 (en) Parallelization of order dependent procedures during software change processes
US20230195901A1 (en) Model-based upgrade recommendations using software dependencies

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