Application updating method and device, storage medium and electronic device

By monitoring and obtaining updated code through a proxy service, the problem of application release difficulties in isolated network environments is solved, achieving efficient updates and security assurance.

CN115766448BActive Publication Date: 2025-08-26HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211426984.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2025-08-26
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

In isolated network environments, application releases are more difficult, leading to high time and manpower costs.

Method used

The proxy service periodically listens for deployment messages in the deployment service, retrieves the updated code, generates deployment messages in the isolated network, and uses the code management version server to update the application server.

Benefits of technology

It enables efficient application updates in isolated network environments, prevents network attacks, ensures system security, and provides a single network deployment entry point.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766448B_ABST
    Figure CN115766448B_ABST
Patent Text Reader

Abstract

The present application discloses an application update method and device, a storage medium, and an electronic device, relating to the field of smart home technology. The application update method includes: periodically monitoring whether there is a deployment message in a deployment service through a proxy service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when there is an updated version of the application running on the first network; when the proxy service periodically monitors whether there is a deployment message in the deployment service, obtaining updated code of the target application in the first network from a code management version server according to the deployment message, wherein the code management version server runs on the second network; and sending the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular, to an application updating method and device, a storage medium, and an electronic device. Background Art

[0002] For enterprises, system application security is a must, and to achieve application security, the most basic thing is to achieve network security. Therefore, some enterprises' systems run in isolated network environments. Since the systems run in isolated network environments, it is more difficult to release applications running in isolated network environments. Deployment packages need to be transmitted across network environments, resulting in a lot of time and labor costs for each release.

[0003] In relation to the problems in related technologies, such as the system running in an isolated network environment and the difficulty in application release, no effective solutions have yet been proposed. Summary of the Invention

[0004] The embodiments of the present application provide an application update method and device, a storage medium, and an electronic device to at least solve the problems in the related art, such as the system running in an isolated network environment and the difficulty in application release.

[0005] According to one embodiment of the embodiments of the present application, a method for updating an application is provided, comprising: periodically monitoring, through a proxy service, whether there is a deployment message in a deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when there is an updated version of the application running on the first network; when the proxy service periodically monitors the presence of a deployment message in the deployment service, obtaining, according to the deployment message, the updated code of the target application in the first network from a code management version server, wherein the code management version server runs on the second network; and sending the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0006] In an exemplary embodiment, obtaining updated code of a target application in the first network in a code management version server according to the deployment message includes: obtaining a code address of the target application; parsing the deployment message to obtain a target code branch of the target application in the deployment message; and obtaining updated code of the target code branch of the target application in the code management version server according to the code address and the target code branch.

[0007] In an exemplary embodiment, sending the updated code to the application server includes: automatically obtaining a compilation script for compiling the updated code through target software; executing a compilation script command corresponding to the compilation script to compile the updated code and obtain code in a target format; packaging the code in the target format, and sending the packaged code in the target format to the application server.

[0008] In an exemplary embodiment, periodically monitoring whether there is a deployment message in the deployment service through a proxy service includes at least one of the following: determining that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives the updated code of the target application sent by the code management version server; determining that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives a deployment task sent by the first object, wherein the deployment service generates the deployment message according to the deployment task, and the deployment task is used to indicate that there is an updated version of the target application of the first network.

[0009] In an exemplary embodiment, periodically monitoring whether there is a deployment message in the deployment service through a proxy service includes: the proxy service starts a timer; when the timer times out, monitoring whether there is a deployment message in the deployment service through the proxy service and resetting the timer.

[0010] In an exemplary embodiment, a proxy service is used to periodically monitor whether there is a deployment message in a deployment service, including: the proxy service sends first identity authentication information to the deployment service; when the deployment service determines that the identity of the proxy service is legitimate based on the first identity authentication information, the proxy service receives second identity authentication information sent by the deployment service that carries the identity information of the deployment service; when the identity of the deployment service is determined to be legitimate based on the second identity authentication information, the proxy service periodically monitors whether there is a deployment message in the deployment service.

