CN114816470A - Metadata database management method and device, electronic equipment and medium - Google Patents

Metadata database management method and device, electronic equipment and medium Download PDF

Info

Publication number
CN114816470A
CN114816470A CN202210326771.4A CN202210326771A CN114816470A CN 114816470 A CN114816470 A CN 114816470A CN 202210326771 A CN202210326771 A CN 202210326771A CN 114816470 A CN114816470 A CN 114816470A
Authority
CN
China
Prior art keywords
version
target
metadata
metadata database
node
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
CN202210326771.4A
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.)
Hainan Qiantang Shilian Information Technology Co ltd
Original Assignee
Hainan Qiantang Shilian Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainan Qiantang Shilian Information Technology Co ltd filed Critical Hainan Qiantang Shilian Information Technology Co ltd
Priority to CN202210326771.4A priority Critical patent/CN114816470A/en
Publication of CN114816470A publication Critical patent/CN114816470A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application provides a metadata database management method, a metadata database management device, electronic equipment and media, and belongs to the technical field of computers. The method comprises the following steps: in response to a version change operation for at least one of the plurality of metadatabase nodes, determining a target metadatabase version corresponding to the version change operation; determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relation between different metadata database versions and the dependency metadata database version and the script information; when a deployment record of a target dependency metadata database version exists in a target metadata database node, extracting script applicable configuration and a script storage address from target script information; when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from a script storage address; and executing the script program, and deploying the target metadata base version at the target metadata base node. And the normal operation of the metadata database version after deployment is ensured.

Description

