Database deployment method and device, electronic equipment and readable storage medium

By creating a database execution object with access permissions for multiple database objects, the operation information of multiple database objects is integrated into one operation file, which solves the problem of inefficient database deployment in a multi-user environment and achieves efficient and reliable database deployment.

CN119668638APending Publication Date: 2025-03-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411883768.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In a multi-user environment, the deployment efficiency of databases is low, and effective solutions are lacking in the prior art.

Method used

By creating a database execution object with permissions to access the database to be deployed, the operation information of the multiple database objects is consolidated into one operation file, and the database execution object executes the target deployment file according to the operation file to deploy the database to be deployed in the production environment.

Benefits of technology

It significantly improves database deployment efficiency in multi-user environments, simplifies deployment steps, ensures the applicability and stability of target deployment files in production environments, reduces database failures, and improves deployment reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668638A_ABST
    Figure CN119668638A_ABST
Patent Text Reader

Abstract

The invention discloses a database deployment method and device, electronic equipment and a readable storage medium, and can be applied to the technical field of financial science and technology. The method comprises the steps that a database execution object is created, and the database execution object has access operation authorities of a plurality of database objects to a to-be-deployed database; integrating the operation information executed by the plurality of database objects on the to-be-deployed database into an operation file; the database execution object is controlled to execute the target deployment file according to the operation file so as to deploy the to-be-deployed database in the production environment, the target deployment file is obtained through a pre-deployment process test, and the pre-deployment process is used for representing that the to-be-deployed database is deployed in a pre-execution environment matched with the production environment. And the to-be-deployed database is adapted to the unitized architecture. Through the method and the device, the technical problem of relatively low database deployment efficiency in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of database deployment, and in particular to a database deployment method, device, electronic device and readable storage medium. Background Art

[0002] Under the background of rapid development of information technology, the innovative transformation of information technology application has promoted the widespread application of databases. However, in a multi-user environment, the deployment of databases has certain challenges and limitations.

[0003] In the related art, in the process of database deployment in a multi-user environment, a sequential deployment method is usually adopted, that is, the steps of database installation, compilation and recompilation of fake invalid content, and reconstruction of invalid indexes are performed in the order of database objects. Since this deployment method needs to execute all steps separately for each database object in a unitized architecture, especially in a distributed system, its process is complicated, time-consuming, and inefficient.

[0004] Currently, no effective solution has been proposed to address the problem of low database deployment efficiency in related technologies. Summary of the invention

[0005] The main purpose of the present application is to provide a database deployment method, device, electronic device and readable storage medium to solve the technical problem of low database deployment efficiency in related technologies.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for deploying a database is provided. The method includes: creating a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed; integrating the operation information executed by multiple database objects on the database to be deployed into an operation file; controlling the database execution object to execute the target deployment file according to the operation file to deploy the database to be deployed in the production environment, wherein the target deployment file is obtained through pre-deployment process testing, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to the unitized architecture.

[0007] Optionally, the operation information performed by multiple database objects on the database to be deployed includes at least one of the following: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. The operation information performed by multiple database objects on the database to be deployed is integrated into one operation file, including: integrating the database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information into one operation file.

[0008] Optionally, the database deployment method further includes: pre-deploying the database to be deployed in a pre-execution environment.

[0009] Optionally, deploying the database to be deployed in the pre-execution environment includes: creating the pre-execution environment; obtaining a pre-deployment file for pre-deploying the database to be deployed; and controlling the database execution object to execute the pre-deployment file to pre-deploy the database to be deployed in the pre-execution environment.

[0010] Optionally, the database deployment method also includes: during the pre-deployment process of the database to be deployed, calling a custom detection component to detect the pre-deployment process of the database to be deployed, and obtaining a detection result, wherein the detection result at least includes deployment problems existing in the pre-deployment process of the database to be deployed; adjusting the pre-deployment file based on the detection result; and re-pre-deploying the database to be deployed based on the adjusted pre-deployment file, until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there are no deployment problems in the pre-deployment process of the database to be deployed.

[0011] Optionally, the detection component includes at least a failure query component and a jamming detection component. During the pre-deployment process of the database to be deployed, a custom detection component is called to detect the pre-deployment process of the database to be deployed, including: during the pre-deployment process of the database to be deployed, the failure query component is called to detect failed content during the deployment process of the database to be deployed; during the pre-deployment process of the database to be deployed, the jamming detection component is called to detect jamming problems during the deployment process of the database to be deployed.

