An application upgrade method, an application upgrade platform, an electronic device and a storage medium

Through the application upgrade method in the cloud computing field, and the generation of upgrade scheduling plans through comparison and resource verification, the problems of application maintenance and upgrading in business scenarios are solved, and the stable and efficient upgrade of applications are achieved.

CN114416131BActive Publication Date: 2025-06-27ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111484865.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-06-27
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The existing technology has failed to effectively solve the subsequent maintenance and upgrade problems of applications in business scenarios in the field of cloud computing.

Method used

Provide an application upgrade method, by comparing the new version data of the application to be upgraded with the old version data, generating comparison data, and comparing the data for resource verification, to determine whether the system resources meet the upgrade conditions. In response to the verification pass, an upgrade schedule for the application to be upgraded is generated based on the comparison data, and the application is upgraded based on the plan.

Benefits of technology

The application maintenance and upgrade is realized, ensuring that the system resources meet the upgrade conditions and ensuring the stability and efficiency of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416131B_ABST
    Figure CN114416131B_ABST
Patent Text Reader

Abstract

The present invention provides an application upgrade method, an application upgrade platform, an electronic device and a storage medium. The application upgrade method includes: comparing the new version data of the application program to be upgraded with the old version data to generate comparison data; performing resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; in response to passing the verification, generating an upgrade scheduling plan for the application program to be upgraded based on the comparison data; and upgrading the application program based on the scheduling plan. This method can achieve the maintenance and upgrade of applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and in particular to an application upgrade method, an application upgrade platform, an electronic device, and a storage medium. Background Art

[0002] In recent years, cloud computing has been continuously popularized and developed in China. As a lightweight virtual technology, open-source container technology has been widely used in the field of cloud computing because it uses the method of packaging images of programs to achieve the rapid deployment and operation of applications, greatly improving the development efficiency. Compared with traditional virtual machines, containers share the host kernel and occupy very few resources themselves, providing users with a flexible resource allocation and scheduling method, and have now become the core function of cloud computing systems. The rise of open-source container technology has given birth to a large number of excellent application orchestration and management systems, such as kubernetes, Dockerswarm, and Mesosphere. Among them, kubernetes has become the leader in the field of container orchestration with its powerful application orchestration and management and automated operation and maintenance capabilities. The prior art proposes an application release method based on kubernetes, which supports a general application release system for multiple technology stacks, but does not consider the subsequent maintenance and upgrade of applications in business scenarios. Summary of the Invention

[0003] The present invention provides an application upgrade method, an application upgrade platform, an electronic device, and a storage medium, which can realize the maintenance and upgrade of applications.

[0004] To solve the above technical problems, the first technical solution provided by the present invention is: to provide an application upgrade method, including: comparing the new version data of the application program to be upgraded with the old version data to generate comparison data; performing resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; in response to passing the verification, generating an upgrade scheduling plan for the application program to be upgraded based on the comparison data; and upgrading the application program based on the scheduling plan.

[0005] Among them, the step of comparing the new version data of the application program to be upgraded with the old version data to generate comparison data includes: comparing the new version data of the application program to be upgraded with the application topology change information and container running environment information in the old version data to generate the comparison data; the application topology change information includes at least one of adding microservices and reducing microservices; the container running environment information includes at least one of environment variables, network resources, container storage information, and computing resources.

[0006] Among them, the step of generating an upgrade scheduling plan for the application to be upgraded based on the comparison data includes: creating copy information corresponding to the upgrade of the application to be upgraded based on the comparison data, and integrating the copy information to generate an upgrade plan; generating the scheduling plan based on the upgrade plan.

[0007] Among them, the copy information includes at least one of a copy name and service information, and the service information includes at least one of an application image and a port configuration.

[0008] Among them, the step of generating the scheduling plan based on the upgrade plan includes: scheduling the copy information in the upgrade plan to generate a scheduling result for the copy information, and the scheduling includes at least one of binding a computing resource node to the copy information, allocating a storage directory, and generating IP information; updating the application program with the copy information in the upgrade plan based on the scheduling result to obtain an upgrade strategy for the application program; generating the scheduling plan based on the upgrade strategy.

