Equipment upgrading method and device, computer equipment and storage medium

Through the device upgrade manager, it continuously sends update notifications in the message queue of the container orchestration system, which solves the problem that industrial computers or automotive equipment cannot be updated in time when the network is unstable, and realizes timely updates and in various network situations Upgrade improves the service life of the equipment and upgrade reliability.

CN119149073APending Publication Date: 2024-12-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411396587.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When the network of industrial computers or automotive equipment is unstable, the update notification cannot be received in a timely manner, resulting in the inability to update in time or missed updates, reducing the use cycle of the equipment.

Method used

Through the device upgrade manager, use the message queue of the container orchestration system to continuously send update notification information until the upgraded device is received. When the system status of the device allows update, it judges and downloads the upgrade package to ensure that the device is in various network situations. All can receive update notifications in a timely manner and complete upgrades.

Benefits of technology

Ensure that the device will not miss update notifications under any network situation, be able to complete updates in a timely manner, improve the service cycle of the device, and improve the reliability and success rate of the upgrade through completeness checksum real-time monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149073A_ABST
    Figure CN119149073A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses an equipment upgrading method and device, computer equipment and a storage medium, and the method comprises the steps that updating notification information sent by an equipment upgrading manager is received, and the equipment upgrading manager receives an upgrading package of to-be-upgraded equipment and sends the upgrading package to the to-be-upgraded equipment; sending update notification information to the to-be-upgraded equipment through a message queue of the container arrangement system, wherein the message queue continuously sends the update notification information until the to-be-upgraded equipment receives the update notification information; determining an upgrade package version number and a download path of the upgrade package based on the update notification information; acquiring a system state and a current version number of the to-be-upgraded equipment; under the condition that the system state of the to-be-upgraded equipment is update-allowed, judging whether the version number of the upgrade package is superior to the current version number or not; if the version number of the upgrade package is superior to the current version number, downloading the upgrade package of the to-be-upgraded equipment based on the downloading path of the upgrade package; and completing the upgrade of the to-be-upgraded equipment based on the upgrade package. The service life of the equipment is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a device upgrading method, device, computer equipment and storage medium. Background Art

[0002] As the times change, the scope of information circulation expands, and information systems are also facing the same situation. In order to increase the service life of industrial computers or automotive equipment, they need to be upgraded frequently.

[0003] In the related art, the upgrade of industrial computers or automotive equipment is often achieved through Over-The-Air Technology (OTA). Specifically, after the OTA server obtains the upgrade package of the industrial computer or automotive equipment, it sends an update notification to the industrial computer or automotive equipment, so that the industrial computer or automotive equipment downloads the upgrade package according to the update notification to complete the upgrade.

[0004] However, when the network of industrial computers or automotive equipment is unstable, if the OTA server sends an update notification, the industrial computer or automotive equipment is very likely to not receive the update notification, and after the industrial computer or automotive equipment restores the network, it is impossible to know that the OTA server has sent the update notification, resulting in failure to update in time or missed updates, which reduces the service life of the industrial computer or automotive equipment. Summary of the invention

[0005] In view of this, the present invention provides an equipment upgrade method, device, computer equipment and storage medium to solve the problem in the related technology that when the network of industrial computers or automotive equipment is unstable, update notifications cannot be received in time, and after the network is restored, it is impossible to know that the update notification has been sent, resulting in failure to update in time or missed updates, thereby reducing the service life of industrial computers or automotive equipment.

[0006] In a first aspect, the present invention provides a device upgrading method, the method comprising:

[0007] Receiving update notification information sent by a device upgrade manager, wherein the device upgrade manager sends the update notification information to the device to be upgraded through a message queue of a container orchestration system when receiving an upgrade package of the device to be upgraded, and the message queue continues to send the update notification information until the device to be upgraded receives the update notification information;

[0008] Based on the update notification information, determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded;

[0009] Get the system status and current version number of the device to be upgraded;

[0010] When the system status of the device to be upgraded is that the upgrade is allowed, determining whether the upgrade package version number of the device to be upgraded is better than the current version number;

[0011] If the version number of the upgrade package of the device to be upgraded is better than the current version number, downloading the upgrade package of the device to be upgraded from the device upgrade manager based on the download path of the upgrade package;

[0012] The upgrade of the device to be upgraded is completed based on the upgrade package.

[0013] The device upgrade method provided in this embodiment receives update notification information sent by the device upgrade manager. The update notification information is sent by the device upgrade manager to the device to be upgraded through the message queue of the container orchestration system until the device to be upgraded receives it. This ensures that the update notification information can be received regardless of whether the network of the device to be upgraded is stable or unstable. Based on the update notification information, the upgrade package version number and the download path of the upgrade package of the device to be upgraded are determined. When the system status of the device to be upgraded is to allow updates, if the upgrade package version number is better than the current version number, the upgrade package of the device to be upgraded is obtained based on the upgrade package download path, and the upgrade of the device to be upgraded is completed based on the upgrade package. It is ensured that the device to be upgraded will not miss the update notification under various network conditions, and the update of the device to be upgraded can be completed in time, thereby improving the service life of the device.

[0014] In an optional implementation, completing the upgrade of the device to be upgraded based on the upgrade package includes:

[0015] Performing integrity check on the upgrade package;

[0016] If the integrity check of the upgrade package passes, completing the upgrade of the device to be upgraded based on the upgrade package;

[0017] In the case that the integrity check of the upgrade package fails, upgrade package exception information is sent, so that the user performs upgrade package exception processing based on the upgrade package exception information.

