Version package deployment method and device, equipment, storage medium and program product

By automatically generating backup and fallback scripts, the problem of error-prone developers in manual preparation of scripts is solved, the success rate of financial service platform version updates is improved, and the risk of failure in production is reduced.

CN119127227APending Publication Date: 2024-12-13CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411293916.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

During the update process of the version of the financial service platform in the existing technology, developers are prone to errors in manual backup and fallback scripts, which increases the risk of production failure and affects the project success rate.

Method used

Provide a version package deployment method. By obtaining the version package to be deployed, the database backup script, database back-up script, database upgrade configuration file, and database backup configuration are automatically generated based on the target environment, target version number and target operation type entered by the user. The corresponding configuration files of the file and service task upgrade files can reduce the risk of developers' manual preparation errors.

Benefits of technology

It improves the success rate of project production, reduces the errors of developers' manual script preparation, and ensures the smooth and high-quality update of the financial service platform version.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127227A_ABST
    Figure CN119127227A_ABST
Patent Text Reader

Abstract

The invention discloses a version package deployment method and device, equipment, a storage medium and a program product. The method is applied to a server and comprises the steps that version packages to be deployed are obtained, the version packages comprise database upgrading scripts and service task upgrading files, and different version packages correspond to different version numbers; generating a database backup script, a database rollback script, a database upgrading configuration file, a database backup configuration file and a database rollback configuration file of the database upgrading script according to a target environment, a target version number and a target operation type input by a user; the target environment is any one of a verification environment and a production environment, and the target operation type comprises a backup operation type, an upgrading operation type and a backspacing operation type; and deploying the server based on the version package content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a version package deployment method, device, equipment, storage medium and program product. Background Art

[0002] In financial services, due to the ever-changing business needs, the financial service platform needs to be updated. In order to ensure that the version update of the financial service platform can be carried out smoothly and with high quality, the existing technology prepares the backup, deployment and rollback scripts for production in advance, stores them in the version package of the fixed template, and finally implements the backup and deployment operations through program calls. However, developers prepare the backup and rollback scripts manually, which is prone to errors and increases the risk of production failure. Summary of the invention

[0003] The embodiments of the present application provide a version package deployment method, apparatus, equipment, storage medium and program product, which can avoid the mistakes made by developers in the prior art in manually preparing backup and rollback scripts, reduce the risk of production failure, and thus improve the success rate of project production.

[0004] In a first aspect, an embodiment of the present application provides a version package deployment method, which is applied to a server, and the method includes:

[0005] Obtain the version package to be deployed, which includes a database upgrade script and a service task upgrade file. Different version packages correspond to different version numbers.

[0006] Generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of the service task upgrade file according to the target environment, the target version number, and the target operation type input by the user, wherein the target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type;

[0007] The server is deployed according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file.

[0008] In a second aspect, an embodiment of the present application provides a version package deployment device, which is applied to a server, and the device includes:

[0009] A first acquisition module is used to acquire a version package to be deployed, wherein the version package includes a database upgrade script and a service task upgrade file, and different version packages correspond to different version numbers;

[0010] a generation module, for generating a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of the service task upgrade file according to a target environment, a target version number, and a target operation type input by a user, wherein the target environment is any one of a verification environment and a production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type;

[0011] A deployment module is used to deploy the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the version package deployment method as described in any one of the above is implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the version package deployment method described in any one of the above items is implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the version package deployment method as described in any one of the above.

[0015] The version package deployment method, apparatus, device, storage medium and program product of the embodiments of the present application can generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file and a database rollback configuration file of the database upgrade script in the version package, and a service task upgrade configuration file, a service task backup configuration file and a service task rollback configuration file of the service task upgrade file according to the target environment, target version number and target operation type input by the user, the target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type and a rollback operation type; and deploy the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file. In the embodiment of the present application, the developer only needs to prepare the database upgrade script and the service task upgrade file in the version package, and can automatically generate the database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file of the database upgrade script, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file of the service task upgrade file according to the target environment, target version number and target operation type input by the user. This can avoid the mistakes of developers manually preparing backup and rollback scripts in the prior art, reduce the risk of production failure, and thus improve the success rate of project production. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 It is a flowchart of the version package deployment method provided in the embodiment of the present application;

[0018] Figure 2 It is an overall design diagram of the automated production tool provided in the embodiment of the present application;

[0019] Figure 3 This is a specific flow diagram of a business scenario provided by an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of an automatic generation module provided in an embodiment of the present application;

[0021] Figure 5 is a schematic diagram of an automated verification module provided in an embodiment of the present application;

[0022] Figure 6 It is a flowchart of a deployment operation provided by an embodiment of the present application;

[0023] Figure 7 It is a structural diagram of a version package deployment device provided in an embodiment of the present application;

