Terminal equipment application upgrading method and device, electronic equipment and storage medium

By receiving and updating the digital twin model configuration information of the terminal device at the edge node and using lightweight agents for application upgrades, the problem of low upgrade efficiency caused by abnormal terminal device status is solved, and efficient terminal device application upgrades are achieved.

CN120045211AActive Publication Date: 2025-05-27INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When upgrading a large number of heterogeneous terminal devices, there is an abnormal state of the terminal device, which makes it impossible to complete the upgrade. The traditional upgrade method requires the upgrade process to restart after the device state returns to normal, which is inefficient.

Method used

By receiving upgrade information sent from the cloud at the edge node, updating the digital twin model configuration information of the terminal device, and synchronizing the configuration information after the device returns to normal, and using a lightweight agent to upgrade the application.

Benefits of technology

It improves the upgrade efficiency of terminal device applications, avoids duplication of upgrade processes caused by abnormal device status, realizes a unified open interface to heterogeneous terminal devices, and reduces the complexity of upgrade management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045211A_ABST
    Figure CN120045211A_ABST
Patent Text Reader

Abstract

The invention provides a terminal equipment application upgrading method and device, electronic equipment and a storage medium, and belongs to the technical field of software upgrading. Updating configuration information of a digital twin model of the to-be-upgraded terminal equipment according to the upgrading information; if the to-be-upgraded terminal equipment is abnormal, after the to-be-upgraded terminal equipment returns to normal, synchronizing the configuration information of the digital twin model to the to-be-upgraded terminal equipment; and issuing the upgrading information to the lightweight agent of the to-be-upgraded terminal equipment, so that the lightweight agent upgrades the to-be-upgraded application of the to-be-upgraded terminal equipment. When the terminal equipment is upgraded again after being recovered to be normal, the upgrading process does not need to be restarted to update the configuration information of the terminal equipment, so that the application upgrading efficiency of the terminal equipment is improved; in addition, the difference of heterogeneous terminal equipment can be shielded through the lightweight agent, and the problem that terminal equipment application upgrading management is difficult due to terminal equipment heterogeneity and application diversification is solved.
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 relates 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 is a situation 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 upgrade processes 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: Receiving 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, 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.

[0005] 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: If the terminal device to be upgraded is normal, sending the upgrade information to the lightweight agent.

[0006] 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: 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, 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.

[0007] According to a terminal device application upgrade method provided by the present invention, the determination of whether the upgrade package has been tampered with or damaged includes: Place the upgrade package at 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; 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; 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; If the standard check value is inconsistent with the first actual check value, place the upgrade package at 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; 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; 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.

[0008] According to a terminal device application upgrade method 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: 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.

[0009] The present invention also provides a method for upgrading applications of a terminal device, which is applied to the terminal device to be upgraded and includes: Receiving the upgrade information sent by the edge node; Using a lightweight proxy to upgrade the application to be upgraded based on the upgrade information.

[0010] According to the method for upgrading applications of a terminal device provided by the present invention, upgrading the application to be upgraded based on the upgrade information includes: Verifying the upgrade information; If the upgrade information passes the verification, upgrading the application to be upgraded based on the upgrade information; 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 and damaged.

[0011] According to the method for upgrading applications of a terminal device provided by the present invention, 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, upgrading the application to be upgraded based on the upgrade information.

[0012] According to the method for upgrading applications of a terminal device provided by the present invention, 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 program package in the upgrade information; Overwriting the backed-up parameter configuration file to a specified directory; Performing restart control on the upgraded application according to the restart rule in the upgrade information.

[0013] The present invention also provides a device for upgrading applications of a terminal device, which is applied to the edge node where the terminal device to be upgraded is located and includes: 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 terminal device to be upgraded according to the upgrade information; 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; A distribution module, configured to distribute 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.

[0014] The present invention further provides a terminal device application upgrade device, which is applied to a terminal device to be upgraded and includes: A second receiving module, configured to receive the upgrade information sent by the edge node; An upgrade module, configured to use a lightweight agent to upgrade the application to be upgraded based on the upgrade information.

[0015] The present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the terminal device application upgrade method described in any one of the above.

[0016] The present invention further 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 implements the terminal device application upgrade method described in any one of the above.

[0017] The present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the terminal device application upgrade method described in any one of the above.

[0018] The terminal device application upgrade method, device, electronic device, and storage medium provided by the present invention update the configuration information of the terminal device digital twin model 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 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 agent can shield the differences of heterogeneous terminal devices, and the consistency operation of application upgrade is realized through a 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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.

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

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

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

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

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

