Method, device and system compatible with hot rolling release of multi-version services

By using shadow database and control switches during the hot rolling release of multi-version services, the service abnormality caused by database table structure modification is solved, and the goal of smooth transition between new and old versions of services and minimizing business impact is achieved.

CN113778495BActive Publication Date: 2025-02-18UNISOUND SHANGHAI INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111249666.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-02-18
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

During the hot rolling release of multi-version services, modification of database table structure may cause abnormal service in V1 version in the production environment, resulting in unavailability of functions.

Method used

The shadow database technology is used to store the changed data structures when multi-version services are hot rolling, and the data in the actual database is synchronized in real time. Through the configuration of shadow control switches and service switches, the new service is controlled to generate data in the shadow database. After all the old services are offline, the data structure and data in the shadow database are reversely synchronized to the actual database.

Benefits of technology

Ensure a smooth transition between new and old versions of services, avoid the impact of data structure changes on the original online services, and minimize the impact of business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778495B_ABST
    Figure CN113778495B_ABST
Patent Text Reader

Abstract

The present invention provides an optimization method, device and system compatible with hot rolling release of multi-version services. The optimization method is to set up a shadow database to store the changed data structure when the multi-version service is hot rolled and synchronize the data in the actual database in real time. The technical solution provided by the present invention solves the compatibility of new and old versions of major cloud service reconstruction or important branch launches, and ensures a smoother launch process of a service, and will not affect the original online service due to factors such as changes in data structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device and system compatible with hot rolling release of multi-version services. Background Art

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The descriptions herein may include concepts that may be explored, but not necessarily concepts that have been previously thought of or explored. Therefore, unless otherwise noted herein, the content described in this section is not prior art with respect to the specification and claims of this application, and is not admitted to be prior art by inclusion in this section.

[0003] The service upgrades the version in the production environment using the mainstream rolling release method. The process of eventually upgrading all to the new version is as follows: Figure 1 As shown, traffic verification is usually performed first, and one machine is first upgraded from version V1 to version V2. After the traffic verification test passes, the remaining V1 machines are upgraded to version V2 one by one.

[0004] However, the above method has the following problems:

[0005] When the V2 version of a service needs to modify the database table structure used by the online V1 version in order to be used normally, the modification of the database table structure will cause anomalies in the production V1 version of the service during the rolling release process, resulting in problems such as the unavailability of the V1 version's functions.

[0006] In view of this, a new processing technology is urgently needed to optimize and solve the problem of hot rolling release of multi-version services. Summary of the invention

[0007] One or more embodiments of this specification describe a method, device and system for hot rolling release of compatible multi-version services, which are used to solve the compatibility of new and old versions of major cloud service reconstruction or important branch online to ensure minimal impact on business.

[0008] The technical solutions provided by one or more embodiments of this specification are as follows:

[0009] In a first aspect, the present invention provides an optimization method compatible with hot rolling release of multi-version services. The method is to set up a shadow database to store the changed data structure during hot rolling release of multi-version services and synchronize the data in the actual database in real time.

[0010] In a possible implementation, when a new service is released, the shadow database is put online. After all old services are offline, the shadow database is taken offline until the next new service is released, and then it is put online again.

[0011] In a possible implementation, after all old services are offline, the data structure and data in the shadow database are all reversely synchronized to the actual database, and the new service is switched to directly connect to the actual database.

[0012] In a possible implementation, a shadow control switch and a service switch are configured;

[0013] When a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database.

[0014] In a possible implementation, when a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database, until all old services are offline, and then the shadow control switch controls the service switch to close the connection to the shadow database, specifically:

[0015] When releasing a new service, a group of new services is released first. After the shadow control switch is turned on, the shadow database is connected first, and the generated data is first stored in the shadow database;

[0016] When new and old services coexist, the actual database and the shadow database coexist and provide services at the same time;

[0017] After all old services are offline, the shadow control switch controls the service switch to turn off, automatically reversely synchronizes the data structure and data in the shadow database to the actual database, and the new service switches to directly connect to the actual database. The shadow database goes offline until it is online again when the next new service is released.

[0018] In one possible implementation, after the new service is verified to have no problems, the overall weight of the new service is gradually adjusted until all old services are offline.