[0018] The device upgrade method provided in this embodiment can effectively prevent upgrade failures caused by data loss or damage during transmission by performing integrity check on the upgrade package before completing the upgrade of the device to be upgraded based on the upgrade package, thereby ensuring the accuracy of the upgrade package and improving the reliability and success rate of the upgrade of the device to be upgraded. By sending upgrade package exception information in a timely manner when the integrity check of the upgrade package fails, it helps users quickly locate the exception and solve the exception, reducing maintenance costs and time and improving the upgrade efficiency of the device to be upgraded.

[0019] In an optional implementation, the performing integrity check on the upgrade package includes:

[0020] Obtaining, from the device upgrade manager, a secure hash value of the upgrade package and a first hash function used to generate the secure hash value;

[0021] Based on the first hash function, selecting a target hash function that is the same as the first hash function from a preset hash function library;

[0022] Or, based on the first Hash function, setting a target Hash function for data processing by a preset Hash calculation tool to be consistent with the first Hash function;

[0023] Read the content in the upgrade package;

[0024] Taking the content in the upgrade package as input, calling the target hash function to process the content in the upgrade package to obtain a target hash value;

[0025] Or, input the content in the upgrade package into a preset hash calculation tool to obtain a target hash value output by the preset hash calculation tool;

[0026] Compare the target hash value with the secure hash value to obtain a comparison result;

[0027] If the comparison result is that the target hash value is consistent with the secure hash value, determining that the integrity check of the upgrade package passes;

[0028] When the comparison result is that the target hash value is inconsistent with the secure hash value, it is determined that the integrity check of the upgrade package has failed.

[0029] The device upgrade method provided in this embodiment determines whether the integrity check of the upgrade package passes through the comparison result of the security hash value and the target hash value, and further determines whether the content of the upgrade package is tampered with or damaged during the transmission or download process. This can effectively prevent upgrade failures caused by data loss or damage during the transmission process, ensure the accuracy of the upgrade package, and improve the reliability and success rate of the upgrade of the device to be upgraded.

[0030] In an optional embodiment, the method further includes:

[0031] During the upgrade process of the device to be upgraded, the upgrade status of the device to be upgraded is monitored in real time, and the upgrade status of the device to be upgraded acquired in real time is recorded in the message queue of the container orchestration system, so as to be fed back to the device upgrade manager, so that the device upgrade manager obtains the system status and version number of the device to be upgraded after the upgrade according to the upgrade status of the device to be upgraded, and updates the system status and version number of the device to be upgraded previously stored based on the system status and version number of the device to be upgraded after the upgrade.

[0032] The device upgrade method provided in this embodiment continuously monitors the upgrade status of the device to be upgraded during the upgrade process to ensure that any abnormality or progress change in the upgrade process can be immediately captured and recorded, thereby providing transparency of the upgrade status. Once the upgrade fails or an abnormality occurs, the problem can be quickly located, diagnosed and repaired, thereby improving the reliability of the upgrade of the device to be upgraded.

[0033] In an optional embodiment, the method further includes:

[0034] Acquire the upgrade status of the device to be upgraded from the message queue of the container orchestration system, and perform function verification on the device to be upgraded when the upgrade status of the device to be upgraded is upgrade completed;

[0035] In the case that the function verification of the device to be upgraded passes, it is determined that the device to be upgraded is upgraded successfully, and information on the successful upgrade is sent, so that the user can determine that the device to be upgraded is upgraded successfully based on the information on the successful upgrade.

[0036] The device upgrade method provided in this embodiment determines whether the device to be upgraded is successfully upgraded by performing function verification after the device to be upgraded is upgraded, thereby ensuring the integrity and stability of the device functions after the upgrade. A clear upgrade success message is sent to the user so that the user can quickly confirm the device upgrade status.

[0037] In an optional embodiment, the method further includes:

[0038] In the case that the function verification of the device to be upgraded fails, it is determined that the upgrade of the device to be upgraded fails, and upgrade failure information is sent, so that the user determines that the upgrade of the device to be upgraded fails based on the upgrade failure information.

[0039] The device upgrade method provided in this embodiment notifies the user of the upgrade failure immediately when the function verification of the device to be upgraded fails, so that the user can quickly identify the problem, reduce waiting time, take countermeasures in time, and improve system stability.

[0040] In an optional implementation, before completing the upgrade of the device to be upgraded based on the upgrade package, the method further includes:

[0041] Backing up the target data of the device to be upgraded by using the container orchestration system, so that when the upgrade of the device to be upgraded fails, the backed-up target data of the device to be upgraded is used to restore the data of the device to be upgraded;

[0042] The target data is customized by the user based on the device to be upgraded.

[0043] The device upgrade method provided in this embodiment provides a safety net for the upgrade operation by automatically backing up the target data of the user-defined device before upgrading the device to be upgraded. Once the upgrade fails and causes data loss or damage, the backup data can be quickly used for recovery, reducing the risk of data loss and ensuring the upgrade safety of the device to be upgraded.

[0044] In a second aspect, the present invention provides a device for upgrading a device, the device comprising:

[0045] A receiving module, configured to receive update notification information sent by a device upgrade manager, wherein the device upgrade manager, when receiving an upgrade package of a device to be upgraded, sends the update notification information to the device to be upgraded through a message queue of a container orchestration system, and the message queue continues to send the update notification information until the device to be upgraded receives the update notification information;

[0046] A determination module, used to determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded based on the update notification information;

[0047] The acquisition module is used to obtain the system status and current version number of the device to be upgraded;

[0048] A judgment module, used to judge whether the upgrade package version number of the device to be upgraded is better than the current version number when the system status of the device to be upgraded is that the update is allowed;

[0049] A download module, configured to download the upgrade package of the device to be upgraded from the device upgrade manager based on the download path of the upgrade package when the version number of the upgrade package of the device to be upgraded is better than the current version number;

[0050] An upgrade module is used to complete the upgrade of the device to be upgraded based on the upgrade package.

