A database management method, device, electronic equipment and computer storage medium

By obtaining database instances at preset time intervals and building a target baseline based on task requirement information for table structure design and SQL audit, the problem of irregular database management in the existing technology is solved, and fast and accurate database management and data model assets are achieved. Continuity of the list.

CN114490594BActive Publication Date: 2024-12-13BANK OF CHINA FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210143446.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-12-13
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

The existing technology cannot manage databases quickly and accurately, resulting in data structure organization and table structure changes that cannot be carried out in a timely manner, resulting in irregular database management, confusing asset lists of data models, and inability to quickly locate errors.

Method used

By obtaining database instances at preset time intervals, obtaining task requirements information, building target baselines based on pre-constructed baselines and task requirements information, performing table structure design and SQL audit, generating and executing code and conducting internal testing, and finally updating the data structure model.

Benefits of technology

It realizes fast and accurate database management, ensures the continuity and accuracy of the data model asset inventory, and can extract the data model asset inventory applied by the product at any time, reducing database load and mislocal time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490594B_ABST
    Figure CN114490594B_ABST
Patent Text Reader

Abstract

The present application discloses a database management method, device, electronic device and computer storage medium, which can be applied to the distributed field, big data field, or financial field. The method includes: obtaining a database instance at a preset time interval; when determining that the database instance is a program for a new product application, obtaining the corresponding task requirement information; constructing a first target baseline corresponding to the new product application based on a pre-built baseline and task requirement information; designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure; when determining that the SQL audit of the table structure has passed, generating an execution code corresponding to the table structure; performing an internal test based on the execution code; and when determining that the internal test has passed, updating the data structure model based on the table structure. The above method can quickly and accurately manage the database data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a database management method, device, electronic equipment and computer storage medium. Background Art

[0002] With the continuous changes in product applications, and each enterprise may have many product applications, each application product has corresponding data, so the data needs to be sorted.

[0003] Currently, in the process of application development, the data structure of product applications and each table structure change are manually recorded. Since product applications are iterated and updated too quickly, the above method cannot quickly and accurately manage the database data. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a database management method device, an electronic device and a computer storage medium to solve the problem in the prior art that the database cannot be managed quickly and accurately.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention shows a database management method, the method comprising:

[0007] Get database instances at preset time intervals;

[0008] When determining that the database instance is a program for a new product application, obtaining corresponding task requirement information;

[0009] constructing a first target baseline corresponding to the new product application based on the pre-constructed baseline and the task requirement information;

[0010] Designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure;

[0011] When it is determined that the SQL audit of the table structure passes, generating an execution code corresponding to the table structure;

[0012] Performing internal testing based on the execution code;

[0013] When it is determined that the internal test passes, the data structure model is updated based on the table structure.

[0014] Optionally, also include:

[0015] When it is determined that the database instance is not a program for a new product application, obtaining corresponding update task requirement information;

[0016] Finding a target table structure corresponding to the product application;

[0017] Based on the database instance and the update task requirement information, changing the target table structure;

[0018] When it is determined that the SQL audit of the table structure after the change has passed, an execution code corresponding to the table structure is generated;

[0019] Performing internal testing based on the execution code;

[0020] When it is determined that the internal test has passed, the data structure model is updated based on the changed table structure.

[0021] Optionally, the step of constructing a first target baseline corresponding to the new product application based on the pre-constructed baseline and the task requirement information includes:

[0022] Based on the task requirement information, searching for a baseline corresponding to the task requirement information in pre-built baselines, and using the baseline as a basic baseline;

[0023] A first target baseline corresponding to the new product application is constructed based on the basic baseline, the application reason information in the task requirement information, and a standard database.

[0024] Optionally, the designing of a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure includes:

[0025] Importing an original table from a standard database of the task requirement information;

[0026] A table structure is designed for the original table based on the first target baseline to obtain a corresponding table structure.

[0027] Optionally, also include:

[0028] When the product application can be applied to multiple deployment environments, the standard database based on the task requirement information is compared with other databases in other deployment environments;

[0029] If there is any inconsistency, the data in the other databases are updated based on the reference database.

[0030] A second aspect of an embodiment of the present invention shows a database management device, the device comprising:

[0031] An acquisition module, used to acquire a database instance at a preset time interval; and when it is determined that the database instance is a program for a new product application, acquire corresponding task requirement information;

[0032] A baseline creation module, configured to construct a first target baseline corresponding to the new product application based on a pre-built baseline and the task requirement information;

[0033] A table structure processing module, used to design a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure;

[0034] The processing module is used to generate an execution code corresponding to the table structure when it is determined that the SQL audit of the table structure has passed; perform internal testing based on the execution code; and update the data structure model based on the table structure when it is determined that the internal testing has passed.

[0035] Optionally, the acquisition module is further used to: when it is determined that the database instance is not a program for a new product application, acquire corresponding update task requirement information;

[0036] Correspondingly, the table structure processing module is also used to: search for a target table structure corresponding to the product application; and change the target table structure based on the database instance and the update task requirement information.

[0037] Optionally, the baseline creation module is specifically used to: based on the task requirement information, search for a baseline in a pre-constructed baseline corresponding to the task requirement information, and use the baseline as a basic baseline; and construct a first target baseline corresponding to the new product application based on the basic baseline and the application reason information in the task requirement information and the standard database.

[0038] A third aspect of an embodiment of the present invention shows an electronic device, which is used to run a program, wherein the program, when running, executes the database management method shown in the first aspect of the embodiment of the present invention.

[0039] A fourth aspect of an embodiment of the present invention shows a computer storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the database management method shown in the first aspect of the embodiment of the present invention.

[0040] Based on the above-mentioned embodiment of the present invention, a database management method device, electronic device and computer storage medium are provided. The method includes: obtaining a database instance at a preset time interval; when determining that the database instance is a program for a new product application, obtaining corresponding task requirement information; constructing a first target baseline corresponding to the new product application based on a pre-built baseline and the task requirement information; designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure; when determining that the SQL audit of the table structure is passed, generating an execution code corresponding to the table structure; performing internal testing based on the execution code; when determining that the internal test is passed, updating a data structure model based on the table structure. In an embodiment of the present invention, when determining that the database instance is a program for a new product application, obtaining corresponding task requirement information; constructing a first target baseline corresponding to the new product application based on the pre-built baseline and the task requirement information; designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure; when determining that the SQL audit of the table structure is passed, generating an execution code corresponding to the table structure; performing internal testing based on the execution code; when determining that the internal test is passed, updating a data structure model based on the table structure. The above method can quickly and accurately manage the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0042] Figure 1 A schematic diagram of a flow chart of a database management method according to an embodiment of the present invention;

[0043] Figure 2 The present invention is a schematic diagram showing the structure of a database management device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0046] As can be seen from the background technology, each large enterprise has many products, and each product is constantly updated and expanded in content and functions. On the one hand, at the beginning of each development task, developers need to create new tables directly in the database according to development requirements, but the directly created new tables cannot be directly applied to the production environment, and will also cause confusion in the data model asset lists of each product. The database is overloaded and cannot accurately extract the data model asset lists of each product application at each point in time. On the second hand, the current database data management is generally post-management, which leads to the inability to manage data in a standardized manner. On the third hand, at present, a standardized management model is formed for each stage of the entire development process, but the management of each stage is separate, which may cause stage dislocation, omission of work records between stages, and the inability to quickly locate the stage where the error occurs when problems occur. It is necessary to roll back and investigate one stage at a time, and it cannot be done in one step.

[0047] In summary, it can be seen that the existing method can quickly and accurately manage data in the database.

[0048] It should be noted that the database management method, device, electronic device and computer storage medium provided by the present invention are used in the distributed field or big data field. The above is only an example and does not limit the application field of the database management method, device, electronic device and computer storage medium provided by the present invention.

[0049] In an embodiment of the present invention, when it is determined that a database instance is a program for a new product application, the corresponding task requirement information is obtained; a first target baseline corresponding to the new product application is constructed based on a pre-constructed baseline and the task requirement information; a table structure is designed for the task requirement information based on the first target baseline to obtain a corresponding table structure; when it is determined that the SQL audit of the table structure has passed, an execution code corresponding to the table structure is generated; an internal test is performed based on the execution code; when it is determined that the internal test has passed, the data structure model is updated based on the table structure. The above method enables fast and accurate data management of the database, that is, the above method enables the data model asset list of each product application to be extracted at any time, and the management of each stage is continuous.

