A method and apparatus for upgrading a distributed business processing system

By managing upgrades in a fine-grained manner, combined with database operations and definition languages, efficient and uninterrupted upgrades of distributed systems are achieved, solving the problem of excessive downtime in existing technologies and improving system operation and maintenance efficiency and customer experience.

CN115658098BActive Publication Date: 2026-11-27INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211121204.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2026-11-27
Estimated Expiration
2042-09-15

Smart Images

  • Figure CN115658098B_ABST
    Figure CN115658098B_ABST
Patent Text Reader

Abstract

The application provides an upgrading method and device of a distributed business processing system, relates to the technical field of software upgrading, and can also be applied to the financial field, and comprises the following steps: determining a system upgrading mode according to a database operation language, a database definition language and a change type of a data table of a database server to be upgraded; the system upgrading mode comprises off-line upgrading and on-line upgrading; determining a database upgrading strategy according to the system upgrading mode, and upgrading the database server to be upgraded according to the database upgrading strategy, the database operation language and the database definition language; and after the database server to be upgraded is upgraded, performing rolling upgrading on a business processing server according to the traffic of the business processing server and a business processing period. The application can reasonably distinguish the hardware device type to be upgraded and specific upgrading content in a fine granularity, thereby effectively reducing the downtime in the system upgrading process and the influence on business processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software upgrades and can be used in the financial sector. Specifically, it relates to a method and apparatus for upgrading a distributed business processing system. Background Technology

[0002] In the financial sector, in order to provide customers with better services, more and more financial institutions are choosing to deploy their servers on distributed platform systems (hereinafter referred to as the system). Some of the core financial businesses involved often require providing customers with uninterrupted 24 / 7 service.

[0003] To avoid system downtime due to software upgrades, existing technologies often employ rolling upgrades using redundant containers, resulting in significant waste of system resources. In reality, not all software upgrades require system downtime. Unavoidable downtime typically involves only certain database upgrades, such as overall database system upgrades or resource domain migrations; data table modifications and data synchronization with applications; and large-scale data table index changes, field additions, or data cleanup. Existing technologies fail to differentiate between the types of hardware devices to be upgraded and the specific upgrade projects, thus failing to effectively reduce downtime and the impact on business operations during system upgrades. Summary of the Invention

[0004] To address the problems in the prior art, this application provides an upgrade method and apparatus for a distributed business processing system, which can reasonably distinguish the types of hardware devices to be upgraded and the specific upgrade content in a fine-grained manner, thereby effectively reducing downtime during the system upgrade process and the impact on business processing.

[0005] To solve the above-mentioned technical problems, this application provides the following technical solution:

[0006] In a first aspect, this application provides an upgrade method for a distributed business processing system, the distributed business processing system including a database server and a business processing server; the method includes:

[0007] The system upgrade method is determined based on the database operation language, database definition language, and data table change types of the database server to be upgraded; the system upgrade method includes upgrades that require system shutdown and upgrades that do not require system shutdown.

[0008] The database upgrade strategy is determined according to the system upgrade method, and the database server to be upgraded is upgraded according to the database upgrade strategy, the database operation language, and the database definition language.

[0009] After the database server to be upgraded is upgraded, the business processing server is upgraded in a rolling manner according to the traffic of the business processing server and the preset busy business period.

[0010] Furthermore, determining the system upgrade method based on the database operation language, database definition language, and data table change types of the database server to be upgraded includes:

[0011] Determine whether the change type of the data table involves index changes, adding fields, or data cleanup; if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade.

[0012] If the system upgrade does not involve index changes, field additions, or data cleanup, determine whether the operations in the database operation language contain statements that affect online services; if such statements are included, the system upgrade method is a shutdown upgrade.

[0013] If the system does not contain statements that affect online services, determine whether the operations involved in the database definition language conflict with the online services in terms of resources; if the operations involved conflict with the online services in terms of resources, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

[0014] Furthermore, the system upgrade method is the shutdown upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes:

[0015] The control routing layer server routes business processing traffic to the backup database server and installs the upgraded operating system and software programs on the database server to be upgraded.

[0016] On the database server to be upgraded, the database definition language is executed to clean up the data tables, create new table structures, and update table fields and / or indexes.

[0017] On the database server to be upgraded, the database operation language is executed to insert and / or update data in the data tables.

[0018] Furthermore, the system upgrade method is a non-stop upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes:

[0019] The control routing layer server routes business processing traffic to the database server to be upgraded;

[0020] On the database server to be upgraded, the database definition language is executed to clean up the data tables, create new table structures, and update table fields and / or indexes.

[0021] On the database server to be upgraded, the database operation language is executed to insert and / or update data in the data tables.

[0022] Furthermore, the step of performing rolling upgrades on the service processing server based on its traffic and preset peak service periods includes:

[0023] Determine whether the current upgrade time falls within the peak period of the business; if not, determine the upgrade batch for each business processing server based on the traffic of the business processing server.

[0024] The upgrade process will be carried out in a rolling manner according to the aforementioned upgrade batches for each business processing server.

[0025] Furthermore, the upgrade method for the distributed business processing system further includes:

[0026] Based on the data after the database server to be upgraded is completed, data migration operations are performed on the data tables involved in the table association migration scenario; wherein, the data migration operation is completed by the business processing batch server in the business processing server initiating the data migration program.

[0027] Secondly, this application provides an upgrade device for a distributed business processing system, comprising:

[0028] The upgrade method determination unit is used to determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded; the system upgrade method includes shutdown upgrade and non-shutdown upgrade;

[0029] The database upgrade unit is used to determine the database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language.

[0030] The server upgrade unit is used to perform rolling upgrades of the business processing server based on the traffic of the business processing server and preset busy business periods after the database server to be upgraded is completed.

[0031] Furthermore, the upgrade method determination unit includes:

[0032] The change type determination module is used to determine whether the change type of the data table involves index changes, adding fields, or data cleanup; wherein, if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade;

[0033] The online service statement determination module is used to determine whether the operations involved in the database operation language contain statements that affect online services when the index changes, field additions, or data cleanup are not involved; wherein, if the statements that affect online services are included, the system upgrade method is a shutdown upgrade.

[0034] The online service resource determination module is used to determine whether the operation involved in the database definition language conflicts with the online service when the statement affecting the online service is not included; wherein, if the operation involved conflicts with the online service, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

[0035] Furthermore, the system upgrade method is the shutdown upgrade; the database upgrade unit includes:

[0036] The first traffic routing module is used to control the routing layer server to route business processing traffic to the backup database server and install the upgraded operating system and software programs on the database server to be upgraded.

[0037] The first definition language execution module is used to execute the database definition language on the database server to be upgraded, in order to clean up the data tables, create new table structures, and update table fields and / or indexes.

[0038] The first operation language execution module is used to execute the database operation language on the database server to be upgraded in order to insert and / or update data in the data table.

[0039] Furthermore, the system upgrade method is a non-stop upgrade; the database upgrade unit includes:

[0040] The second traffic routing module is used to control the routing layer server to route business processing traffic to the database server to be upgraded;

[0041] The second definition language execution module is used to execute the database definition language on the database server to be upgraded in order to clean up the data tables, create new table structures, and update table fields and / or indexes.

[0042] The second operation language execution module is used to execute the database operation language on the database server to be upgraded in order to insert and / or update data in the data table.

[0043] Furthermore, the server upgrade unit includes:

[0044] The upgrade batch determination module is used to determine whether the current upgrade time belongs to the busy period of the business; if not, the upgrade batch of each business processing server is determined according to the traffic of the business processing server.

[0045] The rolling upgrade execution module is used to perform rolling upgrades on each business processing server according to the upgrade batch.

[0046] Furthermore, the upgrade device for the distributed business processing system further includes:

[0047] The data migration operation unit is used to perform data migration operations on data tables involved in table association migration scenarios based on the data after the database server to be upgraded is completed; wherein, the data migration operation is completed by the business processing batch server in the business processing server initiating the data migration program.

[0048] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the upgrade method for the distributed business processing system.

[0049] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the upgrade method for the distributed business processing system.

[0050] Fifthly, this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the upgrade method for the distributed business processing system.

[0051] To address the problems in existing technologies, the upgrade method and apparatus for a distributed business processing system provided in this application can uniformly control the upgrade order of various application servers and database services in the distributed system through an upgrade strategy control server, significantly improving the efficiency of system upgrade and maintenance. Through a strategy analysis and optimization component, the upgrade strategy is automatically verified and the process is analyzed, correcting problems with manual equipment upgrade strategies and better ensuring the correctness of system upgrades. The system automatically analyzes situations requiring database upgrades to require downtime, initiates a non-downtime upgrade strategy, and automatically completes uninterrupted service upgrades by adjusting sharding routing and upgrade strategies, improving the business continuity of the entire system and thus enhancing customer experience. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart of the upgrade method for the distributed business processing system in the embodiments of this application;

[0054] Figure 2 This is a flowchart illustrating the process of determining the system upgrade method in this application embodiment;

[0055] Figure 3 This is one of the flowcharts for upgrading the database server to be upgraded in the embodiments of this application;

[0056] Figure 4 This is the second flowchart of the process of upgrading the database server to be upgraded in this application embodiment;

[0057] Figure 5 This is a flowchart illustrating the rolling upgrade of the service processing server in this embodiment of the application;

[0058] Figure 6 This is a structural diagram of the upgrade device for the distributed service processing system in the embodiments of this application;