[0009] Among them, the step of generating the scheduling plan based on the upgrade strategy includes: using microservices to generate a hierarchical scheduling plan according to the application topology, and all the hierarchical scheduling plans form the scheduling plan.

[0010] Among them, the step of using microservices to generate a hierarchical scheduling plan according to the application topology includes: using the dependent services to perform IP / domain name rendering based on the application topology, and using the database to save the upgrade strategy, the copy information, and the scheduling result based on the application topology, so as to obtain the hierarchical scheduling plan.

[0011] Among them, after the step of scheduling the copy information in the upgrade plan to generate a scheduling result for the copy information, it includes: calling openapi to upgrade the copy information based on an upgrade script.

[0012] Among them, the step of upgrading the application program based on the scheduling plan includes: creating containers based on the scheduling plan, and each of the containers is independent; upgrading the application program based on the containers.

[0013] To solve the above technical problems, the second technical solution provided by the present invention is: providing an application upgrade platform, including: a business layer, comparing the new version data and the old version data of the application program to be upgraded to generate comparison data; performing resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; in response to passing the verification, generating an upgrade scheduling plan for the application program to be upgraded based on the comparison data; a basic layer, and the basic layer is used to upgrade the application program based on the scheduling plan.

[0014] Among them, the service layer includes: gateway service, application center, and image center.

[0015] Among them, the basic layer includes: a master node, and the master node corresponds to a plurality of slave nodes; the master node includes an interface service, a controller, a scheduler, and a key-value database; the slave nodes include a node proxy component, a network proxy component, a container service, a network plugin, and at least one replica.

[0016] To solve the above technical problems, the third technical solution provided by the present invention is: to provide an electronic device, including: a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method described in any one of the above.

[0017] To solve the above technical problems, the fourth technical solution provided by the present invention is: to provide a computer-readable storage medium storing a program file, and the program file can be executed to implement the method described in any one of the above.

[0018] The beneficial effect of the present invention, different from the prior art, is that the present invention compares the new version data of the application program to be upgraded with the old version data to generate comparison data; performs resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; in response to passing the verification, generates an upgrade scheduling plan for the application program to be upgraded based on the comparison data; and upgrades the application program based on the scheduling plan. This method can realize the maintenance and upgrade of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, where:

[0020] Figure 1 It is a schematic flowchart of an embodiment of the application upgrade method of the present invention;

[0021] Figure 2a It is a schematic diagram of image update;

[0022] Figure 2b It is a schematic diagram of the change of the application topology structure;

[0023] Figure 3 For Figure 1 a schematic flowchart of an embodiment of step S13 in

[0024] Figure 4a Schematic diagram of the upgrade method in the simple scheduling mode of the present invention;

[0025] Figure 4b Schematic diagram of the upgrade method in the complex scheduling mode of the present invention;

[0026] Figure 5 Schematic diagram of the structure of an embodiment of the upgrade platform applied in the present invention;

[0027] Figure 6 Schematic diagram of the structure of an embodiment of the electronic device of the present invention;

[0028] Figure 7 Schematic diagram of the structure of the computer-readable storage medium of the present invention. Detailed implementation manners

[0029] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.

[0030] The terms "first", "second", and "third" in the present application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.

[0031] References to "embodiments" in this specification mean that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0032] In some large-scale application upgrades, to ensure the integrity of application data, the system application upgrade requires backing up data or initializing some system data for flexible upgrades. For example, when the blog system iterates and upgrades a large application version, it needs to take the application offline first, back up the mysql data of the blog system, and then perform an overall upgrade of the application.

[0033] The purpose of this application is to provide a deployment and upgrade solution for the container cloud platform based on the application granularity. The standard kubernetes (open-source system, k8s) only provides underlying scheduling and infrastructure management based on container orchestration, and is inadequate in the scheduling and management of business applications (composed of multiple microservices). This proposal mainly starts from the user's business scenario, considering reducing the technical difficulty of using k8s, and uniquely creates a business application concept based on k8s. An application of a user can be formed into a topological structure by orchestrating multiple microservices or components. Each microservice collaborates and depends on each other for calls. Finally, the user deploys the application on the private cloud platform to provide services. Since there is often an urgent need for application version upgrades while the user's business projects are iterating, the application upgrade scenarios for users are sorted out (including internal container image upgrades of the application, application topology changes, and business data upgrades), and an overall application upgrade function is constructed.