[0012] Optionally, the database deployment method further includes: determining a pre-deployment file corresponding to a pre-deployment process of a database to be deployed that has no deployment problem as a target deployment file.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a database deployment device is provided. The device comprises: a creation unit, used to create a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed; an integration unit, used to integrate the operation information executed by multiple database objects on the database to be deployed into an operation file; a control unit, used to control the database execution object to execute the target deployment file according to the operation file, so as to deploy the database to be deployed in the production environment, wherein the target deployment file is obtained through the pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment matching the production environment, and the database to be deployed is adapted to the unitized architecture.

[0014] Optionally, the operation information performed by multiple database objects on the deployed database includes at least one of the following: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. The integration unit is also used to integrate the database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information into one operation file.

[0015] Optionally, the database deployment device further includes: a first pre-deployment unit, configured to pre-deploy the database to be deployed in a pre-execution environment.

[0016] Optionally, the first pre-deployment unit is further used to: deploy the database to be deployed in the pre-execution environment, including: creating the pre-execution environment; obtaining a pre-deployment file for pre-deploying the database to be deployed; controlling the database execution object to execute the pre-deployment file to pre-deploy the database to be deployed in the pre-execution environment.

[0017] Optionally, the database deployment device also includes: a calling unit, which is used to call a custom detection component during the pre-deployment process of the database to be deployed, detect the pre-deployment process of the database to be deployed, and obtain a detection result, wherein the detection result at least includes deployment problems existing in the pre-deployment process of the database to be deployed; an adjustment unit, which is used to adjust the pre-deployment file based on the detection result; and a second pre-deployment unit, which is used to re-pre-deploy the database to be deployed based on the adjusted pre-deployment file, until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there are no deployment problems in the pre-deployment process of the database to be deployed.

[0018] Optionally, the detection component includes at least a failure query component and a jamming detection component. During the pre-deployment process of the database to be deployed, the calling unit is also used to: during the pre-deployment process of the database to be deployed, call the failure query component to detect failed content during the deployment process of the database to be deployed; during the pre-deployment process of the database to be deployed, call the jamming detection component to detect jamming problems during the deployment process of the database to be deployed.

[0019] Optionally, the database deployment device is further used to: determine the pre-deployment file corresponding to the pre-deployment process of the database to be deployed without any deployment problem as the target deployment file.

[0020] To achieve the above object, according to another aspect of the present application, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.

[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps in any one of the above-mentioned method embodiments.

[0022] In order to achieve the above objective, according to another aspect of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0023] In an embodiment of the present application, a database execution object is created that has access operation permissions for multiple database objects to a database to be deployed, and then the execution operations of the multiple database objects are integrated into an operation file. The database execution object executes the target deployment file according to the operation file. The operations of the multiple database objects to be deployed can be uniformly managed and executed through the database execution object, avoiding the need to execute the deployment process separately for each database object, simplifying the database deployment steps, and significantly improving the database deployment efficiency in a multi-user environment, thereby solving the technical problem of low database deployment efficiency in related technologies.

[0024] Furthermore, the target deployment file executed by the database execution object is obtained through pre-deployment process testing, and the pre-deployment process is to deploy the database to be deployed in a pre-execution environment that matches the production environment. This ensures the applicability and stability of the target deployment file in the production environment, reduces database failures caused by deployment file problems in the production environment, and further improves the reliability of database deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0026] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a database deployment method according to an embodiment of the present application;

[0027] Figure 2 is a flowchart of a database deployment method according to an embodiment of the present application;

[0028] Figure 3 is a schematic diagram of a database deployment device according to an embodiment of the present application;

[0029] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

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

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

[0032] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0033] Example 1

[0034] According to an embodiment of the present application, a database deployment method embodiment is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 11 is a hardware structure block diagram of a computer terminal for implementing a database deployment method according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (shown in the figure as 102a, 102b, ..., 102n) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, referred to as MCU) or a programmable logic device (Field-Programmable Gate Array, referred to as FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (Input / Output, referred to as I / O), a Universal Serial Bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the database deployment method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned database deployment method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0040] Under the above operating environment, this application provides Figure 2 The deployment method of the database shown. Figure 2 It is a flowchart of the database deployment method according to Example 1 of the present application.

[0041] Step S201, creating a database execution object.

[0042] In the technical solution provided in the above step S201 of the present application, the database execution object has multiple database objects with access operation permissions to the database to be deployed. The database execution object can be a user with high permissions, which can be called a high-authority database operation user (Database Operation User, referred to as DBOPER), and the database execution object is used to perform all operations in the database deployment process. That is, the database execution object can be understood as a user account for executing database deployment tasks, and multiple database objects are used to indicate various elements in the database, such as stored procedures, functions, indexes, views, etc., as well as various users of the database, which are only illustrative examples here.