[0051] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the device upgrade method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0052] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the device upgrade method of the first aspect or any corresponding embodiment thereof.

[0053] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the device upgrade method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 It is a schematic diagram of the process of upgrading equipment in the related art;

[0056] Figure 2 is a flow chart of a device upgrading method according to an embodiment of the present invention;

[0057] Figure 3 is a schematic diagram of a process for performing device upgrade according to an embodiment of the present invention;

[0058] Figure 4 is a schematic diagram of a process for an OTA server to determine to send update notification information according to an embodiment of the present invention;

[0059] Figure 5 is a flow chart of another device upgrading method according to an embodiment of the present invention;

[0060] Figure 6 is a structural block diagram of a device upgrading apparatus according to an embodiment of the present invention;

[0061] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0063] As the times change, the scope of information circulation has expanded, and information from all over the world can be received. The same situation is also faced in the field of information systems. In order to increase the service life of industrial computers or automotive equipment, industrial computers or automotive equipment need to be frequently upgraded to enhance functions, improve performance or fix vulnerabilities.

[0064] In the related art, upgrading is achieved by physically accessing industrial computers or automotive equipment. However, this method requires manpower to upgrade industrial computers or automotive equipment one by one, which is time-consuming and prone to human errors.

[0065] In order to ensure the reliability and security of the upgrade, the OTA technology is used to upgrade industrial computers or automotive equipment. This remote device upgrade reduces the need for physical connections, which not only shortens the upgrade time and improves the user experience, but also effectively reduces the labor cost and human errors of on-site personnel.

[0066] Figure 1 This is a flow chart of equipment upgrade in related technology. Figure 1 As shown, by registering the industrial computer or vehicle equipment connected to the OTA server with the OTA server, the OTA server can determine whether the industrial computer or vehicle equipment needs to be upgraded by comparing the version information of the upgrade package with the version information of the registered industrial computer or vehicle equipment after obtaining the upgrade package of any industrial computer or vehicle equipment. If upgrade is required, an update notification is sent to the industrial computer or vehicle equipment to be upgraded, so that the industrial computer or vehicle equipment to be upgraded downloads the upgrade package according to the update notification to complete the upgrade.

[0067] However, when the network of industrial computers or automotive equipment is unstable, if the OTA server sends an update notification, the industrial computer or automotive equipment is very likely to not receive the update notification, and after the industrial computer or automotive equipment restores the network, it is impossible to know that the OTA server has sent the update notification, resulting in failure to update in time or missed updates, which reduces the service life of the industrial computer or automotive equipment.

[0068] An embodiment of the present invention provides a device upgrade method, which receives update notification information sent by a device upgrade manager, where the update notification information is sent by the device upgrade manager to a device to be upgraded through a message queue of a container orchestration system, until the device to be upgraded receives it, thereby ensuring that the update notification information can be received regardless of whether the network of the device to be upgraded is stable or unstable, and then determining the upgrade package version number and the download path of the upgrade package of the device to be upgraded based on the update notification information, and when the system status of the device to be upgraded is to allow update, if the upgrade package version number is better than the current version number, obtaining the upgrade package of the device to be upgraded based on the upgrade package download path, and completing the upgrade of the device to be upgraded based on the upgrade package, so as to ensure that the device to be upgraded will not miss the update notification under various network conditions, and can complete the update of the device to be upgraded in time, thereby improving the service life of the device.

[0069] According to an embodiment of the present invention, an embodiment of a device upgrade method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] In this embodiment, a device upgrade method is provided, which can be used for devices to be upgraded, such as industrial computers, industrial computers (such as PLC, SCADA system, etc.) or vehicle equipment, etc. Figure 2 is a flow chart of a device upgrade method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0071] Step S201, receiving update notification information sent by the device upgrade manager.

[0072] When receiving the upgrade package of the device to be upgraded, the device upgrade manager sends update notification information to the device to be upgraded through the message queue of the container orchestration system. The message queue continues to send the update notification information until the device to be upgraded receives the update notification information.

[0073] The device upgrade manager is an OTA server, the container orchestration system is a container cluster management system (Kubernetes, abbreviated as K8S), and the message queue is a RabbitMQ message queue.

[0074] Figure 3 1 is a flow chart of performing device upgrade according to an embodiment of the present invention. Figure 3 As shown, when the device to be upgraded is connected to the OTA server, the device to be upgraded pushes its system status and current version number to the OTA server to realize the registration of the device to be upgraded in the OTA server.

[0075] After receiving the upgrade package of the device to be upgraded, the OTA server publishes the update notification information to the message queue of the container orchestration system to ensure the reliable delivery of the update notification information. The message queue will continue to send update notification information to the device to be upgraded until the device to be upgraded receives the update notification information.

[0076] The corresponding code for sending the update notification information to the message queue of the container orchestration system may be:

[0077] ConnectionFactory factory=new ConnectionFactory();

[0078] factory.setHost("localhost");

[0079] try(Connection connection=factory.newConnection();

[0080] Channel channel=connection.createChannel()){

[0081] channel.queueDeclare(QUEUE_NAME,false,false,false,null);

[0082] channel.basicPublish("",QUEUE_NAME,null,taskMessage.getBytes());

[0083] }

[0084] }

[0085] Figure 4 It is a schematic diagram of a process for an OTA server to determine to send update notification information according to an embodiment of the present invention.

[0086] like Figure 4 As shown, the OTA server receives the device online notification and determines whether the device is a new device, that is, an unregistered device. If the device is a new device, the device information is registered to the OTA server, that is, the current system status and version number of the device are registered to the OTA server. If the device is a registered device, the current system status and version number of the device registered to the OTA server are updated according to the current system status and version number of the device.