[0011] In an exemplary embodiment, after sending the updated code to the application server, the method further includes: receiving update result information sent by the application server; if the update result information is used to indicate that the target application was not successfully updated, again obtaining the updated code of the target application in the first network from the code management version server, and sending the updated code to the application server.

[0012] According to another embodiment of the embodiments of the present application, an application updating device is also provided, including: a monitoring module, used to periodically monitor whether there is a deployment message in the deployment service through a proxy service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when there is an updated version of the application running on the first network; an acquisition module, used to obtain the updated code of the target application in the first network from the code management version server according to the deployment message when the proxy service periodically monitors the deployment service for the presence of a deployment message, wherein the code management version server runs on the second network; a sending module, used to send the updated code to the application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned application update method when running.

[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the application updating method through the computer program.

[0015] In an embodiment of the present application, a proxy service is used to periodically monitor whether there is a deployment message in a deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when an updated version of the application running on the first network exists; when the proxy service periodically monitors the deployment service for a deployment message, the proxy service obtains the updated code of the target application in the first network from a code management version server according to the deployment message, wherein the code management version server runs on the second network; the updated code is sent to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network; using the above technical solution, the proxy service in the first network obtains deployment messages and pulls the updated code of the target application in a unidirectional and periodic manner from the inside to the outside, and completes the deployment through the proxy service, completely eliminating network attacks, solving the problems of the system running in an isolated network environment and the difficulty of application release, and setting a single network deployment entry for the application server, isolating system attacks from the network level, and ensuring system security. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 This is a schematic diagram of a hardware environment for an update method of an application according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of a method for updating an application according to an embodiment of the present application;

[0020] Figure 3 is an architectural diagram of an application updating method according to an embodiment of the present application;

[0021] Figure 4 is a timing diagram of an application updating method according to an embodiment of the present application;

[0022] Figure 5 This is a structural block diagram of an application updating device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to one aspect of the embodiment of the present application, a method for updating an application is provided. The method for updating an application is widely used in smart home (Smart Home), smart home, smart home device ecology, smart home (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for updating an application can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0026] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, smart curtains, smart audio and video, a smart socket, a smart speaker, a smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0027] In this embodiment, a method for updating an application is provided, which is applied to a computer terminal. Figure 2 : is a flowchart of a method for updating an application according to an embodiment of the present application, the process comprising the following steps:

[0028] Step S202: Periodically monitoring the deployment service for deployment messages via a proxy service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is configured to generate a deployment message corresponding to the application when an updated version of the application running on the first network exists;

[0029] It should be noted that the above-mentioned proxy service can be understood as an Agent service, which is not limited in the embodiment of the present invention.

[0030] It should be noted that the second network is a network that allows the first network to access. The second network can be an isolated network or a non-isolated network. The embodiment of the present invention does not limit the type of the second network.

[0031] It should be noted that the above-mentioned isolated network can be understood as a network endpoint.

[0032] Step S204: When the proxy service periodically monitors the deployment service for a deployment message, obtaining the updated code of the target application in the first network from a code management version server according to the deployment message, wherein the code management version server runs in the second network;

[0033] Step S206: Send the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0034] It should be noted that the above application server can be but is not limited to Azure Web Service, and this embodiment of the present invention does not limit this.

[0035] Through the above steps, the proxy service periodically monitors whether there is a deployment message in the deployment service, wherein the proxy service runs on the first network and the deployment service runs on the second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when there is an updated version of the application running on the first network; when the proxy service periodically monitors the presence of a deployment message in the deployment service, the updated code of the target application in the first network is obtained from the code management version server according to the deployment message, wherein the code management version server runs on the second network; the updated code is sent to the application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network, which solves the problems in the related art that the system runs in an isolated network environment and application release is difficult, and sets a single network deployment entry for the application server, isolates system attacks from the network level, and ensures system security.

[0036] There are many ways to implement the above-mentioned step S204. An embodiment of the present invention provides an implementation method. In an exemplary embodiment, obtaining the updated code of the target application in the first network in the code management version server according to the deployment message includes: obtaining the code address of the target application; parsing the deployment message to obtain the target code branch of the target application in the deployment message; obtaining the updated code of the target code branch of the target application in the code management version server according to the code address and the target code branch.