Metadata database management method and device, electronic equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing a metadata repository, an electronic device, and a medium.
Background
With the rapid iteration of software products, data among products and product modules are shared and interacted, the database table structure and metadata modification requirements are high, even modification requirements of the products in the iteration on the same database table exist at the same time, so that the products are mutually held, conflicts are often caused, and the products are difficult to be on-line. For example, the data table structure and metadata of the same product in different system architectures and individual project environments are different and difficult to process. Therefore, a version management method is urgently needed for standardized management, solving the conflicts in research and development and improving the version issuing and online speeds.
Disclosure of Invention
Some embodiments of the present application provide a method, an apparatus, an electronic device, and a medium for managing a metadata database, so as to solve the above technical problems as much as possible.
Some embodiments of the present application provide a method for managing a metadata repository, which is applied to a metadata repository management end, where the metadata repository management end is connected to a plurality of metadata repository nodes, and the method includes:
in response to a version-change operation on at least one of the plurality of metadatabase nodes, determining a target metadatabase version corresponding to the version-change operation;
determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relationship between different metadata database versions and dependency metadata database versions and script information;
when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and a script storage address from the target script information;
when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from the script storage address;
executing the script program, and deploying the target metadata base version at the target metadata base node.
Optionally, the corresponding relationship between the metadata version and the script information is constructed by the following steps:
responding to the construction instruction of the corresponding relation, and displaying a version tree containing the hierarchical relation between metadata database versions;
in response to the newly added operation of any version father node in the version tree, creating a version child node subordinate to the version father node, and acquiring and storing version information of a metadata base;
responding to script input operation of the metadata database version information, and acquiring and storing script information;
and storing the version information of the metadata database and the script information in a correlation manner.
Optionally, after displaying the version tree containing the association relationship between the metadata database versions, the method further includes:
responding to the editing operation of any target version node in the version tree, and displaying version information and script information corresponding to the target version node;
and updating the version information and/or the script information indicated by the editing operation in response to the editing operation on the version information and/or the script information.
Optionally, the determining the target metadata database version corresponding to the version change operation includes:
and when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as target metadata database versions.
Optionally, the taking the metadata database version indicated by the intermediate metadata database version and the version change operation as a target metadata database version includes:
when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as metadata database versions to be updated;
taking the metadata database version to be updated with the lowest database version level as a target metadata database version;
after the executing of the script program deploys the target metadatabase version at the target metadatabase node, the method further includes:
and removing the target metadata database version from the metadata database version to be updated, and re-entering the step of taking the metadata database version to be updated with the lowest hierarchy as the target metadata database version until the metadata database version to be updated does not exist, and ending the execution of the version updating process of the target metadata database node.
Optionally, after the metadata database version to be updated with the lowest database version hierarchy is taken as the target metadata database version, the method further includes:
and when the target metadata base version fails to be updated, rolling back the updated content of the target metadata base version, and ending the execution of the version updating process of the target metadata base node.
Optionally, the node information of the metadata base node is edited by the following steps:
responding to an editing instruction of the metadata node information, and displaying a metadata database node tree containing hierarchical relations among the metadata database nodes;
responding to the editing operation of any target metadatabase node identifier in the metadatabase node tree, and displaying metadatabase node information corresponding to the target metadatabase node identifier;
updating the metadatabase node information in response to an editing operation on the metadatabase node information.
Some embodiments of the present application provide a device for managing a metadata repository, which is applied to a metadata repository management end, where the metadata repository management end is connected to a plurality of metadata repository nodes, and the device includes:
an input module, configured to determine, in response to a version change operation for at least one of the plurality of metadata library nodes, a target metadata library version corresponding to the version change operation;
the verification module is used for determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relation between different metadata database versions and dependency metadata database versions and script information;
when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and a script storage address from the target script information;
when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from the script storage address;
and the deployment module is used for executing the script program and deploying the target metadata base version on the target metadata base node.
Optionally, the apparatus further comprises: an editing module to:
responding to the construction instruction of the corresponding relation, and displaying a version tree containing the hierarchical relation between metadata database versions;
in response to the newly added operation of any version father node in the version tree, creating a version child node subordinate to the version father node, and acquiring and storing version information of a metadata base;
responding to script input operation of the metadata database version information, and acquiring and storing script information;
and storing the version information of the metadata database and the script information in a correlation manner.
Optionally, the editing module is further configured to:
responding to the editing operation of any target version node in the version tree, and displaying version information and script information corresponding to the target version node;
and updating the version information and/or the script information indicated by the editing operation in response to the editing operation on the version information and/or the script information.
Optionally, the verification module is further configured to, when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, use the intermediate metadata database version and the metadata database version indicated by the version change operation as the target metadata database version.
Optionally, the verification module is further configured to:
when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as metadata database versions to be updated;
taking the metadata database version to be updated with the lowest database version level as a target metadata database version;
and removing the target metadata database version from the metadata database versions to be updated, and re-entering the step of taking the metadata database version to be updated with the lowest hierarchy as the target metadata database version until the metadata database version to be updated does not exist, and ending the execution of the version updating process of the target metadata database node.
Optionally, the deployment module is further configured to:
and when the target metadata base version fails to be updated, rolling back the updated content of the target metadata base version, and ending the execution of the version updating process of the target metadata base node.
Optionally, the editing module is further configured to:
responding to an editing instruction of the metadata node information, and displaying a metadata database node tree containing hierarchical relations among the metadata database nodes;
responding to the editing operation of any target metadatabase node identifier in the metadatabase node tree, and displaying metadatabase node information corresponding to the target metadatabase node identifier;
updating the metadatabase node information in response to an editing operation on the metadatabase node information.
Some embodiments of the present application provide a computing processing device comprising:
a memory having computer readable code stored therein;
one or more processors which, when executed by the computer readable code, perform the method of managing a metadata database as described above.
Some embodiments of the present application provide a computer program comprising computer readable code which, when run on a computing processing device, causes the computing processing device to perform a method of managing a meta database as described above.
Some embodiments of the present application provide a computer-readable medium in which a method of managing a metadata base as described above is stored.
According to the metadata database management method, the metadata database management device, the electronic equipment and the media, the metadata database version updating process is centralized to the metadata database management end for unified management, so that when a metadata database node connected with the metadata database management end performs data updating, the metadata database node is firstly confirmed to have a dependency metadata database version corresponding to a target metadata database version to be updated, the deployed version can be supported by the dependency metadata database version, and after the configuration information of the metadata database node is confirmed to be matched with the script applicable configuration of the target metadata database node, a script program is executed to deploy the target metadata database version, the metadata database version can normally run after being deployed, and the metadata database version can be rapidly checked through version deployment records after problems occur.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 schematically illustrates a flowchart of a metadata database management method according to some embodiments of the present application;
FIG. 2 is a schematic diagram illustrating a method for managing a metadata database according to some embodiments of the present application;
FIG. 3 is a schematic flow chart diagram illustrating another method for metadata repository management according to some embodiments of the present application;
FIG. 4 is a second schematic flow chart diagram illustrating another metadata database management method according to some embodiments of the present application;
FIG. 5 is a third schematic flow chart diagram illustrating another metadata database management method according to some embodiments of the present application;
FIG. 6 schematically illustrates a schematic diagram of another method for metadata library management provided by some embodiments of the present application;
FIG. 7 is a fourth flowchart schematically illustrating another metadata repository management method according to some embodiments of the present application;
fig. 8 is a schematic structural diagram of a metadata database management apparatus according to some embodiments of the present application;
FIG. 9 schematically illustrates a block diagram of a computing processing device for performing a method according to some embodiments of the present application;
fig. 10 schematically illustrates a memory unit for holding or carrying program code implementing methods according to some embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 schematically illustrates a method for managing a metadata repository, which is applied to a metadata repository management side that is connected to a plurality of metadata repository nodes, and the method includes:
it should be noted that the metadata refers to structured data (such as title, version, publishing data, related description, including search point, etc.) extracted from information resources and used for organizing, describing, searching, saving, managing information and knowledge resources. Such as information of various servers, terminals, industries, projects, cooperative hospitals, platforms, users of the platforms, authorities, roles, log types, administrative divisions, business alarm types, etc. of our companies, the metadata base node is a database node for storing metadata, and the metadata base node may be a distributed database, so that a plurality of metadata base nodes may exist. The metadatabase management end is a server or a terminal device with functions of data processing, data transmission, data storage and the like, such as a personal computer, a tablet computer, a portable mobile terminal and the like, which are used for managing the update of the data and the database version of the connected metadatabase nodes, and the metadatabase service end can be in communication connection with a plurality of metadatabase nodes through a video network or the internet. When different metadata base nodes are accessed to a metadata base management end, self information needs to be registered and input, at least a dependent metadata base version, script information and version deployment records need to be input, wherein the dependent metadata base version is a metadata version which needs to be quoted or depended when the metadata base nodes operate, the script information is a script program needed by deployment of different metadata versions, and the version deployment records refer to historical records of the metadata base version which is deployed by a metadata base script.
Step 101, responding to a version change operation of at least one metadata base node in the plurality of metadata base nodes, and determining a target metadata base version corresponding to the version change operation.
In the embodiment of the application, when a user needs to change the version of a certain target metadata database node, the user may perform a version change operation on a metadata database management end, where the metadata database management end determines a target metadata database node indicated by the version change operation from a plurality of connected metadata database nodes based on the version change operation, and determines a target metadata database version indicated by the version change operation from the plurality of metadata database versions. It can be understood that the updating process of different metadata database versions is centralized at the metadata database management end for unified management in the embodiment of the application, so that the version updating of different metadata database nodes is managed conveniently.
And 102, determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relationship among different metadata database versions, dependency metadata database versions and script information.
In this embodiment of the application, because the dependent metadata database versions of different metadata database versions are different, if a certain target metadata database version needs to be deployed on a target metadata database node, it needs to be known whether the dependent metadata database version of the target metadata database version is deployed on the target metadata database node, so that a deployment record of the dependent database version of the target metadata database version can be queried in a version deployment record, and the metadata database node updates the deployment record of the metadata database version in a corresponding version deployment record after successfully deploying the certain metadata database version each time.
Step 103, when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and script storage address from the target script information.
In the embodiment of the application, if the target metadatabase node does not deploy the dependent metadatabase version of the target metadatabase version, the deployment process of the target metadatabase version on the target metadatabase node is stopped, and if the target metadatabase node deploys the dependent metadatabase version of the target metadatabase version, the deployment process of the target metadatabase version is continued, that is, the applicable configuration of the script and the script storage address are extracted from the script information of the target metadatabase version. The script suitable configuration refers to hardware conditions such as a device model, a content size, and a bandwidth size required for running the script, software conditions such as a driver and a system architecture required for running the script, and right conditions such as a user and a password logged on a metadata base node, and may be specifically set according to actual requirements, which is not limited herein. The script storage address refers to a physical address stored by the script program code.
And 104, acquiring a script program from the script storage address when the applicable configuration of the script is matched with the configuration information of the target metadatabase node.
In the embodiment of the application, the metadata base management end acquires the configuration information of the target metadata base node from the target metadata base node or reads the pre-stored configuration information from the database of the application, compares the configuration information with the applicable script configuration, and if the configuration information of the target metadata base node is completely matched with the applicable script configuration, the metadata base management end can further read the script program from the script storage address for subsequent deployment of the target metadata base version.
Specifically, referring to fig. 2, during upgrading, a version number to be upgraded is selected, and then whether a dependent version of the version is deployed is detected, and if the dependent version does not exist, the upgrading is not performed; if yes, executing all SQL (structured query language) scripts in the version one by one, before executing each SQL script, detecting whether the applicable architecture of the script is matched with the architecture of the node, comparing whether the applicable environment of the script is matched with the environment information of the node, if so, analyzing the SQL script, and executing each SQL statement in the script. If there is a mismatch in conditions, the script is ignored from execution. Submitting all SQL of one version as a transaction, and rolling back all SQL if an error occurs in the process of executing a certain SQL statement in the version; and if all SQL statements in the version are successfully executed, inserting a version record into a version table in the database to indicate that the node has upgraded the version.
And 105, executing the script program, and deploying the target metadata database version in the target metadata database node.
In the embodiment of the application, the metadata base management end executes all script programs of the target metadata version one by one, before executing each script program, detects whether an applicable architecture of the script is matched with an architecture of the target metadata base node, compares whether applicable configuration information of the script is configured with configuration information of the target metadata base node, if so, continues analyzing the script program and continues executing the script program, and if a condition is not configured in the running process of the script program, the running of the script program can be stopped or the next script program can be directly executed by ignoring the script program. All script programs of a target metadata database version are submitted as a transaction, if a certain script program in the target metadata database version is executed, all script programs are rolled back, if all script programs in the target metadata database version are executed successfully, a version deployment record of the target metadata database version is inserted into a version deployment record of a target metadata database node, the target metadata database node is indicated to be deployed with the target metadata version, namely in a target metadata database needing to be deployed, a version table is specially used for storing the version deployment record, and when one version is deployed, one version deployment record is inserted into the version table.
According to the embodiment of the application, the metadata version updating process is centralized to the metadata base management end for unified management, so that when the metadata base nodes connected with the metadata base management end perform data updating, the metadata base nodes are confirmed to have the dependency metadata base versions corresponding to the target metadata base versions to be updated, the deployed versions can be supported by the dependency metadata base versions, after the configuration information of the metadata base nodes is confirmed to be matched with the script applicable configuration of the target metadata base nodes, the script programs are executed to deploy the target metadata base versions, the metadata base versions can be guaranteed to normally run after deployment, and the metadata base management end can perform investigation quickly through version deployment records after problems occur.
Optionally, referring to fig. 3, the correspondence between the metadata version and the script information is constructed through the following steps 201 to 204:
step 201, responding to the construction instruction of the corresponding relation, and displaying a version tree containing the hierarchical relation between the metadata database versions.
In the embodiment of the application, the metadata version may be a large version or a small version, and the difference is that script information does not need to be added to the large version, and the metadata version of the large version may be deployed through the script information of the metadata database version of the small version. Therefore, the upper and lower level incidence relation between the metadata database versions can be represented in a version tree mode.
In practical application, a user can view the version data through a display node at a metadata management end, so that a node where a metadata version required to be updated is located is selected on the version data to create a metadata database version, if the selected node is a root node, the creation is indicated to be a large version, and if the selected node is a large version, the creation is indicated to be a small version of the metadata version.
Step 202, in response to a new adding operation to any version father node in the version tree, creating a version child node subordinate to the version father node, and acquiring and storing version information of a metadata database.
In the embodiment of the present application, when creating a metadata database version, a user needs to input attribute information of a metadata database version to be created at a metadata database management end, where the attribute information includes a version number, an associated product name plus a version number, version description information, developer information of a docking, creation time, a version number depending on the metadata database version, and the like, and may be specifically set according to actual requirements, and the setting is not limited herein.
And step 203, responding to the script input operation of the metadata database version information, and acquiring and storing script information.
In the embodiment of the application, the metadata base management end can input the attribute information input by the user into the version base. If the created metadata version is a large version, the creation is completed without continuing to input script information. If the created metadatabase version is a small version, script information is added to the metadatabase version after the creation of the finished version. When adding the script information, attribute information of the script needs to be set, including script application configuration, metadata base identification executed by the script, mapping database identification, script storage address, and the like, where the script application configuration includes a script application architecture and a script application environment, and may be specifically set according to actual requirements, and the setting is not limited here.
And 204, storing the metadata database version information and the script information in an associated manner.
In the embodiment of the application, after the new script information is added, the metadata base management end stores the script information and the newly created metadata base version into the version base in a correlation mode, then copies the script storage address of the script program to a directory which is uniformly planned according to the version number for encryption storage, and can add a plurality of scripts according to actual requirements according to the mode.
Optionally, referring to fig. 4, after the step 201, the method further includes:
step 301, responding to an editing operation on any target version node in the version tree, and displaying version information and script information corresponding to the target version node.
In the embodiment of the application, a user can perform editing operation on any target version node in the script data in the display interface of the metadata base management end, so that the version information and the script information corresponding to the version number are displayed in the attribute display area.
Step 302, in response to the editing operation on the version information and/or the script information, updating the version information and/or the script information indicated by the editing operation.
In the embodiment of the application, the user can click the save function option after the modification of the version information and/or the script information in the display interface is completed, and the latest version information can be rewritten in the version library.
The user can select the script to be modified in the script list interface of the display interface, then the script information and the script content can be modified, the latest attribute value is input in each attribute box, and the latest script information can be updated into the version library by clicking the storage option after the modification is finished.
Of course, the user may also click a delete option after selecting a certain script in the display interface, thereby deleting the script information in the version library and deleting the corresponding script file in the script directory.
And 303, responding to the viewing operation of the script information, acquiring a script program from the script storage address, and displaying the code information of the script program.
In this embodiment of the present application, a user selects a certain script in a script tree of a display interface, and reads data from a base library, and displays script information of the version on the display interface, for example: the method comprises the steps of applying to attribute information such as environment, system architecture and a database to which scripts are applied, clicking certain script information on a script list, or reading data from a script library, displaying the script information on a display interface, reading and decrypting the script information from a script catalog by clicking the script information by a user, and displaying the decrypted script information on the display interface.
Optionally, the method further comprises: responding to the creation operation of the metadatabase node, and acquiring and storing metadatabase node information, wherein the metadatabase node information comprises: at least one of host name, port number, maintenance personnel information, password, system architecture, project environment and cluster node relationship.
In this embodiment of the application, a user may click on a creation option in a node tree displayed on a display interface of a metadata management end, and then set an attribute of a node to be created, where a host name, a port number, maintenance staff information, a password, a system architecture, a project environment, a cluster node relationship, and the like may be specifically set according to actual requirements, and this is not limited here. And the metadatabase management end stores the attribute information and writes the attribute information into the node database.
Alternatively, referring to fig. 5, the node information of the metadata base node is edited by the following steps 401 to 403:
step 401, in response to the editing instruction of the metadata node information, displaying a metadata database node tree containing hierarchical relationships between metadata database nodes.
Step 402, responding to the editing operation of any target metadatabase node identifier in the metadatabase node tree, and displaying metadatabase node information corresponding to the target metadatabase node identifier.
In the embodiment of the application, after the display interface of the metadata base management end displays the node tree, a user can enable the display interface to display the attribute information of a certain target metadata base node identifier on the node tree.
And step 403, updating the metadatabase node information in response to the editing operation on the metadatabase node information.
In the embodiment of the application, after clicking the metadatabase node information of a certain node in the metadatabase node data in the display interface, a user can modify some displayed attribute information and then click the storage option, so that the latest attribute information can be updated into the node library. Of course, a deletion operation may be performed on a metadatabase node to delete the metadatabase node from the node tree and node library.
Further, referring to fig. 6, in addition to performing operations of adding, deleting, modifying, and checking metadata database versions and metadata nodes in the above description, the metadata database management end may click a node on the interface node tree, click the historical version interface, connect to the node database, read a version record from the version table, and then display the version record to the interface. Clicking a certain node in the interface node tree, selecting the backup library option by a right button, calling a backup program of the database, and backing up the database to a specified address. Clicking a certain node on the interface node tree, selecting a reduction library option by a right button, calling a reduction program of the database, reading the selected reduction script, and then reducing the database to a historical state.
Optionally, the step 101 includes: and when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as target metadata database versions.
In the embodiment of the present application, if the metadata database version indicated by the version change operation and the current metadata database version currently deployed by the target metadata database node are not version-adjacent, that is, at least one metadata database version exists between the two versions, which is higher in hierarchy than the current metadata database version but lower in hierarchy than the metadata database version indicated by the version change operation, the metadata database version indicated by the operation cannot be directly updated from the current metadata database version. At this time, the metadata database version and the intermediate metadata database version indicated by the version change operation can be regarded as target metadata database versions, the target metadata database nodes are sequentially updated according to the version hierarchy precedence order relationship among a plurality of target metadata database versions,
optionally, referring to fig. 7, a flowchart illustrating steps of another metadata database management method provided in an embodiment of the present application is shown:
step 501, in response to a version change operation on at least one metadata base node in the metadata base nodes, when at least one intermediate metadata base version exists between the metadata base version indicated by the version change operation and the current metadata base version of the target metadata base node, taking the intermediate metadata base version and the metadata base version indicated by the version change operation as metadata base versions to be updated.
In the embodiment of the application, generally, dependency relationships exist between metadata database versions at different hierarchies, so that the metadata database version at a high hierarchy can be continuously deployed after a metadata database version at a low hierarchy is deployed on a target metadata database node.
Specifically, in the actual updating process, the metadata database version and the intermediate metadata database version indicated by the version change operation are both used as the metadata database versions to be updated for subsequent version updating one by one.
And 502, taking the metadata database version to be updated with the lowest database version level as a target metadata database version.
In the embodiment of the application, because the metadata database version at the low level may be a metadata database version dependent on the metadata database version at the high level, the application takes the lowest version level of the metadata database versions to be updated as the target metadata database version updated by the current version. It should be noted that, here, the level of the metadata database version does not refer to the order of the release time of the metadata database version, but refers to the dependency relationship between the metadata database versions, the lower the level of the metadata database version at the bottom of the dependency relationship is, otherwise, the higher the level of the metadata database version at the higher level of the dependency relationship is, for example, there are metadata database version 1, metadata database version 2, and metadata database version 3 whose distribution time is sequentially later, the metadata database version 1 is the dependent metadata database version of the metadata database version 2, but the metadata database version 3 is the latest version of the dependent metadata database version of the metadata database version 1, therefore, the metadata database version 3 is also the dependent source database version of the metadata database version 1, and the version levels are ordered from low to high: metadata base version 3, metadata base version 1, metadata base version 2. Of course, this is only an exemplary illustration, and the specific hierarchical relationship may be set according to actual requirements, which is not limited herein.
Step 503, determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relationship between the different metadata database versions and the dependency metadata database version and the script information.
This step can refer to the detailed description of step 102, which is not repeated here.
Step 504, when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and script storage address from the target script information.
This step can refer to the detailed description of step 103, which is not repeated herein.
And 505, when the applicable configuration of the script is matched with the configuration information of the target metadata base node, acquiring a script program from the script storage address.
This step can refer to the detailed description of step 104, which is not repeated here.
Step 506, executing the script program, and deploying the target metadata base version at the target metadata base node.
This step can refer to the detailed description of step 105, which is not repeated here.
And 507, removing the target metadata base version from the metadata base versions to be updated, and re-entering the step of taking the metadata base version to be updated with the lowest hierarchy as the target metadata base version until the metadata base version to be updated does not exist, and ending the execution of the version updating process for the target metadata base node.
In the embodiment of the application, after the target database version is updated successfully, the target database version with the lowest hierarchy is continuously selected from the remaining metadata database versions to be updated which are not updated and used as the next target database version for updating and changing the metadata database, so that the metadata database versions are sequentially updated from low to high according to the hierarchy relationship of the versions until the metadata database version indicated by the version updating operation is updated.
And step 508, when the target metadata base version fails to be updated, rolling back the updated content of the target metadata base version, and ending the execution of the version updating process of the target metadata base node.
In the application embodiment, if there is no deployment record of the target dependent metadata database version in the target metadata database node in the updating process, or if the applicable script configuration does not match the configuration information of the target metadata database node, it is determined that the target metadata database version is failed to be updated, and at this time, all updated contents of the target metadata database version before rollback are restored to the original metadata database version of the target metadata database before version update, that is, the current metadata database version in the above description.
According to the embodiment of the application, the metadata database versions to be updated are sequentially updated from low to high according to the version hierarchical relationship among the metadata database versions to be updated in the cross-version updating process of the metadata database, the condition that the metadata database versions are not depended on in the cross-version updating process of the metadata is guaranteed, and the stability of the metadata versions is improved.
Fig. 8 schematically shows a structural diagram of an apparatus 60 for managing a metadata repository, which is applied to a metadata repository management side that is connected to a plurality of metadata repository nodes, and the apparatus includes:
an input module 601, configured to determine, in response to a version change operation on at least one of the metadata library nodes, a target metadata library version corresponding to the version change operation;
the verification module 602 is configured to determine, according to correspondence between different metadata database versions and dependency metadata database versions and script information, a target dependency metadata database version and target script information corresponding to the target metadata database version;
when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and a script storage address from the target script information;
when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from the script storage address;
a deployment module 603, configured to execute the script program, and deploy the target metadata repository version in the target metadata repository node.
Optionally, the apparatus further comprises: an editing module to:
responding to the construction instruction of the corresponding relation, and displaying a version tree containing the hierarchical relation between metadata database versions;
in response to the newly added operation of any version father node in the version tree, creating a version child node subordinate to the version father node, and acquiring and storing version information of a metadata base;
responding to script input operation of the metadata database version information, and acquiring and storing script information;
and storing the version information of the metadata database and the script information in a correlation manner.
Optionally, the editing module is further configured to:
responding to the editing operation of any target version node in the version tree, and displaying version information and script information corresponding to the target version node;
and updating the version information and/or the script information indicated by the editing operation in response to the editing operation on the version information and/or the script information.
Optionally, the verification module 602 is further configured to, when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, use the intermediate metadata database version and the metadata database version indicated by the version change operation as the target metadata database version.
Optionally, the verification module 602 is further configured to:
when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as metadata database versions to be updated;
taking the metadata database version to be updated with the lowest database version level as a target metadata database version;
and removing the target metadata database version from the metadata database version to be updated, and re-entering the step of taking the metadata database version to be updated with the lowest hierarchy as the target metadata database version until the metadata database version to be updated does not exist, and ending the execution of the version updating process of the target metadata database node.
Optionally, the deployment module 603 is further configured to:
and when the target metadata base version fails to be updated, rolling back the updated content of the target metadata base version, and ending the execution of the version updating process of the target metadata base node.
Optionally, the editing module is further configured to:
responding to an editing instruction of the metadata node information, and displaying a metadata database node tree containing hierarchical relations among the metadata database nodes;
responding to the editing operation of any target metadatabase node identifier in the metadatabase node tree, and displaying metadatabase node information corresponding to the target metadatabase node identifier;
updating the metadatabase node information in response to an editing operation on the metadatabase node information.
According to the embodiment of the application, the metadata version updating process is centralized to the metadata base management end for unified management, so that when the metadata base nodes connected with the metadata base management end perform data updating, the metadata base nodes are confirmed to have the dependency metadata base versions corresponding to the target metadata base versions to be updated, the deployed versions can be supported by the dependency metadata base versions, after the configuration information of the metadata base nodes is confirmed to be matched with the script applicable configuration of the target metadata base nodes, the script programs are executed to deploy the target metadata base versions, the metadata base versions can be guaranteed to normally run after deployment, and the metadata base management end can perform investigation quickly through version deployment records after problems occur.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in a computing processing device according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, FIG. 9 illustrates a computing processing device that may implement methods in accordance with the present application. The computing processing device conventionally includes a processor 710 and a computer program product or computer-readable medium in the form of a memory 720. The memory 720 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 720 has a storage space 730 for program code 731 for performing any of the method steps of the above-described method. For example, the storage space 730 for the program code may include respective program codes 731 for implementing respective steps in the above method, respectively. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit as described with reference to fig. 10. The memory unit may have memory segments, memory spaces, etc. arranged similarly to memory 720 in the computing processing device of fig. 9. The program code may be compressed, for example, in a suitable form. Generally, the memory unit comprises computer readable code 731', i.e. code that can be read by a processor, such as 710, for example, which when executed by a computing processing device causes the computing processing device to perform the steps of the method described above.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Moreover, it is noted that instances of the word "in one embodiment" are not necessarily all referring to the same embodiment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for managing a metadatabase is applied to a metadatabase management end, wherein the metadatabase management end is connected with a plurality of metadatabase nodes, and the method comprises the following steps:
in response to a version-change operation on at least one of the plurality of metadatabase nodes, determining a target metadatabase version corresponding to the version-change operation;
determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relationship between different metadata database versions and dependency metadata database versions and script information;
when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and a script storage address from the target script information;
when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from the script storage address;
executing the script program, and deploying the target metadata base version at the target metadata base node.
2. The method according to claim 1, wherein the correspondence between the metadata version and the script information is constructed by:
responding to the construction instruction of the corresponding relation, and displaying a version tree containing the hierarchical relation between metadata database versions;
in response to the newly added operation of any version father node in the version tree, creating a version child node subordinate to the version father node, and acquiring and storing version information of a metadata base;
responding to script input operation of the metadata database version information, and acquiring and storing script information;
and storing the version information of the metadata database and the script information in a correlation manner.
3. The method of claim 2, wherein after displaying the version tree containing associations between metadata repository versions, the method further comprises:
responding to the editing operation of any target version node in the version tree, and displaying version information and script information corresponding to the target version node;
and updating the version information and/or the script information indicated by the editing operation in response to the editing operation on the version information and/or the script information.
4. The method according to claim 1, wherein the determining the target metadata database version corresponding to the version change operation comprises:
and when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as target metadata database versions.
5. The method according to claim 4, wherein said making the intermediate metadata repository version and the metadata repository version indicated by the version change operation as target metadata repository versions comprises:
when at least one intermediate metadata database version exists between the metadata database version indicated by the version change operation and the current metadata database version of the target metadata database node, taking the intermediate metadata database version and the metadata database version indicated by the version change operation as metadata database versions to be updated;
taking the metadata database version to be updated with the lowest database version level as a target metadata database version;
after the executing of the script program deploys the target metadatabase version at the target metadatabase node, the method further includes:
and removing the target metadata database version from the metadata database version to be updated, and re-entering the step of taking the metadata database version to be updated with the lowest hierarchy as the target metadata database version until the metadata database version to be updated does not exist, and ending the execution of the version updating process of the target metadata database node.
6. The method according to claim 5, wherein after the metadata base version to be updated with the lowest database version hierarchy is taken as the target metadata base version, the method further comprises:
and when the target metadata base version fails to be updated, rolling back the updated content of the target metadata base version, and ending the execution of the version updating process of the target metadata base node.
7. The method according to claim 1, wherein the node information of the metadatabase node is edited by:
responding to an editing instruction of the metadata node information, and displaying a metadata database node tree containing hierarchical relations among the metadata database nodes;
responding to the editing operation of any target metadatabase node identifier in the metadatabase node tree, and displaying metadatabase node information corresponding to the target metadatabase node identifier;
updating the metadatabase node information in response to an editing operation on the metadatabase node information.
8. An apparatus for managing a metadatabase, the apparatus being applied to a metadatabase management side, the metadatabase management side being connected to a plurality of metadatabase nodes, the apparatus comprising:
the input module is used for responding to the version change operation of at least one metadata base node in the metadata base nodes and determining a target metadata base version corresponding to the version change operation;
the verification module is used for determining a target dependency metadata database version and target script information corresponding to the target metadata database version according to the corresponding relation between different metadata database versions and dependency metadata database versions and script information;
when the deployment record of the target dependency metadata database version exists in the target metadata database node, extracting script applicable configuration and a script storage address from the target script information;
when the applicable configuration of the script is matched with the configuration information of the target metadatabase node, acquiring a script program from the script storage address;
and the deployment module is used for executing the script program and deploying the target metadata base version on the target metadata base node.
9. A computing processing device, comprising:
a memory having computer readable code stored therein;
one or more processors that, when the computer readable code is executed by the one or more processors, the computing processing device performs the method of managing a metadata base recited in any one of claims 1 to 7.
10. A computer-readable medium in which a method of managing the metadata base according to any one of claims 1 to 7 is stored.
CN202210326771.4A 2022-03-30 2022-03-30 Metadata database management method and device, electronic equipment and medium Pending CN114816470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210326771.4A CN114816470A (en) 2022-03-30 2022-03-30 Metadata database management method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210326771.4A CN114816470A (en) 2022-03-30 2022-03-30 Metadata database management method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN114816470A true CN114816470A (en) 2022-07-29