[0034] Please refer to Figure 1 , which is a schematic flowchart of an embodiment of the application upgrade method of the present invention, specifically including:

[0035] Step S11: Compare the new version data of the application program to be upgraded with the old version data to generate comparison data.

[0036] In daily business iterative development, there is often a need to upgrade internal microservices of business applications. For example, the internal microservices of an online application need to be modified and put online. As Figure 2a shown, it is necessary to regularly perform version function upgrade iterations, add some comment functions or fix some known defects. For example, upgrade Tomcat 1.0 to Tomcat 2.0. In the container cloud environment, the update of such microservices is the update of images, configurations, and resources (such as CPU, memory, storage), etc.

[0037] In some major version feature upgrades of the business or refactoring of the business code logic, the application topology changes due to updates to the architecture or business microservice components. For example, Figure 2b As shown, when the traffic of the blog system gradually increases, in order to ensure stability and a good user experience, a redis component is added for caching. The microservice needs to rely on the redis component to provide blog services externally. This update is a change in the dependency topology of the internal services of the application.

[0038] In one embodiment, the new version data of the application to be upgraded is compared with the old version data, including comparing the application topology change information of the new version data and the old version data. For example, it is determined whether microservices are added or reduced in the new version data relative to the old version data. Or, it includes comparing the container running environment information of the new version data and the old version data. For example, it is determined whether the configuration and resources of some components have changed in the new version data relative to the old version data. Specifically, it is determined whether at least one of the environment variables, network resources, container storage information, and computing resources has changed.

[0039] After the comparison is completed, comparison data is generated.

[0040] Step S12: Perform resource verification on the comparison data to determine whether the system resources meet the upgrade conditions.

[0041] Perform resource verification on the comparison data to determine whether the system resources meet the upgrade conditions. The verification mainly includes calculating the resources required for the upgrade and the resources released by the upgrade, etc. mainly to determine whether the current resources of the system can support this upgrade. For example, calculate the remaining storage space of the system and determine whether the remaining storage space meets the upgrade requirements. If it meets, it is determined that the system meets the upgrade conditions; otherwise, it is determined that the system does not meet the upgrade conditions, and a prompt instruction is fed back to the user.

[0042] Step S13: In response to passing the verification, generate an upgrade scheduling plan for the application to be upgraded based on the comparison data.

[0043] In the case where it is determined that the system meets the upgrade conditions, that is, in the case of passing the verification, an upgrade scheduling plan for the application to be upgraded is generated based on the comparison data.

[0044] Specifically, copy information corresponding to the upgrade of the application to be upgraded is created based on the comparison data, and the copy information is integrated to generate an upgrade plan. That is, an upgrade plan contains multiple copy information. Further, a scheduling plan is generated based on the upgrade plan. In one embodiment, the copy information includes at least one of the copy name, service information, etc., where the service information includes at least one of the application image, port configuration, etc.

[0045] In one embodiment, for example, Figure 3As shown in the figure, generating a scheduling plan based on the upgrade plan includes:

[0046] Step S31: Schedule the replica information in the upgrade plan to generate a scheduling result for the replica information.

[0047] Specifically, in one embodiment, the scheduling includes at least one of binding a computing resource node to the replica information, allocating a storage directory, and generating IP information. That is, in this step, a computing resource node is bound to the replica information in the upgrade plan, a storage directory is allocated, and IP information is generated.

[0048] Step S32: Update the application program based on the scheduling result using the replica information in the upgrade plan to obtain an upgrade policy for the application program.

[0049] The scheduling result includes at least one of binding a computing resource node to the replica information, allocating a storage directory, and generating IP information. Updating the application program based on the scheduling result using the replica information can obtain an upgrade policy for the application program.

[0050] Step S33: Generate the scheduling plan based on the upgrade policy.