[0037] It should be noted that in the embodiments of the present invention, the application code base includes: a master branch, a develop branch, feature branches, and patch branches. The code base has only one master branch, and all official versions provided to users are released on the master branch. The master branch is only used to distribute major versions, and daily development should be completed on the develop branch. Feature branches are used to develop new features for upcoming releases, and patch branches are used to fix online bugs. Feature branches and patch branches are temporary branches. Once development is complete, they will be merged into the develop branch or the master branch and then deleted.

[0038] Therefore, when the code address of the target application and the target code branch of the target application are obtained, the updated code of the target code branch of the target application is obtained from the version management server according to the code address.

[0039] In an exemplary embodiment, sending the updated code to the application server includes: automatically obtaining a compilation script for compiling the updated code through target software; executing a compilation script command corresponding to the compilation script to compile the updated code and obtain code in a target format; packaging the code in the target format, and sending the packaged code in the target format to the application server.

[0040] It should be noted that different compilation script commands are executed according to different codes, and the compilation script corresponding to the updated code is automatically determined by the target software, and the updated code is compiled and packaged through the compilation script commands corresponding to the compilation script, and the packaged target format code is sent to the application server.

[0041] In an exemplary embodiment, periodically monitoring whether there is a deployment message in the deployment service through a proxy service includes at least one of the following: determining that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives the updated code of the target application sent by the code management version server; determining that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives a deployment task sent by the first object, wherein the deployment service generates the deployment message according to the deployment task, and the deployment task is used to indicate that there is an updated version of the target application of the first network.

[0042] That is, the proxy service determines that a deployment message has been intercepted by the deployment service in the following two situations: 1) the deployment service receives the updated code of the target application from the code management version server, where the updated code is sent to the code management version server via a second object; or 2) the deployment service receives a deployment task from a first object. It should be noted that the first object and the second object can be the same object or different objects.

[0043] In an exemplary embodiment, periodically monitoring whether there is a deployment message in the deployment service through a proxy service includes: the proxy service starts a timer; when the timer times out, monitoring whether there is a deployment message in the deployment service through the proxy service and resetting the timer.

[0044] In an exemplary embodiment, periodically monitoring whether a deployment message exists in a deployment service through a proxy service includes: setting a timed task in the proxy service, and monitoring whether a deployment message exists in the deployment service according to the timed task.

[0045] In an exemplary embodiment, a proxy service is used to periodically monitor whether there is a deployment message in a deployment service, including: the proxy service sends first identity authentication information to the deployment service; when the deployment service determines that the identity of the proxy service is legitimate based on the first identity authentication information, the proxy service receives second identity authentication information sent by the deployment service that carries the identity information of the deployment service; when the identity of the deployment service is determined to be legitimate based on the second identity authentication information, the proxy service periodically monitors whether there is a deployment message in the deployment service.

[0046] It should be noted that in order to ensure the security of communication, before the proxy service communicates with the deployment service, the identities of the proxy service and the deployment service need to be verified. Specifically, the proxy service sends first identity authentication information to the deployment service, and the deployment service sends second identity authentication information to the proxy service, so that the proxy service and the deployment service can perform two-way authentication. When the deployment service determines that the identity of the proxy service is legal, and the proxy service determines that the identity of the deployment service is legal, the proxy service periodically monitors whether there is a deployment message in the deployment service.

[0047] In an exemplary embodiment, after the updated code is sent to the application server, update result information sent by the application server is received; if the update result information is used to indicate that the target application was not successfully updated, the updated code of the target application in the first network is again obtained from the code management version server, and the updated code is sent to the application server.

[0048] That is to say, in order to ensure the success rate of application updates, if the application is not updated successfully, the code management version server is requested again to obtain the updated code of the target application, so that the application server can update the target application again according to the updated code until the target application is successfully updated.

