Application upgrading method and device, server and storage medium

By adding basic data packets to the application upgrade data package in the server and determining operating parameters, the application is automatically upgraded, which solves the problem of low application update efficiency in the existing technology and realizes an automated and efficiency-improving application upgrade process.

CN118733074APending Publication Date: 2024-10-01SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310363478.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the prior art, application updates require manual writing of modification commands, which results in low application upgrade efficiency in the server. Especially when there are many update data packages, the written commands are longer and difficult to load successfully, resulting in low efficiency.

Method used

By adding basic data packages to each upgrade data package of the target application in the server, and determining the target operating parameters based on the basic data packages, it automatically decides whether to execute the upgrade data package, thereby achieving data upgrade of the application and reducing the steps of manually writing commands.

Benefits of technology

This method does not require manual writing of modification commands, automates the application upgrade process, improves the efficiency of application upgrades in the server, and avoids loading failures caused by too long environment variable parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733074A_ABST
    Figure CN118733074A_ABST
Patent Text Reader

Abstract

The invention discloses an application upgrading method and device, a server and a storage medium, and belongs to the technical field of data processing. The method is applied to a server and comprises the steps that basic data packets and upgrading data packets of a target application are obtained, the basic data packets are added by the server for all the upgrading data packets of the target application, and the upgrading data packets are code packets needing to be upgraded by the target application; according to the basic data packet, target operation parameters are determined, and the target operation parameters are used for indicating whether the upgrading data packet is executed or not; and when the target operation parameter indicates to execute the upgrading data packet, performing data upgrading on the target application according to the upgrading data packet. According to the application, the basic data packets added by the server for each upgrade packet are obtained, the target operation parameters are determined, when the target operation parameters indicate to execute the upgrade data packets, the data upgrade is performed on the target application according to the upgrade data packets, the process does not need to manually write a modification command, the data upgrade is automatically performed on the target application, and the data upgrade efficiency is improved. And the efficiency of performing data upgrading on the target application in the server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an application upgrading method, device, server and storage medium. Background Art

[0002] With the development of science and technology, various terminal devices appear in people's daily lives. People can use the terminal devices to run installed applications for entertainment, work, etc.

[0003] Among them, various applications correspond to servers, and the servers interact with terminal devices to implement the functions provided by the applications. Usually, when an application needs to be updated, the application code of the application in the server is updated first, and then the terminal device downloads the updated application code. For example, when a developer needs to upgrade an application in a server, he or she can code through the application development device and write some modification commands. These modification commands can specify the update data packets written by the developer, so that the server updates the application based on these modification commands.

[0004] In the above scheme, since each update requires writing a modification command, the process takes a lot of time. When there are many update data packets, the written modification commands are longer and not easy to load successfully, resulting in low efficiency of application upgrades in the server. Summary of the invention

[0005] In order to solve the problems of the prior art and improve the efficiency of application upgrades in the server, the embodiments of the present application provide an application upgrade method, device, server and storage medium. The technical solution is as follows:

[0006] In one aspect, the present application provides an application upgrade method, applied to a server, the method comprising:

[0007] Acquire a basic data packet and an upgrade data packet of a target application, wherein the basic data packet is added by the server for each upgrade data packet of the target application, and the upgrade data packet is a code packet that needs to be upgraded for the target application;

[0008] Determining a target operating parameter according to the basic data package, wherein the target operating parameter is used to indicate whether to execute the upgrade data package;

[0009] When the target operation parameter indicates to execute the upgrade data package, data of the target application is upgraded according to the upgrade data package.

[0010] In one aspect, the present application provides an application upgrade device, applied to a server, the device comprising:

[0011] A first acquisition module, configured to acquire data upgrade information of a target application, wherein the data upgrade information includes a basic data packet and an upgrade data packet;

[0012] A first determination module, configured to determine a target operation parameter according to the basic data package, wherein the target operation parameter is used to indicate whether to execute the upgrade data package;

[0013] The first upgrade module is used to upgrade the data of the target application according to the upgrade data packet when the target operation parameter indicates to execute the upgrade data packet.

[0014] In another aspect, the present application provides a server, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the application upgrade method as described in one aspect.

[0015] In another aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the application upgrade method as described in one aspect.