[0024] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0027] In financial services, due to the ever-changing business needs, the financial service platform needs to be updated. In order to ensure that the version update of the financial service platform can be carried out smoothly and with high quality, the existing technology prepares the backup, deployment and rollback scripts for production in advance, stores them in the version package of the fixed template, and finally implements the backup and deployment operations through program calls. However, developers prepare the backup and rollback scripts manually, which is prone to errors and increases the risk of production failure.

[0028] The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0029] In order to solve the problems of the prior art, the embodiments of the present application provide a version package deployment method, apparatus, device, storage medium and program product. The version package deployment method provided by the embodiments of the present application is first introduced below.

[0030] Figure 1 FIG. 1 is a flow chart showing a method for deploying a version package provided by an embodiment of the present application. Figure 1 As shown, a version package deployment method is applied to a server, and the method may include the following steps S101 to S103:

[0031] S101. Obtain a version package to be deployed, where the version package includes a database upgrade script and a service task upgrade file, and different version packages correspond to different version numbers;

[0032] S102. Generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of a database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of a service task upgrade file according to the target environment, the target version number, and the target operation type input by the user, wherein the target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type;

[0033] S103. Deploy the server according to the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file.

[0034] The version package deployment method of the embodiment of the present application can generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file and a database rollback configuration file of the database upgrade script in the version package, and a service task upgrade configuration file, a service task backup configuration file and a service task rollback configuration file of the service task upgrade file according to the target environment, the target version number and the target operation type input by the user, the target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type and a rollback operation type; and the server is deployed according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file. In the embodiment of the present application, the developer only needs to prepare the database upgrade script and the service task upgrade file in the version package, and can automatically generate the database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file of the database upgrade script, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file of the service task upgrade file according to the target environment, target version number and target operation type input by the user. This can avoid the mistakes of developers manually preparing backup and rollback scripts in the prior art, reduce the risk of production failure, and thus improve the success rate of project production.

[0035] In S101, the server is specifically a computer serving the financial platform system, which can perform calculations. The financial platform system can be, for example, a bank system, but is not limited thereto. In this embodiment, it can also be other financial platform systems, which are not specifically limited here.

[0036] The above version package may include database upgrade scripts and service task upgrade files. Among them, the database upgrade script may be a set of SQL statements or database operation instructions for upgrading the database from the old version to the new version, which generally includes operations such as adding new tables, modifying existing table structures, updating data, modifying indexes, changing stored procedures and views. Service task upgrade files may refer to upgrade files related to background services or scheduled tasks in the software. These files may include configuration files, scripts or program codes for defining and controlling the background service tasks of the software, such as data synchronization, regular report generation, resource monitoring, etc. Exemplarily, service task upgrade files may include Extract-Transform-Load (ETL) task upgrade files, Application Service Archive (Java Archive, JAR) / Editable Text Configuration (Editable Text Configuration, ETC) / Library File (Library File, LIB) upgrade files and other script upgrade files.

[0037] In S102, the target environment may be either a verification environment or a production environment. The verification environment is used for final testing and verification before the software or system is officially released. This environment should simulate the production environment as much as possible, including hardware, software, network configuration and other related factors. The production environment is the real-time operating environment in which the software or system is officially released and used by end users.

[0038] The above target version number may be the version number of the version package to be deployed, and different version packages correspond to different version numbers.

[0039] The above target operation types may include a backup operation type, an upgrade operation type, and a rollback operation type.

[0040] The above database backup scripts are used to create database backup scripts. These scripts can be Shell scripts, SQL scripts or other programming language scripts, which automate the database backup process, including data export, file compression and storage, etc.

[0041] The above database rollback scripts are used to roll back the database to the previous version when a problem occurs during a database upgrade or change. These scripts usually contain a series of SQL statements to undo recent changes or restore to backup data.

[0042] The above database upgrade configuration files contain the configuration files of parameters and settings required during the database upgrade process. These files may specify information such as the new database structure, version number, upgrade steps, and dependencies.

[0043] The above database backup configuration file includes a configuration file for settings related to database backup operations, such as backup frequency, backup storage location, backup type (full or incremental), retention policy, etc.

[0044] The above database rollback configuration file contains a configuration file for settings related to the database rollback operation, such as the target version for rollback, the triggering conditions for the rollback operation, the verification steps for the rollback operation, etc.

[0045] The above service task upgrade configuration file contains a configuration file for settings related to the service task upgrade operation, which may include upgrade steps, version control information, and checklists before and after the upgrade.

[0046] The above service task backup configuration file includes a configuration file for settings related to the service task backup operation, such as the backup frequency, the backup storage location, the backup data range, etc.