[0043] In this embodiment, the database to be deployed may be a Gaussian database. A database execution object with high authority is created in the database to be deployed. The database execution object has access operation authority of multiple database objects in the database to be deployed to the database to be deployed, that is, the database execution object can access and operate all data related to the database objects. In other words, in the database to be deployed, the database execution object has the ability to perform key operations such as database installation, compilation, and index reconstruction.

[0044] For example, multiple database objects are authorized as roles to a database execution object (DBOPER user), so that the database execution object can perform the required operations on behalf of multiple database objects in the database. "Authorization" here means granting other users' role permissions to the DBOPER user through the Structured Query Language (SQL) in the database, so that the DBOPER user can perform all database operations related to these roles.

[0045] In this step, by creating a database execution object and granting the database execution object access operation permissions of multiple database objects to the database to be deployed, the database execution object can effectively manage and control the database deployment process, avoiding the inefficiency and complexity of executing database deployment operations separately in the order of database objects in the traditional method.

[0046] Step S202: Integrate the operation information executed by multiple database objects on the database to be deployed into one operation file.

[0047] In the technical solution provided in the above step S202 of the present application, the operation file can be regarded as a script file containing all database operation commands and parameters. The operation file integrates the operation information of multiple database objects on the database to be deployed, so that the deployment operation of the database to be deployed is standardized. No matter how many database objects are involved, the deployment process can be completed by executing this one operation file.

[0048] In this embodiment, the operation information executed by multiple database objects on the deployed database may include but is not limited to: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. Based on this, the database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information executed by multiple database objects on the deployed database may be integrated to obtain an operation file.

[0049] Optionally, the operation file is executed by a database execution object. From the above introduction, it can be seen that the database execution object has the access operation permissions of multiple database objects to the deployed database. Therefore, the database execution object can uniformly execute the instructions in the operation file without switching users during the deployment process, avoiding the additional overhead and potential errors caused by permission management and switching.

[0050] In this step, the operation information of multiple database objects on the database to be deployed is integrated into an operation file, and then the operation file is uniformly executed by the database execution object, thereby avoiding the problem of requiring a single database object to execute different deployment operations separately. The number of script executions and operation switching in the deployment process is significantly reduced. Through a one-time operation file execution, the deployment operations of multiple database objects on the database to be deployed are completed, greatly improving the deployment efficiency.

[0051] Step S203: Control the database execution object to execute the target deployment file according to the operation file to deploy the database to be deployed in the production environment.

[0052] In the technical solution provided in the above step S203 of the present application, the target deployment file is obtained through the pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to the unitized architecture.

[0053] In this embodiment, before deploying the database to be deployed in the production environment, the database to be deployed is pre-deployed and tested in a pre-execution environment that is highly matched with the production environment. The pre-execution environment simulates various conditions of the production environment, including hardware configuration, network environment, data scale, etc., to ensure that the test results are highly relevant to the production environment. By pre-deploying the database to be deployed in the pre-execution environment, it is possible to detect problems such as false compilation failures, long recompilation time, and jams in the deployment process of the database to be deployed, as well as the special needs of the adapted unitized architecture. Then, according to the deployment problems detected in the pre-deployment process, the deployment file of the database to be deployed is adjusted. Then, according to the adjusted deployment file, the database to be deployed is deployed to the pre-execution environment again, and the deployment problems in the deployment process of the database to be deployed are continued to be detected until no problems are detected in the deployment process of the database to be deployed in the pre-execution environment. In this case, the deployment file can be determined as the target deployment file.

[0054] Optionally, after the target deployment file is determined, the database execution object may be controlled to execute the target deployment file according to the operation information in the operation file, so as to deploy the database to be deployed in the production environment.

[0055] In this step, before deploying the database to be deployed in the production environment, a pre-deployment test is performed on the database to be deployed in the pre-execution environment to discover problems in advance and adjust the deployment files to ensure that the database to be deployed in the production environment can be deployed smoothly, avoiding errors and problems that may be encountered in direct deployment, and improving the reliability and success rate of database deployment in the production environment.

[0056] In the above steps S201 to S203, a database execution object with access operation permissions of multiple database objects to the database to be deployed is created, and the execution operations of the multiple database objects are integrated into an operation file. The database execution object executes the target deployment file according to the operation file, and the operations of the multiple database objects to the database to be deployed can be uniformly managed and executed by the database execution object, avoiding the separate execution of the deployment process for each database object, simplifying the database deployment steps, significantly improving the database deployment efficiency in a multi-user environment, and thus solving the technical problem of low database deployment efficiency in related technologies. Furthermore, the target deployment file executed by the database execution object is obtained through pre-deployment process testing, and the pre-deployment process is to deploy the database to be deployed in a pre-execution environment that matches the production environment, which ensures the applicability and stability of the target deployment file in the production environment, reduces database failures caused by deployment file problems in the production environment, and further improves the reliability of database deployment.