[0016] On the other hand, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the application upgrade method as described in one aspect above.

[0017] On the other hand, an embodiment of the present application provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the application upgrade method described in one aspect above.

[0018] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0019] Obtain the basic data packet and upgrade data packet of the target application. The basic data packet is added by the server for each upgrade data packet of the target application. The upgrade data packet is the code packet that the target application needs to upgrade. According to the basic data packet, determine the target operation parameters. The target operation parameters are used to indicate whether to execute the upgrade data packet. When the target operation parameters indicate to execute the upgrade data packet, perform data upgrade on the target application according to the upgrade data packet. In this application, by obtaining the basic data packet added by the server for each upgrade package, determine the target operation parameters. When the target operation parameters indicate to execute the upgrade data packet, perform data upgrade on the target application according to the upgrade data packet. This process does not require manual writing of modification commands. The target application is automatically upgraded, which improves the efficiency of data upgrade on the target application in the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 It is a schematic diagram of an architecture of an application scenario for publishing an application provided by an exemplary embodiment of the present application;

[0022] Figure 2 is a method flow chart of an application upgrade method provided by an exemplary embodiment of the present application;

[0023] Figure 3 is a method flow chart of an application upgrade method provided by an exemplary embodiment of the present application;

[0024] Figure 4 is a structural diagram of a server involved in an exemplary embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of an exemplary embodiment of the present application involving a running container sequentially executing a basic data package and each upgrade data package;

[0026] Figure 6 is a structural block diagram of an application upgrading device provided by an exemplary embodiment of the present application;

[0027] Figure 7 It is a structural diagram of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0029] The solution provided by the present application can be used in real-life scenarios in which a server is used to upgrade and deploy application code of an application in daily life. To facilitate understanding, some of the nouns involved in the embodiments of the present application and the scenario architecture of the application scenarios are briefly introduced below.

[0030] Kubernetes (K8s): It is Google's open source container cluster management system, which is used to manage containerized applications on multiple hosts in the cloud platform.

[0031] Javaagent: It is a jar package specified through the command line provided by the Java Virtual Machine (Java Virtual Machine, JVM), which can modify or monitor Java programs.

[0032] Mutating Admission Webhook: It is a callback mechanism provided by K8s. When the matching resources change, the configured server will be called to modify the resource definition.

[0033] Continuous Deployment: is a higher degree of automation in the server where builds / deployments happen automatically whenever there are significant changes to the code.

[0034] With the development of science and technology, the intelligence of terminal devices is becoming more and more common. Various terminal devices are installed with applications. In actual applications, applications often need to be updated. For example, after the developer has completed the development of an application, when the function of the application needs to be updated, it is often necessary to rewrite the updated content of the application, and update the application code in the formal environment through the server to complete the data change.

[0035] Please refer to Figure 1 , which shows a schematic diagram of the architecture of an application scenario for publishing an application provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the application scenario may include: a computer device 110 and a server 120 .

[0036] The computer device 110 may be a terminal device with a program coding application installed, through which a developer can write the application code of an application program. For example, the terminal device may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, or other terminal device with an editable application code function.

[0037] The server 120 may include at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for applications that support virtual environments. Optionally, the server 120 includes multiple databases, and the server 120 may provide a test environment or a formal environment to developers or users, which is what we often call a test server and a formal server.

[0038] Optionally, a communication connection is established between the computer device 110 and the server 120, and data is transmitted through the communication connection. Among them, the communication connection can be referred to as a communication network or a network connection, and the communication connection uses standard communication technology and / or protocols. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the above-mentioned data communication technologies.

[0039] Developers edit the application through computer devices and then publish it to the server. The server tests the application code of the application and performs the publishing process so that users can download and run the application from the server through other terminal devices.

[0040] When the application needs to be updated, the developer will edit the updated data content through the computer device, generate the Javaagent.jar package, and upload the Javaagent.jar package to the server. The server will download the Javaagent.jar package according to the specified path when updating. Among them, the developer can write a modification command through the computer device, use fixed parameters to specify the Javaagent.jar package in the command line, and the server will upgrade the application code of the application according to the modification command.

