Terminal device application upgrade method, device, electronic device and storage medium

Through collaborative management in the cloud and edge nodes, using digital twin models and lightweight proxy technologies, the problem of duplication of heterogeneous terminal equipment upgrade process is solved, and efficient and consistent application upgrades are achieved.

CN120045211BActive Publication Date: 2025-07-18INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510534785.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-18
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

During the application upgrade process of heterogeneous terminal devices, there is a problem of abnormal device status, causing the upgrade process to be repeated, resulting in low upgrade efficiency.

Method used

By receiving upgrade information sent from the cloud, update the configuration information of the terminal device's digital twin model, and synchronize the configuration information after the device returns to normal, use lightweight agents to perform application upgrades, block the differences in heterogeneous terminal devices, and achieve unified upgrade operations.

Benefits of technology

It improves the upgrade efficiency of terminal equipment applications, reduces the upgrade management difficulties caused by diversified heterogeneous terminal equipment and applications, and realizes consistent operation of application upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045211B_ABST
    Figure CN120045211B_ABST
Patent Text Reader

Abstract

The present invention provides a method, apparatus, electronic device and storage medium for upgrading applications of a terminal device, belonging to the technical field of software upgrading, including: receiving upgrade information sent from the cloud; updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronizing the configuration information of the digital twin model to the terminal device to be upgraded; sending the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded. When the terminal device is upgraded again after returning to normal, the present invention does not need to restart the upgrade process to update the configuration information of the terminal device, improving the upgrade efficiency of the application of the terminal device; in addition, through the lightweight agent, the differences of heterogeneous terminal devices can be shielded, reducing the difficulty of managing the upgrade of the application of the terminal device caused by the heterogeneity of the terminal device and the diversification of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software upgrade, and particularly to a method, a device, an electronic device and a storage medium for upgrading an application of a terminal device. Background Art

[0002] When upgrading applications in a large number of heterogeneous terminal devices, there are situations where the status of the terminal device is abnormal, and at this time, the upgrade cannot be completed. The traditional upgrade method will restart the upgrade process after the status of the terminal device returns to normal, resulting in the problem of repeated execution of the upgrade process and low upgrade efficiency. Summary of the Invention

[0003] The present invention provides a method, a device, an electronic device and a storage medium for upgrading an application of a terminal device, so as to solve the technical problem of low upgrade efficiency of the application of the terminal device in the prior art.

[0004] The present invention provides a method for upgrading an application of a terminal device, which is applied to an edge node where the terminal device to be upgraded is located, and includes:

[0005] Receiving upgrade information sent from the cloud;

[0006] Updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information;

[0007] If the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronizing the configuration information of the digital twin model to the terminal device to be upgraded;

[0008] Sending the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded.

[0009] According to the method for upgrading an application of a terminal device provided by the present invention, after updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information, the method further includes:

[0010] If the terminal device to be upgraded is normal, sending the upgrade information to the lightweight agent.

[0011] According to the method for upgrading an application of a terminal device provided by the present invention, updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information includes:

[0012] Verifying the upgrade information;

[0013] If the upgrade information passes the verification, updating the configuration information of the digital twin model according to the upgrade information;

[0014] Among them, the verification of the upgrade information includes, but is not limited to: excluding non-local terminal devices in the upgrade information, determining whether the upgrade package in the upgrade information is compatible with the terminal device to be upgraded, determining whether the application to be upgraded has been installed on the terminal device to be upgraded, determining whether the current version of the application to be upgraded is lower than the version of the upgrade package, determining whether the application to be upgraded is compatible with the upgrade package, and determining whether the upgrade package has been tampered with or damaged.

[0015] According to a method for upgrading an application of a terminal device provided by the present invention, the determining whether the upgrade package has been tampered with or damaged includes:

[0016] Place the upgrade package in a first storage location, use a first computing tool to calculate a first actual check value of the upgrade package at the first storage location, and copy the first actual check value to a first comparison document;

[0017] Obtain the standard check value provided by the cloud for the upgrade package, open the first comparison document, and determine whether the standard check value is consistent with the first actual check value in the first comparison document;

[0018] If the standard check value is consistent with the first actual check value, it is determined that the upgrade package has not been tampered with or damaged;

[0019] If the standard check value is inconsistent with the first actual check value, place the upgrade package in a second storage location, use a second computing tool to calculate a second actual check value of the upgrade package at the second storage location, and copy the second actual check value to a second comparison document;

[0020] Open the second comparison document, and compare whether the standard check value is consistent with the second actual check value in the second comparison document;

[0021] If the standard check value is consistent with the second actual check value, it is determined that the upgrade package has not been tampered with or damaged; if the standard check value is partially inconsistent with the second actual check value, it is determined that the upgrade package is damaged; if the standard check value is completely inconsistent with the second actual check value, it is determined that the upgrade package has been tampered with.