[0057] The embodiment of the present invention is described in detail below in combination with the above steps.

[0058] As an optional implementation, the operation information performed by multiple database objects on the database to be deployed includes at least one of the following: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. Step S202 integrates the operation information performed by multiple database objects on the database to be deployed into one operation file, including: integrating the database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information into one operation file.

[0059] In this embodiment, the database installation operation information may include basic operations such as initialization configuration of the database to be deployed and creation of user accounts. The invalid content recompilation operation information may include that when the database to be deployed is deployed or updated, some content (such as stored procedures, functions, etc.) in the database is invalid due to environmental changes, changes in dependencies, etc., and these contents need to be recompiled to ensure their correct operation in the new environment; the invalid index recompilation operation information may include that the database index becomes invalid after the database to be deployed is deployed or updated, and needs to be recompiled or rebuilt to restore its function.

[0060] Optionally, the database installation operation information, the invalid content recompilation operation information, and the invalid index recompilation operation information are integrated into one operation file, which means that all necessary database operation instructions are summarized into one file.

[0061] In this step, the operation information executed by multiple database objects is integrated into one operation file, avoiding the need to execute the deployment process separately for each database object or user, reducing repeated operations, and helping to improve deployment efficiency.

[0062] As an optional implementation, the database deployment method further includes: pre-deploying the database to be deployed in a pre-execution environment.

[0063] In this embodiment, the pre-execution environment is a test environment that is highly similar to the production environment but independent, and is used to simulate the configuration and status of the production environment. The purpose of setting up this pre-execution environment is to provide a safe testing place before the formal production deployment, to detect and adjust problems in the deployment process, so as to ensure the correctness of the deployment process and the stability of the database.

[0064] Optionally, the pre-deployment process is a process of simulating the entire database deployment in a pre-execution environment, including but not limited to the steps of database installation, compilation and recompilation of fake invalid content, and reconstruction of invalid indexes.

[0065] In this step, the purpose of pre-deployment is to detect and resolve any deployment issues that may occur in the production environment, such as false failures of stored procedures or functions, compilation errors, index rebuilding issues, and possible freezes or performance bottlenecks. This allows potential problems to be identified and resolved before deployment in the production environment, greatly improving deployment efficiency and reducing production risks.

[0066] As an optional implementation, deploying the database to be deployed in a pre-execution environment includes: creating a pre-execution environment; obtaining a pre-deployment file for pre-deploying the database to be deployed; controlling the database execution object to execute the pre-deployment file to pre-deploy the database to be deployed in the pre-execution environment.

[0067] In this embodiment, as can be seen from the above introduction, the pre-execution environment is a test environment that is highly similar to the production environment but independent, and is used to simulate the configuration and status of the production environment. The pre-deployment file is a file used when deploying a database in the pre-execution environment, and may contain all necessary operations for database deployment, such as detailed instructions and parameters for steps such as database installation, compilation, and rebuilding indexes. The generation of the pre-deployment file can be manually written or generated by an automated tool, which may include an optimized configuration based on historical deployment experience, aiming to reduce errors in the deployment process and improve deployment efficiency.

[0068] Optionally, a pre-execution environment can be created according to the architecture of the production environment, and then the pre-deployment file for deploying the database to be deployed can be obtained. After obtaining the pre-deployment file of the database to be deployed, the pre-created database execution object (for example, DBOPER user) can be used to execute the pre-deployment file, and then the database to be deployed is deployed in the pre-execution environment, and deployment problems existing in the database to be deployed during the deployment process are detected.

[0069] In this step, by pre-deploying in the pre-execution environment, potential deployment problems can be effectively identified and resolved, ensuring the stability and reliability of the database to be deployed in the formal production environment.

[0070] As an optional implementation, the database deployment method also includes: during the pre-deployment process of the database to be deployed, calling a custom detection component to detect the pre-deployment process of the database to be deployed, and obtaining a detection result, wherein the detection result at least includes deployment problems existing in the pre-deployment process of the database to be deployed; adjusting the pre-deployment file based on the detection result; and re-pre-deploying the database to be deployed based on the adjusted pre-deployment file until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there are no deployment problems in the pre-deployment process of the database to be deployed.