[0019] In a second aspect, the present invention provides an optimization device compatible with hot rolling release of multi-version services, the device comprising a shadow database module for storing the changed data structure during hot rolling release of multi-version services and synchronizing the data in the actual database in real time.

[0020] In a possible implementation, the device further includes a shadow control switch and a service switch; specifically,

[0021] When a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database.

[0022] In a possible implementation, the shadow control switch and the service switch are specifically used to:

[0023] When releasing a new service, a group of new services is released first. After the shadow control switch is turned on, the shadow database is connected first, and the generated data is first stored in the shadow database;

[0024] When new and old services coexist, the actual database and the shadow database coexist and provide services at the same time;

[0025] After all old services are offline, the shadow control switch controls the service switch to turn off. The service switch automatically synchronizes all the data structures and data in the shadow database to the actual database. The new service switches to directly connect to the actual database. The shadow database goes offline until it is online again when the next new service is released.

[0026] In a third aspect, the present invention provides an optimization system compatible with hot rolling release of multi-version services, the system comprising at least one processor and a memory;

[0027] The memory is used to store one or more program instructions;

[0028] The processor is used to run one or more program instructions to execute one or more methods as described in the first aspect.

[0029] In a fourth aspect, the present invention provides a chip, which is coupled to a memory in a system, so that the chip calls program instructions stored in the memory during operation to implement one or more of the methods described in the first aspect.

[0030] In a fifth aspect, the present invention provides a computer-readable storage medium, which includes one or more program instructions, and the one or more program instructions can be executed by the system described in the third aspect to implement one or more methods described in the first aspect.

[0031] The method provided by the embodiment of the present invention solves the problem of compatibility between new and old versions of major cloud service reconstruction or important branch launch, and ensures a smoother service launch process without affecting the original online services due to factors such as data structure changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flowchart of the mainstream rolling release method used for upgrading the service version in the production environment in existing technologies;

[0033] Figure 2 A schematic flow chart of an optimization method for hot rolling release of compatible multi-version services provided by an embodiment of the present invention;

[0034] Figure 3 A schematic flow chart of an optimization method for hot rolling release of compatible multi-version services provided by another embodiment of the present invention;

[0035] Figure 4 A schematic flow chart of an optimization method for hot rolling release of compatible multi-version services provided by another embodiment of the present invention;

[0036] Figure 5 A schematic flow chart of an optimization method for hot rolling release of compatible multi-version services provided by the best embodiment of the present invention;

[0037] Figure 6 A schematic diagram of an optimized device structure for hot rolling release of compatible multi-version services provided by an embodiment of the present invention;

[0038] Figure 7 A schematic diagram of an optimized device structure for hot rolling release of compatible multi-version services provided by an embodiment of the present invention;

[0039] Figure 8 A schematic diagram of an optimized device structure for hot rolling release of compatible multi-version services provided by another embodiment of the present invention;

[0040] Fig. 9 A schematic diagram of an optimized device structure for hot rolling release of compatible multi-version services provided by another embodiment of the present invention;

[0041] Fig.10 A schematic diagram of an optimized device structure for hot rolling release of compatible multi-version services provided by another embodiment of the present invention;

[0042] Fig.11 A schematic diagram of an optimized system structure compatible with hot rolling release of multi-version services provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0044] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0045] To solve the major reconstruction of cloud services or the compatibility of new and old versions of important branches, and ensure the minimum impact on business, Figure 2 The optimized method for hot rolling release of compatible multi-version services provided by an embodiment of the present invention is shown. Figure 2 As shown, the optimization method specifically sets up a shadow database to store the changed data structure during hot rolling release of multi-version services and synchronizes the data in the actual database in real time.

[0046] Specifically, Figure 3 FIG. 4 shows an optimization method for hot rolling release of compatible multi-version services provided by another embodiment of the present invention. Figure 3 As shown in the figure, when a new service is released, the shadow database is online. After all old services are offline, the shadow database is offline until the next new service is released, when it is online again. Before the shadow database is offline, the data structure and data in the shadow database are all reversely synchronized to the actual database, and the new service is switched to directly connect to the actual database.