[0087] The OTA server obtains the upgrade package of any device and compares the version number of the upgrade package with the version number of the registered device to determine whether the device needs to be upgraded. If the version number of the upgrade package is the same as the version number of the registered device, it means that the registered device is the latest version and does not need to be upgraded. If the version number of the upgrade package is better than the version number of the registered device, it means that the device needs to be updated, and then an update notification message is sent to the device, that is, the version number of the upgrade package, i.e. the new version number and the download path of the upgrade package are sent to the device.

[0088] Step S202: Determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded based on the update notification information.

[0089] After receiving the update notification information, the device to be upgraded obtains the upgrade package version number and the download path of the upgrade package of the device to be upgraded according to the update notification information. It should be noted that the update notification information includes the upgrade package version number and the download path of the upgrade package of the device to be upgraded.

[0090] Step S203, obtaining the system status and current version number of the device to be upgraded.

[0091] The device to be upgraded obtains its own system status and current version number through a Java program to ensure the applicability of the upgrade package. For example, the Java program can be:

[0092] Properties properties=System.getProperties();

[0093] properties.getProperty("os.version")

[0094] Step S204: when the system status of the device to be upgraded is that the upgrade is allowed, it is determined whether the upgrade package version number of the device to be upgraded is better than the current version number.

[0095] Among them, judging whether the version number of the upgrade package of the device to be upgraded is better than the current version number is essentially judging whether the upgrade package of the device to be upgraded is more advanced than the current device to be upgraded.

[0096] Step S205 , when the version number of the upgrade package of the device to be upgraded is better than the current version number, the upgrade package of the device to be upgraded is downloaded from the device upgrade manager based on the download path of the upgrade package.

[0097] The upgrade package version number of the device to be upgraded is better than the current version number, and it is determined that the device to be upgraded needs to be upgraded. Based on the download path of the upgrade package, the upgrade package of the device to be upgraded is downloaded from the OTA server. Among them, the OTA server can provide the latest update package through the API and support version control and rollback functions.

[0098] This embodiment uses the HTTP protocol to obtain the upgrade package of the device to be upgraded. Specifically, the Java HttpURLConnection class is used to download the upgrade package of the device to be upgraded from the OTA server to ensure the stability of the network connection and the integrity of the download. The code for downloading the upgrade package of the device to be upgraded from the OTA server can be as follows:

[0099] HttpURLConnection connection=(HttpURLConnection)url.openConnection();

[0100] connection.setRequestMethod("GET");

[0101] try(InputStreamin=connection.getInputStream();

[0102] FileOutputStream out=new FileOutputStream(saveFilePath)){

[0103] byte[]buffer=new byte

[1024] ;

[0104] int bytesRead;

[0105] while((bytesRead=in.read(buffer))!=-1){

[0106] out.write(buffer,0,bytesRead);

[0107] }

[0108] }

[0109] Step S206: completing the upgrade of the device to be upgraded based on the upgrade package.

[0110] After the upgrade package is downloaded to the device to be upgraded, the upgrade of the device to be upgraded is completed based on the upgrade package. Figure 3As shown, after the device to be upgraded is successfully upgraded, the current system status and version number of the device to be upgraded are pushed to the device upgrade manager to complete the system status update and version number update of the device to be upgraded in the device upgrade manager.

[0111] The device upgrade method provided in this embodiment receives update notification information sent by the device upgrade manager. The update notification information is sent by the device upgrade manager to the device to be upgraded through the message queue of the container orchestration system until the device to be upgraded receives it. This ensures that the update notification information can be received regardless of whether the network of the device to be upgraded is stable or unstable. Based on the update notification information, the upgrade package version number and the download path of the upgrade package of the device to be upgraded are determined. When the system status of the device to be upgraded is to allow updates, if the upgrade package version number is better than the current version number, the upgrade package of the device to be upgraded is obtained based on the upgrade package download path, and the upgrade of the device to be upgraded is completed based on the upgrade package. It is ensured that the device to be upgraded will not miss the update notification under various network conditions, and the update of the device to be upgraded can be completed in time, thereby improving the service life of the device.

[0112] In this embodiment, a device upgrade method is provided, which can be used for devices to be upgraded, such as industrial computers, industrial computers or vehicle equipment, etc. Figure 5 is a flow chart of a device upgrade method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0113] Step S501: receiving update notification information sent by the device upgrade manager.

[0114] When the device upgrade manager receives the upgrade package of the device to be upgraded, it sends the update notification information to the device to be upgraded through the message queue of the container orchestration system. The message queue continues to send the update notification information until the device to be upgraded receives the update notification information. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.

[0115] It should be noted that the code for obtaining update notification information from the RabbitMQ message queue and performing upgrade operations, ensuring that update tasks are executed in sequence and handling upgrade failures can be as follows:

[0116] ConnectionFactory factory=new ConnectionFactory();

[0117] factory.setHost("localhost");

[0118] try(Connection connection=factory.newConnection();

[0119] Channel channel=connection.createChannel()){

[0120] channel.queueDeclare(QUEUE_NAME,false,false,false,null);

[0121] DeliverCallback deliverCallback=(consumerTag,delivery)->{

[0122] / / Execute the upgrade

[0123] };

[0124] channel.basicConsume(“QUEUE_NAME”,true,deliverCallback,consumerTag->{});

[0125] }

[0126] Step S502: Based on the update notification information, determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0127] Step S503: Obtain the system status and current version number of the device to be upgraded. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.

[0128] Step S504: If the system status of the device to be upgraded is that the upgrade is allowed, determine whether the upgrade package version number of the device to be upgraded is better than the current version number. Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.

[0129] Step S505: If the version number of the upgrade package of the device to be upgraded is better than the current version number, the upgrade package of the device to be upgraded is downloaded from the device upgrade manager based on the download path of the upgrade package. Figure 2 Step S205 of the illustrated embodiment will not be described in detail here.