[0071] In this embodiment, during the pre-deployment process, a pre-developed detection component can be automatically called to detect the pre-deployment process of the database to be deployed, wherein the detection component may include an invalidation query component and a jamming detection component. By calling these components, the deployment of the database to be deployed in the pre-execution environment can be detected, including the presence of false invalidation content, performance bottlenecks or jamming during the deployment process, etc. By executing these components, detailed detection results can be obtained, including potential deployment problems, query time consumption, jamming causes, etc.

[0072] Optionally, since the detection results at least include deployment problems of the database to be deployed in the pre-deployment process, based on this, after obtaining the detection results, the deployment problems of the database to be deployed in the deployment process can be found based on the analysis of the detection results, and then the deployment files to be deployed can be adjusted according to the found deployment problems. For example, if false invalid content is detected, it may be necessary to adjust the database compilation strategy or check the code quality; if a jamming phenomenon is found, it may be necessary to optimize the index structure or increase hardware resources.

[0073] Optionally, after the pre-deployment file is adjusted, the pre-deployment file needs to be re-verified, for example, the pre-deployment process is executed again with the adjusted pre-deployment file to verify whether the adjustment measures are effective and whether there are other undiscovered problems. The pre-deployment process is repeated until the detection results of the detection component no longer show any deployment problems. This means that the configuration and instructions in the pre-deployment file are sufficient to support the stable and efficient deployment of the database in the production environment. In this case, the pre-deployment file can be used as the target deployment file.

[0074] In this step, through the cyclic process of pre-deployment detection and adjustment, sufficient preparation before deployment of the database to be deployed is ensured, the possibility of deployment failure in the production environment is reduced, and the success rate of deployment is improved.

[0075] As an optional implementation, the detection component includes at least a failure query component and a jamming detection component. During the pre-deployment process of the database to be deployed, the custom detection component is called to detect the pre-deployment process of the database to be deployed, including: during the pre-deployment process of the database to be deployed, the failure query component is called to detect failed content during the deployment process of the database to be deployed; during the pre-deployment process of the database to be deployed, the jamming detection component is called to detect jamming problems during the deployment process of the database to be deployed.

[0076] In this embodiment, during the pre-deployment process, the failure query component is called to detect false failure problems in database deployment. False failure refers to compilation errors or operational anomalies caused by environmental changes or improper configuration when compiling or executing database objects (such as stored procedures, functions, indexes, etc.). By calling the failure query component in the pre-deployment stage, it is possible to identify in advance which content or objects may encounter problems during formal deployment, such as compilation failures, operational anomalies, etc. The component performs a series of queries on the database in the pre-execution environment to check whether there are any false failures. Once a false failure is found, the component will generate corresponding reports and logs to notify the developers and operation and maintenance team for timely adjustments and repairs. The notification method can be email notification or notification through the office automation system (OfficeAutomation, referred to as OA).

[0077] Optionally, the jam detection component is called to identify and prevent performance bottlenecks or system delays that may occur during the deployment of the database to be deployed. These jams may be caused by resource contention, network delays, improper configuration, and other reasons. In the pre-deployment environment, by calling the jam detection component, you can monitor and detect the operating status of the database during deployment, such as query execution time, system response time, etc., to identify whether there are factors that may cause delays or jams. This component will analyze the operating status of the database, determine whether there is a jam, and can automatically analyze the cause of the jam based on the configured conditions and parameters, and provide detailed query results and time-consuming information. In this way, possible performance issues can be resolved before formal deployment, reducing deployment risks in the production environment.

[0078] Optionally, the invalid query component is called automatically after each database operation, and the stuck component is called at a scheduled time.

[0079] In this step, during the pre-deployment process of the database to be deployed, the failure query component is called to detect false failure problems in the database deployment, and the jam detection component is called to detect jam problems in the database deployment process. This can pre-identify false failure problems and jam problems in the database deployment process, and then make advance adjustments to ensure that the formal deployment process can proceed smoothly.

[0080] As an optional implementation, the database deployment method further includes: determining a pre-deployment file corresponding to a pre-deployment process of a database to be deployed without any deployment problem as a target deployment file.

[0081] In this embodiment, after the pre-deployment process is completed, if the pre-deployment file is executed in the pre-execution environment without any deployment problems, that is, all test results show that the database deployment process is normal, without lags, without false failures, etc., then this pre-deployment file can be determined as the target deployment file. The target deployment file is a verified deployment file that can be directly used as a production environment deployment file.

[0082] Optionally, after the target deployment file is determined, it can be used in a production environment, and the database execution object (eg, DBOPER user) executes the operations in the target deployment file to complete the deployment of the database.

[0083] In this step, since the target deployment file is generated based on the successful pre-deployment experience of the pre-execution environment, it can greatly reduce the problems in the production environment deployment process and improve the efficiency and success rate of deployment.