[0022] According to a method for upgrading an application of a terminal device provided by the present invention, if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal and the configuration information of the digital twin model is synchronized to the terminal device to be upgraded, the method further includes:

[0023] If the application to be upgraded is a container image, the edge node is a control node, and the terminal device to be upgraded is a cluster composed of container nodes, directly upgrade the container image based on the upgrade information.

[0024] The present invention also provides a method for upgrading an application of a terminal device, which is applied to a terminal device to be upgraded and includes:

[0025] Receiving upgrade information sent by an edge node;

[0026] Using a lightweight proxy to upgrade the application to be upgraded based on the upgrade information.

[0027] According to the method for upgrading an application of a terminal device provided by the present invention, upgrading the application to be upgraded based on the upgrade information includes:

[0028] Verifying the upgrade information;

[0029] If the upgrade information passes the verification, upgrade the application to be upgraded based on the upgrade information;

[0030] Among them, verifying the upgrade information includes at least one of the following: determining whether the upgrade content in the upgrade information is consistent with the actual environment of the terminal device to be upgraded, determining whether the digital twin model of the terminal device to be upgraded is consistent with the configuration information of the terminal device to be upgraded, and determining whether the upgrade program package in the upgrade information is tampered with or damaged.

[0031] According to the method for upgrading an application of a terminal device provided by the present invention, upgrading the application to be upgraded based on the upgrade information includes:

[0032] Obtaining the resource occupancy rate of the terminal device to be upgraded;

[0033] When the resource occupancy rate is lower than a preset threshold, upgrade the application to be upgraded based on the upgrade information.

[0034] According to the method for upgrading an application of a terminal device provided by the present invention, upgrading the application to be upgraded based on the upgrade information includes:

[0035] Backing up the parameter configuration file of the application to be upgraded;

[0036] Installing the upgrade program package in the upgrade information;

[0037] Overwriting the backed-up parameter configuration file to a specified directory;

[0038] Performing restart control on the upgraded application according to the restart rule in the upgrade information.

[0039] The present invention also provides a terminal device application upgrade device, which is applied to an edge node where a terminal device to be upgraded is located, and includes:

[0040] A first receiving module, configured to receive upgrade information sent by the cloud;

[0041] An update module, configured to update the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information;

[0042] A synchronization module, configured to, if the terminal device to be upgraded is abnormal, synchronize the configuration information of the digital twin model to the terminal device to be upgraded after the terminal device to be upgraded returns to normal;

[0043] A sending module, configured to send the upgrade information to a lightweight proxy of the terminal device to be upgraded, so that the lightweight proxy upgrades the application to be upgraded of the terminal device to be upgraded.

[0044] The present invention also provides a terminal device application upgrade device, which is applied to a terminal device to be upgraded, and includes:

[0045] A second receiving module, configured to receive upgrade information sent by the edge node;

[0046] An upgrade module, configured to use a lightweight proxy to upgrade the application to be upgraded based on the upgrade information.

[0047] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the terminal device application upgrade method described in any one of the above is implemented.

[0048] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the terminal device application upgrade method described in any one of the above is implemented.

[0049] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the terminal device application upgrade method described in any one of the above is implemented.

[0050] The terminal device application upgrade method, device, electronic device, and storage medium provided by the present invention update the configuration information of the digital twin model of the terminal device according to the upgrade information when the current upgrade of the terminal device application is abnormal, and synchronize the configuration information of the digital twin model to the terminal device after the terminal device returns to normal, so that there is no need to restart the upgrade process to update the configuration information of the terminal device during the next upgrade, improving the upgrade efficiency of the terminal device application. In addition, for a large number of heterogeneous terminal devices, the lightweight proxy can shield the differences of the heterogeneous terminal devices, and the consistent operation of application upgrade is achieved through a unified open interface, providing support for the upgrade of diverse applications and reducing the difficulty of terminal device application upgrade management caused by heterogeneous terminal devices and diverse applications. Brief Description of the Drawings

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

[0052] Figure 1 It is a schematic structural diagram of the terminal device application upgrade system provided by the present invention.

[0053] Figure 2 It is one of the schematic flowcharts of the terminal device application upgrade method provided by the present invention.

[0054] Figure 3 It is the second schematic flowchart of the terminal device application upgrade method provided by the present invention.

[0055] Figure 4 It is one of the schematic structural diagrams of the terminal device application upgrade device provided by the present invention.

[0056] Figure 5 It is the second schematic structural diagram of the terminal device application upgrade device provided by the present invention.

[0057] Figure 6 It is the schematic structural diagram of the electronic device provided by the present invention. Detailed Embodiments

[0058] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0059] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation to the present invention. Unless otherwise clearly specified and defined, the terms "mounted", "connected", "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and can be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0060] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.

[0061] The following will be combined with Figures 1-6 to describe the terminal device application upgrade method, device, electronic device and storage medium provided by the present invention.