[0050] See also Figure 1 , is a flow chart of a database management method shown in an embodiment of the present invention, the method comprising:

[0051] Step S101: Obtain a database instance at a preset time interval.

[0052] In the process of implementing step S101, database instances deployed on various databases sent by database servers of all product applications of the enterprise are received at preset time intervals. Specifically, whether there are deployed and subsequently added database instances on the database is detected in real time at preset time intervals. If so, the corresponding database instances are collected in real time.

[0053] It should be noted that the preset time interval is set by the technicians according to the actual situation.

[0054] All product applications include newly developed applications and already developed applications.

[0055] For example, deploying multiple database instances on a database server, different product applications use different database instances.

[0056] A database instance is a program. Any operations that users perform on the data in the database, including data definition, data query, data maintenance, database operation control, etc., are all performed under the database instance. The application program can only interact with the database through the database instance.

[0057] Step S102: Determine whether the database instance is a program for a new product application. If it is determined that the database instance is a program for a new product application, execute steps S103 to S105 and steps S109 to S112. If it is determined that the database instance is not a program for a new product application, execute steps S106 to S108 and steps S109 to S112.

[0058] In the process of implementing step S102, in order to determine whether the acquired database instance is a database instance deployed on the database of the new product application, it is necessary to judge it to determine that the database instance is a program for the new product application. If it is determined that the database instance is a program for the new product application, execute steps S103 to S105 and steps S109 to S112. If it is determined that the database instance is not a program for the new product application, execute steps S106 to S108 and steps S109 to S112.

[0059] Step S103: Obtain corresponding task requirement information.

[0060] In the specific implementation of step S103, task requirement information of the product application corresponding to the database instance is obtained.

[0061] Optionally, after determining to obtain the corresponding task requirement information, a work order is created so as to manage the database based on the work order.

[0062] It should be noted that a work order refers to a manufacturing plan consisting of one or more operations.

[0063] Step S104: constructing a first target baseline corresponding to the new product application based on the pre-constructed baseline and the task requirement information.

[0064] It should be noted that the specific implementation of step S104 of constructing the content of the first target baseline corresponding to the new product application based on the pre-constructed baseline and the task requirement information includes the following steps:

[0065] Step S11: Based on the task requirement information, a baseline corresponding to the task requirement information is searched in pre-constructed baselines, and the baseline is used as a basic baseline.

[0066] In the specific implementation of step S11, an existing pre-constructed baseline may be referred to, and a baseline having a content similarity with the task requirement information higher than a preset threshold is searched among the pre-constructed baselines and used as the basic baseline.

[0067] It should be noted that a baseline is a "snapshot" of each artifact version in the project repository at a specific time.

[0068] Step S12: constructing a first target baseline corresponding to the new product application based on the basic baseline, the application reason information in the task requirement information, and the standard database.

[0069] In the specific implementation of step S12, the basic baseline is modified based on the application reason information in the task requirement information and all tables or customized partial tables selected in the standard database to determine a new baseline, that is, the first target baseline corresponding to the new product application.

[0070] Step S105: Designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure.

[0071] In the specific implementation of step S105, an original table is imported from the standard database of the task requirement information; and a table structure is designed for the original table based on the first target baseline to obtain a corresponding table structure.

[0072] Optionally, it also includes: when editing the table structure to add fields, it supports global search of all fields in all baselines of the existing database to find out whether there are identical or similar fields. You can refer to the table structure styles of other microservices to clarify the field attributes.

[0073] Optionally, it also includes: copying tables, that is, supporting cloning tables, which can easily achieve consistency in table structure between the source database and the target database, reducing workload.

[0074] Step S106: Obtain corresponding update task requirement information.

[0075] In step S106, the update task requirement information includes the updated database name, the changed content of the table, and the changed table.

[0076] In the specific implementation of step S106 , the changed content of the table and the changed table are obtained, and the update information is determined.

[0077] It should be noted that the update information includes developer information and build time.

[0078] Step S107: searching for a target table structure corresponding to the product application.

[0079] In the specific process of implementing step S107, the target table structure corresponding to the product application is searched from all existing constructed target table structures.