[0130] Step S506: completing the upgrade of the device to be upgraded based on the upgrade package.

[0131] Specifically, the above step S506 includes:

[0132] Step S5061, perform integrity check on the upgrade package.

[0133] Before upgrading the device to be upgraded based on the upgrade package, it is necessary to first perform an integrity check on the upgrade package to verify the integrity and validity of the downloaded upgrade package.

[0134] Step S5062: When the integrity check of the upgrade package passes, the upgrade of the device to be upgraded is completed based on the upgrade package.

[0135] If the integrity check of the upgrade package passes, it is determined that the upgrade package is complete and valid, and then the device to be upgraded is upgraded based on the upgrade package.

[0136] Step S5063: When the integrity check of the upgrade package fails, upgrade package exception information is sent, so that the user can perform upgrade package exception processing based on the upgrade package exception information.

[0137] If the integrity check of the upgrade package fails, it is determined that data loss or damage may exist in the upgrade package, and upgrade package exception information is sent, so that the user can quickly locate the upgrade package exception based on the upgrade package exception information and solve the exception.

[0138] The device upgrade method provided in this embodiment can effectively prevent upgrade failures caused by data loss or damage during transmission by performing integrity check on the upgrade package before completing the upgrade of the device to be upgraded based on the upgrade package, thereby ensuring the accuracy of the upgrade package and improving the reliability and success rate of the upgrade of the device to be upgraded. By sending upgrade package exception information in a timely manner when the integrity check of the upgrade package fails, it helps users quickly locate the exception and solve the exception, reducing maintenance costs and time and improving the upgrade efficiency of the device to be upgraded.

[0139] In some optional implementations, the above step S5061 includes:

[0140] Step a1: Obtain a secure hash value of the upgrade package and a first hash function used to generate the secure hash value from a device upgrade manager.

[0141] In order to verify the integrity and validity of the upgrade package, the security hash value of the device to be upgraded and the first hash function used to generate the security hash value are obtained from the OTA server.

[0142] Step a2: based on the first hash function, select a target hash function that is the same as the first hash function from a preset hash function library.

[0143] Or, based on the first Hash function, a target Hash function for data processing by a preset Hash calculation tool is set to be consistent with the first Hash function.

[0144] After determining the first hash function used to generate the secure hash value, the target hash value of the upgrade package can be obtained in two ways. The first way can be to filter out a target hash function that is the same as the first hash function from a preset hash function library, and obtain the target hash value of the upgrade package through the target hash function. The preset hash function library can be a hash function library that comes with the Java language.

[0145] The second method may be to use a preset hash calculation tool to obtain a target hash value of the upgrade package, and the target hash function of the preset hash calculation tool for data processing needs to be set to be consistent with the first hash function.

[0146] Step a3, read the content in the upgrade package.

[0147] Step a4, taking the content in the upgrade package as input, calling the target hash function to process the content in the upgrade package, and obtaining the target hash value.

[0148] Alternatively, the content in the upgrade package is input into a preset hash calculation tool to obtain the target hash value output by the preset hash calculation tool.

[0149] It can be understood that when a target hash function identical to the first hash function is selected from a preset hash function library based on the first hash function, the content in the upgrade package is taken as input, the target hash function is called to process the content in the upgrade package, and a target hash value is obtained.

[0150] When the target hash function of the preset hash calculation tool for data processing is set to be consistent with the first hash function based on the first hash function, the content in the upgrade package is input into the preset hash calculation tool to obtain the target hash value output by the preset hash calculation tool.

[0151] Step a5: compare the target hash value with the secure hash value to obtain a comparison result.

[0152] Regardless of the method used, when the target hash value of the upgrade package is obtained, the target hash value of the upgrade package is compared with the secure hash value of the upgrade package to obtain a comparison result.

[0153] Step a6: When the comparison result shows that the target hash value is consistent with the secure hash value, it is determined that the integrity check of the upgrade package has passed.

[0154] The comparison result is that the target hash value is consistent with the security hash value, indicating that the upgrade package is complete and valid, and confirming that the integrity check of the upgrade package has passed.

[0155] Step a7: When the comparison result is that the target hash value and the secure hash value are inconsistent, it is determined that the integrity check of the upgrade package has failed.

[0156] The comparison result is that the target hash value is inconsistent with the security hash value, indicating that the upgrade package may have data loss or damage, and it is determined that the integrity check of the upgrade package has failed.

[0157] Exemplarily, the content in the upgrade package is used as input, and the target hash function is called to process the content in the upgrade package to obtain the target hash value. The integrity check of the upgrade package can be performed by performing a SHA256 check of the upgrade package through the Java MessageDigest class to ensure the integrity of the file, wherein the target hash function can be SHA256, that is, a secure hash algorithm 256-bit. The corresponding code can be:

[0158] MessageDigest digest=MessageDigest.getInstance("SHA-256");

[0159] try(FileInputStream fis=new FileInputStream(filePath)){

[0160] byte[]buffer=new byte

[1024] ;

[0161] int bytesRead;

[0162] while((bytesRead=fis.read(buffer))!=-1){

[0163] digest.update(buffer,0,bytesRead);

[0164] }

[0165] }

[0166] byte[]hashBytes=digest.digest();

[0167] StringBuilder sb=new StringBuilder();

[0168] for(byte b:hashBytes){

[0169] sb.append(String.format("%02x",b));

[0170] }

[0171] }

[0172] The device upgrade method provided in this embodiment determines whether the integrity check of the upgrade package passes through the comparison result of the security hash value and the target hash value, and further determines whether the content of the upgrade package is tampered with or damaged during the transmission or download process. This can effectively prevent upgrade failures caused by data loss or damage during the transmission process, ensure the accuracy of the upgrade package, and improve the reliability and success rate of the upgrade of the device to be upgraded.