[0062] The present invention first provides a terminal device application upgrade system, as Figure 1 shown. The system includes a cloud, a plurality of edge nodes and a plurality of terminal devices. Each edge node is located in a different area. The cloud is communicatively connected to each edge node, and each edge node is communicatively connected to each terminal device in its area.

[0063] Among them, the edge node is a server running in a certain area, which is used to manage the terminal devices in the area, communicate with the cloud, report the data of local terminal devices to the cloud, and receive tasks sent from the cloud. Terminal devices are independent devices scattered in different areas, such as smart devices, dedicated devices, etc. Terminal devices do not communicate directly with the cloud and are managed by the edge nodes where they are located.

[0064] The cloud mainly responsible for managing all edge nodes, terminal devices and application programs, mainly including life cycle management, status management and application program versions, etc. Application programs refer to the application programs running on terminal devices, including software program packages, data parameter configurations, AI models, etc. Application programs in different terminal devices are different, such as AI models in smart cameras, firmware in quality inspection devices, lightweight container images, etc. Life cycle management is to manage edge nodes, terminal devices and application programs in the system from creation, maintenance, change, offline, to destruction; status management is to monitor and manage the running status of edge nodes and terminal devices, such as normal, offline, faulty, etc.; version management mainly refers to the management of different versions of application programs, including the management of different version program packages.

[0065] Edge nodes are mainly used to cooperate with the cloud to jointly complete the management of local terminal devices, including receiving application upgrade tasks sent from the cloud, reporting the status of terminal devices to the cloud, controlling the operation of local terminal devices and application management operations, etc. It can automatically complete the management of local devices without the participation of the cloud and share the access pressure on the cloud in the case of a large number of terminal devices being connected. Edge nodes are mainly deployed in independent and secure areas such as workshops and parks, which can further ensure data security and reduce the risk of sensitive data leakage.

[0066] The edge node has digital twin models of each terminal device within its area. The digital twin models can synchronously store data such as the basic attributes, physical hardware, operating system, application programs, lightweight agents, and running status of local terminal devices. The basic attributes mainly refer to attributes such as device name, serial number, device type, location, maintainer, and manufacturer; the physical hardware mainly includes processors, memory, hard disks, network cards, graphics acceleration cards, cameras, etc.; the operating system refers to the operating system running on the terminal device, such as Linux, Ubuntu, Windows 10, Kylin OS, etc.; the application programs are the applications installed and running on the terminal device, including the program packages of the applications, application versions, installation locations, installation times, parameter configurations, etc.; the lightweight agent is an agent program installed on the terminal device for interacting with the edge node and managing the terminal device itself, such as operation and maintenance monitoring, application management, etc.; the running status is the running status of the terminal device reported by the lightweight agent to the edge node, such as power-on / off status, CPU utilization rate, memory utilization rate, disk utilization rate, etc. In addition, the digital twin models also store the historical records of application upgrades and can trace and roll back the upgrade process.

[0067] The lightweight agent runs on the terminal device. On the one hand, it monitors the running situation of the terminal device and reports it to the edge node. On the other hand, it manages the system environment of the terminal device, such as application upgrade, application uninstallation, security repair, etc.

[0068] Through the collaborative mechanism of the cloud, edge, and terminal, the present invention solves the problem of the access device quantity bottleneck caused by traditional centralized device management and can support the access of tens of millions of heterogeneous devices. In addition, by centrally managing terminal devices and application programs in the cloud, the present invention solves the problem of difficult matching of devices and applications caused by traditional separate management of devices and applications and ensures the correctness of application upgrade operations.

[0069] Before upgrading the application to be upgraded on the terminal device to be upgraded, the cloud first formulates an upgrade plan. The upgrade plan contains a specific requirement description for the application upgrade, including the list of target terminal devices, upgraded applications, specific versions, and upgrade times, etc. Before formulating the upgrade plan, it is necessary to first create the application to be upgraded in the cloud, including information such as application name, application type, development manufacturer, version number, program package (not limited to software installation packages, but also other types such as AI models, configuration files, container images, etc.), applicable devices, and version introduction. After the upgrade plan is created, the cloud sends the terminal application upgrade task and the upgrade program package to the edge node where the terminal device to be upgraded is located through the network according to the upgrade requirement description.

[0070] As Figure 2 shown, the terminal device application upgrade method provided by the present invention applied to the edge node where the terminal device to be upgraded is located includes steps S1 - S4.

[0071] Step S1, receive the upgrade information sent from the cloud.

[0072] Among them, the upgrade information may include an upgrade task and an upgrade program package.

[0073] Step S2, update the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information.

[0074] Among them, the configuration information of the digital twin model mainly includes application parameters, and the application parameters further include the program package of the application, the application version, the installation location, the installation time, parameter configuration, etc.

[0075] Step S3, if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronize the configuration information of the digital twin model to the terminal device to be upgraded.