[0051] Furthermore, a hierarchical scheduling plan is generated based on microservices according to the application topology. Specifically, the hierarchical scheduling plan is determined based on the dependency relationship of microservices, IP / domain name rendering is performed on dependent services based on the application topology, and the upgrade policy, the replica information, and the scheduling result are saved in a database based on the application topology, thereby obtaining the hierarchical scheduling plan. All hierarchical scheduling plans form an overall scheduling plan corresponding to the upgrade process.

[0052] In one embodiment, the scheduling plan includes a complex scheduling mode and a simple scheduling mode. The complex scheduling mode is an asynchronous scheduling and deployment method in a row. In this deployment method, users can perform autonomous and controllable scheduling. The mode of the scheduling plan can be selected by the user. If the user specifies the simple scheduling mode, the system gradually starts the replica information of the application microservices according to the generated scheduling plan. That is, the simple scheduling mode cannot be autonomously controlled by the user.

[0053] Step S14: Upgrade the application program based on the scheduling plan.

[0054] Specifically, the system upgrades the application based on the scheduling plan. If the user selects the simple scheduling mode, the application microservice replica information is gradually pulled up according to the generated scheduling plan, and then the upgrade is completed. If the user selects the complex scheduling mode, when scheduling the replica information in the upgrade plan, an upgrade script is obtained from an asynchronous scheduling and deployment container (cf container), and the openapi is called based on the upgrade script to upgrade the replica information. Then, continue with the steps shown in the above embodiment to complete the system upgrade.

[0055] In one embodiment, containers are further created based on the scheduling plan, and each container is independent of each other; the application is upgraded based on the containers.

[0056] Specifically, as Figure 4a shown, it is a schematic diagram of the upgrade method process under the simple scheduling mode of the present invention. The process includes:

[0057] 1. The user sends an upgrade instruction; → 2. The application center (appstore) compares the new version data and the old version data of the application to be upgraded to obtain comparison data; → 3. Create replica information based on the comparison data and schedule the replica information to obtain an upgrade plan; → 4. Feedback the upgrade process to the user; → 5. Generate a hierarchical scheduling plan and further generate a scheduling plan; → 6. Feedback the scheduling plan to k8s; → 7. The container service docker in k8s creates containers based on the scheduling plan; → 8. Docker feeds back the container creation status to Master; → 9. Master feeds back the microservice creation status to appstore, and the user can query the application upgrade status based on appstore to determine whether the upgrade is completed.

[0058] As Figure 4b shown, it is a schematic diagram of the upgrade method process under the complex scheduling mode of the present invention. The process includes:

[0059] 1. The user sends an upgrade instruction; → 2. The app store compares the new version data and the old version data of the application to be upgraded to obtain comparison data; → 3. Creates copy information based on the comparison data and schedules the copy information to obtain an upgrade plan; → 4. Feeds back the upgrade process to the user; → 5. The app store sends an upgrade message to the cf container; → 6. Triggers the user upgrade script in the cf container; → 7. Invokes the openapi to upgrade the copy information based on the user upgrade script; → 8. Generates a hierarchical scheduling plan and further generates a scheduling plan; → 9. Feeds back the scheduling plan to k8s; → 10. The container service docker in k8s creates a container based on the scheduling plan; → 11. Docker feeds back the container creation status to the Master; → 12. The Master feeds back the microservice creation status to the app store; → 13. The app store sends the copy upgrade information to the cf container; → 14. The cf container sends an application upgrade success message to the app store; so that the user can query the application upgrade status based on the app store to determine whether the upgrade is completed.

[0060] The biggest feature of this proposal is: it simplifies the usage difficulty of native kubernetes, introduces the concept of business application orchestration, analyzes in detail the requirements of application upgrade in the business scenario, synthesizes different scenarios, designs and completes a set of application upgrade methods, compensates for the deficiencies of kubernetes in the upper layer of business applications, and greatly simplifies the difficulty of using containers in the private cloud field through the combination of open source and self-developed solutions, bringing an improvement in the development efficiency of business application parties. This proposal will describe the application upgrade and deployment process through methods such as open source and self-created business, creates an original application upgrade process, and opens application upgrade modes such as ordinary and advanced in the face of rapid iterative upgrades of business versions. While meeting the needs of ordinary users, it also opens the openapi interface for complex application upgrades through development interfaces, providing users with flexible application upgrade methods through the combination of multiple upgrade modes.