[0173] In some optional implementations, the device upgrade method further includes:

[0174] Step b1: During the upgrade process of the device to be upgraded, the upgrade status of the device to be upgraded is monitored in real time, and the upgrade status of the device to be upgraded obtained in real time is recorded in the message queue of the container orchestration system to be fed back to the device upgrade manager, so that the device upgrade manager obtains the system status and version number of the device to be upgraded after the upgrade according to the upgrade status of the device to be upgraded, and updates the system status and version number of the device to be upgraded previously stored based on the system status and version number of the device to be upgraded after the upgrade.

[0175] After the device to be upgraded is successfully upgraded, its corresponding system status and current version number need to be fed back to the device upgrade manager to update the system status and version number of the device to be upgraded stored in the device upgrade manager.

[0176] The device upgrade method provided in this embodiment continuously monitors the upgrade status of the device to be upgraded during the upgrade process to ensure that any abnormality or progress change in the upgrade process can be immediately captured and recorded, thereby providing transparency of the upgrade status. Once the upgrade fails or an abnormality occurs, the problem can be quickly located, diagnosed and repaired, thereby improving the reliability of the upgrade of the device to be upgraded.

[0177] In some optional implementations, the device upgrade method further includes:

[0178] Step c1, obtaining the upgrade status of the device to be upgraded from the message queue of the container orchestration system, and when the upgrade status of the device to be upgraded is upgrade completed, performing function verification on the device to be upgraded.

[0179] When the upgrade status of the device to be upgraded is upgrade completed, in order to determine whether the upgraded device to be upgraded is successfully upgraded, it is necessary to perform function verification on the device to be upgraded.

[0180] Step c2: if the function verification of the device to be upgraded is passed, it is determined that the device to be upgraded is upgraded successfully, and a successful upgrade message is sent, so that the user can determine that the device to be upgraded is upgraded successfully based on the successful upgrade message.

[0181] If the function verification of the device to be upgraded is passed, it means that the system function of the device to be upgraded is normal and can run normally after the upgrade, and it is determined that the device to be upgraded is successfully upgraded. If the device to be upgraded is successfully upgraded, an upgrade success message is sent to prompt the user that the device to be upgraded is successfully upgraded.

[0182] The device upgrade method provided in this embodiment determines whether the device to be upgraded is successfully upgraded by performing function verification after the device to be upgraded is upgraded, thereby ensuring the integrity and stability of the device functions after the upgrade. A clear upgrade success message is sent to the user so that the user can quickly confirm the device upgrade status.

[0183] In some optional implementations, the device upgrade method further includes:

[0184] Step d1, when the function verification of the device to be upgraded fails, it is determined that the upgrade of the device to be upgraded fails, and upgrade failure information is sent, so that the user determines that the upgrade of the device to be upgraded fails based on the upgrade failure information.

[0185] If the function verification of the device to be upgraded fails, it means that the system function of the upgraded device to be upgraded is abnormal and cannot run normally, and the upgrade of the device to be upgraded is determined to have failed. If the upgrade of the device to be upgraded fails, an upgrade failure message is sent to prompt the user that the upgrade of the device to be upgraded has failed.

[0186] The device upgrade method provided in this embodiment notifies the user of the upgrade failure immediately when the function verification of the device to be upgraded fails, so that the user can quickly identify the problem, reduce waiting time, take countermeasures in time, and improve system stability.

[0187] In some optional implementations, before step S506, the device upgrade method further includes:

[0188] Step e1, using the container orchestration system to back up the target data of the device to be upgraded, so that in case the upgrade of the device to be upgraded fails, the backed up target data of the device to be upgraded can be used to restore the data of the device to be upgraded.

[0189] The target data is customized by the user based on the device to be upgraded.

[0190] Use Kubernetes's Job or CronJob with the Velero tool to automatically back up the target data of the device to be upgraded to the Kubernetes Volume. The target data is the important data of the device to be upgraded that the user has customized based on the device to be upgraded, that is, the data required to restore the device to the state before the upgrade.

[0191] In the event that the upgrade of the device to be upgraded fails, the target data of the device to be upgraded is backed up through the Kubernetes Volume to restore the data of the device to be upgraded, so as to ensure the normal operation of the device to be upgraded after the upgrade fails.

[0192] The device upgrade method provided in this embodiment provides a safety net for the upgrade operation by automatically backing up the target data of the user-defined device before upgrading the device to be upgraded. Once the upgrade fails and causes data loss or damage, the backup data can be quickly used for recovery, reducing the risk of data loss and ensuring the upgrade safety of the device to be upgraded.

[0193] The device upgrade method provided in this embodiment, which combines RabbitMQ, OTA technology and Kubernetes, can significantly improve the efficiency, reliability and security of device upgrades. Among them, RabbitMQ's message queue mechanism provides efficient task scheduling and message delivery functions, OTA technology ensures flexible acquisition and management of upgrade packages, and Kubernetes' container orchestration capabilities support automated data backup, recovery and system verification. Through the combination of these technologies, more advanced system update management can be achieved, downtime can be reduced, system stability can be improved, and the upgrade process can be ensured to proceed smoothly.

[0194] It should be noted that the device upgrade method provided in this embodiment can be applied to various information systems that require device management.

[0195] In some optional implementations, completing the upgrade of the device to be upgraded based on the upgrade package includes:

[0196] After the upgrade package of the device to be upgraded is downloaded, upgrade confirmation information is sent, so that the user can determine the upgrade method of the device to be upgraded based on the upgrade confirmation information.

[0197] In response to the upgrade mode confirmation operation, an upgrade mode of the device to be upgraded is obtained.