[0059] Figure 7 This is a structural diagram of the upgrade method determination unit in the embodiments of this application;

[0060] Figure 8 This is a structural diagram of the database upgrade unit in an embodiment of this application;

[0061] Figure 9 This is a structural diagram of the database upgrade unit in an embodiment of this application;

[0062] Figure 10 This is a structural diagram of the server upgrade unit in an embodiment of this application;

[0063] Figure 11 This is a schematic diagram of the structure of the electronic device in the embodiments of this application;

[0064] Figure 12 This is a schematic diagram of the non-shutdown upgrade system in the embodiments of this application;

[0065] Figure 13 This is a schematic diagram of the upgrade policy control server in an embodiment of this application;

[0066] Figure 14AThis is one of the process flowcharts for the non-shutdown upgrade method in the embodiments of this application;

[0067] Figure 14B This is the second flowchart of the non-shutdown upgrade method in the embodiments of this application;

[0068] Figure 14C This is the third flowchart of the non-shutdown upgrade method in the embodiments of this application;

[0069] Figure 14D This is the fourth flowchart of the non-shutdown upgrade method in the embodiments of this application;

[0070] Figure 14E This is the fifth flowchart of the non-shutdown upgrade method in the embodiments of this application;

[0071] Figure 14F This is the sixth flowchart of the non-shutdown upgrade method in the embodiments of this application;

[0072] Figure 14G This is the seventh flowchart of the non-stop upgrade method in the embodiments of this application. Detailed Implementation

[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0074] It should be noted that the upgrade method and apparatus for the distributed business processing system provided in this application can be used in the financial field, or in any field other than the financial field. The application field of the upgrade method and apparatus for the distributed business processing system provided in this application is not limited.

[0075] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0076] In one embodiment, see Figure 1 To enable fine-grained differentiation of the types of hardware devices to be upgraded and the specific upgrade content, thereby effectively reducing downtime and impact on business processing during system upgrades, this application provides an upgrade method for a distributed business processing system, wherein the distributed business processing system includes a database server and a business processing server; the method includes:

[0077] S101: Determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded; the system upgrade method includes upgrades with downtime and upgrades without downtime.

[0078] Database definition language and database operation language are the scripts used to update the database. Specifically, database definition language includes operations such as adding, deleting, adding fields, and modifying indexes in table structures. Database operation language includes operations on data within the database, such as adding, deleting, and updating data.

[0079] It is understood that, in order to achieve the technical effects of the present invention, the technical solution adopted by the present invention is as follows:

[0080] See Figure 12 As shown, the present invention proposes a distributed system upgrade method and system without downtime, comprising a load balancer, a routing layer server, a business processing layer online server, a business processing layer batch server, a database server, and an upgrade strategy server. The business processing layer online server and the business processing layer batch server are collectively referred to as the business processing server.

[0081] Load balancer: Receives transaction requests, processes them using a load balancing algorithm, and then calls the services provided by the routing layer server based on the load of the routing layer.

[0082] Routing layer server: As a provider of distributed services, it consists of 1-N groups of containers, virtual machines, or physical machines. It is invoked by the load balancer via HTTP, generating a sharding route field. Based on the value of this field, it uses a hash algorithm to calculate which business processing layer online server needs to be invoked. For example, in a bank's acquiring system, the business processing layer online server horizontally splits the database using order numbers. The routing layer server generates the order number and uses a hash algorithm to calculate which business processing layer online server's service should handle the transaction.

[0083] Online Business Processing Layer Servers: These are application servers that perform online business logic processing. They consist of 1-N groups of containers, virtual machines, or physical machines and are invoked by the routing layer server via RPC remote calls. The online business processing layer servers perform route calculations based on a specific routing field, and each group of online business processing layer servers only processes transaction requests falling within its designated shard.

[0084] Business processing layer batch server: An application server that performs batch business logic processing. It consists of 1-N groups of containers, virtual machines or physical machines and is connected to the same database server as the business processing layer online server.

[0085] The business processing layer uses batch servers to perform batch business logic processing during the day or at the end of the day, including but not limited to data statistics, data migration, data processing, and business report generation.

[0086] Database server: A database connected to the business processing layer server, providing persistent storage for transaction request processing, recording and updating the results of business processing. The database server also consists of 1-N groups of containers, virtual machines, or physical machines. There is a one-to-one correspondence between the business processing layer online servers and the business processing layer batch servers. For example, group 1 of the business processing layer online servers corresponds to group 1 of the database server, group 2 of the business processing layer online servers corresponds to group 2 of the database server, and so on.

[0087] Upgrade Policy Control Server: A server used to uniformly control the system upgrade policies of the routing layer server, the business processing layer online server, the business processing layer batch server, and the database server.

