Upgrade implementation method, device, system, and electronic device

By deploying new images and building new containers during system upgrades, the problem of system malfunction caused by image deployment was resolved, achieving seamless upgrades and improving user experience.

CN114327576BActive Publication Date: 2025-11-25BEIJING KNOWNSEC INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111549772.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-11-25
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

In existing technologies, system upgrades often result in container malfunctions due to image deployment, impacting system usage and leading to a poor user experience.

Method used

During the upgrade process, the system obtains the upgrade data package, deploys a new image and builds a new container to replace the original image and container, ensuring that system functions are not interrupted.

Benefits of technology

Image deployment does not affect the original container functionality, has a very short impact on user experience, and optimizes the system upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327576B_ABST
    Figure CN114327576B_ABST
Patent Text Reader

Abstract

The application provides an upgrading implementation method, device, system and electronic equipment. When it is judged that upgrading is needed based on the mirror information corresponding to the current upgrading data packet, the upgrading process is triggered, the upgrading data packet required for upgrading is acquired, the deployment of a new mirror is performed based on the information in the acquired upgrading data packet, and a new container mapped by the new mirror is constructed after the successful deployment of the new mirror. The existing container mapped by the existing mirror is replaced by the new container, and the existing mirror and the container mapped thereby are deleted, so as to complete the upgrading of the system. In the scheme, the deployment of the new mirror is performed based on the upgrading data packet, and the container mapped by the new mirror is constructed. In this way, the deployment of the mirror does not affect the function of the original container, and does not affect the normal use of the system. The time required for replacing the existing container by the new container is extremely short, and no interference to the use of the user is caused.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to an upgrading implementation method, device, system and electronic equipment. BACKGROUND

[0002] For a server running a related system, such as an OA system, in order to perfect and modify the system function, the system often needs to be upgraded. The data packet related to the system function is deployed in the form of an image, and the container having a mapping relationship with the image presents the system function.

[0003] In the prior art, when upgrading the system, the image related to the container is directly operated based on the obtained upgrade data packet to deploy the image. Such a method will cause the container to be unable to work normally while the image is deployed, thereby causing the system to be unable to be normally used. That is, in this upgrading method, the system cannot be normally used during the upgrading process, which seriously affects the experience of the system user. SUMMARY

[0004] The purpose of the present application includes, for example, providing an upgrading implementation method, device, system and electronic equipment, which can implement system upgrading without affecting the system function.

[0005] Embodiments of the present application can be implemented as follows:

[0006] In a first aspect, the present application provides an upgrading implementation method applied to a system server, the method comprising:

[0007] When it is judged that upgrading is needed based on the image information corresponding to the current upgrade data packet, an upgrading process is triggered, and the upgrade data packet required for upgrading is obtained, wherein the existing image provides a system function with a container mapped thereto;

[0008] The deployment of a new image is performed based on the information in the obtained upgrade data packet;

[0009] After verifying that the new image is successfully deployed, a new container mapped to the new image is constructed;

[0010] The new container is used to replace the container mapped to the existing image, and the existing image and the container mapped thereto are deleted, so as to complete the upgrading of the system.

[0011] In an optional embodiment, the system server is a sub-system server or a total system server, the total system server communicates with at least one sub-system server, and the total system server is further connected in communication with a remote server;

[0012] When the system server is a total system server, the upgrade data package is obtained from the remote server or based on a local uploading operation;

[0013] When the system server is a sub-system server, the upgrade data package is obtained from the total system server or based on a local uploading operation.

[0014] In an optional embodiment, the method further comprises a step of pre-configuration information, which comprises:

[0015] Obtaining the IP of the sub-system server and the IP of the total system server for communication in the business configuration interface;

[0016] Matchingly checking the IP of the sub-system server and the IP of the total system server;

[0017] After the verification is successful, the IP of the sub-system server and the IP of the total system server are associated and stored in the database.

[0018] In an optional embodiment, the step of pre-configuration information further comprises:

[0019] Performing configuration of security information, which includes any one or more of user password length, system automatic exit time, password input error upper limit, system locking time when the password error reaches the upper limit, and user abnormal operation type.

[0020] In an optional embodiment, the upgrade data package is divided into multiple sub-data packages, and the step of obtaining the upgrade data package required for upgrading comprises:

[0021] Obtaining each sub-data package contained in the upgrade data package required for upgrading in sequence, and after completing the uploading of each sub-data package, encrypting the sub-data package and storing the encrypted sub-data package under the working directory of the backend;

[0022] After all the sub-data packages are completed, all the encrypted sub-data packages are merged to obtain the compressed upgrade data package.

[0023] In an optional embodiment, before the step of triggering the upgrade process and obtaining the upgrade data package required for upgrading, the method further comprises:

[0024] Judging whether the user has system upgrade authority based on the user information input by the user;

[0025] When it is determined that the user has system upgrade authority, the step of triggering the upgrade process is executed.

[0026] In an optional embodiment, the step of determining whether an upgrade is needed based on the image information corresponding to the current upgrade package comprises:

[0027] monitoring whether an updated upgrade package exists in the remote server or the total system server;

[0028] when the updated upgrade package exists, comparing the version numbers between the current upgrade package and the updated upgrade package based on the image information corresponding to the current upgrade package;

[0029] when the version number of the current upgrade package is lower than the version number of the updated upgrade package, determining that the upgrade is needed.

[0030] In a second aspect, the application provides a system upgrade implementation device, applied to a system server, and the device comprises:

[0031] an acquisition module, configured to trigger an upgrade process and acquire an upgrade package required for the upgrade when determining whether an upgrade is needed based on image information corresponding to a current upgrade package, wherein an existing image provides system functions by mapping a container;

[0032] a deployment module, configured to deploy a new image based on information in the acquired upgrade package;

[0033] a construction module, configured to construct a new container mapped by the new image after verifying that the new image is successfully deployed;

[0034] a replacement module, configured to replace a container mapped by the existing image with the new container, and delete the existing image and the container mapped thereto, so as to complete the upgrade of the system.

[0035] In a third aspect, the application provides an upgrade implementation system, comprising a total system server and at least one sub-system server in communication with the total system server;

[0036] the sub-system server is configured to trigger an upgrade process and send an upgrade request to the total system server when determining whether an upgrade is needed based on image information corresponding to a current upgrade package, wherein an existing image provides system functions by mapping a container;

[0037] the total system server is configured to send an upgrade package required for the upgrade to the sub-system server in response to the upgrade request;

[0038] The sub-system server is configured to deploy a new image based on the information in the obtained upgrade data packet, build a new container mapped by the new image after verifying that the new image is successfully deployed, replace an existing container mapped by an existing image with the new container, and delete the existing image and the container mapped by the existing image, so as to complete the upgrade of the system.

[0039] In a fourth aspect, the present application provides an electronic device, comprising one or more storage media and one or more processors in communication with the storage media, the one or more storage media storing machine executable instructions executable by the processor, when the electronic device is running, the processor executes the machine executable instructions to perform the method steps of any one of the preceding embodiments.

[0040] The beneficial effects of the embodiments of the present application include, for example:

[0041] The present application provides an upgrade implementation method, device, system and electronic device, by triggering an upgrade process when it is determined that an upgrade is needed based on the image information corresponding to the current upgrade data packet, and obtaining the upgrade data packet required for the upgrade, deploying a new image based on the information in the obtained upgrade data packet, building a new container mapped by the new image after verifying that the new image is successfully deployed, and replacing an existing container mapped by an existing image with the new container, and deleting the existing image and the container mapped by the existing image, so as to complete the upgrade of the system. In the present application, the deployment of the new image is based on the upgrade data packet, and the container mapped by the new image is built, so that the deployment of the image will not affect the function of the original container, and will not affect the normal use of the system. The time required for replacing the existing container with the new container is extremely short, and will not interfere with the use of the user. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0043] Figure 1 The structure diagram of the upgrade implementation system provided by the embodiments of the present application is shown in the figure;

[0044] Figure 2 The flowchart of the upgrade implementation method provided by the embodiments of the present application is shown in the figure;

[0045] Figure 3 The flowchart of the configuration method in the upgrade implementation method provided by the embodiments of the present application is shown in the figure;

[0046] Figure 4 As Figure 2 A flowchart of the sub-steps included in step S201 in the embodiment of the present application;

[0047] Figure 5 As Figure 2 Another flowchart of the sub-steps included in step S201 in the embodiment of the present application;