Family

ID=82532460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210326771.4A Pending CN114816470A (en) 2022-03-30 2022-03-30 Metadata database management method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114816470A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116149712A (en) * 2023-04-04 2023-05-23 湖南中青能科技有限公司 Database version updating compatible matching method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365945A (en) * 2012-03-29 2013-10-23 乐金信世股份有限公司 Method of managing script, server performing the same and storage media storing the same
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
WO2017177769A1 (en) * 2016-04-11 2017-10-19 平安科技(深圳)有限公司 Ogg version deployment method and system, server, and storage medium
CN111708764A (en) * 2020-06-22 2020-09-25 深圳前海微众银行股份有限公司 Method and device for controlling database change version

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365945A (en) * 2012-03-29 2013-10-23 乐金信世股份有限公司 Method of managing script, server performing the same and storage media storing the same
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
WO2017177769A1 (en) * 2016-04-11 2017-10-19 平安科技(深圳)有限公司 Ogg version deployment method and system, server, and storage medium
CN111708764A (en) * 2020-06-22 2020-09-25 深圳前海微众银行股份有限公司 Method and device for controlling database change version

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116149712A (en) * 2023-04-04 2023-05-23 湖南中青能科技有限公司 Database version updating compatible matching method
CN116149712B (en) * 2023-04-04 2023-06-27 湖南中青能科技有限公司 Database version updating compatible matching method