[0049] In order to better understand the process of the update method of the above application, the implementation method flow of the update of the above application is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of this application.

[0050] In this embodiment, a method for updating an application is provided. Figure 3 is an architectural diagram of an application updating method according to an embodiment of the present application, such as Figure 3As shown, it specifically includes: gateway, network 1 (equivalent to the first network in the above embodiment), network 2 (equivalent to the second network in the above embodiment), Azure Web Service (equivalent to the application server in the above embodiment), Agent service (equivalent to the agent service in the above embodiment), deployment service, GitLab service (equivalent to the code management server in the above embodiment), wherein,

[0051] The gateway is used to map user requests from the Internet and map the requests to the Azure Web Service in network 1;

[0052] Network 1 is an independent network endpoint. The network ingress and egress rules for Network 1 are: only gateway ingress is allowed, network egress is unrestricted, and Network 2 can be freely accessed.

[0053] Network 2 is the daily office network environment for employees. It can be the corporate intranet or the Internet. It only requires that Network 1 can freely access Network 2.

[0054] Azure Web Service, located in Network 1, is a web application service deployed in a network-isolated environment.

[0055] The Agent service is located in Network 1, on the same network as Azure Web Service. It can access Azure Web Service and publish deployment packages to it. It listens to the deployment service through polling. When a deployment task is detected, it pulls the code from the branch specified by the GitLab service and executes the compilation and release script to complete the release.

[0056] Deployment service: Located in the same network environment as development engineers and version managers, it is used to receive deployment tasks and generate deployment messages;

[0057] GitLab service: code management service.

[0058] In this embodiment, a method for updating an application is provided. Figure 3 is the timing of the update method of the application according to the embodiment of the present application, such as Figure 4 As shown, the specific steps are as follows:

[0059] 1. Automatic deployment task process:

[0060] Step S401: A development engineer (equivalent to the second object in the above embodiment) submits code to the Gitlab service;

[0061] Step S402: The GitLab service pushes the [code submission notification] to the deployment service via an HTTP request;

[0062] Step S403: The deployment service generates a deployment task (the deployment service generates a deployment message according to each deployment task);

[0063] Step S404: The Agent service pulls the deployment message;

[0064] It should be noted that the Agent service will periodically pull deployment messages, requesting the latest deployment messages through HTTP every ten seconds (the specific time interval can be adjusted). The deployment message returned by the deployment service mainly contains the following information:

[0065] $(branch): specifies the code branch;

[0066] $(App_Data): application name;

[0067] $(zipname): package name;

[0068] $(resource-group): Azure resource group;

[0069] $(resource-name): Azure webService resource name;

[0070] Step S405: The Agent service pulls code from the Gitlab service based on the deployment task;

[0071] Step S406: Compile and package, and execute the following scripts in sequence:

[0072] #Pull Gitlab specified branch code

[0073] git fetch –all;

[0074] git checkout--progress--force$(branch);

[0075] #Execute the compilation script command according to different codes (here takes .net compilation as an example);

[0076] dotnet publish--configuration Release;

[0077] #Package deployment package;

[0078] Compress-Archive-LiteralPath$(App_Data)-DestinationPath$(zipname);

[0079] Step S407: The Agent service publishes the task to the Azure Web Service.

[0080] 2. Triggered deployment task process:

[0081] Step S408: The version administrator publishes the deployment task to the deployment service;

[0082] Step S409: The deployment service generates a deployment task (the deployment service generates a deployment message according to each deployment task);

[0083] Step S410: The Agent service pulls the deployment message;

[0084] It should be noted that the Agent service will periodically pull deployment messages, requesting the latest deployment messages through HTTP every ten seconds (the specific time interval can be adjusted). The deployment message returned by the deployment service mainly contains the following information:

[0085] $(branch): specifies the code branch;

[0086] $(App_Data): application name;

[0087] $(zipname): package name;

[0088] $(resource-group): Azure resource group;

[0089] $(resource-name): Azure webService resource name;

[0090] Step S411: The Agent service pulls code from the Gitlab service based on the deployment task;