[0048] Figure 6 A structural block diagram of the electronic device provided by the embodiment of the present application;

[0049] Figure 7 A functional module block diagram of the upgrade implementation device provided by the embodiment of the present application.

[0050] Icon: 110 - storage medium; 120 - processor; 130 - upgrade implementation device; 131 - acquisition module; 132 - deployment module; 133 - construction module; 134 - replacement module; 140 - communication interface. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0052] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts, fall within the scope of protection of the present application.

[0053] It should be noted that: similar reference numbers and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0054] In the description of the present application, it should be noted that, in the case of no conflict, the features in the embodiments of the present application can be combined with each other.

[0055] Please refer to Figure 1An upgrading implementation system is provided in the embodiment, which comprises a total system server and at least one sub-system server in communication with the total system server. The total system server can also be in communication with a remote server. The sub-system server can be connected to the total system server through http (Hyper Text Transfer Protocol) to realize the upgrading of the system.

[0056] In the embodiment, the total system server can be designed as a combined management system server or a special sub-system server. That is, the scheme can modify the positioning of the total system for different scenarios. The total system can be designed as a sub-system that realizes the upgrading service or as a total system that only performs the upgrading management and the like.

[0057] In a possible application scenario, if the system upgrading scenario is the same region and the same company, the upgrading implementation system can comprise a total system server and a sub-system server. The total system server can manage the upgrading of the sub-system server, and the sub-system server is the system that needs to be upgraded.

[0058] In another possible application scenario, if the system upgrading scenario is the same company but different regions, a sub-system server can be designed for each region, and the total system server can be any one of the sub-system servers. For example, the sub-system server in the region of the head office can serve as the total system server. In this case, the total system server itself needs to complete the system upgrading and also needs to manage the system upgrading of other sub-system servers.

[0059] It should be noted that the total system server and the sub-system server can be a single server or a server cluster composed of multiple servers, and the embodiment is not limited in this regard.

[0060] Figure 2 A flowchart of an upgrading implementation method provided in the embodiment is shown, which can be applied to a system server, which can be the total system server or the sub-system server. It should be understood that in other embodiments, the order of some steps of the upgrading implementation method of the embodiment can be exchanged according to actual needs, or some steps can be omitted or deleted. The detailed steps of the upgrading implementation method are as follows.

[0061] S201, when it is judged that the upgrade is needed based on the image information corresponding to the current upgrade package, triggering the upgrade process, and obtaining the upgrade package required for the upgrade, wherein the existing image provides system functions through the container mapped thereto.

[0062] S202, deploying the new image based on the information in the obtained upgrade package.

[0063] S203, after verifying that the new image is successfully deployed, constructing a new container mapped to the new image.

[0064] S204, replacing the container mapped to the existing image with the new container, and deleting the existing image and the container mapped thereto, to complete the upgrade of the system.

[0065] In this embodiment, when the total system server or the sub-system server determines that the upgrade is needed, the upgrade process can be triggered. In addition, after the total system server completes the work related to the upgrade, the total system server can also monitor the system information of the sub-system server, and when it is monitored that the system of the sub-system server needs to be upgraded, the total system server can also send prompt information to the sub-system server to trigger the sub-system server to upgrade. For example, after the total system server completes the work related to the upgrade, the total system server can send prompt information to the remaining sub-system servers through WebSocket, so that each sub-system server knows the upgrade update information.

[0066] The total system server can have an operation page, which can list and display the configuration information of all sub-systems, such as the system version, upgrade operation, security configuration information, etc. of the sub-system. The total system server can respond to the click operation to update the configuration of the sub-system, push the upgrade package, manage the system upgrade, etc.

[0067] In this embodiment, the system-related data package in each system server exists in the form of a corresponding image, and each image has a mapped container. The functions related to the information in the image are provided through the container mapped by the image. That is, each system server has a current upgrade package before the upgrade, and the current upgrade package has a corresponding image. The image has a mapped container, and the system functions need to be provided through the container mapped by the existing image.

[0068] That is, if the system function needs to operate normally, the corresponding container should be able to operate normally. When the container runs abnormally, the system function will not operate normally.

[0069] When the system server determines that an upgrade is needed, the upgrade data package required for the upgrade can be obtained. The obtained upgrade data package should originally be mapped to the container currently providing system functions in the system server, and in the prior art, the obtained upgrade data package is also mapped to the container currently providing system functions, and after the deployment of the image of the obtained upgrade data package is completed, the system functions are provided through the existing container.