[0084] The database deployment method provided in the embodiment of the present application creates a database execution object with access operation permissions of multiple database objects to the database to be deployed, and then integrates the execution operations of multiple database objects into an operation file. The database execution object executes the target deployment file according to the operation file, and the operations of multiple database objects on the database to be deployed can be uniformly managed and executed by the database execution object, avoiding the separate execution of the deployment process for each database object, simplifying the deployment steps of the database, and significantly improving the efficiency of database deployment in a multi-user environment, thereby solving the technical problem of low database deployment efficiency in related technologies. Furthermore, the target deployment file executed by the database execution object is obtained through pre-deployment process testing, and the pre-deployment process is to deploy the database to be deployed in a pre-execution environment that matches the production environment, which ensures the applicability and stability of the target deployment file in the production environment, reduces database failures caused by deployment file problems in the production environment, and further improves the reliability of database deployment.

[0085] Another optional specific implementation is described in detail below.

[0086] At present, after the transformation of information technology application innovation, Gaussian database is widely used as a mainstream database. When deploying Gaussian database code, the traditional deployment method is adopted, that is, executing database installation, recompiling invalid content, and recompiling invalid indexes. For database instances with multiple users, the above steps need to be executed in the order of users. Due to system reasons and compatibility issues, Gaussian database will have problems such as false invalidation, long deployment time, low efficiency, and deployment process jams when deploying multiple users. In the development process and the actual production process, the above problems will affect the development progress, and cause the Gaussian database deployment to time out and fail in production, and the program to run abnormally during production. At the same time, after the unit transformation, a single code base does not support multi-user database deployment.

[0087] However, the embodiment of the present application proposes a method for deploying a database, which creates a new high-authority database execution user DBOPER, integrates multi-user deployment operations into a unified execution process, realizes efficient execution of multi-user deployment, and improves the deployment efficiency of the database. Moreover, before the formal database deployment, pre-deployment is performed in a pre-execution dedicated environment, and the Gaussian database failure query component and the Gaussian database jamming detection component are customized in the deployment process based on the unitized architecture, and then the Gaussian database failure query component and the Gaussian database jamming detection component are used to detect the failure content and jamming reasons during the database deployment process, and then the problems in the database deployment process are solved through the detection results, so that when the database is formally deployed in the production environment, the deployment success rate and efficiency can be improved, the deployment risk can be reduced, and the smooth execution of the Gaussian database deployment can be achieved.

[0088] Next, the process of creating a new high-privilege database execution user and integrating multi-user deployment operations in this application is further introduced.

[0089] In this embodiment, a new database user DBOPER is created and authorized as a role for all database users, and this user is used as a unified deployment execution entry.

[0090] Optionally, the single steps of database deployment (such as database installation, fake invalidation compilation, recompilation, invalidation index reconstruction) are integrated into an execution file, which is inserted into the deployment process to replace the original execution by a single user. When executing the deployment, the DPOPER user is used to execute the integrated execution file, which can realize the unified operation of multi-user deployment.

[0091] Next, the pre-execution system and detection components in this application are further introduced.

[0092] In this embodiment, pre-deployment is performed in a pre-execution dedicated environment, and a Gaussian database failure query component and a jam detection component are developed and integrated into the database deployment pipeline. Among them, the failure query component is used to query and report the invalid content in the database, and supports automated email sending and OA notification. The jam detection component is used to detect the cause of database jams, supports custom configuration conditions and outputs, and provides fuzzy matching functions.

[0093] Optionally, the input of the Gaussian database failure query component is: query failure SQL, query environment, query result email recipient, query result notification user. The output is: query result, query time. The input of the Gaussian database jam detection component is query jam SQL, query environment, query result email recipient, query result notification user. The output is: query result, query time, jam reason. The processing logic of this component can customize the configuration conditions and output reasons based on the query results, that is, the database jam reason, and supports fuzzy matching.

[0094] Optionally, the Gaussian database failure query component and the Gaussian database jam detection component are optional in the development process and mandatory in production execution. The failure query component will be automatically executed after each database operation, and the jam detection component will be executed periodically.

[0095] In this embodiment, a new high-authority database execution user DBOPER is created to achieve unified operation of multi-user deployment; a Gaussian database failure query component and a jamming detection component are developed and integrated to ensure that database problems can be effectively detected and handled in the pre-execution stage; and a pre-execution step is configured in the pipeline to ensure that pre-deployment and detection are automatically triggered after each code update or version delivery.

[0096] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0097] Example 2

[0098] The embodiment of the present application also provides a database deployment device. It should be noted that the database deployment device of the embodiment of the present application can be used to execute the database deployment method provided in the embodiment of the present application. The following introduces the database deployment device provided in the embodiment of the present application.