[0088] Specifically, see Figure 13 As shown, the upgrade policy control server includes a policy configuration and maintenance component 01, a policy analysis and optimization component 02, a policy push component 03, and an upgrade process control component 04.

[0089] Strategy Configuration and Maintenance Component 01: This module provides a visual upgrade pipeline configuration interface for upgrade strategies. System upgrade personnel configure the strategy based on the time, content, and steps of each upgrade for the routing layer server, business processing layer online server, business processing layer batch server, and database server. For the routing layer server, business processing layer online server, and business processing layer batch server, a rolling upgrade strategy for program version packages in 1-N groups can be set, specifying the upgrade order and time interval for program version packages in groups 1-N. It also configures the release time of required parameters and files to ensure that program version packages are imported before the upgrade is complete. For the database server, it sets the DML and DDL for database upgrades, as well as the upgrade time and order for each DML and DDL.

[0090] Strategy Analysis and Optimization Component 02: This module analyzes and optimizes the upgrade strategy based on the upgrade strategy set by Strategy Configuration and Maintenance Component 01. The specific upgrade strategy analysis method is as follows: First, obtain the DML and DDL statements for the database upgrade, as well as the specific data volume and access volume of the database tables. Then, based on the type of data table structure change (including creating a new table, adding an index, adding a column, deleting a column, etc.), combined with the data volume of the database tables and the program code, analyze whether a shutdown upgrade is required. If a shutdown upgrade is required, then initiate a non-shutdown upgrade strategy. Scenarios requiring shutdown upgrades include, but are not limited to: 1. Data table changes need to be consistent with the application. For example, the application needs to use a newly added field from the data table structure to record in another table. If a rolling upgrade is used, the un-upgraded program cannot handle it correctly; 2. For certain types of databases, when making large-scale data table index changes, adding fields, or data cleanup, the normal operation of transactions may be affected due to table locking during the upgrade. For example, the database version needs to update table A by adding fields B and C with default values. Table A contains 20 million records and is accessed 100 times per second. Since the database version is MySQL 5.7, the table needs to be rebuilt. Analysis shows that the update time will be more than 180 seconds. During the change, due to the large number of transactions, congestion will occur, causing the change to fail. Therefore, a non-stop upgrade strategy needs to be started.

[0091] Policy Push Component 03: Responsible for establishing communication connections with the routing layer server, business processing layer online server, business processing layer batch server, and database server, and pushing communication and upgrade policies during production upgrades. This includes pushing program version packages and installation scripts to the routing layer server, business processing layer online server, and business processing layer batch server, as well as pushing database programs, DML and DDL upgrade policies, and installation scripts to the database server. Simultaneously, Policy Push Component 03 receives and records the processing results from the routing layer server, business processing layer online server, and business processing layer batch server.

[0092] Upgrade Process Control Component 04: Responsible for the overall scheduling and control of the upgrade process, based on the upgrade strategy determined by the upgrade strategy configuration module and strategy analysis and optimization component. This is achieved by pushing and receiving upgrade results from each node through the strategy push component according to the upgrade process steps. For example, a system upgrade might proceed as follows: 1) Stop the batch server for the business processing layer; 2) Install the DML and DDL scripts for the database server; 3) Upgrade the online server program for the business processing layer every minute; 4) Start the batch server for the business processing layer and end the upgrade process. The upgrade process control component will follow these steps and sequence, pushing and arranging program packages through the strategy push component, and initiating the next upgrade step based on the upgrade results of the previous step.

[0093] Specifically, see Figure 2 The step of determining the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded includes:

[0094] S201: Determine whether the change type of the data table involves index changes, adding fields, or data cleanup; wherein, if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade;

[0095] S202: If the index changes, field additions, or data cleanup are not involved, determine whether the operations involved in the database operation language contain statements that affect online services; if such statements are contained, the system upgrade method is a shutdown upgrade.

[0096] S203: If the system does not contain the statements that affect online services, determine whether the operations involved in the database definition language conflict with the online services in terms of resources; if the operations involved conflict with the online services in terms of resources, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

[0097] Understandably, in real-world application scenarios, some upgrades require system downtime. In such cases, the "non-downtime upgrade strategy" provided in this application can be used for system upgrades. In other cases, upgrades do not require system downtime, so no downtime or diversion of business processing traffic is needed; the upgrade can be performed on the running database server or business processing server. For specific judgment methods, please refer to steps S201 to S203.

[0098] S102: Determine the database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language;

[0099] Specifically, in one embodiment, see [reference needed]. Figure 3 The system upgrade method is the shutdown upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes:

[0100] S301: The control routing layer server routes business processing traffic to the backup database server and installs the upgraded operating system and software programs on the database server to be upgraded.

[0101] S302: On the database server to be upgraded, execute the database definition language to clean up the data tables, create new table structures, and update table fields and / or indexes;