[0070] However, the above-mentioned method requires a long time for image deployment, and during the long time, the container cannot provide system functions, that is, during the long time of the upgrade process, the system cannot provide related functions, which seriously affects the user experience.

[0071] Based on this, in the embodiment, after the upgrade data package required for the upgrade is obtained, the deployment of a new image is performed based on the information in the obtained upgrade data package, and the deployment of the new image can be implemented through a Shell script. The name of the new image can be distinguished from the name of the existing image in the system server. Since the new image is not mapped to the original container, the deployment of the new image does not affect the system function provided by the original container.

[0072] After the deployment of the new image is completed and it is verified that the deployment of the new image is successful, a new container mapped to the new image can be constructed. Similarly, during the construction of the new container, the operation of the original container is not affected, and the use of the system by the user is not affected.

[0073] After the construction of the new container is completed, the original container can be replaced with the new container. During this process, the original container cannot provide system functions, but since the time required to replace the original container with the new container is very short, only a very short time affects the use of the system by the user. Compared with the prior art which causes a long time to affect the provision of system functions, the upgrade implementation method provided in the embodiment can greatly reduce the impact of the upgrade on the provision of system functions and effectively avoid the impact on the user experience.

[0074] In the embodiment, after the deployment of the new image, the construction of the new container, and the replacement of the existing container with the new container are completed, the existing image and the container mapped thereto can be deleted, thereby avoiding the burden of redundant data on the system server.

[0075] In the embodiment, the above upgrading implementation method can be applied to a subsystem server or a total system server. When the system server is the total system server, the upgrade data packet can be obtained from a remote server or based on a local uploading operation. Similarly, when the system server is the subsystem server, the upgrade data packet can be obtained from the total system server or based on a local uploading operation.

[0076] Taking the subsystem server as an example, the subsystem server can implement real-time upgrading or offline upgrading. When the real-time upgrading is implemented, the subsystem server can be connected with the total system server, and the subsystem server can obtain the upgrade data packet from the total system server after the corresponding interface calling and data returning. The subsystem server can be upgraded based on the upgrade data packet, and the system function can be normally used in the upgrading process. The existing container can be replaced by a new container to improve the user experience.

[0077] When the offline upgrading is implemented, the administrator can upload the upgrade data packet locally on the subsystem server, for example, by copying the subsystem server through a U disk. Thus, the system upgrading can be completed without the communication with the total system server.

[0078] In the embodiment, the real-time upgrading is mainly used to implement the upgrading of the subsystem server or the total system server. Thus, the subsystem server and the total system server need to be connected. The configuration interface can be contained on the subsystem server and the total system server, and the information can be pre-configured based on the configuration interface. Please refer to Figure 3 In the embodiment, the pre-configured information can include the following steps:

[0079] S101, obtaining the IP of the subsystem server and the IP of the total system server communicated with the subsystem server filled in the business configuration interface.

[0080] S102, performing matching verification on the IP of the subsystem server and the IP of the total system server.

[0081] S103, after the verification is successful, associating and storing the IP of the subsystem server and the IP of the total system server in the database.

[0082] In the embodiment, for the configuration of the IP information, the configuration page of the subsystem server can be used. The subsystem server provides a configuration page, and the subsystem server can fill in the IP of the subsystem server and the IP of the total system server in response to the configuration page, and check the matching. For example, whether the IP of the subsystem server is the same as the IP of the total system server, which belongs to the same company and the same region or different regions. If it is the same as the IP of the total system server, which belongs to the same company and the same region or different regions, it is determined that the matching check is successful. In the case of successful check, the IP can be associated and saved. The subsystem server can send a request to the IP associated with the IP to obtain the upgrade data packet when it needs to obtain the upgrade data packet.

[0083] In the total system server, a data table can be saved, which contains the IP information of the subsystem managed by the total system. The total system server can manage the subsystem server corresponding to the IP in the data table based on the data table.

[0084] In the embodiment, the security information on the system server can also be configured, and the security information can be configured on the total system server and the subsystem server. The security information includes any one or more of the user password length, the system automatic exit time, the upper limit of the password input error, the system locking time when the password error reaches the upper limit, and the user abnormal operation type.