[0047] Figure 4 Another embodiment of the present invention provides an optimization method for hot rolling release of compatible multi-version services, such as Figure 4 As shown, the optimization method also includes configuring a shadow control switch and a service switch. When a new service is released, the shadow control switch controls the service switch to open a connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database.

[0048] Figure 5 Schematic diagram of the optimization method for hot rolling release of compatible multi-version services provided by the best embodiment of the present invention. Figure 5 As shown, the optimization method steps for compatible hot rolling release of multi-version services include:

[0049] When releasing a new service, a group of new services is released first. After the shadow control switch is turned on, the shadow database is connected first, and the generated data is first stored in the shadow database;

[0050] When new and old services coexist, the actual database and the shadow database coexist and provide services at the same time;

[0051] After all old services are offline, the shadow control switch controls the service switch to turn off, automatically reversely synchronizes the data structure and data in the shadow database to the actual database, and the new service switches to directly connect to the actual database. The shadow database goes offline until it is online again when the next new service is released.

[0052] It should be noted that before all old services are offline, new services need to be verified to be problem-free, and then the overall weight of new services is gradually adjusted until all old services are offline. This ensures a smoother service launch process.

[0053] In summary, in order to optimize and solve the problem of hot rolling release of multi-version services, the present invention first creates a new shadow database storage service, which is specially used to store the changed data structure, and synchronizes the data in the back-end actual database in real time. When releasing the service, a group of new services are first sent to use the switch configuration. When it is turned on by default, the shadow database is first connected, and the generated data is first stored in the shadow database. When the new and old services coexist during the transition process, the actual database and the shadow database coexist and provide services at the same time. After the new service is verified to have no problems, the overall weight of the new service is gradually adjusted until all the old services are offline. When all the old services are offline, closing the configuration switch of the new service will automatically synchronize the data structure and data in the shadow database to the actual database. The new service is switched to directly connect to the actual database, and the shadow database is temporarily offline until the next time the new service release configuration switch is turned on.

[0054] The method provided by the present invention solves the problem of compatibility between old and new versions of major cloud service reconstruction or important branch launch, ensuring a smoother service launch process, and will not affect the original online services due to factors such as data structure changes. The solution of the present invention has minimal impact on the business.

[0055] Corresponding to the above-mentioned embodiment method, the present invention also provides an optimization device compatible with hot rolling release of multi-version services. Figure 6-Figure 7 FIG. 4 shows an optimization device compatible with hot rolling release of multi-version services provided by an embodiment of the present invention. Figure 6 As shown, the optimization device includes a shadow database module 1, which is used to store the changed data structure when the multi-version service is hot-rolled and synchronize the data in the actual database in real time.

[0056] It should be noted that when a new service is released, the shadow database module 1 is online. After all old services are offline, the shadow database module 1 is offline until the next new service is released, and then it is online again. Figure 7 As shown, before the shadow database module 1 goes offline, the data structure and data in the shadow database are all reversely synchronized to the actual database, and the new service is switched to directly connect to the actual database.

[0057] Figure 8-Figure 10 FIG. 4 shows an optimization device compatible with hot rolling release of multi-version services provided by another embodiment of the present invention, such as Figure 8-10 As shown, the optimization device also includes a shadow control switch 2 and a service switch 3; Figure 8 and Fig. 9 As shown, when a new service is released, the shadow control switch 2 controls the service switch 3 to open the connection to the shadow database, until all old services are offline, the shadow control switch 2 controls the service switch 3 to close the connection to the shadow database. Specifically,

[0058] like Figure 8 and Fig. 9 As shown, when a new service is released, a group of new services are released first. After the shadow control switch 2 controls the service switch 3 to be turned on, the shadow database is connected first, and the generated data is first stored in the shadow database. When the new and old services coexist, the actual database and the shadow database coexist and provide services at the same time;

[0059] like Fig.10 As shown, after all old services are offline, shadow control switch 2 controls service switch 3 to turn off, and service switch 3 automatically synchronizes all data structures and data in the shadow database to the actual database. The new service switches to directly connect to the actual database, and the shadow database goes offline until it is online again when the next new service is released.

[0060] To ensure a smoother service launch process, before all old services are offline, new services need to be verified to be problem-free, and then the overall weight of the new services is gradually adjusted until all old services are offline.