[0041] Taking Java language as an example, use -javaagent to specify the javaagent jar package in the java command line, and use -D to add jvm parameters, such as java-javaagent: / path / Agent.jar-DagentArgs1=xxx1-DagentArgs1=xxx2-jar app.jar, or use the JAVA_TOOL_OPTIONS environment variable to be automatically loaded by the jvm, such as export JAVA_TOOL_OPTIONS=-javaagent: / path / Agent.jar-DagentArgs1=xxx1-DagentArgs1=xxx2, etc.

[0042] In existing data changes, since modification commands need to be written for each update, the process takes a lot of time. When there are many update data packets, the modification commands written are longer and not easy to load successfully, resulting in low efficiency of application upgrades in the server.

[0043] In order to solve the problems existing in the above-mentioned related technologies and improve the efficiency of application upgrades in the server, the present application provides an application upgrade method, which can actively add basic data packets to each upgrade data packet of the target application, and decide whether to actively upgrade the data of the target application based on the basic data packet, thereby reducing the steps of manually writing commands.

[0044] Please refer to Figure 2 , which shows a method flow chart of an application upgrade method provided by an exemplary embodiment of the present application. The application upgrade method can be applied to the above Figure 1 Server in the scenario architecture. Figure 2 As shown, the application upgrade method may include the following steps:

[0045] Step 201 , obtaining a basic data package and an upgrade data package of a target application, wherein the basic data package is added by a server for each upgrade data package of the target application, and the upgrade data package is a code package that needs to be upgraded for the target application.

[0046] The server may store application code of the target application in advance, and each upgrade data package may be a code package written by a developer that needs to be upgraded. For example, taking the Java application code as an example, the upgrade data package written by the developer may be a javaagent jar package. Optionally, the basic data package may be a data package corresponding to the target application that is pre-set in the server by the developer.

[0047] Step 202: Determine target operation parameters according to the basic data package, where the target operation parameters are used to indicate whether to execute the upgrade data package.

[0048] Optionally, the server can run the basic data package, and determine whether to execute the upgrade data package by enabling the basic data package. For example, the target operation parameter is a true parameter or a false parameter; the true parameter indicates that the upgrade data package is executed, and the false parameter indicates that the upgrade data package is not executed. When the target operation parameter written after the basic data package is enabled is a true parameter, step 203 is executed, otherwise it is not necessary to start each upgrade data package to upgrade the target application.

[0049] Step 203: When the target operation parameter indicates to execute the upgrade data package, data of the target application is upgraded according to the upgrade data package.

[0050] For example, when the target operation parameter written after the above basic data package is enabled is the true parameter, the server performs data upgrade on the target application according to the upgrade data package, starts each upgrade data package, and runs the application program of the target application to perform data upgrade.

[0051] In summary, the basic data packet and the upgrade data packet of the target application are obtained. The basic data packet is added by the server for each upgrade data packet of the target application, and the upgrade data packet is the code packet that the target application needs to upgrade; according to the basic data packet, the target operation parameters are determined, and the target operation parameters are used to indicate whether to execute the upgrade data packet; when the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. In this application, the basic data packet added by the server for each upgrade package is obtained to determine the target operation parameters. When the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. This process does not require manual writing of modification commands, and automatically upgrades the data of the target application, thereby improving the efficiency of data upgrade of the target application in the server.

[0052] In one possible implementation, before executing a data upgrade command, the server intercepts the data upgrade command and adds configuration information to the container that executes the data upgrade command. During the process of executing the data upgrade command, the server executes the data upgrade command according to the configuration information, thereby avoiding the situation where the running parameters are too long to be successfully loaded during the call of the environment variable, thereby improving the efficiency of data upgrade for the target application in the server.

[0053] Please refer to Figure 3 , which shows a method flow chart of an application upgrade method provided by an exemplary embodiment of the present application. The application upgrade method can be applied to the above Figure 1 Server in the scenario architecture. Figure 3 As shown, the application upgrade method may include the following steps:

[0054] Step 301: Receive information on an upgraded version selected for a target application.