[0025] Figure 6 It is the structural schematic diagram of the electronic device provided by the present invention. Detailed implementation manners

[0026] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying 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 based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0027] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant 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 expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the phrase "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 of the present invention. Unless otherwise clearly defined and limited, the terms "mount", "connect" and "couple" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediate medium, and it may 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.

[0028] 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 usually of the same category, and the number of objects is not limited. 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 indicates an "or" relationship between the associated objects before and after.

[0029] The following will describe Figures 1-6 the method, device, electronic device, and storage medium for application upgrade of the terminal device provided by the present invention.

[0030] The present invention first provides a terminal device application upgrade system, as Figure 1 shown. The system includes a cloud, multiple edge nodes, and multiple 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.

[0031] Among them, the edge node is a server running in a certain area, which is used to manage the terminal devices in its area, communicate with the cloud, report the data of local terminal devices to the cloud, and receive tasks issued by the cloud. The terminal device is an independent device scattered in different areas, such as smart devices, dedicated devices, etc. The terminal device does not directly communicate with the cloud and is managed by the edge node where it is located.

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

[0033] Edge nodes are mainly used to cooperate with the cloud to jointly manage local terminal devices, including receiving application upgrade tasks sent by 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, sharing the access pressure on the cloud in the case of massive terminal device access. Edge nodes are mainly deployed in independent and secure areas such as workshops and industrial parks, which can further ensure data security and reduce the risk of sensitive data leakage.

[0034] Edge nodes have digital twin models of each terminal device in the area where they are located. 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 a proxy program installed on the terminal device, used to interact with the edge node and manage 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 model also stores the historical records of application upgrades, enabling traceability and rollback of the upgrade process.

[0035] The lightweight agent runs on the terminal device. On the one hand, it monitors the operation 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.

[0036] Through the collaborative mechanism of the cloud-edge-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 between devices and applications caused by traditional separate management of devices and applications, ensuring the correctness of application upgrade operations.

[0037] Before upgrading the application to be upgraded on the upgrading terminal device, the cloud first formulates an upgrade plan, which includes a description of the specific requirements for the application upgrade, including the list of target terminal devices, the upgraded application, the specific version, and the upgrade time, etc. Before formulating the upgrade plan, it is necessary to first create the application to be upgraded on the cloud, including information such as the 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 according to the upgrade requirement description through the network.

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

[0039] Step S1, receive the upgrade information sent by the cloud.

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

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

[0042] 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, the parameter configuration, etc.

[0043] 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.

[0044] Among them, the abnormality of the terminal device to be upgraded includes the offline of the terminal device to be upgraded, and at this time, the upgrade cannot be completed. The return to normal of the terminal device to be upgraded includes the return to online of the terminal device to be upgraded. 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.

[0045] 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.

[0046] Among them, the lightweight proxy 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 proxy 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 the security policy, and at the same time receive the task request of the edge node for autonomous processing.

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

[0048] Step S5, receiving the upgrade information sent by the edge node; Step S6, using the lightweight proxy to upgrade the application to be upgraded based on the upgrade information.

[0049] As can be seen from the above, the terminal device application upgrade method of the present invention updates the configuration information of the terminal device digital twin model according to the upgrade information when the current upgrade of the terminal device application is abnormal, and synchronizes 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 differences of heterogeneous terminal devices can be shielded through the lightweight proxy, and the consistent 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.

[0050] 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: If the terminal device to be upgraded is normal, the upgrade information is sent to the lightweight proxy.

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

[0052] In some embodiments, step S2 of the present invention may further include: Verifying the upgrade information; If the upgrade information passes the verification, the configuration information of the digital twin model is updated 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, 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.

[0053] Among them, the purpose of the edge node verifying the upgrade information is to determine whether the application upgrade task request is legal. Specifically, the list of target terminal devices in the upgrade task content can be checked, and non-locally managed terminal devices can be excluded from the list; determine whether the upgrade package in the upgrade information is compatible with the terminal device to be upgraded, specifically, determine whether the hardware, operating system, driver, etc. of the terminal device to be upgraded support the upgrade package; perform integrity verification on the upgrade package to check whether it has been tampered with or 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 package to the cloud.

[0054] The edge node verifying the upgrade information can ensure the success of the application upgrade and avoid upgrade failures.