[0198] When the upgrade mode of the device to be upgraded is immediate upgrade, the device to be upgraded is upgraded immediately based on the upgrade package.

[0199] When the upgrade mode of the device to be upgraded is scheduled upgrade, the scheduled upgrade time is obtained, and when the scheduled upgrade time arrives, the device to be upgraded is upgraded based on the upgrade package.

[0200] It is understandable that the scheduled upgrade time is customized by the user, and is generally set to a time period that does not affect the normal use of the device.

[0201] When the upgrade mode of the device to be upgraded is suspended upgrade, the upgrade of the device to be upgraded based on the upgrade package is stopped until the upgrade mode of the device to be upgraded is updated to immediate upgrade or scheduled upgrade, and then the device to be upgraded is upgraded according to the corresponding upgrade mode.

[0202] Among them, users can suspend the upgrade of the device to be upgraded under an unstable network environment or other unfavorable conditions to improve the stability and reliability of the upgrade.

[0203] The device upgrade method provided in this embodiment allows users to choose upgrade methods such as immediate upgrade, scheduled upgrade, and pause upgrade according to their needs, and then the device to be upgraded is upgraded according to the upgrade method selected by the user, which provides greater flexibility and autonomy for device upgrades, reduces the impact of upgrades on the normal use of the device, improves user experience, and also improves the stability and reliability of the upgrade.

[0204] In this embodiment, a device upgrade device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0205] This embodiment provides a device upgrade device, such as Figure 6 As shown, including:

[0206] The receiving module 601 is used to receive the update notification information sent by the device upgrade manager. When the device upgrade manager receives the upgrade package of the device to be upgraded, it sends the update notification information to the device to be upgraded through the message queue of the container orchestration system. The message queue continues to send the update notification information until the device to be upgraded receives the update notification information.

[0207] The determination module 602 is used to determine the version number of the upgrade package of the device to be upgraded and the download path of the upgrade package based on the update notification information.

[0208] The acquisition module 603 is used to acquire the system status and current version number of the device to be upgraded.

[0209] The judgment module 604 is used to judge whether the upgrade package version number of the device to be upgraded is better than the current version number when the system status of the device to be upgraded is that the update is allowed.

[0210] The download module 605 is used to download the upgrade package of the device to be upgraded from the device upgrade manager based on the download path of the upgrade package when the version number of the upgrade package of the device to be upgraded is better than the current version number.

[0211] The upgrade module 606 is used to complete the upgrade of the device to be upgraded based on the upgrade package.

[0212] In some optional implementations, the upgrade module 606 includes:

[0213] The verification unit is used to perform integrity verification on the upgrade package.

[0214] The upgrade unit is used to complete the upgrade of the device to be upgraded based on the upgrade package when the integrity check of the upgrade package passes.

[0215] The sending unit is used to send upgrade package exception information when the integrity check of the upgrade package fails, so that the user can perform upgrade package exception processing based on the upgrade package exception information.

[0216] In some optional implementations, the verification unit includes:

[0217] The first acquisition unit is used to acquire the secure hash value of the upgrade package and the first hash function used to generate the secure hash value from the device upgrade manager.

[0218] The screening unit is used to screen out a target hash function that is the same as the first hash function from a preset hash function library based on the first hash function.

[0219] Or, a setting unit is used to set a target hash function for data processing by a preset hash calculation tool to be consistent with the first hash function based on the first hash function.

[0220] The reading unit is used to read the content in the upgrade package.

[0221] The second acquisition unit is used to take the content in the upgrade package as input, call the target hash function to process the content in the upgrade package, and obtain a target hash value.

[0222] Or, a third acquisition unit is used to input the content in the upgrade package into a preset hash calculation tool to obtain a target hash value output by the preset hash calculation tool.

[0223] The fourth acquisition unit is used to compare the target hash value with the secure hash value to obtain a comparison result.

[0224] The first determination unit is used to determine whether the integrity check of the upgrade package passes when the comparison result is that the target hash value is consistent with the security hash value.

[0225] The second determining unit is used to determine that the integrity check of the upgrade package fails when the comparison result is that the target hash value and the security hash value are inconsistent.

[0226] In some optional implementations, the device upgrading apparatus further includes:

[0227] The monitoring unit is used to monitor the upgrade status of the device to be upgraded in real time during the upgrade process of the device to be upgraded, and record the upgrade status of the device to be upgraded acquired in real time into the message queue of the container orchestration system to feed back to the device upgrade manager, so that the device upgrade manager obtains the system status and version number of the device to be upgraded after the upgrade according to the upgrade status of the device to be upgraded, and updates the system status and version number of the device to be upgraded previously stored based on the system status and version number of the device to be upgraded after the upgrade.

[0228] In some optional implementations, the device upgrading apparatus further includes:

[0229] The verification unit is used to obtain the upgrade status of the device to be upgraded from the message queue of the container orchestration system, and perform functional verification on the device to be upgraded when the upgrade status of the device to be upgraded is upgrade completion.

[0230] The third determining unit is used to determine that the device to be upgraded has been successfully upgraded if the function verification of the device to be upgraded has passed, and send information on the successful upgrade, so that the user can determine that the device to be upgraded has been successfully upgraded based on the information on the successful upgrade.

[0231] In some optional implementations, the device upgrading apparatus further includes:

[0232] The fourth determining unit is used to determine that the upgrade of the device to be upgraded has failed if the function verification of the device to be upgraded has not passed, and send information about the upgrade failure, so that the user can determine that the upgrade of the device to be upgraded has failed based on the information about the upgrade failure.

[0233] In some optional implementations, before completing the upgrade of the device to be upgraded based on the upgrade package, the device upgrade apparatus further includes:

[0234] The recovery unit is used to back up the target data of the device to be upgraded by using the container orchestration system, so that when the upgrade of the device to be upgraded fails, the target data of the device to be upgraded can be used to restore the data of the device to be upgraded by using the backed up target data of the device to be upgraded.

[0235] The target data is customized by the user based on the device to be upgraded.

[0236] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0237] The equipment upgrade device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0238] The embodiment of the present invention also provides a computer device having the above Figure 6 The device upgrade unit shown.

[0239] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 701, memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.

[0240] The processor 701 may be a central processing unit, a network processor or a combination thereof. The processor 701 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0241] The memory 702 stores instructions executable by at least one processor 701, so that the at least one processor 701 executes the method shown in the above embodiment.

[0242] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0243] The memory 702 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 702 may also include a combination of the above types of memory.

[0244] The computer device also includes a communication interface 703, which is used for the computer device to communicate with other devices or a communication network.

[0245] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0246] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0247] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A device upgrading method, characterized in that: The method comprises: Receiving update notification information sent by a device upgrade manager, wherein the device upgrade manager sends the update notification information to the device to be upgraded through a message queue of a container orchestration system when receiving an upgrade package of the device to be upgraded, and the message queue continues to send the update notification information until the device to be upgraded receives the update notification information; Based on the update notification information, determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded; Get the system status and current version number of the device to be upgraded; When the system status of the device to be upgraded is that the upgrade is allowed, determining whether the upgrade package version number of the device to be upgraded is better than the current version number; If the version number of the upgrade package of the device to be upgraded is better than the current version number, downloading the upgrade package of the device to be upgraded from the device upgrade manager based on the download path of the upgrade package; The upgrade of the device to be upgraded is completed based on the upgrade package.

2. The method according to claim 1, characterized in that The completing the upgrading of the device to be upgraded based on the upgrade package includes: Performing integrity check on the upgrade package; If the integrity check of the upgrade package passes, completing the upgrade of the device to be upgraded based on the upgrade package; In the case that the integrity check of the upgrade package fails, upgrade package exception information is sent, so that the user performs upgrade package exception processing based on the upgrade package exception information.

3. The method according to claim 2, characterized in that The performing integrity check on the upgrade package includes: Obtaining, from the device upgrade manager, a secure hash value of the upgrade package and a first hash function used to generate the secure hash value; Based on the first hash function, selecting a target hash function that is the same as the first hash function from a preset hash function library; Or, based on the first Hash function, setting a target Hash function for data processing by a preset Hash calculation tool to be consistent with the first Hash function; Read the content in the upgrade package; Taking the content in the upgrade package as input, calling the target hash function to process the content in the upgrade package to obtain a target hash value; Or, input the content in the upgrade package into a preset hash calculation tool to obtain a target hash value output by the preset hash calculation tool; Compare the target hash value with the secure hash value to obtain a comparison result; If the comparison result is that the target hash value is consistent with the secure hash value, determining that the integrity check of the upgrade package passes; When the comparison result is that the target hash value is inconsistent with the secure hash value, it is determined that the integrity check of the upgrade package has failed.

4. The method according to claim 1, characterized in that: The method further comprises: During the upgrade process of the device to be upgraded, the upgrade status of the device to be upgraded is monitored in real time, and the upgrade status of the device to be upgraded acquired in real time is recorded in the message queue of the container orchestration system, so as to be fed back to the device upgrade manager, so that the device upgrade manager obtains the system status and version number of the device to be upgraded after the upgrade according to the upgrade status of the device to be upgraded, and updates the system status and version number of the device to be upgraded previously stored based on the system status and version number of the device to be upgraded after the upgrade.

5. The method according to claim 4, characterized in that The method further comprises: Acquire the upgrade status of the device to be upgraded from the message queue of the container orchestration system, and perform function verification on the device to be upgraded when the upgrade status of the device to be upgraded is upgrade completed; In the case that the function verification of the device to be upgraded passes, it is determined that the device to be upgraded is upgraded successfully, and information on the successful upgrade is sent, so that the user can determine that the device to be upgraded is upgraded successfully based on the information on the successful upgrade.

6. The method according to claim 5, characterized in that The method further comprises: In the case that the function verification of the device to be upgraded fails, it is determined that the upgrade of the device to be upgraded fails, and upgrade failure information is sent, so that the user determines that the upgrade of the device to be upgraded fails based on the upgrade failure information.

7. The method according to claim 1, characterized in that Before completing the upgrade of the device to be upgraded based on the upgrade package, the method further includes: Backing up the target data of the device to be upgraded by using the container orchestration system, so that when the upgrade of the device to be upgraded fails, the backed-up target data of the device to be upgraded is used to restore the data of the device to be upgraded; The target data is customized by the user based on the device to be upgraded.

8. A device upgrading apparatus, characterized in that: The device comprises: A receiving module, configured to receive update notification information sent by a device upgrade manager, wherein the device upgrade manager, when receiving an upgrade package of a device to be upgraded, sends the update notification information to the device to be upgraded through a message queue of a container orchestration system, and the message queue continues to send the update notification information until the device to be upgraded receives the update notification information; A determination module, used to determine the upgrade package version number and the download path of the upgrade package of the device to be upgraded based on the update notification information; The acquisition module is used to obtain the system status and current version number of the device to be upgraded; A judgment module, used to judge whether the upgrade package version number of the device to be upgraded is better than the current version number when the system status of the device to be upgraded is that the update is allowed; A download module, configured to download the upgrade package of the device to be upgraded from the device upgrade manager based on the download path of the upgrade package when the version number of the upgrade package of the device to be upgraded is better than the current version number; An upgrade module is used to complete the upgrade of the device to be upgraded based on the upgrade package.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the device upgrade method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the device upgrading method according to any one of claims 1 to 7.