[0076] Among them, the abnormality of the terminal device to be upgraded includes that the terminal device to be upgraded is offline, and the upgrade cannot be completed at this time. The terminal device to be upgraded returning to normal includes the terminal device to be upgraded returning to online. It can be understood that synchronizing the configuration information of the digital twin model to the terminal device to be upgraded eliminates the need to restart the upgrade process to update the configuration information of the terminal device to be upgraded.

[0077] Step S4, send the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded on the terminal device to be upgraded.

[0078] Among them, the lightweight agent is a lightweight resident application running on the terminal device, mainly solving problems such as inconsistent interfaces of heterogeneous terminals and difficult management and control. The lightweight agent realizes a unified externally open interface by shielding the differential details of heterogeneous terminals. By establishing a network connection of the control plane with the edge node, it can detect the running state of the terminal device and report it to the edge node without affecting the normal operation of the terminal device and ensuring security policies, and at the same time receive task requests from the edge node for autonomous processing.

[0079] As Figure 3 shown, the terminal device application upgrade method provided by the present invention for the terminal device to be upgraded includes Step S5 - Step S6.

[0080] Step S5, receive the upgrade information sent from the edge node;

[0081] Step S6, use the lightweight agent to upgrade the application to be upgraded based on the upgrade information.

[0082] As can be seen from the above, when the current upgrade of the terminal device application of the present invention is abnormal, the configuration information of the digital twin model of the terminal device is updated according to the upgrade information, and after the terminal device returns to normal, the configuration information of the digital twin model is synchronized to the terminal device, so that when upgrading again, there is no need to restart the upgrade process to update the configuration information of the terminal device, improving the upgrade efficiency of the terminal device application. In addition, for a large number of heterogeneous terminal devices, the lightweight proxy can shield the differences of the heterogeneous terminal devices, and the consistency operation of application upgrade is realized through the unified open interface, providing support for the upgrade of diversified applications and reducing the difficulty of terminal device application upgrade management caused by heterogeneous terminal devices and diversified applications.

[0083] Of course, if the terminal device to be upgraded is normal during this upgrade, the upgrade information can be directly sent to the lightweight proxy of the terminal device to be upgraded for application upgrade. Therefore, after step S2, the terminal device application upgrade method of the present invention may further include:

[0084] If the terminal device to be upgraded is normal, send the upgrade information to the lightweight proxy.

[0085] In this way, the application upgrade can be directly completed when the terminal device to be upgraded is normal.

[0086] In some embodiments, step S2 of the present invention may further include:

[0087] Verify the upgrade information;

[0088] If the upgrade information passes the verification, update the configuration information of the digital twin model according to the upgrade information;

[0089] Among them, verifying the upgrade information includes, but is not limited to: excluding non-local terminal devices in the upgrade information, determining whether the upgrade package in the upgrade information is suitable for the terminal device to be upgraded, determining whether the terminal device to be upgraded has installed the application to be upgraded, determining whether the current version of the application to be upgraded is lower than the version of the upgrade package, determining whether the application to be upgraded is compatible with the upgrade package, determining whether the upgrade package has been tampered with and damaged.

[0090] Among them, the purpose of the edge node to verify the upgrade information is to determine whether the application upgrade task request is legal. Specifically, the target terminal device list in the upgrade task content can be checked to exclude non-locally managed terminal devices from the list; it is determined whether the upgrade program package in the upgrade information is compatible with the terminal device to be upgraded, specifically, whether the hardware, operating system, driver program, etc. of the terminal device to be upgraded support the upgrade program package; the integrity of the upgrade program package is verified to check whether it has been tampered with and damaged during transmission, and algorithms such as MD5 and SHA-256 can be used to achieve this. For upgrade tasks that fail the verification, the edge node will feedback information such as application incompatibility and damaged application upgrade program package to the cloud.

[0091] The edge node's verification of the upgrade information can ensure the successful application upgrade and avoid upgrade failures.

[0092] In some embodiments, the present invention's determination of whether the upgrade program package has been tampered with and damaged may further include:

[0093] Place the upgrade program package in the first storage location, use the first computing tool to calculate the first actual verification value of the upgrade program package in the first storage location, and copy the first actual verification value to the first comparison document;

[0094] Obtain the standard verification value provided by the cloud for the upgrade program package, open the first comparison document, and determine whether the standard verification value is consistent with the first actual verification value in the first comparison document;

[0095] If the standard verification value is consistent with the first actual verification value, it is determined that the upgrade program package has not been tampered with and damaged;

[0096] If the standard verification value is inconsistent with the first actual verification value, place the upgrade program package in the second storage location, use the second computing tool to calculate the second actual verification value of the upgrade program package in the second storage location, and copy the second actual verification value to the second comparison document;

[0097] Open the second comparison document and compare whether the standard verification value is consistent with the second actual verification value in the second comparison document;