[0055] In some embodiments, when the present invention determines whether the upgrade package has been tampered with or damaged, it may further include: Place the upgrade package in the first storage location, use the first computing tool to calculate the first actual check value of the upgrade package in the first storage location, and copy the first actual check value to the first comparison document; 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; 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; If the standard check value is inconsistent with the first actual check value, place the upgrade package in the second storage location, use the second computing tool to calculate the second actual check value of the upgrade package in the second storage location, and copy the second actual check value to the second comparison document; 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; 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.

[0056] Among them, when the standard verification value is consistent with the first actual verification value, it means that the first verification is passed, proving that the upgrade package has not been tampered with or damaged; when the standard verification value is inconsistent with the first actual verification value, it means that the first verification fails. The reason may be that the upgrade package has been tampered with or damaged, or the first verification is incorrect, including verification failure due to abnormal storage location of the upgrade package or abnormal calculation tool used. It is necessary to perform repeated verification through the second verification, using a new storage location and a new calculation tool.

[0057] If the standard verification value is consistent with the second actual verification value, it means that the first verification is incorrect and the second verification is passed. 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 greater.

[0058] The present invention can eliminate the possibility of single verification failure due to abnormal storage location of the upgrade package or abnormal calculation tool used through the verification of two verification values, improve the reliability of judging whether the upgrade package has been tampered with or damaged, and 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 after two verification failures, and can determine the specific problems of the upgrade package.

[0059] In some embodiments, after step S3, the terminal device application upgrade method of the present invention may further include: 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.

[0060] Most applications of the present invention need to be upgraded through a lightweight proxy. For example, in a 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 mirror installation. For container image applications, if the edge node is used as the container cluster control node and the terminal device is used as a container node in a small container cluster, 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.

[0061] In this way, when the application to be upgraded is a container image, the edge node can directly perform the upgrade without passing through a lightweight proxy, which can improve the upgrade management efficiency of container applications.

[0062] In some embodiments, in step S6 of the present invention, upgrading the application to be upgraded based on the upgrade information may further include: Verifying the upgrade information; If the upgrade information passes the verification, upgrading the application to be upgraded based on the upgrade information; 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.

[0063] 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, mainly verifying 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.

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

[0065] 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.

[0066] To reduce the impact of application upgrade on the business of the terminal device, in step S6, upgrading the application to be upgraded based on the upgrade information may further include: Obtaining the resource occupancy rate of the terminal device to be upgraded; When the resource occupancy rate is lower than the preset threshold, upgrading the application to be upgraded based on the upgrade information.

[0067] Among them, the resource occupancy rate of the terminal device to be upgraded being lower than the preset threshold means that the resource occupancy rate of the terminal device to be upgraded is low, and upgrading at this time can reduce the impact on the business of the terminal device.

[0068] In some embodiments, in step S6 of the present invention, upgrading the application to be upgraded based on the upgrade information may further include: Back up the parameter configuration file of the application to be upgraded; Install the upgrade package in the upgrade information; Overwrite the backed-up parameter configuration file to the specified directory; Perform restart control on the upgraded application according to the restart rule in the upgrade information.

[0069] Specifically, when the lightweight proxy upgrades the application, 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, restart control is performed 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.

[0070] 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: 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 terminal device to be upgraded according to the upgrade information; A synchronization module, configured to 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 if the terminal device to be upgraded is abnormal; 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.

[0071] The sending module of the present invention may also be used for: If the terminal device to be upgraded is normal, send the upgrade information to the lightweight proxy.

[0072] The update module of the present invention may specifically be used for: Verify the upgrade information; If the upgrade information passes the verification, update 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, 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.

[0073] The update module of the present invention can also be used for: Place the upgrade package in the first storage location, use the first computing tool to calculate the first actual check value of the upgrade package in the first storage location, and copy the first actual check value to the first comparison document; 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; 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; If the standard check value is inconsistent with the first actual check value, place the upgrade package in the second storage location, use the second computing tool to calculate the second actual check value of the upgrade package in the second storage location, and copy the second actual check value to the second comparison document; 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; 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.

[0074] The terminal device application upgrade device of the present invention may further include: An installation module, which is used to directly upgrade 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.

[0075] As Figure 5 shown, the terminal device application upgrade device provided by the present invention for the terminal device to be upgraded includes: A second receiving module, which is used to receive the upgrade information sent by the edge node; An upgrade module, which is used to upgrade the application to be upgraded based on the upgrade information by using a lightweight proxy.

[0076] The upgrade module of the present invention can specifically be used for: Verifying the upgrade information; If the upgrade information verification passes, upgrade the application to be upgraded based on the upgrade information; 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.

[0077] The upgrade module of the present invention can be specifically used for: Obtain the resource occupancy rate of the terminal device to be upgraded; When the resource occupancy rate is lower than the preset threshold, upgrade the application to be upgraded based on the upgrade information.