[0047] The above service task rollback configuration file contains a configuration file for service task rollback operation related settings, which is used to guide how to roll back the service task to a previous version or status.

[0048] The above-mentioned method generates a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file and a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file and a service task rollback configuration file of the service task upgrade file according to the target environment, target version number and target operation type input by the user. Exemplarily, the database generation script and the service task generation script can generate a database upgrade configuration file of the database upgrade script and a service task upgrade configuration file of the service task upgrade file according to the verification environment, target version number and upgrade operation type input by the user when the target environment is the verification environment; generate a database backup script of the database upgrade script according to the verification environment, target version number and backup operation type input by the user, and obtain the database backup configuration file and the service task backup configuration file of the service task upgrade file; generate a database rollback script of the database upgrade script according to the verification environment, target version number and rollback operation type input by the user, and obtain the database rollback configuration file and the service task rollback configuration file of the service task upgrade file.

[0049] Alternatively, when the target environment is the production environment, the database generation script and the service task generation script generate a database upgrade configuration file for the database upgrade script and a service task upgrade configuration file for the service task upgrade file according to the production environment, target version number and upgrade operation type input by the user; generate a database backup script, a database backup configuration file, and a service task backup configuration file for the database upgrade script according to the production environment, target version number and backup operation type input by the user; and generate a database rollback script, a database rollback configuration file, and a service task rollback configuration file for the database upgrade script according to the production environment, target version number and rollback operation type input by the user.

[0050] In S103, the server is deployed according to the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file. Exemplarily, when the target environment is a verification environment, the server is backed up according to the database backup script, database backup configuration file and service task backup configuration file to obtain a backup file of the server; the server is upgraded and deployed according to the database upgrade script, database upgrade configuration file and service task upgrade configuration file, and a first verification result is generated, and the first verification result is used to indicate whether the server is successfully upgraded and deployed; when the first verification result indicates that the server is successfully upgraded and deployed, the upgraded and deployed server is rolled back according to the backup file, database rollback script, database rollback configuration file and service configuration rollback configuration file, and a second verification result is generated, and the second verification result is used to indicate whether the server is successfully rolled back; when the second verification result indicates that the server is successfully rolled back, it is determined that the version package is successfully executed in the verification environment.

[0051] Alternatively, when the target environment is a production environment, the server is backed up according to the database backup script, the database backup configuration file, and the service task backup configuration file to obtain a backup file of the server; the server is upgraded and deployed according to the database upgrade script, the database upgrade configuration file, and the service task upgrade configuration file; the server's log information is obtained, and the log information is used to indicate whether an error is reported when running the database upgrade script in the server; when the log information indicates that an error is reported when running the database upgrade script in the server, and the error type in the log information is a data error, the server is upgraded and deployed from the data location indicated in the log information according to the data correction operation input by the user, and the database upgrade script, the database upgrade configuration file, and the service task upgrade configuration file; when the log information indicates that an error is reported when running the program in the server, and the error type is a service task error, the server is rolled back and deployed according to the backup file, the database rollback script, the database rollback configuration file, and the service configuration rollback configuration file.

[0052] As an implementation of the present application, in order to ensure the comprehensiveness of the content of the version package, before the above S103, the above method may further include:

[0053] Verify the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file, and database rollback configuration file in the version package to obtain a first verification result, where the first verification result is used to indicate whether the script quantity, table quantity, table operation sequence, and table operation quantity of the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file, and database rollback configuration file in the version package meet a preset first rule;

[0054] Verify the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package to obtain a second verification result, where the second verification result is used to indicate whether the service task quantity, service task name, and service task path of the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package meet a preset second rule;

[0055] The above S103 may specifically include:

[0056] When the first verification result indicates that the number of scripts, the number of tables, the order of table operations, and the number of table operations of the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file, and database rollback configuration file in the version package meet the first rule, and the second verification result indicates that the number of service tasks, the service task name, and the service task path of the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package meet the second rule, the server is deployed according to the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file, and database rollback configuration file, and the service task upgrade configuration file, service task backup configuration file, and service task rollback configuration file in the version package.

[0057] The above-mentioned first rule, exemplarily, may be that the number of scripts is equal to a preset first threshold, the number of tables is equal to a preset second threshold, the order of table operations is a preset specified order, and the number of table operations is equal to a preset third threshold.

[0058] The above second rule, illustratively, may be that the number of service tasks is equal to a preset fourth threshold, the service task name is a preset designated name, and the service task path is a preset designated path.

[0059] In an embodiment of the present application, by verifying whether the number of scripts, the number of tables, the order of table operations and the number of table operations of the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package meet the preset first rule, and whether the number of service tasks, the service task name and the service task path of the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file in the version package meet the preset second rule, it is possible to perform a content check on the version package before deployment to ensure the comprehensiveness of the content of the version package, and only deploy the version package on the server when the first rule and the second rule are met, thereby improving the reliability of server deployment.