[0080] Step S108: modifying the target table structure based on the database instance and the update task requirement information.

[0081] In the specific implementation of step S108, the target table structure table is updated and designed through the database instance and the update task requirement information to obtain a new table structure.

[0082] Step S109: Perform SQL audit on the table structure. If the audit passes, execute step S110. If the audit fails, modify the table structure manually and return to execute step S109.

[0083] In the process of implementing step S109, an SQL audit tool is introduced after the table structure is constructed to perform a syntax audit on the table structure to determine whether the syntax of the table structure conforms to the preset syntax verification rules; if the audit passes, step S110 is executed; if the audit fails, the table structure is modified manually and the process returns to step S109.

[0084] Optionally, after the SQL audit is passed, it is submitted to the database administrator DBA for review. If the audit pass information sent by the database administrator DBA is received, step S107 is executed.

[0085] It should be noted that the preset syntax verification rules can not only be the syntax verification rules of the database itself, but also pre-customized verification rules, such as customizing the primary key name style, table name style, and requiring fields to be annotated according to business needs, thereby improving the quality of the data structure by refining the table structure and building format specifications.

[0086] Furthermore, it should be noted that SQL auditing tools refer to tools that support auditing of currently commonly used mainstream database languages ​​such as MySQL and Oracle.

[0087] Optionally, if the application version changes frequently and a script needs to be repaired quickly when problems occur, SQL syntax parsing and verification tools can be used for automatic review, and after eliminating basic syntax problems, the script can be submitted to the DBA for review. This allows remote development and timely repair of script problems.

[0088] Step S110: Generate execution code corresponding to the table structure.

[0089] In the process of implementing step S110, a target development framework template is selected from the pre-set development framework templates according to the content of the table structure, and the table structure is imported into the pre-set target development framework template to generate corresponding execution code, thereby improving the work efficiency of developers, reducing development costs, and speeding up the development process.

[0090] It should be noted that the pre-set development framework template is customized by the system administrator. The pre-set development framework template can support multiple front-end and back-end frameworks, such as Vue and JS files required for front-end development, or the corresponding files of Spring framework, Springboot framework, Mybatis, and Ibatis required for back-end development.

[0091] Step S111: performing internal testing based on the execution code.

[0092] In the process of implementing step S111, for product applications that have not yet been installed in the production environment, internal testing can be performed at this time, and the execution code can be run to perform the internal testing. If the internal testing passes, step S109 is executed.

[0093] Optionally, when most companies need to release a version after completing the development task, they obtain the packaging script entered by the developer, label the corresponding database table structure, and then export it for packaging to automatically generate data definition language DDL, database operation language DML, and special table sequence script packages for storing arithmetic progressions, so that developers can download and extract script packages with version labels with one click, and SQL online preview is supported.

[0094] Step S112: updating the data structure model based on the table structure.

[0095] In the process of specifically implementing step S112, the data structure model is updated based on the table structure to facilitate the technicians to quickly perform other operations.

[0096] Optionally, after the SQL audit is successful, the operation will be automatically executed in the internal test library to view the execution progress. After the internal test is successful, the work order content will be automatically synchronized to the database, and there is no need for manual operations in the database again.

[0097] Optionally, the table structure design and baseline creation of the present invention will adopt an online work order review mode to determine whether the table structure design and / or baseline are successfully established. The system automatically generates a work order and pushes it to the next authorized reviewer for review. At the same time, it automatically records the operator and operation time of the entire process, as well as the table structure change history, for future tracing.

[0098] In an embodiment of the present invention, when it is determined that the database instance is a program for a new product application, the corresponding task requirement information is obtained; a first target baseline corresponding to the new product application is constructed based on the pre-constructed baseline and the task requirement information; a table structure is designed for the task requirement information based on the first target baseline to obtain a corresponding table structure; when it is determined that the database instance is not data for a new product application, the corresponding update task requirement information is obtained; the target table structure corresponding to the product application is searched; the target table structure is changed based on the database instance and the update task requirement information; when it is determined that the SQL audit of the table structure is passed, an execution code corresponding to the table structure is generated; an internal test is performed based on the execution code; when it is determined that the internal test is passed, the data structure model is updated based on the table structure. The above method can quickly and accurately manage the database.