[0061] The functions performed by the various components in the device provided in the embodiment of the present invention have been described in detail in the above method, so they will not be described in detail here.

[0062] Corresponding to the above embodiment, the embodiment of the present invention also provides an optimization system compatible with hot rolling release of multi-version services, specifically as follows Fig.11 As shown, the system includes at least one processor 111 and a memory 112;

[0063] A memory 111, used to store one or more program instructions;

[0064] The processor 112 is used to run one or more program instructions to execute any method step in the optimization method for hot rolling release compatible with multi-version services as described in the above embodiment.

[0065] Corresponding to the above-mentioned embodiment, an embodiment of the present invention further provides a chip, which is coupled to the memory in the above-mentioned system, so that the chip calls the program instructions stored in the memory during operation to implement the optimization method for hot rolling release of compatible multi-version services as introduced in the above-mentioned embodiment.

[0066] Corresponding to the above-mentioned embodiments, an embodiment of the present invention further provides a computer storage medium, which includes one or more programs, wherein the one or more program instructions are used by an optimization system compatible with hot rolling release of multi-version services to execute the optimization method for hot rolling release of compatible multi-version services as introduced above.

[0067] The solution provided in this application can solve the compatibility problem of new and old versions during hot rolling release of multi-version services in the prior art, ensuring a smoother service launch process and not affecting the original online services due to factors such as changes in data structure.

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

[0069] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0070] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An optimization method compatible with hot rolling release of multi-version services, characterized in that: Set up a shadow database to store the changed data structure during hot rolling release of multi-version services and synchronize the data in the actual database in real time; When a new service is released, the shadow database is put online. After all old services are offline, the shadow database is offline until the next new service is released, and then it is put online again. Among them, before all old services are offline, new services need to be verified to have no problems, and then the overall weight of new services will be gradually adjusted until all old services are offline; The method further includes configuring a shadow control switch and a service switch; When a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database. When a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database. Specifically: When releasing a new service, a group of new services is released first. After the shadow control switch is turned on, the shadow database is connected first, and the generated data is first stored in the shadow database; When new and old services coexist, the actual database and the shadow database coexist and provide services at the same time; After all old services are offline, the shadow control switch controls the service switch to turn off, automatically reversely synchronizes the data structure and data in the shadow database to the actual database, and the new service switches to directly connect to the actual database. The shadow database goes offline until it is online again when the next new service is released.

2. The optimization method according to claim 1, characterized in that: After all old services are offline, the data structure and data in the shadow database are all reversely synchronized to the actual database, and the new service is switched to directly connect to the actual database.

3. An optimization device compatible with hot rolling release of multi-version services, characterized in that: The device includes a shadow database module for storing the changed data structure during hot rolling release of multi-version services and synchronizing the data in the actual database in real time; When a new service is released, the shadow database is put online. After all old services are offline, the shadow database is offline until the next new service is released, and then it is put online again. Among them, before all old services are offline, new services need to be verified to have no problems, and then the overall weight of new services will be gradually adjusted until all old services are offline; The device also includes a shadow control switch and a service switch; specifically, When a new service is released, the shadow control switch controls the service switch to open the connection to the shadow database. After all old services are offline, the shadow control switch controls the service switch to close the connection to the shadow database. The shadow control switch and service switch are specifically used for: When releasing a new service, a group of new services is released first. After the shadow control switch is turned on, the shadow database is connected first, and the generated data is first stored in the shadow database; When new and old services coexist, the actual database and the shadow database coexist and provide services at the same time; After all old services are offline, the shadow control switch controls the service switch to turn off. The service switch automatically synchronizes all the data structures and data in the shadow database to the actual database. The new service switches to directly connect to the actual database. The shadow database goes offline until it is online again when the next new service is released.

4. An optimized system compatible with hot rolling release of multiple versions of services, characterized by: The system includes at least one processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the method according to claim 1 or 2.

5. A chip, characterized in that: The chip is coupled to a memory in the system, so that the chip calls program instructions stored in the memory during operation to implement the method as claimed in claim 1 or 2.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes one or more program instructions, which can be executed by the system according to claim 4 to implement the method according to claim 1 or 2.

Citation Information

Patent Citations

  • Data on-line migration method and device for updating applications in network platform

    CN103729204A