[0085] In addition to the pre-configuration of the above information, the user's authority can also be pre-configured in the embodiment, for example, the users with different identities such as managers, salesmen, and staff can be designed to configure the authority of different identities, so that different users can view, operate different pages, and trigger different processes.

[0086] Please refer to Figure 4 In the embodiment, after the above configuration is completed, when the above trigger upgrade process is executed, it can be determined whether the upgrade is needed by the following method:

[0087] S2011, monitoring whether there is an updated upgrade data packet in the remote server or the total system server.

[0088] S2012, when there is an updated upgrade data packet, comparing the version numbers between the current upgrade data packet and the updated upgrade data packet based on the mirror information corresponding to the current upgrade data packet.

[0089] S2013, when the version number of the current upgrade data packet is lower than the version number of the updated upgrade data packet, it is determined that the upgrade is needed.

[0090] In this embodiment, for the total system server, it can be judged whether to trigger the subsequent upgrade process by monitoring whether there is an updated upgrade data package in the remote server. For the subsystem server, it can be judged whether to trigger the subsequent upgrade process by monitoring whether there is an updated upgrade data package in the subsystem server.

[0091] Of course, if there is an updated upgrade data package in the remote server, the update information can be pushed to the total system server, so that the total system server knows the update information. When there is an updated upgrade data package in the total system server, the update information can also be pushed to the subsystem server, so that the subsystem server knows the update information.

[0092] When the total system server obtains the update information from the remote server, it can compare the version of the current upgrade data package of itself and the updated upgrade data package in the remote server. If the version of itself is lower, it can trigger the upgrade process.

[0093] When the subsystem server obtains the update information from the total system server, it can compare the version of the current upgrade data package of itself and the updated upgrade data package in the total system server. If the version of itself is lower, it can trigger the upgrade process.

[0094] In this embodiment, after it is judged that the upgrade is needed, and before the upgrade process is triggered, the user's permission can be verified first.

[0095] As known from the above, different users have different permissions. Some users have corresponding permissions to trigger system upgrade, such as administrators, and some users do not have upgrade permissions and only have general function use permissions. Therefore, in this embodiment, the user's permission can be verified by the following way first:

[0096] Based on the user information input by the user, it is judged whether the user has system upgrade permission. When it is determined that the user has system upgrade permission, the step of triggering the upgrade process is executed.

[0097] In this embodiment, by setting different permissions for different users, the system can be reasonably managed and the security of the system is guaranteed.

[0098] After it is determined that the user has corresponding permissions and the upgrade process is triggered, the required upgrade data package can be obtained. Please refer to Figure 5 In this embodiment, the obtained upgrade data package can be divided into multiple sub-data packages, and when the upgrade data package is obtained, it can be achieved by the following way:

[0099] S2014, sequentially acquire each sub-packet contained in the upgrade data packet required for upgrading, and after completing the uploading of each sub-packet, encrypt the sub-packet, and store the encrypted sub-packet in the working directory of the backend.

[0100] S2015, after all the sub-packets are uploaded, all the encrypted sub-packets are merged to obtain the compressed upgrade data packet.

[0101] In this embodiment, considering that if the upgrade data packet is large, it may cause the file uploading to fail or the file to be uploaded from the beginning due to network interruption. Therefore, the upgrade data packet is divided into multiple sub-packets. For example, when uploading a 1GB upgrade data packet in the total system server, the sub-packet can be cut into 10MB each. And each sub-packet can be encrypted, for example, encrypted by MD5, and transmitted to the backend of the server in the form of fromData through the interface. When implementing, the interface can be called in batches to transmit to the backend in the form of 4 sub-packets per interface request. The backend will store each sub-packet in the directory in the server docker container.

[0102] After all the sub-packets are uploaded, a merged and compressed upgrade data packet can be generated in the backend storage directory.

[0103] If the uploading is interrupted due to an accident during the uploading process, the next time the uploading is performed, the information in the directory can be read and the resume operation is performed. Until all the sub-packets are uploaded, the above-mentioned merging operation is performed.