[0060] In some embodiments, the above S102 may specifically include:

[0061] When the target environment is a verification environment, a database upgrade configuration file of a database upgrade script and a service task upgrade configuration file of a service task upgrade file are generated according to the verification environment, target version number and upgrade operation type input by the user;

[0062] Generate a database backup script for the database upgrade script according to the verification environment, target version number, and backup operation type input by the user, and obtain a database backup configuration file and a service task backup configuration file for the service task upgrade file;

[0063] A database rollback script for a database upgrade script is generated according to the verification environment, target version number, and rollback operation type input by the user, and a database rollback configuration file and a service task rollback configuration file for a service task upgrade file are obtained.

[0064] In an embodiment of the present application, when the target environment is a verification environment, a database backup script, a database rollback script, and a database upgrade configuration file, a database backup configuration file, a database rollback configuration file of a database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of a service task upgrade file can be generated according to the verification environment, the target version number and multiple operation types input by the user, thereby meeting the user's needs for automatically generating version packages in different operating environments.

[0065] In some embodiments, the above S103 may specifically include:

[0066] Back up the server according to the database backup script, database backup configuration file and service task backup configuration file to obtain the server backup file;

[0067] Perform upgrade deployment on the server according to the database upgrade script, the database upgrade configuration file and the service task upgrade configuration file, and generate a first verification result, where the first verification result is used to indicate whether the server upgrade deployment is successful;

[0068] If the first verification result indicates that the server has been successfully upgraded and deployed, the upgraded server is rolled back according to the backup file, the database rollback script, the database rollback configuration file, and the service configuration rollback configuration file, and a second verification result is generated, and the second verification result is used to indicate whether the server has been successfully rolled back and deployed;

[0069] When the second verification result indicates that the server has successfully rolled back the deployment, it is determined that the version package has been successfully executed in the verification environment.

[0070] The above first verification result can be used to indicate whether the server is successfully upgraded and deployed.

[0071] The above second verification result can be used to indicate whether the server has been successfully rolled back to deployment.

[0072] In an embodiment of the present application, in a verification environment, the server can be tested for full-process deployment of backup-upgrade-rollback based on database backup scripts, database backup configuration files and service task backup configuration files, database upgrade scripts, database upgrade configuration files and service task upgrade configuration files, as well as backup files, database rollback scripts, database rollback configuration files and service configuration rollback configuration files to verify whether the version package can be successfully executed in the verification environment, thereby ensuring that the version package can be smoothly executed in the production environment.

[0073] In some embodiments, the above S102 may specifically include:

[0074] If the version package is successfully executed in the verification environment and the target environment is the production environment, a database upgrade configuration file of the database upgrade script and a service task upgrade configuration file of the service task upgrade file are generated according to the production environment, target version number and upgrade operation type input by the user;

[0075] Generates a database backup script, a database backup configuration file for a database upgrade script, and a service task backup configuration file for a service task upgrade file according to the production environment, target version number, and backup operation type input by the user;

[0076] Generates a database rollback script for the database upgrade script, a database rollback configuration file, and a service task rollback configuration file for the service task upgrade file according to the production environment, target version number, and rollback operation type entered by the user.

[0077] In an embodiment of the present application, when the version package is successfully executed in a verification environment and the target environment is a production environment, a database backup script, a database rollback script, and a database upgrade configuration file, a database backup configuration file, a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of the service task upgrade file can be generated according to the production environment, target version number and multiple operation types input by the user, thereby meeting the user's needs for automatically generating version packages in different operating environments.

[0078] In some embodiments, the above S103 may specifically include:

[0079] Back up the server according to the database backup script, database backup configuration file and service task backup configuration file to obtain the server backup file;

[0080] Upgrade and deploy the server according to the database upgrade script, database upgrade configuration file, and service task upgrade configuration file;

[0081] Get the server's log information, which is used to indicate whether the program running on the server reports an error;

[0082] When the log information indicates that a program error is reported in the server, and the error type in the log information is a data error, the server upgrade deployment is continued from the data location indicated in the log information according to the data correction operation input by the user, as well as the database upgrade script, database upgrade configuration file, and service task upgrade configuration file;

[0083] If the log information indicates that a program error is reported in the server, and the error type is a service task error, roll back the server according to the backup file, database rollback script, database rollback configuration file, and service configuration rollback configuration file.

[0084] The above log information can be used to indicate whether the program running in the server reports an error. The log information may include the error type and data location. The error type includes data error and service task error, wherein the data error type corresponds to a program that can be modified, and the service task error type corresponds to a program that cannot be modified.