[0102] S303: On the database server to be upgraded, execute the database operation language to insert and / or update data in the data table.

[0103] It should be noted that: First, if the upgrade involves changing the database type or replacing the database server, the database type and database server must be changed first. For example, converting an Oracle database to a MySQL database and replacing the database server with a new one. Second, if there is a database program version upgrade, the database version upgrade should be performed first. Third, after completing the above steps, execute the database definition language first, and then execute the database operation language.

[0104] Understandably, see Figures 14A to 14G As shown, to achieve the objectives of this invention, the distributed system upgrade method and system proposed in this invention, which involves database upgrade downtime, requires the activation of a "non-downtime upgrade strategy." However, before executing the "non-downtime upgrade strategy," the routing layer server should first be controlled to route business processing traffic to a backup database server, and the upgraded operating system and software programs should be installed on the database server to be upgraded, i.e., diverting business processing traffic. The purpose of this is to avoid affecting external business services, that is, to temporarily use the backup database server to replace the database server to be upgraded for external business services.

[0105] The specific implementation steps for the "non-downtime upgrade strategy" are as follows:

[0106] See Figure 14A Step 1: The routing layer server adjusts the routing strategy: The routing layer server obtains the non-downtime upgrade strategy based on the parameters. The upgrade strategy sets up that half of the databases numbered N / 2+1 to N are upgraded first. The routing layer server controls the routing field of transactions to only generate routing fields for transactions to database servers numbered 1 to N / 2, so that transactions are automatically routed to the online servers connected to database servers numbered 1 to N / 2. For example, in a bank merchant acquiring payment system, which consists of 8 databases (numbered 1-8), the system uses the order number hash value as the routing field for transaction routing. Therefore, when the routing layer generates order numbers, it controls the order number hash value to only generate for database shards numbered 1-4. Transactions are automatically routed to online servers numbered 1-4, and no more transactions are received from online servers numbered 5-8.

[0107] See Figure 14B Step 2: Upgrade the database server from N / 2+1 to N: Upgrade the database server from N / 2+1 to N, including the database program and the installation of database DML and DDL scripts, etc.

[0108] See Figure 14CStep 3: Upgrade the online and batch server programs from N / 2+1 to N: Upgrade the online and batch server programs connected to the database servers from N / 2+1 to N.

[0109] See Figure 14D Step 4: Migration of Related Table Scenarios: For scenarios involving table relationship migration, use a new batch server program to migrate the data; for example, if table A adds a field c, and data needs to be obtained through the relationship between tables B and C, then migrated to field c in table A.

[0110] See Figure 14E Step 5: Adjust the routing policy of the routing layer server: Adjust the upgrade policy settings for database upgrades numbered 1 to N / 2. The routing layer server controls the routing field of the transaction to only generate routing fields for database server transactions from N / 2+1 to N, so that the transactions are automatically routed to the online servers connected to the database servers from N / 2+1 to N.

[0111] See Figure 14F Step 6: Upgrade the 1-N database servers, online servers, and batch servers. The upgrade method is the same as steps 2, 3, and 4.

[0112] See Figure 14G Step 7: The routing layer server adjusts the routing policy, restores routing policy control, and transactions can be routed to all online servers from 1 to N, completing the system upgrade.

[0113] As can be seen from the above description, the upgrade method for the distributed business processing system provided in this application can upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language.

[0114] Specifically, in one embodiment, see [reference needed]. Figure 4 The system upgrade method is a non-stop upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes:

[0115] S401: The control routing layer server routes the service processing traffic to the database server to be upgraded;

[0116] S402: On the database server to be upgraded, execute the database definition language to clean up the data tables, create new table structures, and update table fields and / or indexes;

[0117] S403: On the database server to be upgraded, execute the database operation language to insert and / or update data in the data table.

[0118] Understandably, in scenarios where upgrades do not require downtime, there is no need to redirect business processing traffic; the upgrade can be performed directly on the running database server or business processing server. In this case, instead of the control routing layer server routing business processing traffic to the database server to be upgraded, the database server to be upgraded continues to process business traffic. The specific execution process of steps S402 to S403 is the same as that of steps S302 to S303, and will not be repeated here.

[0119] As can be seen from the above description, the upgrade method for the distributed business processing system provided in this application can upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language.

[0120] S103: After the database server to be upgraded is upgraded, the business processing server is upgraded in a rolling manner according to the traffic of the business processing server and the preset busy business period.

[0121] Specifically, in one embodiment, see [reference needed]. Figure 5 The step of performing rolling upgrades on the business processing server based on its traffic and preset peak business periods includes:

[0122] S501: Determine whether the current upgrade time falls within the busy business period; if not, determine the upgrade batch for each business processing server based on the traffic of the business processing server; if not, wait until it is determined that the current upgrade time does not fall within the busy business period before determining the upgrade batch and preparing for the upgrade.