[0098] If the standard verification value is consistent with the second actual verification value, it is determined that the upgrade program package has not been tampered with and damaged; if the standard verification value is partially inconsistent with the second actual verification value, it is determined that the upgrade program package is damaged; if the standard verification value is completely inconsistent with the second actual verification value, it is determined that the upgrade program package has been tampered with.

[0099] Among them, the standard verification value being consistent with the first actual verification value indicates that the first verification passes, proving that the upgrade package has not been tampered with or damaged; the standard verification value being inconsistent with the first actual verification value indicates that the first verification fails. The reason may be that the upgrade package has been tampered with or damaged, or it may be that the first verification is incorrect, including verification failures caused by abnormal storage locations of the upgrade package or abnormal calculation tools used. It is necessary to repeat the verification through the second verification, using a new storage location and a new calculation tool.

[0100] If the standard verification value is consistent with the second actual verification value, it indicates that the first verification is incorrect and the second verification passes, and it can be considered that the upgrade package has not been tampered with or damaged; if the standard verification value is partially consistent and partially inconsistent with the second actual verification value, the possibility of the upgrade package being damaged during download is relatively high; if the standard verification value is completely inconsistent with the second actual verification value, the possibility of the upgrade package being tampered with is even greater.

[0101] The present invention can eliminate the possibility of single - verification failure due to abnormal storage locations of the upgrade package or abnormal calculation tools used through the verification of two verification values, improving the reliability of judging whether the upgrade package has been tampered with or damaged. And after two verification failures, it can accurately judge whether the upgrade package has been tampered with or damaged through the consistency between the standard verification value and the second actual verification value, and can determine the specific problems of the upgrade package.

[0102] In some embodiments, after step S3, the terminal device application upgrade method of the present invention may further include:

[0103] If the application to be upgraded is a container image, the edge node is a control node, and the terminal device to be upgraded is a cluster composed of container nodes, then directly upgrade the container image based on the upgrade information.

[0104] Most applications of the present invention need to be upgraded through a lightweight proxy. For example, in the container environment on a terminal device without cluster management, the lightweight proxy is responsible for installation, mainly including pulling the mirror file from the edge node and interacting with the container environment (such as docker, containerd, etc.) to complete the mirror installation. For container image - type applications, if the edge node is the container cluster control node and the terminal device is a container node in a small container cluster, then after the digital twin model is updated, the container application scheduling can be performed by the cluster controller on the edge node, and there is no need to install through a lightweight proxy, such as K8S, K3S, etc.

[0105] This can directly upgrade the container image by the edge node when the application to be upgraded is a container image, without going through a lightweight proxy, which can improve the upgrade management efficiency of container - type applications.

[0106] In some embodiments, in step S6 of the present invention, upgrading the application to be upgraded based on the upgrade information may further include:

[0107] Verify the upgrade information;

[0108] If the upgrade information passes the verification, upgrade the application to be upgraded based on the upgrade information;

[0109] Among them, verifying the upgrade information includes, but is not limited to: determining whether the upgrade content in the upgrade information is consistent with the actual environment of the terminal device to be upgraded, determining whether the digital twin model of the terminal device to be upgraded is consistent with the configuration information of the terminal device to be upgraded, and determining whether the upgrade package has been tampered with or damaged.

[0110] The lightweight proxy verifies the upgrade information, mainly for verifying the upgrade content, the digital twin model configuration and the actual environment of the terminal device. It mainly verifies whether the upgrade content, the digital twin model configuration and the actual environment of the terminal device are consistent, including the application name, application version, installation location, etc. For inconsistent situations, the lightweight proxy feedbacks to the digital twin model of the edge node for inspection. The digital twin model comprehensively evaluates the feedback content of the lightweight proxy and the model configuration content, updates the model configuration according to the feedback content, and synchronizes it to the cloud, and then issues an upgrade request to the terminal device lightweight proxy again. The feedback content mainly includes the application name, application version, installation location, parameter configuration, etc. actually running in the terminal device. Similarly, the lightweight proxy also needs to pull the upgrade package from the edge node for integrity check to check whether it has been tampered with or damaged during the transmission process, mainly implemented by algorithms such as MD5 and SHA-256.

[0111] The lightweight proxy's verification of the upgrade information can ensure the successful upgrade of the application and avoid upgrade failures.

[0112] Step S6 of the present invention can upgrade the application to be upgraded based on the upgrade information at any time, but upgrading when the resource occupancy rate of the terminal device to be upgraded is high will affect the normal operation of the business of the terminal device to be upgraded.

[0113] In order to reduce the impact of application upgrade on the terminal device's business, in step S6, upgrading the application to be upgraded based on the upgrade information may further include:

[0114] Obtain the resource occupancy rate of the terminal device to be upgraded;

[0115] When the resource occupancy rate is lower than the preset threshold, upgrade the application to be upgraded based on the upgrade information.

[0116] Among them, the resource occupancy rate of the terminal device to be upgraded is lower than the preset threshold, indicating that the resource occupancy rate of the terminal device to be upgraded is low. At this time, performing the upgrade can reduce the impact on the terminal device's services.