[0061] Please refer to Figure 5 , which is a schematic structural diagram of an embodiment of the application upgrade platform of the present invention, specifically including: a business layer 51 and a basic layer 52.

[0062] Among them, the business layer 51 is used to compare the new version data and the old version data of the application to be upgraded to generate comparison data; perform resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; in response to passing the verification, generate an upgrade scheduling plan for the application to be upgraded based on the comparison data.

[0063] Specifically, the business layer 51 includes: gateway service (gateway), application center (appstore), and image center (image-registry). Specifically, when upgrading an application, the comparison between the old and new versions, resource verification, replica creation, and scheduling are all executed in the application center (appstore).

[0064] The basic layer 52 is the k8s layer, including: a master node (Master), and the master node corresponds to multiple sub-nodes Node; the master node includes an interface service api-server, a controller controller-manager, a scheduler scheduler, and a key-value database etcd. The sub-nodes include a node proxy component kubelet, a network proxy component kube-proxy, a container service docker, a network plugin calico, and at least one replica pod.

[0065] The basic layer 52 is used to upgrade the application based on the scheduling plan. Specifically, after the application center generates a scheduling plan, it sends the scheduling plan to the basic layer 52. The container service docker in the basic layer 52 creates containers for the replicas in the scheduling plan. The containers corresponding to each replica are independent of each other and do not affect each other. After the container creation is successful, application upgrade is performed through the interface service api-server, controller controller-manager, scheduler scheduler, and key-value database etcd in the master node (Master).

[0066] The biggest feature of this proposal is: it simplifies the usage difficulty of native kubernetes, introduces the concept of business application orchestration, analyzes in detail the requirements of application upgrade in the business scenario, synthesizes different scenarios, designs and completes a set of application upgrade methods, supplements the deficiencies of kubernetes in the upper layer of business applications, and greatly simplifies the difficulty of container usage in the private cloud domain through the combination of open source and self-developed solutions, bringing an improvement in the development efficiency of business application parties. This proposal will describe the application upgrade and deployment process through open source, self-made business, etc., create an original application upgrade process, open general, advanced and other application upgrade modes in the face of rapid iterative upgrade of business versions, and while meeting the needs of ordinary users, also open the openapi interface for complex application upgrade through development interfaces, providing users with flexible application upgrade methods through the combination of multiple upgrade modes.

[0067] Please refer to Figure 6 , which is a schematic structural diagram of an embodiment of the electronic device of the present invention. The electronic device includes a memory 202 and a processor 201 connected to each other.

[0068] The memory 202 is used to store program instructions for implementing the method of any one of the above.

[0069] The processor 201 is used to execute the program instructions stored in the memory 202.

[0070] Among them, the processor 201 can also be called a CPU (Central Processing Unit). The processor 201 may be an integrated circuit chip with the ability to process signals. The processor 201 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0071] The memory 202 can be a memory module, a TF card, etc., and can store all the information in the electronic device, including the input original data, computer programs, intermediate motion results, and final motion results are all stored in the memory. It stores and retrieves information according to the positions specified by the controller. With the memory, the electronic device has a memory function and can ensure normal operation. The memory of the electronic device can be classified into a main memory (internal memory) and an auxiliary memory (external memory) according to its use, and there is also a classification method of dividing it into an external memory and an internal memory. The external memory is usually a magnetic medium or an optical disc, etc., which can store information for a long time. The internal memory refers to the storage component on the motherboard, which is used to store the data and programs being currently executed, but only temporarily stores the programs and data. When the power is turned off or cut off, the data will be lost.

[0072] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation manners described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other forms.

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

[0074] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0075] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a system server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application.

[0076] Please refer to Figure 7 , which is a schematic structural diagram of the computer-readable storage medium of the present invention. The storage medium of the present application stores a program file 203 that can implement all the above methods. Among them, the program file 203 may be stored in the above storage medium in the form of a software product and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage device includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, or a terminal device such as a computer, a server, a mobile phone, or a tablet.