[0099] The database management method shown in the above embodiment of the present invention further includes the following steps:

[0100] Step S21: When the product application can be applied to multiple deployment environments, the standard database based on the task requirement information is compared with other databases in other deployment environments. If there is inconsistency, step S22 is executed. If there is consistency, it is determined that the product application can be applied to each deployment environment.

[0101] In the process of implementing step S21, when the product application can be applied to multiple deployment environments, the standard database based on the task requirement information is compared with other databases. If there is any inconsistency, the table structure differences are quickly summarized and step S22 is executed. If there is any consistency, it is determined that the product application can be applied to each deployment environment.

[0102] Step S22: updating the data of the other databases based on the reference database.

[0103] In the specific implementation of step S22, other databases will be updated based on the benchmark database, that is, the standardization when the database is first established.

[0104] In an embodiment of the present invention, when a product application can be applied to multiple deployment environments, a standard database based on the task requirement information is compared with other databases in other deployment environments. If there is any inconsistency, the data of the other databases is updated based on the reference database. The above method can quickly and accurately manage the database.

[0105] Based on the database management method shown in the above embodiment of the present invention, the embodiment of the present invention also shows a database management device, such as Figure 2 FIG. 1 is a schematic diagram of a database management method according to an embodiment of the present invention. The method comprises:

[0106] The acquisition module 201 is used to acquire a database instance at a preset time interval; and when it is determined that the database instance is a program for a new product application, acquire corresponding task requirement information.

[0107] The baseline creation module 202 is used to construct a first target baseline corresponding to the new product application based on the pre-constructed baseline and the task requirement information.

[0108] The table structure processing module 203 is used to design the table structure of the task requirement information based on the first target baseline to obtain a corresponding table structure.

[0109] The processing module 204 is used to generate an execution code corresponding to the table structure when it is determined that the SQL audit of the table structure has passed; perform internal testing based on the execution code; and update the data structure model based on the table structure when it is determined that the internal testing has passed.

[0110] It should be noted that the specific principles and execution processes of each unit in the database management device disclosed in the above embodiment of the present invention are the same as the database management method implemented by the above invention. Please refer to the corresponding parts of the database management method disclosed in the above embodiment of the present invention, and will not be repeated here.

[0111] In an embodiment of the present invention, when it is determined that the database instance is a program for a new product application, the corresponding task requirement information is obtained; a first target baseline corresponding to the new product application is constructed based on the pre-constructed baseline and the task requirement information; a table structure is designed for the task requirement information based on the first target baseline to obtain a corresponding table structure; when it is determined that the database instance is not data for a new product application, the corresponding update task requirement information is obtained; the target table structure corresponding to the product application is searched; the target table structure is changed based on the database instance and the update task requirement information; when it is determined that the SQL audit of the table structure is passed, an execution code corresponding to the table structure is generated; an internal test is performed based on the execution code; when it is determined that the internal test is passed, the data structure model is updated based on the table structure. The above method can quickly and accurately manage the database.

[0112] Based on the database management device shown in the above embodiment of the present invention, the acquisition module 201 is further used to: when it is determined that the database instance is not data of a new product application, obtain corresponding update task requirement information.

[0113] Correspondingly, the table structure processing module 203 is further used to: search for a target table structure corresponding to the product application; and change the target table structure based on the database instance and the update task requirement information.

[0114] Based on a database management device shown in the above-mentioned embodiment of the present invention, the baseline creation module 202 is specifically used to: based on the task requirement information, search for a baseline corresponding to the task requirement information in a pre-constructed baseline, and use the baseline as a basic baseline; based on the basic baseline and the application reason information in the task requirement information and the standard database, construct a first target baseline corresponding to the new product application.

[0115] Based on a database management device shown in the above-mentioned embodiment of the present invention, the table structure processing module 203 designs the table structure of the task requirement information based on the first target baseline to obtain the corresponding table structure, which is specifically used for: importing the original table from the standard database of the task requirement information; designing the table structure of the original table based on the first target baseline to obtain the corresponding table structure.

[0116] A database management device according to the above embodiment of the present invention includes:

[0117] The library table synchronization module is used to compare the data of the standard database based on the task requirement information with other databases in other deployment environments when the product application can be applied to multiple deployment environments; if there is inconsistency, update the data of the other databases based on the benchmark database.

[0118] In an embodiment of the present invention, when a product application can be applied to multiple deployment environments, a standard database based on the task requirement information is compared with other databases in other deployment environments. If there is any inconsistency, the data of the other databases is updated based on the reference database. The above method can quickly and accurately manage the database.

[0119] The embodiment of the present invention also discloses an electronic device, which is used to run a database storage process, wherein the above-mentioned Figure 1 A database management method is disclosed.

[0120] The embodiment of the present invention also discloses a computer storage medium, wherein the storage medium includes a storage database storage process, wherein when the database storage process is running, the device where the storage medium is located is controlled to execute the above Figure 1 A database management method is disclosed.

[0121] In the context of the present disclosure, a computer storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0124] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A database management method, characterized in that: The method comprises: Check in real time whether there are deployed and newly added database instances on the database at preset time intervals; If it exists, the corresponding database instance is collected in real time; When determining that the database instance is a program for a new product application, obtaining task requirement information of the product application corresponding to the database instance; Based on the task requirement information, searching for a baseline corresponding to the task requirement information in pre-built baselines, and using the baseline as a basic baseline; Modify the basic baseline based on the application reason information in the task requirement information and all tables or customized partial tables selected in the standard database to determine a first target baseline corresponding to the new product application; Designing a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure; Determine whether the syntax of the table structure conforms to preset syntax verification rules; If it is in compliance, it is determined that the SQL audit of the table structure has passed, and an execution code corresponding to the table structure is generated; Performing internal testing based on the execution code; When it is determined that the internal test passes, the data structure model is updated based on the table structure.

2. The method according to claim 1, characterized in that Also includes: When it is determined that the database instance is not a program for a new product application, obtaining corresponding update task requirement information; Finding a target table structure corresponding to the product application; Based on the database instance and the update task requirement information, changing the target table structure; When it is determined that the SQL audit of the table structure after the change has passed, an execution code corresponding to the table structure is generated; Performing internal testing based on the execution code; When it is determined that the internal test has passed, the data structure model is updated based on the changed table structure.

3. The method according to claim 1, characterized in that The table structure design of the task requirement information based on the first target baseline to obtain a corresponding table structure includes: Importing an original table from a standard database of the task requirement information; A table structure is designed for the original table based on the first target baseline to obtain a corresponding table structure.

4. The method according to claim 1, characterized in that Also includes: When the product application can be applied to multiple deployment environments, the standard database based on the task requirement information is compared with other databases in other deployment environments; If there is any inconsistency, the data in the other databases are updated based on the standard database.

5. A database management device, characterized in that: The device comprises: An acquisition module is used to detect in real time at a preset time interval whether there are deployed and later added database instances on the database; if so, collect the corresponding database instances in real time; and when it is determined that the database instance is a program for a new product application, obtain task requirement information of the product application corresponding to the database instance; A baseline creation module is used to search for a baseline corresponding to the task requirement information in a pre-built baseline based on the task requirement information, and use the baseline as a basic baseline; modify the basic baseline based on the application reason information in the task requirement information and all tables or custom partial tables selected in the standard database to determine a first target baseline corresponding to the new product application; A table structure processing module, used to design a table structure for the task requirement information based on the first target baseline to obtain a corresponding table structure; A processing module is used to determine whether the syntax of the table structure conforms to preset syntax verification rules; if so, determine that the SQL audit of the table structure has passed, generate execution code corresponding to the table structure; perform internal testing based on the execution code; when it is determined that the internal test has passed, update the data structure model based on the table structure.

6. The device according to claim 5, characterized in that The acquisition module is further used to: when it is determined that the database instance is not a program for a new product application, acquire corresponding update task requirement information; Correspondingly, the table structure processing module is also used to: search for a target table structure corresponding to the product application; and change the target table structure based on the database instance and the update task requirement information.

7. An electronic device, characterized in that: The electronic device is used to run a program, wherein the program, when running, executes the database management method as described in any one of claims 1 to 4.

8. A computer storage medium, characterized in that: The storage medium includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the database management method according to any one of claims 1 to 4.