[0085] In an embodiment of the present application, the server can be backed up and upgraded in a production environment according to database backup scripts, database backup configuration files and service task backup configuration files, database upgrade scripts, database upgrade configuration files and service task upgrade configuration files. During the deployment process, it can be identified whether an error is reported in the running program in the server according to the log information, and the corresponding breakpoint-resume upgrade deployment can be performed in combination with the data error type in the log information, so as to realize the smooth commissioning of the version package in the production environment and improve the execution success rate of the version package in the production environment.

[0086] As another implementation of the present application, in order to verify whether the version package is successfully put into production, the above method may also include:

[0087] When the server is successfully upgraded and deployed in the production environment, obtain the table information of the database in the server and the deployment file time information of the service task;

[0088] When the table page quantity value in the table information is equal to the preset table page quantity value and the deployment file time information is greater than the preset time information, it is determined that the version package is successfully put into production.

[0089] The table information of the above database may be detailed data and structure description of the table in the database, and may include information such as the number of table pages in the database and the table name.

[0090] The deployment file time information of the above service task may refer to the time data recorded in the file related to the service task deployment, and this information is usually used to identify the creation, modification and deployment status of the file.

[0091] In an embodiment of the present application, when the server is successfully upgraded and deployed in a production environment, it is also possible to help users effectively verify whether the version package has been successfully put into production based on whether the table page quantity value in the table information is equal to the preset table page quantity value, and whether the deployment file time information is greater than the preset time information.

[0092] In order to facilitate the understanding of the version package deployment method in the embodiment of the present application, the actual application process of this version package deployment method is described as follows:

[0093] In order to ensure that the versions of the financial service platform can be iterated quickly and effectively, a version package deployment method is provided, and a set of automated production tools is developed based on the version package deployment method, so that each production can be carried out smoothly and with high quality while simplifying the operating steps and reducing personnel input.

[0094] The embodiment of the present application provides a set of full-process automated production tools including production version package preparation, version package content inspection, version package production and post-production business verification.

[0095] The overall design of the automated production tool is as follows: Figure 2 As shown in the figure, the complete set of automated implementation solutions, including version package preparation, version package content verification, version package deployment, and post-deployment business verification, is used to realize the automated production of the project. The version package includes database upgrade scripts and service task upgrade files. The service task upgrade files include ETL task upgrade files, application service JAR / ETC / LIB upgrade files, and other script upgrade files.

[0096] The specific process is as follows Figure 3 As shown, the developer provides the script or program to be put into production, and the automatic generation module will automatically generate the corresponding backup script and rollback script, which can improve the quality of backup and rollback code on the basis of reducing personnel input. In order to facilitate developers to review whether the content contained in the version package covers all the contents of the entire process of backup-->upgrade-->rollback, this application can also check the content of the version package through the automatic verification module, and the developer can clearly see what is included in the version package to ensure that the content in the version package is accurate. After the version package is verified, the automatic packaging module is used to pack the version package into the corresponding tar package, and then the tar package is transferred to the corresponding directory through the version package upload module, and then the deployment operation is implemented. Finally, by pre-burying points and verifying the modification time point of the deployment file, the automatic verification function after production is realized, and the verification result file is generated. The business verification personnel only need to view the verification result file to clearly analyze whether the production is successful.

[0097] like Figure 4As shown, the automatic generation module mainly includes two scripts and three configuration tables:

[0098] (1) Database generation script: Database backup and rollback script and database configuration file based on input parameters, output corresponding environment, corresponding version number, and corresponding operation type.

[0099] (2) Service & Task Generation Script: Based on the input parameters, output the service & task configuration files corresponding to the environment, version number, and operation type.

[0100] (3) Database connection string configuration table: The login information of each database instance maintained by the operation and maintenance personnel, and the password in the login information is encrypted.

[0101] (4) Service basic information configuration table: path information, start and stop commands, start and stop parameters, etc. of each application service maintained by the developer.

[0102] (5) Other script information configuration table: The target path information of other scripts maintained by the developer needs to correspond to the scripts uploaded by the version package and be distinguished by version numbers.

[0103] Note: The parameters of the two generated scripts are the same. The first parameter is the environment identifier, the second parameter is the version number, and the third parameter is the operation type (1: backup; 2: upgrade; 3: rollback).

[0104] like Figure 5 As shown in the figure, the automated verification module mainly consists of two parts:

[0105] (1) Database verification: counting the number of scripts, the number of tables, the table operation sequence, and the number of operations.

[0106] (2) Service task verification, counting service task quantity, service task name, service task path and other information.

[0107] Note: The first parameter in the version package verification script is the version number, the second parameter is the environment identifier, and the third parameter is the display level, with a total of 4 levels.