[0123] S502: Perform rolling upgrades on each business processing server according to the aforementioned upgrade batch.

[0124] Understandably, once the database server is upgraded, it will already be the latest version. Only the programs on the business processing servers that connect to the database server need to be upgraded. Since there are multiple business processing servers, a rolling upgrade model can be adopted, upgrading one server at a time.

[0125] The so-called rolling upgrade mode refers to the upgrade method of multiple replica services. Its characteristic is that it can ensure that external business services are not interrupted during the upgrade process and the outside world is unaware of the upgrade process. This upgrade mode can be understood as upgrading the business processing servers to be upgraded in turn.

[0126] As can be seen from the above description, the upgrade method for the distributed business processing system provided in this application can perform rolling upgrades of the business processing server based on the traffic of the business processing server and preset busy business periods.

[0127] In one embodiment, the upgrade method for the distributed business processing system further includes:

[0128] Based on the data after the database server to be upgraded is completed, data migration operations are performed on the data tables involved in the table association migration scenario; wherein, the data migration operation is completed by the business processing batch server in the business processing server initiating the data migration program.

[0129] Understandably, examples of data migration operations are as follows:

[0130] If a new field is added to a table structure in the database (e.g., table A), and the data for this field needs to be retrieved from other table structures (e.g., tables B and C), the business processing batch server will initiate a migration program through batch scheduling. This migration program queries other related tables (e.g., tables B and C) through the primary key or foreign key of the data table to obtain the information required for the new field. Based on the requirements of the business logic, the migration program calculates or concatenates the obtained information and writes it into the new field of the upgraded table structure, i.e., stores it in the changed table.

[0131] As can be seen from the above description, the upgrade method for the distributed business processing system provided in this application can perform data migration operations on data tables involving table association migration scenarios.

[0132] In summary, the upgrade method for the distributed business processing system provided in this application can uniformly control the upgrade order of various application servers and database services in the distributed system through the upgrade strategy control server, which greatly improves the efficiency of system upgrade and maintenance; through the strategy analysis and optimization component, the upgrade strategy is automatically verified and the process is analyzed, correcting the problems of manual equipment upgrade strategies and better ensuring the correctness of system upgrades; the system automatically analyzes the situation where database upgrades require downtime and initiates a non-downtime upgrade strategy; by adjusting the sharding routing and upgrade strategy, the system automatically completes uninterrupted service upgrades, improving the business continuity of the entire system and thus enhancing the customer experience.

[0133] Based on the same inventive concept, this application also provides an upgrade apparatus for a distributed business processing system, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principle of the upgrade apparatus for a distributed business processing system in solving the problem is similar to that of the upgrade method for a distributed business processing system, the implementation of the upgrade apparatus for a distributed business processing system can refer to the implementation of the method based on software performance benchmarks, and will not be repeated. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0134] In one embodiment, see Figure 6 In order to make reasonable distinctions between the types of hardware devices to be upgraded and the specific upgrade content in a fine-grained manner, thereby effectively reducing downtime and impact on business processing during the system upgrade process, this application provides an upgrade device for a distributed business processing system, including: an upgrade method determination unit 601, a database upgrade unit 602, and a server upgrade unit 603.

[0135] The upgrade method determination unit 601 is used to determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded; the system upgrade method includes shutdown upgrade and non-shutdown upgrade;

[0136] The database upgrade unit 602 is used to determine a database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language.

[0137] Server upgrade unit 603 is used to perform rolling upgrades on the business processing server based on the traffic of the business processing server and preset busy business periods after the database server to be upgraded is completed.

[0138] In one embodiment, see Figure 7 The upgrade method determination unit 601 includes: a change type determination module 701, an online service statement determination module 702, and an online service resource determination module 703.

[0139] The change type determination module 701 is used to determine whether the change type of the data table involves index changes, adding fields, or data cleanup; wherein, if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade;

[0140] The online service statement determination module 702 is used to determine whether the operation involved in the database operation language contains statements that affect online services when the index change, field addition, or data cleanup is not involved; wherein, if the statements that affect online services are included, the system upgrade method is a shutdown upgrade.

[0141] The online service resource determination module 703 is used to determine whether the operation involved in the database definition language conflicts with the online service when the statement affecting the online service is not included; wherein, if the operation involved conflicts with the online service, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

[0142] In one embodiment, see Figure 8 The system upgrade method is the shutdown upgrade; the database upgrade unit 602 includes:

[0143] The first traffic guidance module 801 is used to control the routing layer server to route business processing traffic to the backup database server and install the upgraded operating system and software programs on the database server to be upgraded.

[0144] The first definition language execution module 802 is used to execute the database definition language on the database server to be upgraded, so as to clean up the data tables, create the structure of new tables, and update the fields and / or indexes of the tables.