[0091] Step S412: Compile and package, and execute the following scripts in sequence:

[0092] #Pull the Git specified branch code;

[0093] git fetch –all;

[0094] git checkout--progress--force$(branch);

[0095] #Execute the compilation script command according to different codes (here takes .net compilation as an example);

[0096] dotnet publish--configuration Release;

[0097] #Package deployment package;

[0098] Compress-Archive-LiteralPath$(App_Data)-DestinationPath$(zipname);

[0099] Step S413: The Agent service publishes the task to the Azure Web Service.

[0100] Through the above embodiment, after the network is isolated, deployment tasks and code are obtained from the inside out in a one-way, scheduled manner, and code compilation and packaging are completed in the Agent service through a fixed script. The deployment is completed through the Agent service, completely eliminating network attacks.

[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0102] Figure 5 is a structural block diagram of an update device according to an embodiment of the present application; Figure 5 Shown, including:

[0103] a monitoring module 52 configured to periodically monitor, through a proxy service, whether a deployment message is present in a deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is configured to generate a deployment message corresponding to an application running on the first network when an updated version of the application exists;

[0104] an acquisition module 54 configured to acquire, when the proxy service periodically monitors a deployment service for a deployment message, updated code of the target application in the first network from a code management version server according to the deployment message, wherein the code management version server is running in the second network;

[0105] The sending module 56 is configured to send the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0106] Through the above-mentioned device, a proxy service is used to periodically monitor whether there is a deployment message in the deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when there is an updated version of the application running on the first network; when the proxy service periodically monitors the presence of a deployment message in the deployment service, the updated code of the target application in the first network is obtained from the code management version server according to the deployment message, wherein the code management version server runs on the second network; the updated code is sent to the application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network, which solves the problems in the related art that the system runs in an isolated network environment and application release is more difficult, and sets a single network deployment entry for the application server, isolates system attacks from the network level, and ensures system security.

[0107] In an exemplary embodiment, the acquisition module 54 is used to obtain the code address of the target application; parse the deployment message to obtain the target code branch of the target application in the deployment message; and obtain the updated code of the target code branch of the target application in the code management version server based on the code address and the target code branch.

[0108] In an exemplary embodiment, the sending module 56 is used to automatically obtain a compilation script for compiling the updated code through the target software; execute the compilation script command corresponding to the compilation script to compile the updated code and obtain the code in the target format; package the code in the target format, and send the packaged target format code to the application server.

[0109] In an exemplary embodiment, the monitoring module 52 is used to determine that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives the updated code of the target application sent by the code management version server; and to determine that the proxy service has monitored the existence of a deployment message in the deployment service when the deployment service receives a deployment task sent by the first object, wherein the deployment service generates the deployment message based on the deployment task, and the deployment task is used to indicate that there is an updated version of the target application of the first network.

[0110] In an exemplary embodiment, the monitoring module 52 is configured to start a timer for the proxy service; when the timer times out, monitor whether there is a deployment message in the deployment service through the proxy service, and reset the timer.

[0111] In an exemplary embodiment, the monitoring module 52 is used for the proxy service to send first identity authentication information to the deployment service; when the deployment service determines that the identity of the proxy service is legitimate based on the first identity authentication information, the monitoring module 52 receives second identity authentication information sent by the deployment service that carries the identity information of the deployment service; when the identity of the deployment service is determined to be legitimate based on the second identity authentication information, the proxy service periodically monitors whether there is a deployment message in the deployment service.

[0112] In an exemplary embodiment, the acquisition module 54 is used to receive update result information sent by the application server; when the update result information is used to indicate that the target application was not successfully updated, the updated code of the target application in the first network is again obtained from the code management version server, and the updated code is sent to the application server.

[0113] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0114] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0115] S1, periodically monitoring whether there is a deployment message in the deployment service through a proxy service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when an updated version of the application running on the first network exists;

[0116] S2, when the proxy service periodically monitors a deployment service for a deployment message, obtaining, according to the deployment message, an updated code of the target application in the first network from a code management version server, wherein the code management version server runs in the second network;