[0108] like Figure 6As shown, the specific implementation of the deployment operation includes: first, backing up the financial service platform according to the database backup script in the version package and the database backup configuration and service & task backup configuration in the automated deployment configuration file. Then, upgrading the financial service platform according to the database upgrade script in the version package and the database upgrade configuration and service & task upgrade configuration in the automated deployment configuration file; judging whether an error is reported according to the log during the upgrade; if the log indicates an error, judging whether the program can be modified according to the error type in the log; when the error type in the log is a service or task error, rolling back the financial service platform according to the database rollback script in the version package and the database rollback configuration and service & task rollback configuration in the automated deployment configuration file; when the error type in the log is a data error, according to the developer's correction operation on the wrong data input in the log, the database upgrade script in the version package and the database upgrade configuration and service & task upgrade configuration in the automated deployment configuration file continue to upgrade the financial service platform at the data position in the log.

[0109] In the embodiment of the present application, a complete automated production tool is provided. During the version package preparation stage, backup and rollback scripts are automatically generated according to the deployment scripts provided by the developer. The tool has a built-in version package check function, which is convenient for developers to confirm whether the version package content is fully covered. The deployment process supports breakpoint resumption and multiple deployment functions to ensure the success of the launch. The complete post-production verification function ensures that there are no blind spots in the verification. Save labor costs and increase the success rate of submission for production.

[0110] Based on the version package deployment method provided in the above embodiment, the present application also provides a specific implementation of the version package deployment device. Please refer to the following embodiment.

[0111] like Figure 7 As shown, the version package deployment device 700 provided in the embodiment of the present application is applied to a server and may include the following modules: a first acquisition module 701 , a generation module 702 and a deployment module 703 .

[0112] The first acquisition module 701 is used to acquire the version package to be deployed, the version package includes a database upgrade script and a service task upgrade file, and different version packages correspond to different version numbers;

[0113] A generation module 702 is used to generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of a database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of a service task upgrade file according to a target environment, a target version number, and a target operation type input by a user, wherein the target environment is any one of a verification environment and a production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type;

[0114] The deployment module 703 is used to deploy the server according to the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file.

[0115] The version package deployment device of the embodiment of the present application can generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file and a database rollback configuration file of the database upgrade script in the version package, and a service task upgrade configuration file, a service task backup configuration file and a service task rollback configuration file of the service task upgrade file according to the target environment, the target version number and the target operation type input by the user. The target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type and a rollback operation type; and the server is deployed according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file. In the embodiment of the present application, the developer only needs to prepare the database upgrade script and the service task upgrade file in the version package, and can automatically generate the database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file of the database upgrade script, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file of the service task upgrade file according to the target environment, target version number and target operation type input by the user. This can avoid the mistakes of developers manually preparing backup and rollback scripts in the prior art, reduce the risk of production failure, and thus improve the success rate of project production.

[0116] As an implementation of the present application, in order to ensure the comprehensiveness of the content of the version package, the above-mentioned device 700 may also include:

[0117] A first verification module is used to verify the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package to obtain a first verification result, which is used to indicate whether the script quantity, table quantity, table operation sequence and table operation quantity of the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package meet a preset first rule;

[0118] A second verification module is used to verify the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package to obtain a second verification result, where the second verification result is used to indicate whether the service task quantity, service task name, and service task path of the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package meet a preset second rule;

[0119] The above-mentioned deployment module 703 can be specifically used to deploy the server according to the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package, and the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file when the first verification result indicates that the number of scripts, the number of tables, the order of table operations and the number of table operations of the database upgrade script, database backup script, database rollback script, database upgrade configuration file, database backup configuration file and database rollback configuration file in the version package meet the first rule, and the second verification result indicates that the number of service tasks, the service task name and the service task path of the service task upgrade configuration file, service task backup configuration file and service task rollback configuration file in the version package meet the second rule.

[0120] In some embodiments, the generation module 702 may specifically include:

[0121] A first generating unit is used to generate a database upgrade configuration file of a database upgrade script and a service task upgrade configuration file of a service task upgrade file according to the verification environment, the target version number and the upgrade operation type input by the user when the target environment is the verification environment;

[0122] The second generating unit is used to generate a database backup script of the database upgrade script according to the verification environment, target version number and backup operation type input by the user, and obtain a database backup configuration file and a service task backup configuration file of the service task upgrade file;

[0123] The third generating unit is used to generate a database rollback script of the database upgrade script according to the verification environment, target version number and rollback operation type input by the user, and obtain a database rollback configuration file and a service task rollback configuration file of the service task upgrade file.

[0124] In some embodiments, the deployment module 703 may specifically include:

[0125] The first backup unit is used to back up the server according to the database backup script, the database backup configuration file and the service task backup configuration file to obtain a backup file of the server;