[0078] The upgrade module of the present invention can be specifically used for: Back up the parameter configuration file of the application to be upgraded; Install the upgrade package in the upgrade information; Overwrite the backed-up parameter configuration file to the specified directory; Perform restart control on the upgraded application according to the restart rule in the upgrade information.

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

[0080] Figure 6 It is a schematic structural diagram of an electronic device provided by the present invention. As Figure 6 shown, the electronic device may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The processor can call the logical instructions in the memory to execute the terminal device application upgrade method, which 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.

[0081] In addition, when the logical instructions in the above-mentioned memory can be 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 the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can 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 aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0082] 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 terminal device application upgrade method provided in each of 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.

[0083] On 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 each of 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.

[0084] 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 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 efforts.

[0085] 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 essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This 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.

[0086] 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 recorded in the foregoing embodiments or equivalently replace 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 terminal device application upgrade method, applied to an edge node where the terminal device to be upgraded is located, characterized in that: include: Receive 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, the configuration information of the digital twin model is synchronized to the terminal device to be upgraded; The upgrade information is sent 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.

2. The terminal device application upgrade method according to claim 1, characterized in that: 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, the upgrade information is sent to the lightweight agent.

3. The terminal device application upgrade method according to claim 1, characterized in that: The updating of 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 verification passes, updating the configuration information of the digital twin model according to the upgrade information; Among them, the verification of the upgrade information includes but is not limited to: excluding non-local terminal devices in the upgrade information, judging whether the upgrade package in the upgrade information is compatible with 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 package, judging whether the application to be upgraded is compatible with the upgrade package, and judging whether the upgrade package has been tampered with and damaged.

4. The terminal device application upgrade method according to claim 3, characterized in that: The determining whether the upgrade program package has been tampered with or damaged includes: Placing the upgrade program package in a first storage location, using a first calculation tool to calculate a first actual verification value of the upgrade program package in the first storage location, and copying the first actual verification value to a first comparison document; Obtaining a standard check value provided by the cloud for the upgrade program package, opening the first comparison document, and determining 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 or damaged; If the standard check value is inconsistent with the first actual check value, placing the upgrade program package in a second storage location, using a second calculation tool to calculate a second actual check value of the upgrade program package in the second storage location, and copying the second actual check value to a second comparison document; Opening the second comparison document, and comparing whether the standard verification value is consistent with the second actual verification 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 program 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 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.

5. The terminal device application upgrade method according to claim 1, characterized in that: If the terminal device to be upgraded is abnormal, after the terminal device to be upgraded returns to normal, the configuration information of the digital twin model is synchronized to the terminal device to be upgraded, and 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, the container image is upgraded directly based on the upgrade information.

6. A terminal device application upgrade method, applied to a terminal device to be upgraded, characterized in that: include: Receive upgrade information sent by edge nodes; A lightweight agent is used to upgrade the application to be upgraded based on the upgrade information.

7. The terminal device application upgrade method according to claim 6, characterized in that: The upgrading the application to be upgraded based on the upgrade information includes: Verifying the upgrade information; If the upgrade information is verified, the application to be upgraded is upgraded based on the upgrade information; Among them, the verification of 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 in the upgrade information is tampered with and damaged.

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

9. The terminal device application upgrade method according to claim 6, characterized in that: 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; Install the upgrade package in the upgrade information; Overwrite the backed up parameter configuration file to the specified directory; Restart control is performed on the upgraded application according to the restart rule in the upgrade information.

10. A terminal device application upgrade device, applied to an edge node where the terminal device to be upgraded is located, characterized in that: include: A first receiving module, used to receive upgrade information sent from the cloud; An updating module, used to update the configuration information of the digital twin model of the terminal device to be upgraded according to the upgrade information; A synchronization module, configured to 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 if the terminal device to be upgraded is abnormal; The sending module is used to 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.

11. A terminal device application upgrade device, applied to a terminal device to be upgraded, characterized in that: include: The second receiving module is used to receive the upgrade information sent by the edge node; The upgrade module is used to upgrade the application to be upgraded based on the upgrade information by using a lightweight agent.

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

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

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

Citation Information

Patent Citations

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

    CN114385201A

  • Edge node application updating method and device

    CN114697308A

  • Edge application SOTA upgrading method under cloud edge collaboration strategy

    CN116431188A

  • Software upgrading method and system based on information security

    CN117270915A

  • Containerized modeling of device updates or modifications via digital twinning

    CN117785435A