[0104] In this embodiment, the total system server and the sub-system server both have an upgrade service, which is started in the form of a process, and there is a folder for storing data inside the upgrade service. The system server can be started in the form of a docker image container, and the upgrade center of the total system server stores the data in the server image after uploading the upgrade data packet, and at the same time, an external storage address can be mapped to copy a copy of the storage. The sub-system server clicks to download the upgrade data packet of the total system server and stores it in the server container at the same time, and also can do external storage address mapping. When the upgrade function is started, the upgrade service copies the upgrade data packet in the system container to the folder inside the upgrade service.

[0105] The upgrading implementation method provided in the embodiment optimizes the user experience and avoids affecting the use of the user due to system upgrading problems. In addition, the system is operated in the front-end page layer and the back end in a total-subsystem system manner. The related functions can be implemented through the total system server and the subsystem server, which optimizes the user experience compared with the existing system function stopping manner for upgrading.

[0106] In the overall system, the total system server can be used as a master control system to complete the update management of the application system. This simplifies the work of the system operator, and the operator only needs to implement the system upgrading of the subsystem server based on the total-subsystem structure without connecting the system server to the remote server for redeployment to implement the upgrading.

[0107] Based on the above upgrading implementation method, in the upgrading implementation system provided in the embodiment of the application, the subsystem server can be used to trigger the upgrading process and send an upgrading request to the total system server when it is determined that upgrading is needed based on the image information corresponding to the current upgrading data packet. The existing image provides system functions in association with the container thereof.

[0108] The total system server is used to send the upgrading data packet required for upgrading to the subsystem server in response to the upgrading request. The subsystem server is used to deploy a new image based on the information in the obtained upgrading data packet, construct a new container mapped by the new image after verifying that the new image is successfully deployed, replace the container mapped by the existing image with the new container, and delete the existing image and the container mapped by the existing image, so as to complete the upgrading of the system.

[0109] The related details of the upgrading implementation system provided in the embodiment can be referred to the description of the upgrading implementation method in the above embodiment, which will not be described herein.

[0110] Please refer to Figure 6 An exemplary component schematic diagram of an electronic device provided in the embodiment of the application is shown in FIG. 1. The electronic device can be the system server described above, which can be the total system server or the subsystem server. The electronic device can include a storage medium 110, a processor 120, an upgrading implementation apparatus 130, and a communication interface 140. In the embodiment, the storage medium 110 and the processor 120 are located in the electronic device and are separately arranged. However, it should be understood that the storage medium 110 can also be independent of the electronic device and can be accessed by the processor 120 through a bus interface. Alternatively, the storage medium 110 can also be integrated into the processor 120, for example, can be a cache and / or a general-purpose register.

[0111] The upgrading implementation apparatus 130 can be understood as the electronic device described above, or the processor 120 of the electronic device, or a software functional module for implementing the upgrading implementation method described above under the control of the electronic device.

[0112] As shown in Figure 7 The upgrading implementation apparatus 130 can include an acquisition module 131, a deployment module 132, a construction module 133, and a replacement module 134. The functions of each functional module of the upgrading implementation apparatus 130 will be described in detail below.

[0113] The acquisition module 131 is configured to trigger an upgrading process when it is determined that upgrading is needed based on the image information corresponding to the current upgrading data packet, and to acquire the upgrading data packet required for upgrading, wherein the existing image provides system functions with the container mapped thereto.

[0114] It can be understood that the acquisition module 131 can be used to execute the step S201, and the detailed implementation of the acquisition module 131 can be referred to the content described above in relation to the step S201.

[0115] The deployment module 132 is configured to deploy a new image based on the information in the acquired upgrading data packet.

[0116] It can be understood that the deployment module 132 can be used to execute the step S202, and the detailed implementation of the deployment module 132 can be referred to the content described above in relation to the step S202.

[0117] The construction module 133 is configured to construct a new container mapped to the new image after verifying that the new image is successfully deployed.

[0118] It can be understood that the construction module 133 can be used to execute the step S203, and the detailed implementation of the construction module 133 can be referred to the content described above in relation to the step S203.

[0119] The replacement module 134 is configured to replace the container mapped to the existing image with the new container, and to delete the existing image and the container mapped thereto, so as to complete the upgrading of the system.

[0120] It can be understood that the replacement module 134 can be used to execute the step S204, and the detailed implementation of the replacement module 134 can be referred to the content described above in relation to the step S204.