[0126] A first upgrade unit is used to upgrade and deploy the server according to the database upgrade script, the database upgrade configuration file and the service task upgrade configuration file, and generate a first verification result, where the first verification result is used to indicate whether the server is successfully upgraded and deployed;

[0127] A first rollback unit is used to roll back the upgraded server according to the backup file, the database rollback script, the database rollback configuration file and the service configuration rollback configuration file when the first verification result indicates that the server has been successfully upgraded and deployed, and generate a second verification result, the second verification result is used to indicate whether the server has been successfully rolled back and deployed;

[0128] The determination unit is used to determine that the version package is successfully executed in the verification environment when the second verification result indicates that the server has successfully rolled back the deployment.

[0129] In some embodiments, the generation module 702 may specifically include:

[0130] A fourth generating unit is used to generate a database upgrade configuration file of the database upgrade script and a service task upgrade configuration file of the service task upgrade file according to the production environment, target version number and upgrade operation type input by the user when the version package is successfully executed in the verification environment and the target environment is the production environment;

[0131] A fifth generating unit, configured to generate a database backup script for a database upgrade script, a database backup configuration file, and a service task backup configuration file for a service task upgrade file according to a production environment, a target version number, and a backup operation type input by a user;

[0132] The sixth generating unit is used to generate a database rollback script for the database upgrade script, a database rollback configuration file, and a service task rollback configuration file for the service task upgrade file according to the production environment, target version number and rollback operation type input by the user.

[0133] In some embodiments, the deployment module 703 may specifically include:

[0134] The second backup unit is used to back up the server according to the database backup script, the database backup configuration file and the service task backup configuration file to obtain a backup file of the server;

[0135] The second upgrade unit is used to upgrade and deploy the server according to the database upgrade script, the database upgrade configuration file and the service task upgrade configuration file;

[0136] An acquisition unit, used to acquire log information of the server, where the log information is used to indicate whether an error is reported in a program running on the server;

[0137] The second upgrade unit is further configured to, when the log information indicates that a program error is reported in the server and the error type in the log information is a data error, continue to upgrade and deploy the server from the data location indicated in the log information according to the correction data operation input by the user, as well as the database upgrade script, the database upgrade configuration file, and the service task upgrade configuration file;

[0138] The second rollback unit is used to roll back the server according to the backup file, database rollback script, database rollback configuration file and service configuration rollback configuration file when the log information indicates that an error occurs when running a program on the server and the error type is a service task error.

[0139] As another implementation of the present application, in order to verify whether the version package is successfully put into production, the above-mentioned device 700 may also include:

[0140] The second acquisition module is used to obtain the table information of the database in the server and the deployment file time information of the service task when the server is successfully upgraded and deployed in the production environment;

[0141] The determination module is used to determine that the version package is successfully put into production when the table page quantity value in the table information is equal to the preset table page quantity value and the deployment file time information is greater than the preset time information.

[0142] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0143] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.

[0144] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0145] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.

[0146] In certain embodiments, the memory 802 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0147] The processor 801 implements any one of the version package deployment methods in the above embodiments by reading and executing the computer program instructions stored in the memory 802 .

[0148] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.

[0149] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0150] Bus 810 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0151] The electronic device can execute the version package deployment method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 7 Described is a version package deployment method and device.

[0152] In addition, in combination with the version package deployment method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any version package deployment method in the above embodiment is implemented.

[0153] In combination with the version package deployment method in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any one of the version package deployment methods above.

[0154] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0155] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0156] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0157] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0158] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A version package deployment method, characterized in that: Applied to a server, the method comprises: Obtain the version package to be deployed, which includes a database upgrade script and a service task upgrade file. Different version packages correspond to different version numbers. Generate a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of the service task upgrade file according to the target environment, the target version number, and the target operation type input by the user, wherein the target environment is any one of the verification environment and the production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type; The server is deployed according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file.

2. The method according to claim 1, characterized in that Before deploying the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file, the method further includes: Verify the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package to obtain a first verification result, where the first verification result is used to indicate whether the number of scripts, the number of tables, the order of table operations, and the number of table operations of the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package meet a preset first rule; Verifying the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package to obtain a second verification result, wherein the second verification result is used to indicate whether the service task quantity, service task name, and service task path of the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file in the version package meet a preset second rule; The step of deploying the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file, comprises: When the first verification result indicates that the script quantity, table quantity, table operation order and table operation quantity of the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package meet the first rule, and the second verification result indicates that the service task quantity, service task name and service task path of the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file in the version package meet the second rule, the server is deployed according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file.