[0117] In some embodiments, in step S6 of the present invention, upgrading the application to be upgraded based on the upgrade information may further include:

[0118] Back up the parameter configuration file of the application to be upgraded;

[0119] Install the upgrade package in the upgrade information;

[0120] Overwrite the backed-up parameter configuration file to the specified directory;

[0121] Perform restart control on the upgraded application according to the restart rule in the upgrade information.

[0122] Specifically, when the lightweight proxy performs application upgrade, it first backs up the existing application installation environment, especially the parameter configuration file of the application (specified in the cloud), then installs the program package of the application to be upgraded, including decompressing the specified directory, installation script, installation files, etc., and finally overwrites the backed-up parameter configuration file to the specified directory to complete the configuration replacement. After the upgrade is completed, perform restart control on the upgraded application according to the restart rule specified in the upgrade content. The restart rule includes immediate restart, specified time, and no restart. After the upgrade is completed, the lightweight proxy will notify the edge node of the application upgrade completion status and update the application upgrade status and key configuration information to the digital twin model.

[0123] As Figure 4 shown, the terminal device application upgrade device applied to the edge node where the terminal device to be upgraded is located provided by the present invention includes:

[0124] A first receiving module, configured to receive the upgrade information sent by the cloud;

[0125] An update module, configured to update the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information;

[0126] A synchronization module, configured to, if the terminal device to be upgraded is abnormal, synchronize the configuration information of the digital twin model to the terminal device to be upgraded after the terminal device to be upgraded returns to normal;

[0127] A sending module, configured to send the upgrade information to the lightweight proxy of the terminal device to be upgraded, so that the lightweight proxy upgrades the application to be upgraded of the terminal device to be upgraded.

[0128] The sending module of the present invention may further be used for:

[0129] If the terminal device to be upgraded is normal, send the upgrade information to the lightweight proxy.

[0130] The update module of the present invention can specifically be used for:

[0131] Verify the upgrade information;

[0132] If the upgrade information passes the verification, update the configuration information of the digital twin model according to the upgrade information;

[0133] Among them, verifying the upgrade information includes, but is not limited to: excluding non-local terminal devices in the upgrade information, determining whether the upgrade package in the upgrade information is compatible with the terminal device to be upgraded, determining whether the application to be upgraded has been installed on the terminal device to be upgraded, determining whether the current version of the application to be upgraded is lower than the version of the upgrade package, determining whether the application to be upgraded is compatible with the upgrade package, and determining whether the upgrade package has been tampered with or damaged.

[0134] The update module of the present invention can also be used for:

[0135] Place the upgrade package in the first storage location, use the first computing tool to calculate the first actual verification value of the upgrade package in the first storage location, and copy the first actual verification value to the first comparison document;

[0136] Obtain the standard verification value provided by the cloud for the upgrade package, open the first comparison document, and determine whether the standard verification value is consistent with the first actual verification value in the first comparison document;

[0137] If the standard verification value is consistent with the first actual verification value, it is determined that the upgrade package has not been tampered with or damaged;

[0138] If the standard verification value is inconsistent with the first actual verification value, place the upgrade package in the second storage location, use the second computing tool to calculate the second actual verification value of the upgrade package in the second storage location, and copy the second actual verification value to the second comparison document;

[0139] Open the second comparison document and compare whether the standard verification value is consistent with the second actual verification value in the second comparison document;

[0140] If the standard verification value is consistent with the second actual verification value, it is determined that the upgrade package has not been tampered with or damaged; if the standard verification value is partially inconsistent with the second actual verification value, it is determined that the upgrade package is damaged; if the standard verification value is completely inconsistent with the second actual verification value, it is determined that the upgrade package has been tampered with.

[0141] The terminal device application upgrade device of the present invention may further include:

[0142] An installation module, for directly upgrading the container image based on the upgrade information if the application to be upgraded is a container image, the edge node is a control node, and the terminal device to be upgraded is a cluster composed of container nodes.

[0143] As Figure 5 shown, the terminal device application upgrade device provided by the present invention for the terminal device to be upgraded includes:

[0144] A second receiving module, for receiving the upgrade information sent by the edge node;

[0145] An upgrade module, for upgrading the application to be upgraded based on the upgrade information by using a lightweight proxy.

[0146] The upgrade module of the present invention can specifically be used for:

[0147] Verifying the upgrade information;

[0148] If the upgrade information passes the verification, upgrading the application to be upgraded based on the upgrade information;

[0149] Among them, verifying the upgrade information includes, but is not limited to: determining whether the upgrade content in the upgrade information is consistent with the actual environment of the terminal device to be upgraded, determining whether the digital twin model of the terminal device to be upgraded is consistent with the configuration information of the terminal device to be upgraded, and determining whether the upgrade program package has been tampered with and damaged.

[0150] The upgrade module of the present invention can specifically be used for:

[0151] Obtaining the resource occupancy rate of the terminal device to be upgraded;

[0152] When the resource occupancy rate is lower than a preset threshold, upgrading the application to be upgraded based on the upgrade information.

[0153] The upgrade module of the present invention can specifically be used for:

[0154] Backing up the parameter configuration file of the application to be upgraded;

[0155] Installing the upgrade program package in the upgrade information;

[0156] Overwriting the backed-up parameter configuration file to a specified directory;

[0157] Performing restart control on the upgraded application according to the restart rule in the upgrade information.

[0158] It should be noted that the terminal device application upgrade device provided by the present invention, when specifically running, can execute the terminal device application upgrade method of any of the above embodiments, and this embodiment will not be elaborated herein.

[0159] Figure 6It is a schematic structural diagram of the electronic device provided by the present invention. As Figure 6 shown, the electronic device may include: a processor, a communications interface, a memory, and a communication bus. Among them, the processor, the communications interface, and the memory complete mutual communication through the communication bus. The processor can call the logical instructions in the memory to execute the method for upgrading the application of the terminal device. The method includes: receiving the upgrade information sent by the cloud; updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronize the configuration information of the digital twin model to the terminal device to be upgraded; send the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded.

[0160] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0161] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method for upgrading the application of the terminal device provided in the above-mentioned various embodiments. The method includes: receiving the upgrade information sent by the cloud; updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronize the configuration information of the digital twin model to the terminal device to be upgraded; send the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded.

[0162] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the terminal device application upgrade method provided in the above embodiments. The method includes: receiving upgrade information sent from the cloud; updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; if the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronizing the configuration information of the digital twin model to the terminal device to be upgraded; sending the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded.