[0055] Optionally, in this application, the server may provide a user selection platform, and the user selects the upgrade version information corresponding to the target application and sends it to the server, so that the server receives the upgrade version information. For example, the server includes an upgrade version management system, which can provide a selection platform for developers. Developers select the target application to be upgraded and the upgrade version information corresponding to the target application from the upgrade version management system through the selection platform. Optionally, the administrator of the upgrade version management system can write the javaagent.jar package that needs to be added, configure the relevant javaagent parameters for the javaagent.jar package, and upload it to the upgrade version management system. Developers can independently select the javaagent information of the corresponding version of the target application.

[0056] Taking java code as an example, a javaagent management system is maintained in the server, and developers select the target application to be upgraded and the javaagent version information corresponding to the target application through the javaagent management system.

[0057] Step 302: Create a data upgrade command based on the upgrade version information.

[0058] Optionally, the server performs continuous deployment and establishes a data upgrade command based on the selected upgrade version information. For example, the server also includes a continuous deployment system, which can provide developers with an application publishing interface. When a user chooses to publish an application, the continuous deployment system can query the upgrade version information of the application. For example, the continuous deployment system can have a communication connection with the upgrade version management system, and the continuous deployment system queries the upgrade version information selected by the developer from the upgrade version management system.

[0059] Optionally, after the server obtains the upgrade version information, it can establish a data upgrade command based on the upgrade version information. For example, taking the obtained upgrade version information as the javaagent version information, the server starts to deploy the target application through the continuous deployment system, creates a Pod container, puts a label on the Pod to enable javaagent, and puts an annotation on the Pod, which contains the javaagent version information. Optionally, the server also includes a K8s cluster, and starts to apply the Pod to the K8s cluster through the continuous deployment system. Optionally, the data upgrade command established by the server based on the upgrade version information can be a command for upgrading the data of the target application in the K8s cluster after the above-mentioned information required for the Pod is applied to the K8s cluster. For example, the K8s Application Program Interface (API) service in the K8s cluster can receive the Pod created during the application deployment process of the continuous deployment system, establish a data upgrade command and perform application upgrade deployment.

[0060] Please refer to Figure 4 , which shows a schematic diagram of the structure of a server involved in an exemplary embodiment of the present application, such as Figure 4 As shown, it includes K8s cluster 401, continuous deployment system 402, javaagent management system 403, storage system 404, and K8s cluster 401 also includes K8s API service unit 401a. The administrator uploads the javaagent jar package to the javaagent management system 403 and adds parameters. The javaagent management system 403 uploads the javaagent jar package to the storage system, and the storage system saves the download address and parameters of the javaagent jar package to form a javaagent version. The javaagent management system 403 can also receive the javaagent version selected by the user for the target application, and publish the target application to the continuous deployment system 402. The continuous deployment system 403 can deploy the target application and issue an upgrade deployment command to the K8s cluster 401.

[0061] Step 303: Before executing the data upgrade command, intercept the data upgrade command.

[0062] Step 304: Add configuration information to the container that executes the data upgrade command.

[0063] Optionally, in the present application, before executing the data upgrade command through the server, the data upgrade command needs to be intercepted and configuration information added to the container that executes the data upgrade command, so that the container that executes the data upgrade command in the server executes the data upgrade command according to the configuration information.

[0064] Optionally, taking the example that the server also includes a K8s cluster, the present application can add a mutating webhook configuration (Mutating Webhook Configuration) unit and a Webhook server unit to the K8s cluster. After marking the above information required by the Pod and applying it to the K8s cluster, the pre-deployed Mutating WebhookConfiguration unit can call the Webhook server unit, intercept the update of the Pod, and add configuration information to the container that executes the data upgrade command.

[0065] In one possible implementation, the container for executing the data upgrade command in the server includes: a loading container and a running container; the configuration information includes: information loading environment variables, running environment variables, and information appending environment variables; wherein the information loading environment variables are used for the loading container to download each upgrade data package; the running environment variables are used to place variable characters when the variable length of the information appending environment variables exceeds a preset length; and the information appending environment variables are used to append each upgrade data package.