3. The method according to claim 1, characterized in that The step of generating a database backup script, a database rollback script, and a database target configuration file of the database upgrade script, and a service task target configuration file of the service task upgrade file according to the target environment, target version number, and target operation type input by the user includes: In the case where the target environment is the verification environment, generating a database upgrade configuration file of the database upgrade script and a service task upgrade configuration file of the service task upgrade file according to the verification environment, the target version number and the upgrade operation type input by the user; Generate a database backup script for the database upgrade script according to the verification environment, target version number and backup operation type input by the user, and obtain a database backup configuration file and a service task backup configuration file for the service task upgrade file; A database rollback script of the database upgrade script is generated according to the verification environment, the target version number and the rollback operation type input by the user, and a database rollback configuration file and a service task rollback configuration file of the service task upgrade file are obtained.

4. The method according to claim 3, characterized in that The step of deploying the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file, comprises: Backing up the server according to the database backup script, the database backup configuration file and the service task backup configuration file to obtain a backup file of the server; According to the database upgrade script, the database upgrade configuration file and the service task upgrade configuration file, the server is upgraded and deployed, and a first verification result is generated, where the first verification result is used to indicate whether the server is successfully upgraded and deployed; In the case where the first verification result indicates that the server is successfully upgraded and deployed, the upgraded server is rolled back according to the backup file, the database rollback script, the database rollback configuration file, and the service configuration rollback configuration file, and a second verification result is generated, wherein the second verification result is used to indicate whether the server is successfully rolled back and deployed; When the second verification result indicates that the server has successfully rolled back the deployment, it is determined that the version package has been successfully executed under the verification environment.

5. The method according to claim 4, characterized in that The step of generating a database backup script, a database rollback script, and a database target configuration file of the database upgrade script, and a service task target configuration file of the service task upgrade file according to the target environment, target version number, and target operation type input by the user includes: If the version package is successfully executed in the verification environment and the target environment is the production environment, generating a database upgrade configuration file of the database upgrade script and a service task upgrade configuration file of the service task upgrade file according to the production environment, the target version number and the upgrade operation type input by the user; Generate a database backup script for the database upgrade script, a database backup configuration file, and a service task backup configuration file for the service task upgrade file according to the production environment, target version number, and the backup operation type input by the user; A database rollback script of the database upgrade script, a database rollback configuration file, and a service task rollback configuration file of the service task upgrade file are generated according to the production environment, the target version number, and the rollback operation type input by the user.

6. The method according to claim 5, characterized in that The step of deploying the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file, and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file, and the service task rollback configuration file, comprises: Backing up the server according to the database backup script, the database backup configuration file and the service task backup configuration file to obtain a backup file of the server; Performing upgrade deployment on the server according to the database upgrade script, the database upgrade configuration file and the service task upgrade configuration file; Obtaining log information of the server, wherein the log information is used to indicate whether an error is reported when a program is running in the server; When the log information indicates that a program running in the server reports an error, and the error type in the log information is a data error, continuing to upgrade and deploy the server from the data location indicated in the log information according to the correction data operation input by the user, and the database upgrade script, the database upgrade configuration file, and the service task upgrade configuration file; When the log information indicates that an error occurs when a program is run on the server and the error type is a service task error, the server is rolled back according to the backup file, the database rollback script, the database rollback configuration file and the service configuration rollback configuration file.

7. The method according to claim 6, characterized in that The method further comprises: When the server is successfully upgraded and deployed in the production environment, obtaining table information of the database in the server and deployment file time information of the service task; When the table page quantity value in the table information is equal to the preset table page quantity value, and the deployment file time information is greater than the preset time information, it is determined that the version package is successfully put into production.

8. A version package deployment device, characterized in that: Applied to a server, the device comprises: The first acquisition module is used to acquire the version package to be deployed, wherein the version package includes a database upgrade script and a service task upgrade file, and different version packages correspond to different version numbers; a generation module, for generating a database backup script, a database rollback script, a database upgrade configuration file, a database backup configuration file, and a database rollback configuration file of the database upgrade script, and a service task upgrade configuration file, a service task backup configuration file, and a service task rollback configuration file of the service task upgrade file according to a target environment, a target version number, and a target operation type input by a user, wherein the target environment is any one of a verification environment and a production environment, and the target operation type includes a backup operation type, an upgrade operation type, and a rollback operation type; A deployment module is used to deploy the server according to the database upgrade script, the database backup script, the database rollback script, the database upgrade configuration file, the database backup configuration file and the database rollback configuration file in the version package, and the service task upgrade configuration file, the service task backup configuration file and the service task rollback configuration file.

9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the version package deployment method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the version package deployment method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the version package deployment method as described in any one of claims 1-7.

Citation Information

Cited By

  • Database upgrading method and device, equipment, storage medium and program product

    CN119440590A

  • Multi-database automatic upgrading method for multi-service system

    CN121833669A