[0077] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. An application upgrade method, characterized in that, Including: Comparing the new version data of the application to be upgraded with the old version data to generate comparison data; Performing resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; In response to passing the verification, generating an upgrade scheduling plan for the application to be upgraded based on the comparison data; Upgrading the application based on the scheduling plan; Wherein, the step of generating an upgrade scheduling plan for the application to be upgraded based on the comparison data includes: Creating copy information corresponding to the upgrade of the application to be upgraded based on the comparison data, and integrating the copy information to generate an upgrade plan; Generating the scheduling plan based on the upgrade plan; The step of generating the scheduling plan based on the upgrade plan includes: Scheduling the copy information in the upgrade plan to generate a scheduling result for the copy information, where the scheduling includes at least one of binding a computing resource node to the copy information, allocating a storage directory, and generating IP information; Updating the application using the copy information in the upgrade plan based on the scheduling result to obtain an upgrade strategy for the application; Generating the scheduling plan based on the upgrade strategy.

2. The method according to claim 1, wherein The step of comparing the new version data of the application to be upgraded with the old version data to generate comparison data includes: Comparing the new version data of the application to be upgraded with the application topology change information and container running environment information in the old version data to generate the comparison data; The application topology change information includes at least one of adding microservices and reducing microservices; The container running environment information includes at least one of environment variables, network resources, container storage information, and computing resources.

3. The method according to claim 1, characterized in that, The copy information includes at least one of a copy name and service information, and the service information includes at least one of an application image and port configuration.

4. The method according to claim 1, wherein The step of generating the scheduling plan based on the upgrade strategy includes: Using microservices to generate a hierarchical scheduling plan according to the application topology, and all hierarchical scheduling plans form the scheduling plan.

5. The method according to claim 4, characterized in that, The step of using microservices to generate a hierarchical scheduling plan according to the application topology includes: Using the dependent services to perform IP / domain name rendering based on the application topology, and using the database to save the upgrade strategy, the copy information, and the scheduling result based on the application topology, thereby obtaining the hierarchical scheduling plan.

6. The method according to claim 1, characterized in that, After the step of scheduling the copy information in the upgrade plan to generate a scheduling result for the copy information, it includes: Invoking openapi to upgrade the copy information based on an upgrade script.

7. The method according to claim 1 or 6, characterized in that The step of upgrading the application based on the scheduling plan includes: Creating containers based on the scheduling plan, and each container is independent of each other; Upgrading the application based on the containers.

8. An application upgrade platform, characterized in that, Including: A business layer that compares the new version data of the application to be upgraded with the old version data to generate comparison data; Performing resource verification on the comparison data to determine whether the system resources meet the upgrade conditions; In response to passing the verification, generate an upgrade scheduling plan for the application to be upgraded based on the comparison data; Base layer, which is used to upgrade the application based on the scheduling plan; wherein, generating an upgrade scheduling plan for the application to be upgraded based on the comparison data includes: creating copy information corresponding to the upgrade of the application to be upgraded based on the comparison data, and integrating the copy information to generate an upgrade plan; generating the scheduling plan based on the upgrade plan; The generating the scheduling plan based on the upgrade plan includes: scheduling the copy information in the upgrade plan to generate a scheduling result for the copy information, and the scheduling includes at least one of binding a computing resource node to the copy information, allocating a storage directory, and generating IP information; updating the application with the copy information in the upgrade plan based on the scheduling result to obtain an upgrade policy for the application; generating the scheduling plan based on the upgrade policy.

9. The upgrade platform according to claim 8, wherein, The business layer includes: gateway service, application center, and image center.

10. The upgrade platform according to claim 8, characterized in that, The base layer includes: a master node, and the master node corresponds to multiple sub-nodes; The master node includes an interface service, a controller, a scheduler, and a key-value database; The sub-nodes include a node proxy component, a network proxy component, a container service, a network plugin, and at least one copy.

11. An electronic device, characterized in that, including: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1-7.

12. A computer-readable storage medium, characterized in that, Stored with a program file, and the program file can be executed to implement the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Vehicle-mounted terminal application program upgrading method, device, equipment, medium and product

    CN112433750A