[0066] Optionally, the K8s cluster in the server includes a loading container (Init Container) and a running container (Biz Container). The loading container (Init Container) is an Init Container that adds a standard Javaagent injection to the Pod's spec after the pre-deployed Mutating WebhookConfiguration unit intercepts the Pod update. The above configuration information includes: configuring the loading container (Init Container) and the running container (Biz Container) containing the Pod, namely: mounting an empty Dir for the Init Container and the Biz Container (to support shared directories); adding information loading environment variables for the Init Container so that the Init Container can download the javaagent.jar package corresponding to the target application; adding running environment variables (JAVA_AGENT_PARAM) for the Biz Container so that the agent parameters can be written into the running environment variables; adding information appending environment variables (JAVA_TOOL_OPTIONS) for the Biz Container so that the additional value javaagent: / path / xxxx.jar (multiple values ​​are allowed) is added after JAVA_TOOL_OPTIONS of the Biz Container, thereby appending the javaagent.jar package corresponding to the target application after the JAVA_TOOL_OPTIONS environment variable.

[0067] For example, in the above Figure 4 The K8s cluster 401 also includes a mutated network hook configuration unit 401b, a Webhook server unit 401c, a loading container 401d, and a running container 401e. The administrator deploys the mutated network hook configuration unit 401b and the Webhook server unit 401c in the K8s cluster 401 in advance. The network hook configuration unit 401b calls the Webhook server unit to intercept the update of the Pod and add configuration information to the container that executes the data upgrade command.

[0068] Optionally, after configuring the above configuration information, the Webhook server unit returns the changed Pod to the K8s API service, and the K8s API service continues to perform the upgrade deployment.

[0069] Step 305: According to the upgrade version information, an upgrade data packet of the target application corresponding to the upgrade version information is obtained.

[0070] Optionally, when upgrading and deploying the target application in the server, an upgrade data packet of the target application corresponding to the upgrade version information is acquired according to the upgrade version information acquired above.

[0071] In one possible implementation, when the target application is upgraded and deployed in the server, the upgrade deployment is initiated to the loading container (Init Container) based on the K8s API service in the above-mentioned K8s cluster. The server uses the upgrade version information as the information loading environment variable of the loading container (Init Container) to obtain the upgrade data packet of the target application corresponding to the upgrade version information.

[0072] For example, the server uses the loading container (Init Container) in the above-mentioned K8s cluster to load the upgrade version information as the information of the loading container (Init Container) to load the environment variable, and download the upgrade data packet of the target application corresponding to the upgrade version information. For example, the administrator of the above-mentioned upgrade version management system can write the javaagent.jar package (i.e., each upgrade data packet) that needs to be added, and configure the relevant javaagent parameters for the javaagent.jar package, and upload it to the upgrade version management system. The upgrade version management system can also upload the javaagent.jar package to the storage system for storage, and save the download address of the javaagent.jar package and the configured javaagent parameters in the storage system to form a javaagent version. In this step, the loading container (Init Container) loads the environment variable according to the added information, and downloads the javaagent.jar package corresponding to the target application from the storage system.

[0073] Step 306, adding a basic data package before upgrading the data package.

[0074] Optionally, the base data package is added before the upgrade data package. For example, the server can be the administrator of the upgrade version management system mentioned above, can write the javaagent.jar package (i.e., each upgrade data package) that needs to be added, and configure the relevant javaagent parameters for the javaagent.jar package, and upload it to the upgrade version management system, and then the upgrade version management system automatically adds the base data package (base agent.jar package) before the upgrade data package and stores it in the storage system, and the base data package is downloaded in the process of downloading each javaagent.jar package from the storage system in the above step 305.

[0075] Optionally, the basic data package can also be configured by the Webhook server unit in the above K8s cluster. For example, after the above pre-deployed Mutating Webhook Configuration unit and the Webhook server intercept the update of the Pod, the configuration information also includes a content: add the basic data package (BaseAgent.jar package) before each originally enabled upgrade data package.

[0076] Step 307: Determine target operation parameters according to the basic data package, where the target operation parameters are used to indicate whether to execute the upgrade data package.

[0077] After downloading each upgrade data package (javaagent.jar package) from the storage system in step 305, during the upgrade deployment process in the server, when starting the running container (Biz Container), the basic data package (BaseAgent.jar package) added before each upgrade data package is first run.