[0121] In a possible implementation, the system server is a sub-system server or a total system server, the total system server communicates with at least one sub-system server, and the total system server is further connected with a remote server in communication.

[0122] When the system server is a total system server, the upgrade data package is obtained from the remote server or based on a local uploading operation;

[0123] When the system server is a sub-system server, the upgrade data package is obtained from the total system server or based on a local uploading operation.

[0124] In a possible implementation, the upgrade implementation device 130 further comprises a configuration module for pre-configuration information, which is configured to:

[0125] obtain the IP of the sub-system server and the IP of the total system server communicated with the sub-system server filled in the service configuration interface;

[0126] perform matching verification on the IP of the sub-system server and the IP of the total system server;

[0127] after successful verification, associate and store the IP of the sub-system server and the IP of the total system server in the database.

[0128] In a possible implementation, the above-mentioned configuration module can be further configured to:

[0129] perform configuration of security information, the security information including any one or more of user password length, system automatic exit time, password input error upper limit, system locking time when the password error reaches the upper limit, and user abnormal operation type.

[0130] In a possible implementation, the upgrade data package is divided into a plurality of sub-data packages, and the above-mentioned obtaining module 131 can be configured to:

[0131] obtain each sub-data package contained in the upgrade data package required for upgrading in sequence, and after completing the uploading of each sub-data package, encrypt the sub-data package, and store the encrypted sub-data package under the working directory of the backend;

[0132] after all the sub-data packages are completed, merge all the encrypted sub-data packages to obtain the compressed upgrade data package.

[0133] In a possible implementation, the upgrade implementation device 130 further comprises a judgment module, which can be configured to:

[0134] judge whether the user has system upgrade authority based on the user information input by the user;

[0135] when it is determined that the user has system upgrade authority, execute the step of triggering the upgrade process.

[0136] In a possible implementation, the acquisition module 131 can be specifically configured to:

[0137] monitor whether there is an updated upgrade data package in the remote server or the total system server;

[0138] when there is an updated upgrade data package, compare the version numbers between the current upgrade data package and the updated upgrade data package based on the mirror image information corresponding to the current upgrade data package;

[0139] when the version number of the current upgrade data package is lower than that of the updated upgrade data package, determine that the upgrade needs to be performed.

[0140] In the embodiments of the present application, corresponding to the above-mentioned upgrade implementation method, a computer readable storage medium is also provided, the computer readable storage medium stores a computer program, and the computer program performs each step of the above-mentioned upgrade implementation method when running.

[0141] Each step performed by the computer program when running is not described again here, and can be referred to the above-mentioned explanation and description of the upgrade implementation method.

[0142] In summary, the upgrade implementation method, device, system and electronic device provided by the embodiments of the present application trigger the upgrade process when it is determined that the upgrade needs to be performed based on the mirror image information corresponding to the current upgrade data package, acquire the upgrade data package required for the upgrade, deploy a new mirror image based on the information in the acquired upgrade data package, and construct a new container mapped by the new mirror image after detecting that the deployment of the new mirror image is successful. The new container is used to replace the container mapped by the existing mirror image, and the existing mirror image and the container mapped thereby are deleted, so as to complete the upgrade of the system. In the present scheme, the deployment of the new mirror image is performed based on the upgrade data package, and the container mapped by the new mirror image is constructed, so that the deployment of the mirror image does not affect the function of the original container, and does not affect the normal use of the system. The new container is used to replace the existing container, and the time required is extremely short, so as not to cause interference to the user.