[0099] According to an embodiment of the present application, a device for implementing the above database deployment method is also provided, such as Figure 3 As shown, the device includes: a creation unit 301, an integration unit 302 and a control unit 303.

[0100] The creation unit 301 is used to create a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed.

[0101] The integration unit 302 is used to integrate the operation information executed by multiple database objects on the database to be deployed into one operation file.

[0102] The control unit 303 is used to control the database execution object to execute the target deployment file according to the operation file to deploy the database to be deployed in the production environment, wherein the target deployment file is obtained through the pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to the unitized architecture.

[0103] Optionally, the operation information performed by multiple database objects on the deployed database includes at least one of the following: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. The integration unit 302 is also used to integrate the database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information into one operation file.

[0104] Optionally, the database deployment device 300 further includes: a first pre-deployment unit, configured to pre-deploy the database to be deployed in a pre-execution environment.

[0105] Optionally, the first pre-deployment unit is further used to: deploy the database to be deployed in the pre-execution environment, including: creating the pre-execution environment; obtaining a pre-deployment file for pre-deploying the database to be deployed; controlling the database execution object to execute the pre-deployment file to pre-deploy the database to be deployed in the pre-execution environment.

[0106] Optionally, the database deployment device 300 also includes: a calling unit, which is used to call a custom detection component during the pre-deployment process of the database to be deployed, detect the pre-deployment process of the database to be deployed, and obtain a detection result, wherein the detection result at least includes deployment problems existing in the pre-deployment process of the database to be deployed; an adjustment unit, which is used to adjust the pre-deployment file based on the detection result; and a second pre-deployment unit, which is used to re-pre-deploy the database to be deployed based on the adjusted pre-deployment file, until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there are no deployment problems in the pre-deployment process of the database to be deployed.

[0107] Optionally, the detection component includes at least a failure query component and a jamming detection component. During the pre-deployment process of the database to be deployed, the calling unit is also used to: during the pre-deployment process of the database to be deployed, call the failure query component to detect failed content during the deployment process of the database to be deployed; during the pre-deployment process of the database to be deployed, call the jamming detection component to detect jamming problems during the deployment process of the database to be deployed.

[0108] Optionally, the database deployment device 300 is further used to: determine the pre-deployment file corresponding to the pre-deployment process of the database to be deployed without any deployment problem as the target deployment file.

[0109] The database deployment device provided in the embodiment of the present application creates a database execution object with access operation permissions of multiple database objects to the database to be deployed, and then integrates the execution operations of multiple database objects into an operation file. The database execution object executes the target deployment file according to the operation file, and the operations of multiple database objects on the database to be deployed can be uniformly managed and executed by the database execution object, avoiding the separate execution of the deployment process for each database object, simplifying the deployment steps of the database, and significantly improving the efficiency of database deployment in a multi-user environment, thereby solving the technical problem of low database deployment efficiency in related technologies. Furthermore, the target deployment file executed by the database execution object is obtained through pre-deployment process testing, and the pre-deployment process is to deploy the database to be deployed in a pre-execution environment that matches the production environment, which ensures the applicability and stability of the target deployment file in the production environment, reduces database failures caused by deployment file problems in the production environment, and further improves the reliability of database deployment.

[0110] It should be noted that the creation unit 301, integration unit 302 and control unit 303 correspond to steps S201 to S203 in Example 1, and the three modules and corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.

[0111] Example 3

[0112] An embodiment of the present application may provide an electronic device, Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4(only one is shown) processor 402, memory 404, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0113] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0114] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: create a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed; integrate the operation information executed by multiple database objects on the database to be deployed into an operation file; control the database execution object to execute the target deployment file according to the operation file to deploy the database to be deployed in the production environment, wherein the target deployment file is obtained through the pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to the unitized architecture.

[0115] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: integrating the database installation operation information, the invalid content recompilation operation information, and the invalid index recompilation operation information into one operation file.

[0116] The processor may also call the information and application programs stored in the memory through the transmission device to perform the following steps: pre-deploy the database to be deployed in the pre-execution environment.

[0117] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: create a pre-execution environment; obtain a pre-deployment file for pre-deploying the database to be deployed; control the database execution object to execute the pre-deployment file to pre-deploy the database to be deployed in the pre-execution environment.

[0118] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: in the pre-deployment process of the database to be deployed, call the custom detection component to detect the pre-deployment process of the database to be deployed, and obtain the detection result, wherein the detection result at least includes the deployment problems existing in the pre-deployment process of the database to be deployed; adjust the pre-deployment file based on the detection result; based on the adjusted pre-deployment file, re-pre-deploy the database to be deployed until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there are no deployment problems in the pre-deployment process of the database to be deployed.