[0078] Optionally, the server determines the target operating parameters based on the basic data package as follows: based on the basic data package, determine whether the currently executed data upgrade command belongs to the command of executing the program; when the currently executed data upgrade command belongs to the command of executing the program, determine the target operating parameters to be operating parameters indicating that the upgrade data package is executed; when the currently executed data upgrade command does not belong to the command of executing the program, determine the target operating parameters to be operating parameters indicating that the upgrade data package is not executed. In other words, the server runs the logic of the basic data package, and the basic data package will start to determine whether the current upgrade command belongs to the command of executing the program. If so, the operating parameters of the upgrade data package are written; if not, the operating parameters of the upgrade data package are written not to execute.

[0079] In the above example, javaagent.enabled is used to represent the target running parameter. When the currently executed data upgrade command belongs to the command of the execution program, javaagent.enabled=true is set; when the currently executed data upgrade command does not belong to the command of the execution program, javaagent.enabled=false is set.

[0080] Step 308: When the target operation parameter indicates to execute the upgrade data package, data of the target application is upgraded according to the upgrade data package.

[0081] Optionally, when the currently executed data upgrade command belongs to a command for executing a program, the target operation parameter indicates to execute the upgrade data packet, and the server executes each upgrade data packet in sequence, thereby realizing data upgrade of the target application. Optionally, the server can perform data upgrade of the target application in the following manner: the server reads the target operation parameters in sequence through the upgrade data packet, and executes the operation logic of the upgrade data packet to perform data upgrade of the target application.

[0082] Please refer to Figure 5 , which shows a schematic diagram of an exemplary embodiment of the present application involving a running container sequentially executing a basic data package and each upgrade data package. Figure 5 As shown, it includes a basic data package 501, an upgrade data package 1 502, an upgrade data package 2 503, and a target application 504. The running container reads the basic data package and writes the target running parameter javaagent.enabled=true / false. Subsequently, each upgrade data package is run to read the target running parameter in turn.

[0083] Optionally, during the execution of the above-mentioned basic data package, when the variable length of the information-appended environment variable exceeds a preset length, the information-appended environment variable is split according to the basic data package and added to the running environment variable; the running environment variables are read in sequence to obtain upgrade parameters for data upgrade of the target application, so that the running container runs according to the upgrade parameters.

[0084] For example, in the Java runtime environment, usually, the length limit of the environment variable JAVA_TOOL_OPTIONS is 1024 characters. When the running container uses more jvm parameters, the length of the environment variable JAVA_TOOL_OPTIONS will exceed the limit and cannot be loaded successfully. In this solution, after reading the running environment variable JAVA_AGENT_PARAM through the basic data package, the information appended to the environment variable will be split, so the jvm parameters are split into JAVA_AGENT_PARAM, which is read and written to the jvm by BaseAgent.

[0085] For example, JAVA_TOOL_OPTIONS="javaagent.agent.jar-Durl=xxx-Dport=xxx...", after using the basic data package, JAVA_TOOL_OPTIONS="javaagent.agent.jar", JAVA_AGENT_PARAM="-Durl=xxx-Dport=xxx...", thereby achieving the splitting effect.

[0086] In summary, the basic data packet and the upgrade data packet of the target application are obtained. The basic data packet is added by the server for each upgrade data packet of the target application, and the upgrade data packet is the code packet that the target application needs to upgrade; according to the basic data packet, the target operation parameters are determined, and the target operation parameters are used to indicate whether to execute the upgrade data packet; when the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. In this application, the basic data packet added by the server for each upgrade package is obtained to determine the target operation parameters. When the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. This process does not require manual writing of modification commands, and automatically upgrades the data of the target application, thereby improving the efficiency of data upgrade of the target application in the server.

[0087] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0088] Please refer to Figure 6 , which shows a structural block diagram of an application upgrade device provided by an exemplary embodiment of the present application. The application upgrade device 600 can be used in the above Figure 1 The server in the scene architecture. Figure 2 , Figure 3 All or part of the steps in the method provided by the illustrated embodiment are executed by the server. The application upgrade device 600 includes:

[0089] A first acquisition module 601 is used to acquire data upgrade information of a target application, where the data upgrade information includes a basic data packet and an upgrade data packet;

[0090] A first determination module 602, configured to determine a target operation parameter according to the basic data package, wherein the target operation parameter is used to indicate whether to execute the upgrade data package;