[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for upgrading an application of a terminal device, which is applied to an edge node where the terminal device to be upgraded is located, and is characterized in that Including: Receiving the upgrade information sent from the cloud; Updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; If the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, synchronizing the configuration information of the digital twin model to the terminal device to be upgraded; Sending the upgrade information to the lightweight agent of the terminal device to be upgraded, so that the lightweight agent upgrades the application to be upgraded of the terminal device to be upgraded; Among them, the lightweight agent is a lightweight resident application running on the terminal device, mainly solving the problems of inconsistent interfaces of heterogeneous terminals and difficult management and control. The lightweight agent realizes a unified external opening interface by shielding the differential details of heterogeneous terminals; by establishing a network connection of the control plane with the edge node, it can detect the running state of the terminal device and report it to the edge node without affecting the normal operation of the terminal device and ensuring the security policy, and at the same time receive the task requests of the edge node for autonomous processing.

2. The method for upgrading an application of a terminal device according to claim 1, wherein After updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information, the method further includes: If the terminal device to be upgraded is normal, sending the upgrade information to the lightweight agent.

3. The method for upgrading an application of a terminal device according to claim 1, wherein Updating the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information includes: Verifying the upgrade information; If the upgrade information passes the verification, updating the configuration information of the digital twin model according to the upgrade information; Among them, verifying the upgrade information includes, but is not limited to: excluding non-local terminal devices in the upgrade information, judging whether the upgrade program package in the upgrade information is suitable for the terminal device to be upgraded, judging whether the terminal device to be upgraded has installed the application to be upgraded, judging whether the current version of the application to be upgraded is lower than the version of the upgrade program package, judging whether the application to be upgraded is compatible with the upgrade program package, judging whether the upgrade program package has been tampered with and damaged.

4. The method for upgrading an application of a terminal device according to claim 3, wherein Judging whether the upgrade program package has been tampered with and damaged includes: Placing the upgrade program package at the first storage location, using the first computing tool to calculate the first actual check value of the upgrade program package at the first storage location, and copying the first actual check value to the first comparison document; Obtaining the standard check value provided by the cloud for the upgrade program package, opening the first comparison document, and judging whether the standard check value is consistent with the first actual check value in the first comparison document; If the standard check value is consistent with the first actual check value, it is determined that the upgrade program package has not been tampered with and damaged; If the standard check value is inconsistent with the first actual check value, placing the upgrade program package at the second storage location, using the second computing tool to calculate the second actual check value of the upgrade program package at the second storage location, and copying the second actual check value to the second comparison document; Opening the second comparison document, comparing whether the standard check value is consistent with the second actual check value in the second comparison document; If the standard verification value is consistent with the second actual verification value, it is determined that the upgrade package has not been tampered with or damaged; if the standard verification value is partially inconsistent with the second actual verification value, it is determined that the upgrade package is damaged; if the standard verification value is completely inconsistent with the second actual verification value, it is determined that the upgrade package has been tampered with.

5. The method for upgrading an application of a terminal device according to claim 1, wherein If the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal and the configuration information of the digital twin model is synchronized to the terminal device to be upgraded, the method further includes: If the application to be upgraded is a container image, the edge node is a control node, and the terminal device to be upgraded is a cluster composed of container nodes, directly upgrade the container image based on the upgrade information.

6. A method for upgrading an application of a terminal device, which is applied to the terminal device to be upgraded, and is characterized in that, Including: Receiving upgrade information sent by an edge node; The upgrade information is sent by the edge node after synchronizing the configuration information of the digital twin model of the terminal device to be upgraded to the terminal device to be upgraded after the terminal device to be upgraded returns to normal; the configuration information of the digital twin model is updated by the edge node according to the upgrade information after receiving the upgrade information sent by the cloud. Using a lightweight proxy to upgrade the application to be upgraded based on the upgrade information; Among them, the lightweight proxy is a lightweight resident application running on the terminal device, mainly solving the problems of inconsistent interfaces of heterogeneous terminals and difficult management and control. The lightweight proxy realizes a unified external interface by shielding the differential details of heterogeneous terminals; by establishing a network connection of the control plane with the edge node, it can detect the running state of the terminal device and report it to the edge node without affecting the normal operation of the terminal device and ensuring the security policy, and at the same time receive the task request of the edge node for autonomous processing.

7. The method for upgrading an application of a terminal device according to claim 6, wherein The upgrading the application to be upgraded based on the upgrade information includes: Verifying the upgrade information; If the upgrade information passes the verification, upgrade the application to be upgraded based on the upgrade information; Among them, the verifying the upgrade information includes, but is not limited to: judging whether the upgrade content in the upgrade information is consistent with the actual environment of the terminal device to be upgraded, judging whether the digital twin model of the terminal device to be upgraded is consistent with the configuration information of the terminal device to be upgraded, and judging whether the upgrade package in the upgrade information has been tampered with or damaged.

8. The method for upgrading an application of a terminal device according to claim 6, wherein The upgrading the application to be upgraded based on the upgrade information includes: Obtaining the resource occupancy rate of the terminal device to be upgraded; When the resource occupancy rate is lower than a preset threshold, upgrade the application to be upgraded based on the upgrade information.

9. The method for upgrading an application of a terminal device according to claim 6, wherein The upgrading the application to be upgraded based on the upgrade information includes: Backing up the parameter configuration file of the application to be upgraded; Installing the upgrade package in the upgrade information; Overwriting the backed-up parameter configuration file to a specified directory; Restarting and controlling the upgraded application according to the restart rule in the upgrade information.

10. A terminal device application upgrade device, which is applied to an edge node where the terminal device to be upgraded is located, and is characterized in that, Including: A first receiving module, configured to receive the upgrade information sent by the cloud; An update module, configured to update the configuration information of the digital twin model of the to-be-upgraded terminal device according to the upgrade information; A synchronization module, configured to, if the to-be-upgraded terminal device is abnormal, synchronize the configuration information of the digital twin model to the to-be-upgraded terminal device after the to-be-upgraded terminal device returns to normal; A distribution module, configured to distribute the upgrade information to the lightweight agent of the to-be-upgraded terminal device, so that the lightweight agent upgrades the to-be-upgraded application of the to-be-upgraded terminal device; Wherein, the lightweight agent is a lightweight resident application running on the terminal device, mainly solving the problems of inconsistent interfaces of heterogeneous terminals and difficult management and control. The lightweight agent realizes a unified external open interface by shielding the differential details of heterogeneous terminals; by establishing a network connection of the control plane with the edge node, it can detect the running state of the terminal device and report it to the edge node without affecting the normal operation of the terminal device and ensuring the security policy, and at the same time receive the task request of the edge node for autonomous processing.

11. A terminal device application upgrade device, applied to a terminal device to be upgraded, characterized in that, Including: A second receiving module, configured to receive the upgrade information sent by the edge node; The upgrade information is sent by the edge node after synchronizing the configuration information of the digital twin model of the to-be-upgraded terminal device to the to-be-upgraded terminal device after the to-be-upgraded terminal device returns to normal; the configuration information of the digital twin model is updated by the edge node according to the upgrade information after receiving the upgrade information sent by the cloud; An upgrade module, configured to use the lightweight agent to upgrade the to-be-upgraded application based on the upgrade information; Wherein, the lightweight agent is a lightweight resident application running on the terminal device, mainly solving the problems of inconsistent interfaces of heterogeneous terminals and difficult management and control. The lightweight agent realizes a unified external open interface by shielding the differential details of heterogeneous terminals; by establishing a network connection of the control plane with the edge node, it can detect the running state of the terminal device and report it to the edge node without affecting the normal operation of the terminal device and ensuring the security policy, and at the same time receive the task request of the edge node for autonomous processing.

12. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the terminal device application upgrade method according to any one of claims 1 to 9.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the terminal device application upgrade method according to any one of claims 1 to 9.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the terminal device application upgrade method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • End platform upgrading method and system corresponding to energy storage equipment

    CN114385201A

  • Edge node application updating method and device

    CN114697308A