[0145] The first operation language execution module 803 is used to execute the database operation language on the database server to be upgraded in order to insert and / or update data in the data table.

[0146] In one embodiment, see Figure 9 The system upgrade method is the non-stop upgrade; the database upgrade unit 602 includes: a second traffic guidance module 901, a second definition language execution module 902 and a second operation language execution module 903.

[0147] The second traffic routing module 901 is used to control the routing layer server to route business processing traffic to the database server to be upgraded;

[0148] The second definition language execution module 902 is used to execute the database definition language on the database server to be upgraded, in order to clean up the data tables, create new table structures, and update table fields and / or indexes.

[0149] The second operation language execution module 903 is used to execute the database operation language on the database server to be upgraded in order to insert and / or update data in the data table.

[0150] In one embodiment, see Figure 10 The server upgrade unit 603 includes:

[0151] The upgrade batch determination module 1001 is used to determine whether the current upgrade time belongs to the busy period of the business; wherein, if not, the upgrade batch of each business processing server is determined according to the traffic of the business processing server.

[0152] The rolling upgrade execution module 1002 is used to perform rolling upgrades on each business processing server according to the upgrade batch.

[0153] In one embodiment, the upgrade device for the distributed business processing system further includes:

[0154] The data migration operation unit is used to perform data migration operations on data tables involved in table association migration scenarios based on the data after the database server to be upgraded is completed; wherein, the data migration operation is completed by the business processing batch server in the business processing server initiating the data migration program.

[0155] From a hardware perspective, in order to differentiate the types of hardware devices to be upgraded and the specific upgrade content in a fine-grained manner, thereby effectively reducing downtime and impact on business processing during system upgrades, this application provides an embodiment of an electronic device for implementing all or part of the upgrade method for the distributed business processing system. The electronic device specifically includes the following components:

[0156] The system comprises a processor, a memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the upgrade device of the distributed business processing system and the core business system, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the upgrade method and the upgrade device of the distributed business processing system in the embodiments, the contents of which are incorporated herein, and repeated details will not be described again.

[0157] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.

[0158] In practical applications, the upgrade method of a distributed business processing system can be partially executed on the electronic device side as described above, or all operations can be completed on the client device. The choice can be made based on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed on the client device, the client device may further include a processor.

[0159] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0160] Figure 11 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 11 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 11 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0161] In one embodiment, the upgrade method functionality of the distributed service processing system can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following controls:

[0162] S101: Determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded; the system upgrade method includes upgrades with downtime and upgrades without downtime.

[0163] S102: Determine the database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language;

[0164] S103: After the database server to be upgraded is upgraded, the business processing server is upgraded in a rolling manner according to the traffic of the business processing server and the preset busy business period.

[0165] As described above, the upgrade method for the distributed business processing system provided in this application can uniformly control the upgrade order of various application servers and database services in the distributed system through the upgrade strategy control server, which greatly improves the efficiency of system upgrade and maintenance; through the strategy analysis and optimization component, the upgrade strategy is automatically verified and the process is analyzed, and the problems existing in the manual equipment upgrade strategy are corrected, which better ensures the correctness of the system upgrade; the system can automatically analyze the situation where the database upgrade requires downtime and start the downtime upgrade strategy. By adjusting the sharding routing and upgrade strategy, the system can automatically complete the uninterrupted service upgrade, improve the business continuity of the entire system, and thus improve the customer experience.

[0166] In another embodiment, the upgrade device for the distributed service processing system can be configured separately from the central processing unit 9100. For example, the upgrade device for the distributed service processing system can be configured as a chip connected to the central processing unit 9100, and the function of the upgrade method for the distributed service processing system can be realized through the control of the central processing unit.

[0167] like Figure 11 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 11 All components shown; in addition, the electronic device 9600 may also include Figure 11 For components not shown, please refer to existing technologies.

[0168] like Figure 11 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0169] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0170] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0171] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0172] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0173] The communication module 9110 is a transmitter / receiver 9110 that transmits and receives signals via the antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in a conventional mobile communication terminal.

[0174] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is also coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.

[0175] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the upgrade method for a distributed business processing system with a server or client as the execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the upgrade method for a distributed business processing system with a server or client as the execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0176] S101: Determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded; the system upgrade method includes upgrades with downtime and upgrades without downtime.

[0177] S102: Determine the database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language;

[0178] S103: After the database server to be upgraded is upgraded, the business processing server is upgraded in a rolling manner according to the traffic of the business processing server and the preset busy business period.