[0091] The first upgrade module 603 is configured to upgrade the data of the target application according to the upgrade data packet when the target operation parameter indicates to execute the upgrade data packet.

[0092] In summary, the basic data packet and the upgrade data packet of the target application are obtained. The basic data packet is added by the server for each upgrade data packet of the target application, and the upgrade data packet is the code packet that the target application needs to upgrade; according to the basic data packet, the target operation parameters are determined, and the target operation parameters are used to indicate whether to execute the upgrade data packet; when the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. In this application, the basic data packet added by the server for each upgrade package is obtained to determine the target operation parameters. When the target operation parameters indicate the execution of the upgrade data packet, the target application is upgraded according to the upgrade data packet. This process does not require manual writing of modification commands, and automatically upgrades the data of the target application, thereby improving the efficiency of data upgrade of the target application in the server.

[0093] Optionally, the first determining module 602 includes: a first judging unit, a first determining unit, and a second determining unit;

[0094] The first judgment unit is used to judge whether the currently executed data upgrade command belongs to the command of executing the program according to the basic data packet;

[0095] The first determining unit is configured to determine, when the currently executed data upgrade command belongs to a command for executing a program, that the target operating parameter is an operating parameter for instructing execution of the upgrade data packet;

[0096] The second determining unit is configured to determine, when the currently executed data upgrade command does not belong to a command for executing a program, that the target operating parameter is an operating parameter indicating not to execute the upgrade data packet.

[0097] Optionally, the first acquisition module 601 includes: a first receiving unit, a first acquisition unit and a first adding unit;

[0098] The first receiving unit is used to receive the upgrade version information selected for the target application;

[0099] The first acquisition unit is used to acquire, according to the upgrade version information, an upgrade data packet of the target application corresponding to the upgrade version information;

[0100] The first adding unit is used to add the basic data package before the upgrade data package.

[0101] Optionally, the device further comprises:

[0102] A first establishing module, configured to establish a data upgrade command according to the upgraded version information after receiving the upgraded version information selected for the target application;

[0103] A first interception module, used for intercepting the data upgrade command before executing the data upgrade command;

[0104] The first adding module is used to add configuration information to the container that executes the data upgrade command, so that the container that executes the data upgrade command in the server executes the data upgrade command according to the configuration information.

[0105] Optionally, the container for executing the data upgrade command includes: a loading container and a running container; the configuration information includes: information loading environment variables, running environment variables, and information appending environment variables;

[0106] Among them, the information loading environment variable is used for the loading container to download each of the upgrade data packages; the running environment variable is used to place variable characters when the variable length of the information appending environment variable exceeds the preset length; the information appending environment variable is used to append each of the upgrade data packages.

[0107] Optionally, the first upgrade module 603 is further used to read the target operating parameters in sequence through the upgrade data packet, and execute the operating logic of the upgrade data packet to perform data upgrade on the target application.

[0108] Optionally, the device further comprises:

[0109] A second adding module is used for splitting the information additional environment variable according to the basic data packet and adding it to the running environment variable when the variable length of the information additional environment variable exceeds a preset length;

[0110] The second acquisition module is used to read the operating environment variables in sequence to obtain upgrade parameters for performing data upgrade on the target application, so that the operating container runs according to the upgrade parameters.

[0111] Please refer to Figure 7 , which shows a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application. The server 700 includes a central processing unit (CPU) 701, a system memory 704 including a random access memory (RAM) 702 and a read-only memory (ROM) 703, and a system bus 705 connecting the system memory 704 and the central processing unit 701. The server 700 also includes a basic input / output system (I / O system) 706 that helps transmit information between various devices in the computer, and a large-capacity storage device 707 for storing an operating system 717, application programs 714 and other program modules 715.

[0112] The basic input / output system 706 includes a display 708 for displaying information and an input device 709 such as a mouse and a keyboard for user inputting information. The display 708 and the input device 709 are connected to the central processing unit 701 through an input / output controller 710 connected to the system bus 705. The basic input / output system 706 may also include an input / output controller 710 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 710 also provides output to a display screen, a printer, or other types of output devices.