[0117] S3. Send the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0118] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0119] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0120] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0121] S1, periodically monitoring whether there is a deployment message in the deployment service through a proxy service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when an updated version of the application running on the first network exists;

[0122] S2, when the proxy service periodically monitors a deployment service for a deployment message, obtaining, according to the deployment message, an updated code of the target application in the first network from a code management version server, wherein the code management version server runs in the second network;

[0123] S3. Send the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network.

[0124] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0125] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0126] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0127] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for updating an application, characterized in that: include: periodically monitoring, by a proxy service, whether there is a deployment message in the deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is used to generate a deployment message corresponding to the application when an updated version of the application running on the first network exists; When the proxy service periodically monitors a deployment service for a deployment message, obtaining, according to the deployment message, an updated code of the target application in the first network from a code management version server, wherein the code management version server is running in the second network; sending the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network; Acquiring updated code of the target application in the first network from the code management version server according to the deployment message includes: Obtaining the code address of the target application; Parsing the deployment message to obtain a target code branch of the target application in the deployment message; The updated code of the target code branch of the target application is obtained from the code management version server according to the code address and the target code branch.

2. The application updating method according to claim 1, characterized in that: Sending the updated code to the application server includes: Automatically obtaining, through target software, a compilation script for compiling the updated code; Executing the compile script command corresponding to the compile script to compile the updated code and obtain code in a target format; The target format code is packaged and sent to the application server.

3. The application updating method according to claim 1, characterized in that: Use the proxy service to periodically monitor whether there are deployment messages in the deployment service, including at least one of the following: When the deployment service receives the updated code of the target application sent by the code management version server, determining that the proxy service monitors the presence of a deployment message in the deployment service; When the deployment service receives a deployment task sent by the first object, it is determined that the proxy service monitors the presence of a deployment message in the deployment service, wherein the deployment service generates the deployment message according to the deployment task, and the deployment task is used to indicate that an updated version of the target application of the first network exists.

4. The application updating method according to claim 1, characterized in that: Use the proxy service to periodically monitor whether there are deployment messages in the deployment service, including: The proxy service starts a timer; When the timer times out, the proxy service monitors whether there is a deployment message in the deployment service and resets the timer.

5. The application updating method according to claim 1, characterized in that: Use the proxy service to periodically monitor whether there are deployment messages in the deployment service, including: The proxy service sends first identity authentication information to the deployment service; When the deployment service determines that the identity of the proxy service is legitimate according to the first identity authentication information, receiving second identity authentication information sent by the deployment service and carrying the identity information of the deployment service; When it is determined that the identity of the deployment service is legitimate according to the second identity authentication information, the proxy service periodically monitors whether there is a deployment message in the deployment service.

6. The application updating method according to claim 1, characterized in that: After sending the updated code to the application server, the method further includes: Receiving update result information sent by the application server; When the update result information indicates that the target application is not updated successfully, the updated code of the target application in the first network is obtained again from the code management version server, and the updated code is sent to the application server.

7. An application updating device, characterized in that: include: a monitoring module configured to periodically monitor, through a proxy service, whether a deployment message exists in a deployment service, wherein the proxy service runs on a first network and the deployment service runs on a second network; the first network is an isolated network, and the deployment service is configured to generate a deployment message corresponding to an application running on the first network when an updated version of the application exists; an acquisition module, configured to, when the proxy service periodically monitors a deployment service for a deployment message, acquire, from a code management version server according to the deployment message, the updated code of the target application in the first network, wherein the code management version server runs in the second network; a sending module, configured to send the updated code to an application server, so that the application server updates the target application according to the updated code, wherein the application server runs on the first network; Among them, the acquisition module is used to obtain the code address of the target application; parse the deployment message to obtain the target code branch of the target application in the deployment message; and obtain the updated code of the target code branch of the target application in the code management version server according to the code address and the target code branch.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Application program deployment method, device, computer equipment and storage medium

    CN110609732A

  • Deployment feedback for system updates to resources in private networks

    US9503351B1