[0119] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: during the pre-deployment process of the database to be deployed, call the failure query component to detect the failed content during the deployment process of the database to be deployed; during the pre-deployment process of the database to be deployed, call the jam detection component to detect the jam problem during the deployment process of the database to be deployed.

[0120] The processor may also call the information and application program stored in the memory through the transmission device to perform the following steps: determining the pre-deployment file corresponding to the pre-deployment process of the database to be deployed without deployment problems as the target deployment file.

[0121] By adopting the embodiment of the present application, a database deployment method is provided, which uniformly manages and executes the operations of multiple database objects on the database to be deployed by creating a database execution object, avoids executing the deployment process separately for each database object, simplifies the database deployment steps, significantly improves the database deployment efficiency in a multi-user environment, and thus solves the technical problem of low database deployment efficiency in related technologies. Furthermore, the target deployment file executed by the database execution object is obtained through pre-deployment process testing, and the pre-deployment process is to deploy the database to be deployed in a pre-execution environment that matches the production environment, which ensures the applicability and stability of the target deployment file in the production environment, reduces database failures caused by deployment file problems in the production environment, and further improves the reliability of database deployment.

[0122] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, abbreviated as MID), a personal access device (Personal Access Device, abbreviated as PAD), etc. Figure 4 The structure of the electronic device is not limited. Figure 4More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations shown.

[0123] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0124] Example 4

[0125] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the database deployment method provided in the first embodiment.

[0126] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0127] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program of the database deployment method steps.

[0128] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0129] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

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

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

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

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

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

Claims

1. A database deployment method, characterized in that: include: Creating a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed; Integrate the operation information executed by the multiple database objects on the database to be deployed into an operation file; Control the database execution object to execute the target deployment file according to the operation file to deploy the database to be deployed in the production environment, wherein the target deployment file is obtained through a pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to a unitized architecture.

2. The method according to claim 1, characterized in that The operation information performed by the multiple database objects on the database to be deployed includes at least one of the following: database installation operation information, invalid content recompilation operation information, and invalid index recompilation operation information. The operation information performed by the multiple database objects on the database to be deployed is integrated into an operation file, including: The database installation operation information, the invalid content recompilation operation information, and the invalid index recompilation operation information are integrated into one operation file.

3. The method according to claim 1, characterized in that: The method further comprises: The database to be deployed is pre-deployed in the pre-execution environment.

4. The method according to claim 3, characterized in that Deploying the database to be deployed in the pre-execution environment includes: Creating the pre-execution environment; Obtaining a pre-deployment file for pre-deploying the database to be deployed; The database execution object is controlled to execute the pre-deployment file, and the database to be deployed is pre-deployed in the pre-execution environment.

5. The method according to claim 4, characterized in that The method further comprises: In the pre-deployment process of the database to be deployed, calling a custom detection component to detect the pre-deployment process of the database to be deployed, and obtaining a detection result, wherein the detection result at least includes deployment problems existing in the pre-deployment process of the database to be deployed; adjusting the pre-deployment file based on the detection result; Based on the adjusted pre-deployment file, the database to be deployed is pre-deployed again until the detection result corresponding to the pre-deployment process of the database to be deployed indicates that there is no deployment problem in the pre-deployment process of the database to be deployed.

6. The method according to claim 5, characterized in that The detection component includes at least a failure query component and a jam detection component. During the pre-deployment process of the database to be deployed, the custom detection component is called to detect the pre-deployment process of the database to be deployed, including: In the pre-deployment process of the database to be deployed, calling the invalidation query component to detect invalidation content in the deployment process of the database to be deployed; During the pre-deployment process of the database to be deployed, the jam detection component is called to detect jam problems during the deployment process of the database to be deployed.

7. The method according to claim 5, characterized in that The method further comprises: The pre-deployment file corresponding to the pre-deployment process of the database to be deployed without any deployment problem is determined as the target deployment file.

8. A database deployment device, characterized in that: include: A creation unit, used to create a database execution object, wherein the database execution object has access operation permissions of multiple database objects to the database to be deployed; An integration unit, used for integrating operation information executed by the multiple database objects on the database to be deployed into an operation file; A control unit is used to control the database execution object to execute a target deployment file according to the operation file so as to deploy the database to be deployed in a production environment, wherein the target deployment file is obtained through a pre-deployment process test, and the pre-deployment process is used to indicate that the database to be deployed is deployed in a pre-execution environment that matches the production environment, and the database to be deployed is adapted to a unitized architecture.

9. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.