[0113] The mass storage device 707 is connected to the central processing unit 701 through a mass storage controller (not shown) connected to the system bus 705. The mass storage device 707 and its associated computer-readable medium provide non-volatile storage for the server 700. That is, the mass storage device 707 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0114] The computer readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory 704 and mass storage device 707 can be collectively referred to as memory.

[0115] The server 700 can be connected to the Internet or other network devices through a network interface unit 711 connected to the system bus 705 .

[0116] The memory also includes one or more programs, which are stored in the memory. The central processing unit 701 implements all or part of the steps by executing the one or more programs.

[0117] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0118] An embodiment of the present application also provides a computer-readable medium storing at least one instruction, wherein the at least one instruction is loaded and executed by the processor to implement all or part of the steps executed by the server in the application upgrade method described in the above embodiments.

[0119] An embodiment of the present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the application upgrade method described in the above embodiments, all or part of the steps executed by the server.

[0120] It should be noted that: when the device provided in the above embodiment executes the control of the server, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

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

[0122] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0123] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An application upgrade method, characterized in that: Applied to a server, the method comprises: Acquire a basic data packet and an upgrade data packet of a target application, wherein the basic data packet is added by the server for each upgrade data packet of the target application, and the upgrade data packet is a code packet that needs to be upgraded for the target application; Determining a target operating parameter according to the basic data package, wherein the target operating parameter is used to indicate whether to execute the upgrade data package; When the target operation parameter indicates to execute the upgrade data package, data of the target application is upgraded according to the upgrade data package.

2. The method according to claim 1, characterized in that Determining target operating parameters according to the basic data packet includes: According to the basic data packet, determining whether the currently executed data upgrade command belongs to a command for executing a program; When the currently executed data upgrade command belongs to a command for executing a program, determining that the target operating parameter is an operating parameter indicating execution of the upgrade data packet; When the currently executed data upgrade command does not belong to a command for executing a program, it is determined that the target operating parameter is an operating parameter indicating not to execute the upgrade data packet.

3. The method according to claim 1, characterized in that The step of obtaining a basic data package and an upgrade data package of a target application includes: receiving information on an upgraded version selected for the target application; According to the upgrade version information, acquiring an upgrade data packet of the target application corresponding to the upgrade version information; The basic data package is added before the upgrade data package.

4. The method according to claim 3, characterized in that After receiving the upgrade version information selected for the target application, the method further includes: Establishing a data upgrade command according to the upgrade version information; Before executing the data upgrade command, intercepting the data upgrade command; Configuration information is added to the container that executes the data upgrade command, so that the container that executes the data upgrade command in the server executes the data upgrade command according to the configuration information.

5. The method according to claim 4, characterized in that The container for executing the data upgrade command includes: a loading container and a running container; the configuration information includes: information loading environment variables, running environment variables, and information appending environment variables; Among them, the information loading environment variable is used for the loading container to download each of the upgrade data packages; the running environment variable is used to place variable characters when the variable length of the information appending environment variable exceeds the preset length; the information appending environment variable is used to append each of the upgrade data packages.

6. The method according to claim 5, characterized in that The step of performing data upgrade on the target application according to the upgrade data packet comprises: The target operating parameters are read in sequence through the upgrade data packet, and the operating logic of the upgrade data packet is executed to perform data upgrade on the target application.

7. The method according to claim 5, characterized in that The method further comprises: When the variable length of the information-appended environment variable exceeds a preset length, the information-appended environment variable is split according to the basic data packet and added to the running environment variable; The operating environment variables are read in sequence to obtain upgrade parameters for performing data upgrade on the target application, so that the operating container runs according to the upgrade parameters.

8. An application upgrade device, characterized in that: Applied to a server, the device comprises: A first acquisition module, configured to acquire data upgrade information of a target application, wherein the data upgrade information includes a basic data packet and an upgrade data packet; A first determination module, configured to determine a target operation parameter according to the basic data packet, wherein the target operation parameter is used to indicate whether to execute the upgrade data packet; The first upgrade module is used to upgrade the data of the target application according to the upgrade data packet when the target operation parameter indicates to execute the upgrade data packet.

9. A server, characterized in that: The server includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the application upgrade method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the application upgrade method as described in any one of claims 1 to 7.