[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical range disclosed in the present application can be easily thought of by those skilled in the art, and should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An upgrade implementation method, characterized by, The method applied to a system server comprises: When it is determined that upgrading is needed based on current upgrade data packet corresponding image information, triggering an upgrade process and obtaining an upgrade data packet required for upgrading, wherein an existing image provides system functions with a container mapped thereto; Deploying a new image based on information in the obtained upgrade data packet; After verifying that the new image is successfully deployed, building a new container mapped to the new image; Replacing the container mapped to the existing image with the new container and deleting the existing image and the container mapped thereto to complete the upgrading of the system; The system server comprises a sub-system server or a total system server, the total system server and the sub-system server both have an upgrade service, the upgrade service is started in a process form, the upgrade service has a folder for placing data inside, the total system server stores data in a server image after uploading an upgrade data packet to an upgrade center, and copies a copy of the storage in an external storage address, the sub-system server downloads the upgrade data packet of the total system server, which is also stored in a server container, and maps an external storage address, and the upgrade service copies the upgrade data packet to the folder inside the upgrade service in the system container when starting the upgrade function; The method further comprises a step of pre-configuring information, which comprises: Obtaining the IP of the sub-system server and the IP of the total system server communicated therewith filled in a business configuration interface, performing matching verification on the IP of the sub-system server and the IP of the total system server, and associating and storing the IP of the sub-system server and the IP of the total system server in a database after successful verification, wherein the verification is successful when the IP of the sub-system server and the IP of the total system server belong to the same device IP in the same region or different regions of the same company; Configuring security information, which comprises any one or more of user password length, system automatic exit time, password input error upper limit, system locking time when the password error reaches the upper limit, and user abnormal operation type.

2. The upgrade implementation method of claim 1, wherein, The system server is a sub-system server or a total system server, the total system server communicates with at least one sub-system server, and the total system server is further connected in communication with a remote server; When the system server is a total system server, the upgrade data packet is obtained from the remote server or based on a local uploading operation; When the system server is a sub-system server, the upgrade data packet is obtained from the total system server or based on a local uploading operation.

3. The upgrade implementation method of claim 1, wherein, The upgrade data packet is divided into multiple sub-data packets, and the step of obtaining the upgrade data packet required for upgrading comprises: Obtaining each sub-data packet contained in the upgrade data packet required for upgrading in sequence, encrypting the sub-data packet after completing the uploading of each sub-data packet, and storing the encrypted sub-data packet under the working directory of the backend; After all the sub-data packets are uploaded, all the encrypted sub-data packets are merged to obtain a compressed upgrade data packet.

4. The upgrade implementation method of claim 1, wherein, Before the step of triggering the upgrade process and obtaining the upgrade data package required for upgrading, the method further comprises: determining whether the user has system upgrade authority based on user information input by the user; when it is determined that the user has system upgrade authority, performing the step of triggering the upgrade process.

5. The upgrade implementation method of claim 1, wherein, In the step of determining whether upgrading is required based on the image information corresponding to the current upgrade data package, the step comprises: monitoring whether there is an updated upgrade data package in the remote server or the total system server; when there is an updated upgrade data package, comparing the version numbers between the current upgrade data package and the updated upgrade data package based on the image information corresponding to the current upgrade data package; when the version number of the current upgrade data package is lower than the version number of the updated upgrade data package, determining that upgrading is required.

6. A system upgrade implementation apparatus, characterized by comprising: The system upgrade implementation method according to any one of claims 1-5 is applied to a system server, and the device comprises: an obtaining module configured to trigger an upgrade process and obtain an upgrade data package required for upgrading when it is determined that upgrading is required based on image information corresponding to a current upgrade data package, wherein an existing image provides system functions by mapping a container; a deployment module configured to deploy a new image based on information in the obtained upgrade data package; a construction module configured to construct a new container mapped by the new image after verifying that the new image is successfully deployed; a replacement module configured to replace a container mapped by the existing image with the new container, and delete the existing image and the container mapped thereby, so as to complete system upgrading.

7. An upgrade implementation system, characterized by The system implementation method according to any one of claims 1-5 comprises a total system server and at least one sub-system server in communication with the total system server; the sub-system server is configured to trigger an upgrade process and send an upgrade request to the total system server when it is determined that upgrading is required based on image information corresponding to a current upgrade data package, wherein an existing image provides system functions by mapping a container; the total system server is configured to send an upgrade data package required for upgrading to the sub-system server in response to the upgrade request; the sub-system server is configured to deploy a new image based on information in the obtained upgrade data package, construct a new container mapped by the new image after verifying that the new image is successfully deployed, replace a container mapped by the existing image with the new container, and delete the existing image and the container mapped thereby, so as to complete system upgrading.

8. An electronic device, comprising: The electronic device comprises one or more storage media and one or more processors in communication with the storage media, the one or more storage media storing machine-executable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-executable instructions to perform the method steps according to any one of claims 1-5.

Citation Information

Patent Citations

  • Container mirror image building method, container mirror image building system, container mirror image building device and storage medium

    CN107766126A

  • A gateway deployment upgrading method and device based on a container technology

    CN109861837A