[0179] As described above, the upgrade method for the distributed business processing system provided in this application can uniformly control the upgrade order of various application servers and database services in the distributed system through the upgrade strategy control server, which greatly improves the efficiency of system upgrade and maintenance; through the strategy analysis and optimization component, the upgrade strategy is automatically verified and the process is analyzed, and the problems existing in the manual equipment upgrade strategy are corrected, which better ensures the correctness of the system upgrade; the system can automatically analyze the situation where the database upgrade requires downtime and start the downtime upgrade strategy. By adjusting the sharding routing and upgrade strategy, the system can automatically complete the uninterrupted service upgrade, improve the business continuity of the entire system, and thus improve the customer experience.

[0180] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0184] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for upgrading a distributed business processing system, characterized in that, The distributed business processing system includes a database server and a business processing server; the method includes: The system upgrade method is determined based on the database operation language, database definition language, and data table change types of the database server to be upgraded; the system upgrade method includes upgrades that require system shutdown and upgrades that do not require system shutdown. The database upgrade strategy is determined according to the system upgrade method, and the database server to be upgraded is upgraded according to the database upgrade strategy, the database operation language, and the database definition language. After the database server to be upgraded is upgraded, the business processing server is upgraded in a rolling manner according to the traffic of the business processing server and the preset busy business period. The process of determining the system upgrade method based on the database operation language, database definition language, and data table change types of the database server to be upgraded includes: Determine whether the change type of the data table involves index changes, adding fields, or data cleanup; if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade; If the system upgrade does not involve index changes, field additions, or data cleanup, determine whether the operations in the database operation language contain statements that affect online services; if such statements are included, the system upgrade method is a shutdown upgrade. If the system does not contain statements that affect online services, determine whether the operations involved in the database definition language conflict with the online services in terms of resources; if the operations involved conflict with the online services in terms of resources, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

2. The upgrade method for a distributed business processing system according to claim 1, characterized in that, The system upgrade method is the shutdown upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes: The control routing layer server routes business processing traffic to the backup database server and installs the upgraded operating system and software programs on the database server to be upgraded. On the database server to be upgraded, the database definition language is executed to clean up the data tables, create new table structures, and update table fields and / or indexes. On the database server to be upgraded, the database operation language is executed to insert and / or update data in the data tables.

3. The upgrade method for a distributed business processing system according to claim 1, characterized in that, The system upgrade method is a non-stop upgrade; the upgrade of the database server to be upgraded according to the database upgrade strategy, the database operation language, and the database definition language includes: The control routing layer server routes business processing traffic to the database server to be upgraded; On the database server to be upgraded, the database definition language is executed to clean up the data tables, create new table structures, and update table fields and / or indexes. On the database server to be upgraded, the database operation language is executed to insert and / or update data in the data tables.

4. The upgrade method for a distributed business processing system according to claim 1, characterized in that, The step of performing rolling upgrades on the service processing server based on its traffic and preset peak service periods includes: Determine whether the current upgrade time falls within the peak period of the business; if not, determine the upgrade batch for each business processing server based on the traffic of the business processing server. The upgrade process will be carried out in a rolling manner according to the aforementioned upgrade batches for each business processing server.

5. The upgrade method for a distributed business processing system according to claim 1, characterized in that, Also includes: Based on the data after the database server to be upgraded is completed, data migration operations are performed on the data tables involved in the table association migration scenario; wherein, the data migration operation is completed by the business processing batch server in the business processing server initiating the data migration program.

6. An upgrade device for a distributed business processing system, characterized in that, include: The upgrade method determination unit is used to determine the system upgrade method based on the database operation language, database definition language, and data table change type of the database server to be upgraded. The system upgrade methods include upgrades that require system shutdown and upgrades that do not require system shutdown. The database upgrade unit is used to determine the database upgrade strategy according to the system upgrade method, and upgrade the database server to be upgraded according to the database upgrade strategy, the database operation language and the database definition language. The server upgrade unit is used to perform rolling upgrades of the business processing server based on the traffic of the business processing server and preset busy business periods after the database server to be upgraded is completed. The upgrade method determination unit includes: a change type determination module, an online service statement determination module, and an online service resource determination module; The change type determination module is used to determine whether the change type of the data table involves index changes, adding fields, or data cleanup; wherein, if it involves index changes, adding fields, or data cleanup, the system upgrade method is a shutdown upgrade; The online service statement determination module is used to determine whether the operations involved in the database operation language contain statements that affect online services when the index changes, field additions, or data cleanup are not involved; wherein, if the statements that affect online services are included, the system upgrade method is a shutdown upgrade. The online service resource determination module is used to determine whether the operation involved in the database definition language conflicts with the online service when the statement affecting the online service is not included; wherein, if the operation involved conflicts with the online service, the system upgrade method is a shutdown upgrade; otherwise, the system upgrade method is a non-shutdown upgrade.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the upgrade method for the distributed business processing system according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the upgrade method for the distributed business processing system according to any one of claims 1 to 5.

9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the upgrade method for the distributed business processing system according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • An uninterrupted upgrading method for a cloud service

    CN109981350A