Similar Documents

Publication Publication Date Title
US8010962B2 (en) Infrastructure for the automation of the assembly of schema maintenance scripts
CN105938448B (en) Method and apparatus for data duplication
US8255899B2 (en) Techniques for upgrade dependency management
US10621212B2 (en) Language tag management on international data storage
US7774772B2 (en) Method and apparatus to perform an application software migration
US7672966B2 (en) Adding extrinsic data columns to an existing database schema using a temporary column pool
US8140573B2 (en) Exporting and importing business objects based on metadata
ES2774716T3 (en) A method and system for modeling mobile phone application tasks
CN110196725A (en) Configuration file management method, apparatus, computer equipment and storage medium
US10339113B2 (en) Method and system for effecting incremental changes to a repository
JP5630190B2 (en) Update management apparatus, update management method, and update management program
US8805777B2 (en) Data record collapse and split functionality
CN109491962B (en) File directory tree management method and related device
CN111694612A (en) Configuration checking method, device, computer system and storage medium
CN113326247A (en) Cloud data migration method and device and electronic equipment
CN112416957A (en) Data increment updating method and device based on data model layer and computer equipment
CN114816470A (en) Metadata database management method and device, electronic equipment and medium
CN110244951B (en) Application publishing method and device
CN114924914B (en) Disk partition table information backup and recovery method and system
CN116048609A (en) Configuration file updating method, device, computer equipment and storage medium
CN113986237A (en) Method and device for creating Jenkins compiling task
CN113419752A (en) Data processing method and device, electronic equipment and storage medium
CN113806309A (en) Metadata deleting method, system, terminal and storage medium based on distributed lock
CN108614838B (en) User group index processing method, device and system
US20230244542A1 (en) System and method for automatically identifying application groups in container deployment environments

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