Upgrading method, upgrading system and computer equipment

By sending upgrade broadcasts and files in the local area network of the embedded system, automatic system upgrades are realized when normal startup cannot be started, solving the problem of high upgrade costs in the existing technology and improving the efficiency of fault repair.

CN113973044BActive Publication Date: 2024-12-31SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010663031.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-10
Publication Date
2024-12-31
Estimated Expiration
2040-07-10

AI Technical Summary

Technical Problem

When existing embedded systems cannot start normally and cannot access the external network, upgrade and troubleshooting costs are high, and backend technicians are required to participate in local upgrades.

Method used

By sending upgrade broadcasts within the same LAN, candidate devices transmit upgrade files to the equipment to be upgraded, realizing automatic upgrade of the system and avoiding manual intervention.

Benefits of technology

Reduces operating costs, improves fault repair efficiency, and reduces dependence on backend technicians.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113973044B_ABST
    Figure CN113973044B_ABST
Patent Text Reader

Abstract

The present application relates to an upgrade method, an upgrade system and a computer device, the method comprising: when a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system; sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast; upgrading the system according to the upgrade file to achieve a system upgrade of the device to be upgraded. When the system cannot be started normally and cannot access the external network for upgrading or troubleshooting, the present invention upgrades the device to be upgraded through the candidate device, without the need for background technicians to participate, saving manpower and having high repair efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded systems, and in particular to an upgrade method, an upgrade system and a computer device. Background Art

[0002] An embedded system consists of hardware and software and is a device that can operate independently. The software part of an embedded system includes the software operating environment and its operating system. The embedded system is responsible for the allocation of all software and hardware resources of embedded devices, task scheduling, control, and coordination of concurrent activities.

[0003] Existing embedded system upgrade methods include local upgrade, network upgrade, and over-the-air firmware upgrade. The upgrade is usually implemented when the system starts normally or the upgrade system starts normally and the network connection is normal. When the embedded system cannot start normally or there is a network anomaly, the system can only be restored through local upgrades by back-end technicians, which will greatly increase operating costs for enterprises.

[0004] Therefore, the prior art needs to be improved. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide an upgrade method, an upgrade system and a computer device. When the system cannot be started normally and cannot access the external network for upgrading or troubleshooting, an upgrade broadcast can be sent to a candidate device through a local area network, and the candidate device sends the upgrade file to the device to be upgraded to repair the fault of the device to be upgraded.

[0006] In a first aspect, an embodiment of the present invention provides an upgrade method, which is applied to a device to be upgraded in an upgrade system, wherein the upgrade system further includes a candidate device, and the candidate device and the device to be upgraded are in the same local area network, and the method includes:

[0007] When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system;

[0008] Sending an upgrade broadcast corresponding to the information to be upgraded to the local area network where the device to be upgraded is located, and acquiring an upgrade file sent by the candidate device based on the upgrade broadcast;

[0009] The system is upgraded according to the upgrade file to achieve system upgrade of the device to be upgraded.

[0010] As a further improved technical solution, when a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system includes:

[0011] When a startup failure occurs in the system of the device to be upgraded, restart the system to enter the boot program;

[0012] Determine the data in each partition of the system according to the boot program to obtain first verification codes respectively corresponding to each partition;

[0013] Obtaining a second verification code corresponding to each of the partitions, wherein the second verification code is a verification code generated when the system is successfully started;

[0014] The information to be upgraded is determined according to the first verification codes and the second verification codes.

[0015] As a further improved technical solution, the determining the information to be upgraded according to the first verification codes and the second verification codes includes:

[0016] For each partition, if the first check code corresponding to the partition is inconsistent with the second check code corresponding to the partition, obtain the partition name and partition version number corresponding to the partition;

[0017] The information to be upgraded is obtained according to the partition name and the partition version number.

[0018] As a further improved technical solution, the determining the information to be upgraded according to the first verification codes and the second verification codes further includes:

[0019] For any partition, if the first verification code corresponding to the partition is consistent with the second verification code corresponding to the partition, then the system name and system version number corresponding to the system are obtained;

[0020] The information to be upgraded is obtained according to the system name and the system version number.

[0021] As a further improved technical solution, the application upgrade system includes multiple candidate devices, and the multiple candidate devices include a target service device; the step of sending an upgrade broadcast corresponding to the information to be upgraded to a local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast, includes:

[0022] Sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, so that the multiple candidate devices can feedback multiple matching requests according to the upgrade broadcast;

[0023] determining a target service device according to the multiple matching requests;

[0024] An upgrade instruction is sent to the target service device, so that the target service device feeds back an upgrade file according to the upgrade instruction.

[0025] As a further improved technical solution, for a candidate device, the matching request corresponding to the candidate device includes the candidate upgrade information corresponding to the candidate device; and determining the target service device according to the multiple matching requests includes:

[0026] Taking any one of the candidate upgrade information satisfying a preset condition among the multiple candidate upgrade information as the target information to be upgraded, wherein the preset condition includes: the target information to be upgraded is consistent with the information to be upgraded, or the target information to be upgraded is the highest version of the multiple candidate upgrade information;

[0027] The candidate device corresponding to the target to-be-upgraded information is used as the target service device.

[0028] As a further improved technical solution, the target information to be upgraded includes: the target service address and target port number of the simple file transfer protocol corresponding to the target service device; the sending of the upgrade instruction to the target service device so that the target service device can feedback the upgrade file according to the upgrade instruction includes:

[0029] An upgrade instruction is sent to the target service device according to the target service address and the target port number, wherein the upgrade instruction includes the service address to be upgraded and the port to be upgraded of the simple file transfer protocol corresponding to the device to be upgraded, so that the target service device can feedback the upgrade file according to the service address to be upgraded and the port to be upgraded.

[0030] In a second aspect, an embodiment of the present invention provides an application upgrade method, which is applied to a target service device in an upgrade system, wherein the upgrade system includes multiple candidate devices, the target service device is one of the multiple candidate devices, the upgrade system also includes a device to be upgraded, and the candidate device and the device to be upgraded are in the same local area network, the method comprising:

[0031] Receiving an upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes information to be upgraded;

[0032] Feedback an upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded can be upgraded according to the upgrade file.

[0033] As a further improved technical solution, the step of feeding back the upgrade file to the device to be upgraded according to the information to be upgraded includes:

[0034] Determine the target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, send a matching request to the device to be upgraded, so that the device to be upgraded feeds back an upgrading instruction according to the matching request;

[0035] The upgrade instruction is received, and an upgrade file is fed back to the device to be upgraded according to the upgrade instruction.

[0036] As a further improved technical solution, the determining target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, sending a matching request to the device to be upgraded, includes:

[0037] When the information to be upgraded includes a partition name and a partition version number, determining a target candidate partition according to the partition name, wherein the target candidate partition name corresponding to the target candidate partition is consistent with the partition name;

[0038] If the target candidate partition version number corresponding to the target candidate partition is equal to or higher than the partition version number, a matching request is sent to the device to be upgraded.

[0039] As a further improved technical solution, the determining target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, sending a matching request to the device to be upgraded, includes:

[0040] When the information to be upgraded includes a system name and a system version number, obtaining a target candidate system name, and if the target candidate system name is consistent with the system name, obtaining the target candidate system version number, wherein the target candidate system is a system of the target service device;

[0041] If the target candidate system version number is equal to or higher than the system version number, a matching request is sent to the device to be upgraded.

[0042] In a third aspect, an embodiment of the present invention provides an upgrade system, the upgrade system comprising a device to be upgraded and a plurality of candidate devices, wherein the plurality of candidate devices comprises a target service device, and the plurality of candidate devices and the device to be upgraded are in the same local area network;

[0043] The device to be upgraded is used to determine the to-be-upgraded information corresponding to the system when a startup failure occurs in the system of the device to be upgraded; send an upgrade broadcast corresponding to the to-be-upgraded information to the local area network where the device to be upgraded is located, and obtain an upgrade file sent by the candidate device based on the upgrade broadcast; upgrade the system according to the upgrade file to achieve system upgrade of the device to be upgraded;

[0044] The target service device is used to receive the upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes the information to be upgraded; and feed back the upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file.

[0045] In a fourth aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0046] When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system; sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast; upgrading the system according to the upgrade file to achieve system upgrade of the device to be upgraded;

[0047] Alternatively, an upgrade broadcast sent by the device to be upgraded is received, wherein the upgrade broadcast includes information to be upgraded; and an upgrade file is fed back to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file.

[0048] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0049] When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system; sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast; upgrading the system according to the upgrade file to achieve system upgrade of the device to be upgraded;

[0050] Alternatively, an upgrade broadcast sent by the device to be upgraded is received, wherein the upgrade broadcast includes information to be upgraded; and an upgrade file is fed back to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file.

[0051] Compared with the prior art, the embodiments of the present invention have the following advantages:

[0052] In order to solve the above problems, an upgrade method is provided in an embodiment of the present invention, which is applied to an upgrade system, wherein the upgrade system includes a device to be upgraded and multiple candidate devices, wherein the multiple candidate devices include a target service device; the method includes: when a startup failure occurs in the system of the device to be upgraded, determining the upgrade information of the system, sending an upgrade broadcast corresponding to the upgrade information to the candidate devices, and the candidate devices and the device to be upgraded are in the same local area network; the target service device receives the upgrade information sent by the device to be upgraded, and feeds back an upgrade file to the device to be upgraded according to the upgrade information; the device to be upgraded receives the upgrade file, and upgrades according to the upgrade file.

[0053] In the present invention, when a system startup failure occurs in the device to be upgraded, an upgrade broadcast is sent to candidate devices in the same local area network, and the upgrade broadcast includes information to be upgraded. In this way, when the system cannot be started normally and the external network cannot be accessed for upgrading or fault handling, an upgrade broadcast can be sent to the candidate devices through the local area network, and the candidate devices send upgrade files to the device to be upgraded, so as to upgrade the device to be upgraded and repair the fault of the device to be upgraded. There is no need for background technicians to participate, which saves manpower and has high repair efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in 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 A schematic diagram of an application scenario of the upgrade method provided by the present invention;

[0056] Figure 2 A schematic diagram of a flow chart of an upgrading method in an embodiment of the present invention;

[0057] Figure 3 It is a schematic diagram of device 1 sending an upgrade broadcast to candidate devices in the same local area network in an embodiment of the present invention;

[0058] Figure 4 A schematic diagram of the structure of an upgrade system in an embodiment of the present invention;

[0059] Figure 5 1 is a diagram showing the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The present invention provides an upgrade method, an upgrade system and a computer device. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0061] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0062] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0063] The inventor has found through research that the existing methods for upgrading embedded systems include local upgrade, network upgrade, and over-the-air firmware upgrade. The existing upgrade methods can be used to upgrade when the system can be started normally or the upgrade system can be started normally and the network connection is normal. When the embedded system cannot be started normally and cannot access the external network for upgrading or troubleshooting, the system can only be restored through local upgrades by back-end technicians, which will greatly increase operating costs for enterprises.

[0064] In order to solve the above problems, in an embodiment of the present invention, when a system startup failure occurs in the device to be upgraded, an upgrade broadcast is sent to candidate devices in the same local area network, and the upgrade broadcast includes the information to be upgraded. In this way, when the system cannot be started normally and the external network cannot be accessed for upgrading or fault handling, an upgrade broadcast can be sent to the candidate devices through the local area network, and the candidate devices send the upgrade files to the device to be upgraded, so as to upgrade the device to be upgraded and repair the fault of the device to be upgraded. There is no need for the participation of background technicians, which saves manpower and has high repair efficiency.

[0065] This embodiment provides an upgrade method, an upgrade system and a computer device, which can be applied to an upgrade system, wherein the upgrade system includes a device to be upgraded and a candidate device, wherein the device to be upgraded and the candidate device can be implemented in various forms, such as a PC, a server, a mobile phone, a tablet computer, a PDA, etc. In addition, the functions implemented by the method can be implemented by calling program codes by the processors in the device to be upgraded and the candidate device, and of course the program codes can be stored in a computer storage medium. It can be seen that the device to be upgraded and the candidate device at least include a processor and a storage medium.

[0066] For example, the embodiments of the present invention can be applied to Figure 1 The scenario shown. In this scenario, when a startup failure occurs in upgrade device 1, an upgrade broadcast is sent to the local area network where upgrade device 1 is located, and candidate devices 2, candidate devices 3, and candidate devices 4 in the same local area network as upgrade device 1 receive the upgrade broadcast. Among candidate devices 2, candidate devices 3, and candidate devices 4, there is a target service device. Assuming that the target service device is candidate device 2, candidate device 2 feeds back the upgrade file to upgrade device 1, and upgrade device 1 is upgraded according to the upgrade file. The specific process of candidate device 2 feeding back the upgrade file to upgrade device 1 according to the received upgrade broadcast is not described in detail again.

[0067] It is understandable that, in the above application scenario, although the actions of the embodiments of the present invention are described as upgrade device 1 sending an upgrade broadcast, when a startup failure occurs in candidate device 2, candidate device 3, and candidate device 4, they can all be used as upgrade device 1 to send an upgrade broadcast. Similarly, when a startup failure occurs in any one of candidate device 2, candidate device 3, and candidate device 4, upgrade device 1 can also be used as a candidate device to receive an upgrade broadcast.

[0068] It should be noted that the above application scenarios are only shown to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in this respect. On the contrary, the embodiments of the present invention can be applied to any applicable scenarios.

[0069] See also Figure 2 , shows an upgrade method in an embodiment of the present invention. In this embodiment, the method may include the following steps:

[0070] S1. When a startup failure occurs in the system of the device to be upgraded, determine the upgrade information corresponding to the system.

[0071] In an embodiment of the present invention, the system startup failure of the device to be upgraded is: the device to be upgraded cannot be started normally, and the reason for the inability to start the device to be upgraded is that the device to be upgraded needs to be upgraded. For a device, the inability of the device to be started normally may also be caused by problem data in the device, and the problem data is generated during the use of the device. In this case, after clearing the problem data, the system of the device can be started normally, and the device does not need to be upgraded. Therefore, it is necessary to first eliminate the situation where the device to be upgraded cannot be started normally due to the problem data, so as to determine that the reason for the inability to start the device to be upgraded is that the device to be upgraded needs to be upgraded. The specific process of determining that the system startup failure of the device to be upgraded occurs will be introduced later.

[0072] In the embodiment of the present invention, if it is determined that a startup failure occurs in the system of the device to be upgraded, it means that the system of the device to be upgraded needs to be upgraded, and the startup failure of the system is repaired by upgrading the device to be upgraded. For the device to be upgraded, it may be a partition in the system of the device to be upgraded, or it may be the entire system of the device to be upgraded; first, it is necessary to determine the object to be upgraded, that is, first determine whether it is a partition in the system or the entire system that needs to be upgraded, and then determine the information to be upgraded.

[0073] Next, the specific process of determining whether the system of the device to be upgraded has a startup failure is introduced. Specifically, step S1 includes:

[0074] S11. Monitoring the number of startup failures of the system, and determining whether the number of startup failures is equal to a preset threshold.

[0075] In an embodiment of the present invention, when the device to be upgraded is successfully powered on (i.e., the system startup is completed), a power-on broadcast will be sent. The power-on broadcast is used to start each application in the system. The number of power-on failures can be determined by monitoring the power-on broadcast. Specifically, after receiving the power-on command, the device to be upgraded monitors the power-on broadcast. If the power-on broadcast is not monitored within a preset time after receiving the power-on command, it is determined that the power-on failed. The preset time can be set to 30s. The starting value of the number of power-on failures is 0. If the power-on broadcast is not monitored within the preset time, the number of power-on failures is increased by one; when the number of power-on failures reaches a preset threshold, the threshold can be set to 3 times.

[0076] For example, the preset time is 30s, and the threshold is 3 times; the device to be upgraded receives a power-on command, and if no power-on broadcast is received within the preset time after receiving the power-on command, it is considered that the power-on failed, and the number of power-on failures is 1; the power-on command is received again, and if no power-on broadcast is received within the preset time after receiving the power-on command, it is considered that the power-on failed, and the number of power-on failures is 2, until the number of power-on failures is 3, that is, it is determined that the number of power-on failures is equal to the preset threshold.

[0077] S12: If the number of startup failures is equal to the preset threshold, restore the factory settings.

[0078] In the embodiment of the present invention, the reason for the boot failure may be that there is problematic data in the device to be upgraded. If there is problematic data in the device to be upgraded, even if the system of the device to be upgraded is upgraded, it cannot be normally booted. Therefore, after determining that the number of boot failures is equal to the preset threshold, the device to be upgraded is first restored to factory settings, and restoring the factory settings will clear the data in the device to be upgraded. This step is to eliminate the situation where there is problematic data in the system, which causes the system to fail to boot.

[0079] S13. If the computer fails to start up after restoring the factory settings, it is determined that a system failure has occurred.

[0080] In the embodiment of the present invention, after restoring the factory settings, if the power-on command is accepted again and the power-on still fails, it is determined that the power-on failure is not caused by problematic data, and further it is determined that a system failure occurs and the device to be upgraded needs to be upgraded.

[0081] Next, the specific process of determining the information to be upgraded is introduced. Specifically, step S1 includes:

[0082] S14: When a system failure occurs in the device to be upgraded, restart the system to enter a boot program.

[0083] In the embodiment of the present invention, after determining that a system failure occurs in the device to be upgraded, the system is restarted to enter a boot program (BOOT). The BOOT boot program is a program located on a computer or other computer application and used to boot an operating system.

[0084] S14. Determine the data in each partition of the system according to the boot program to obtain a first verification code corresponding to each partition.

[0085] In the embodiment of the present invention, the system is an embedded system of a device to be upgraded, and the partition is a partition of the system, that is, a certain area in the system disk. The root directory of the partition contains a startup file of the operating system for starting the system. After a system failure occurs, it is necessary to determine whether the startup failure is caused by the partition needing to be upgraded.

[0086] Specifically, the integrity of the partition data is verified through the boot program. For each partition, the data of the partition is added to the system environment variable. The boot program verifies the partition data to generate a first verification code.

[0087] S15. Obtain a second verification code corresponding to each of the partitions, wherein the second verification code is a verification code generated when the system is successfully started.

[0088] In the embodiment of the present invention, the second verification code is a verification code saved when the system is successfully started. If the system is successfully started, it means that the partition data is complete, that is, the second verification code is a verification code corresponding to the complete partition data. The second verification code can be a verification code saved when the system is successfully started any time. Similarly, when the system is successfully started any time, the partition data can be verified by the boot program to obtain the second verification code.

[0089] S16. Determine the information to be upgraded according to the first verification codes and the second verification codes.

[0090] In an embodiment of the present invention, the situation that causes the system to have a startup failure may be: the data of one or more partitions in the system is incomplete, in which case one or more partitions need to be upgraded; or the data of the system is incomplete, in which case the entire system needs to be upgraded. The information to be upgraded includes information that the partition needs to be upgraded, or information that the system needs to be upgraded. Whether the partition data is complete can be determined by the first check code and the second check code.

[0091] Specifically, step S16 includes:

[0092] S161. For each partition, if the first verification code corresponding to the partition is inconsistent with the second verification code corresponding to the partition, obtain the partition name and partition version number corresponding to the partition.

[0093] In the embodiment of the present invention, for a partition, if the first check code and the second check code of the partition are consistent, it means that the data of the partition is consistent with the data when the system can be started normally, indicating that the system failure is not caused by the data of the partition. If the first check code and the second check code of the partition are inconsistent, it means that the data of the partition is inconsistent with the data when the system can be started normally, it can be considered that the partition is damaged and needs to be upgraded, and then the partition name and partition version number corresponding to the partition are obtained.

[0094] S162: Obtain information to be upgraded according to the partition name and the partition version number.

[0095] In the embodiment of the present invention, the information to be upgraded includes the partition name and partition version number corresponding to the partition. For example, the partition name is system, and the partition version number is 2.1.24.

[0096] In the embodiment of the present invention, for each partition, it is necessary to determine whether the partition needs to be upgraded through the first verification code and the second verification code of the partition. Therefore, there may be multiple partitions that need to be upgraded, that is, the information to be upgraded may include the partition names and partition version numbers corresponding to the multiple partitions. For example, the information to be upgraded includes: partition name 1: system, partition version number 1 is 2.1.24; partition name 2: reserved, partition version number 2 is 1.1.3.

[0097] Specifically, step S16 also includes:

[0098] S163. For any partition, if the first verification code corresponding to the partition is consistent with the second verification code corresponding to the partition, then obtain the system name and system version number corresponding to the system.

[0099] In an embodiment of the present invention, if the first check code of each partition is consistent with the second check code of each partition, it means that the data of each partition is consistent with the data when the system is normally started, and no partition needs to be upgraded. In other words, the system failure is not caused by the need to upgrade the partition, but the need to upgrade the system, and then the system name and system version number are obtained.

[0100] S164: Obtain information to be upgraded according to the system name and the system version number.

[0101] In an embodiment of the present invention, the information to be upgraded includes a system name and a system version number. For example, the information to be upgraded includes: system name: Windows 10, system version number: 10.0.10586.

[0102] S2. The device to be upgraded sends an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, and obtains the upgrade file sent by the candidate device based on the upgrade broadcast.

[0103] In the embodiment of the present invention, the device to be upgraded sends an upgrade broadcast to the local area network where it is located, and the upgrade broadcast includes the upgrade information, so that the candidate devices in the same local area network as the device to be upgraded can receive the upgrade broadcast. The application upgrade system includes multiple candidate devices, that is, there can be multiple candidate devices that can receive the upgrade broadcast. Figure 3 As shown, device 1 is the device to be upgraded, device 2, device 3 and device 4 are candidate devices, device 1, device 2, device 3 and device 4 are all in the same local area network, device 1 sends an upgrade broadcast to the local area network where it is located, and device 2, device 3 and device 4 can receive the upgrade broadcast.

[0104] In the embodiment of the present invention, there may be multiple candidate devices that can send the upgrade file corresponding to the upgrade information to the device to be upgraded, but the device to be upgraded only needs one upgrade file to complete the upgrade. If multiple candidate devices send the upgrade file corresponding to the upgrade information to the device to be upgraded, it will cause a waste of resources. Therefore, the device to be upgraded needs to screen multiple candidate devices to determine the target service device and request the upgrade file from the target service device. The specific process of the device to be upgraded requesting the upgrade file from the target service device will be introduced later.

[0105] In the embodiment of the present invention, multiple candidate devices receive the upgrade broadcast, and each candidate device feeds back its corresponding matching request to the device to be upgraded according to the upgrade broadcast. The matching request fed back by each candidate device includes candidate upgrade information of the candidate device. The device to be upgraded determines the target service device according to the multiple candidate upgrade information. The specific process of determining the target service device according to the multiple candidate upgrade information will be introduced later.

[0106] S3. The target service device receives the upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes information to be upgraded.

[0107] In the embodiment of the present invention, multiple candidate devices in the same local area network as the device to be upgraded will receive the upgrade broadcast, and the multiple candidate devices include the target service device. The target service device receives the upgrade broadcast and obtains the upgrade information included in the upgrade broadcast.

[0108] S4. The target service device feeds back an upgrade file to the device to be upgraded according to the information to be upgraded.

[0109] In the embodiment of the present invention, for each candidate device, the candidate device determines the candidate upgrade information according to the information to be upgraded, and if the candidate upgrade information is consistent with the information to be upgraded, a matching request is sent to the device to be upgraded. There are multiple candidate devices, and the multiple candidate devices include a target service device. The candidate upgrade information corresponding to the target service device is recorded as the target information to be upgraded. For the target service device, the target service device also needs to determine whether the information to be upgraded is consistent with the target information to be upgraded.

[0110] In an embodiment of the present invention, if multiple candidate upgrade information (including target information to be upgraded) are consistent with the information to be upgraded, the device to be upgraded can receive multiple matching requests. The device to be upgraded selects a target service device based on multiple matching requests. After the device to be upgraded determines the target service device, it sends an upgrade instruction to the target service device. Only one candidate device will receive the upgrade instruction, that is, the candidate device that receives the upgrade instruction is the target service device. The target service device feeds back the upgrade file according to the upgrade instruction. The specific process of the target service device feeding back the upgrade file to the device to be upgraded according to the information to be upgraded will be described in detail later.

[0111] S5. The device to be upgraded upgrades the system according to the upgrade file to achieve system upgrade of the device to be upgraded.

[0112] In an embodiment of the present invention, the device to be upgraded receives the upgrade file fed back by the target service device, and performs an upgrade according to the upgrade file to repair the system startup failure. After the upgrade is completed, the system is restarted. If the system can start normally, the repair is completed.

[0113] In an embodiment of the present invention, when the system cannot be started normally and cannot access the external network for upgrading or troubleshooting, the device to be upgraded can be upgraded through the candidate device. Specifically, when the system cannot be started normally and cannot access the external network for upgrading or troubleshooting, the device to be upgraded sends an upgrade broadcast to the local area network. Multiple candidate devices can receive the upgrade broadcast through the local area network and feedback their corresponding matching requests. The matching request includes candidate upgrade information. The upgrade broadcast is sent through the local area network without the system accessing the Internet. The device to be upgraded can filter the most matching candidate upgrade information from the multiple matching requests received, and send a matching request to the target service device corresponding to the filtered candidate upgrade information, and receive the upgrade file fed back by the target service device, and upgrade according to the upgrade file to repair the system startup failure. In the whole process of the present invention, there is no need for technical personnel to check the cause of the system startup failure, select upgrade files for the system, and upgrade the system, which greatly saves manpower and has high repair efficiency.

[0114] Next, the specific process of requesting the target service device to upgrade the file is introduced. Specifically, step S2 includes:

[0115] S21. Send an upgrade broadcast corresponding to the information to be upgraded to the local area network where the device to be upgraded is located, so that the multiple candidate devices can feedback multiple matching requests according to the upgrade broadcast.

[0116] In the embodiment of the present invention, multiple candidate devices receive the upgrade broadcast. For one candidate device, it is determined whether the information to be upgraded included in the upgrade broadcast is consistent with the candidate upgrade information in the candidate device. If they are consistent, a matching request is fed back. The specific process of determining whether the information to be upgraded in the upgrade broadcast is consistent with the candidate upgrade information will be described later.

[0117] S22: Determine a target service device according to the multiple matching requests.

[0118] In an embodiment of the present invention, for a candidate device, the matching request of the candidate device includes the candidate upgrade information corresponding to the candidate device; as described above, the information to be upgraded includes a partition name and a partition version number, or the information to be upgraded includes a system name and a system version number; in an embodiment of the present invention, the candidate upgrade information includes a candidate partition name and a candidate partition version number, or the candidate upgrade information includes a candidate system name and a candidate system version number. The device to be upgraded selects a target service device based on multiple candidate upgrade information.

[0119] In the embodiment of the present invention, the upgrade broadcast is a data packet sent in a broadcast form, and each byte of the data packet represents different information, as shown in Table 1:

[0120] Table 1

[0121]

[0122] In the embodiment of the present invention, the partition in the system or the entire system can be determined to be upgraded by the 4th to 19th bytes in the data packet. When the partition in the system needs to be upgraded, the 4th to 11th bytes are 0.

[0123] Specifically, step S22 includes:

[0124] S221. Taking any one of the multiple candidate upgrade information that meets a preset condition as the target information to be upgraded, wherein the preset condition includes: the target information to be upgraded is consistent with the information to be upgraded, or the target information to be upgraded is the highest version of the candidate upgrade information among the multiple candidate upgrade information.

[0125] In an embodiment of the present invention, candidate upgrade information that is consistent with the information to be upgraded can be selected from multiple candidate upgrade information as target information to be upgraded. The so-called candidate upgrade information that is consistent with the information to be upgraded means: the partition name in the candidate upgrade information is consistent with the partition name in the information to be upgraded, and the partition version number in the candidate upgrade information is consistent with the partition version number in the information to be upgraded; when the system needs to be upgraded, the system name in the candidate upgrade information is consistent with the system name in the information to be upgraded, and the system version number in the candidate upgrade information is consistent with the system version number in the information to be upgraded.

[0126] For example, the information to be upgraded is: the partition name is system, the partition version number is 2.1.24, if one of the candidate upgrade information is: the candidate partition name is system, the candidate partition version number is 2.1.24, then the candidate upgrade information is used as the target information to be upgraded. If at least two of the multiple candidate upgrade information are consistent with the information to be upgraded, then one of the at least two candidate upgrade information is selected as the target information to be upgraded.

[0127] In an embodiment of the present invention, the target information to be upgraded may also be the candidate upgrade information of the highest version among the multiple candidate upgrade information. The so-called candidate upgrade information of the highest version may be determined based on the version number in the candidate upgrade information, and the larger the value corresponding to the version number, the higher the version number is considered to be. For example, for two information to be upgraded, if the value corresponding to the version number included in the first information to be upgraded of the two information to be upgraded is greater than the version number included in the second information to be upgraded of the two information to be upgraded, then the version number of the first information to be upgraded is considered to be higher than the version number of the second information to be upgraded.

[0128] For example, the information to be upgraded is: the partition name is system, and the partition version number is 2.1. If candidate upgrade information 1 among multiple candidate upgrade information is: the candidate partition name is system, and the candidate partition version number is 2.1, if candidate upgrade information 2 among multiple candidate upgrade information is: the candidate partition name is system, and the candidate partition version number is 2.2, since 2.2 is greater than 2.1, it is considered that the version number of candidate upgrade information 2 is higher than the version number of candidate upgrade information 1. If candidate upgrade information 2 is the candidate upgrade information with the highest version number among multiple candidate upgrade information, candidate upgrade information 2 is used as the target information to be upgraded.

[0129] S222: Use the candidate device corresponding to the target to-be-upgraded information as the target service device.

[0130] In the embodiment of the present invention, the device to be upgraded determines the target upgrade information from multiple candidate upgrade information according to preset conditions, and uses the candidate device corresponding to the target upgrade information as the target service device. For example, multiple candidate devices include candidate device 1, candidate device 2, and candidate device 3. The device to be upgraded determines the target service device according to the candidate upgrade information corresponding to each candidate device. Assuming that the candidate upgrade information corresponding to candidate device 1 meets the preset conditions (the candidate upgrade information of candidate device 1 is consistent with the candidate upgrade information to be upgraded, or the candidate upgrade information of candidate device 1 is the candidate upgrade information with the highest version number among the candidate upgrade information), candidate device 1 is used as the target service device.

[0131] S23: Send an upgrade instruction to the target service device, so that the target service device feeds back an upgrade file according to the upgrade instruction.

[0132] In the embodiment of the present invention, for a candidate upgrade information, if the candidate device determines that the information to be upgraded is consistent with the candidate upgrade information, a matching request is sent to the device to be upgraded, and the matching request includes the simple file transfer protocol service address and port number of the candidate upgrade device, so that the device to be upgraded can send the upgrade instruction to the candidate device according to the service address and port number. After the device to be upgraded determines the target service device, the matching request corresponding to the target service device includes the target service address and the target port number.

[0133] Specifically, step S23 includes:

[0134] S231. Send an upgrade instruction to the target service device according to the target service address and the target port number, wherein the upgrade instruction includes the service address to be upgraded and the port to be upgraded of the simple file transfer protocol corresponding to the device to be upgraded, so that the target service device can feedback the upgrade file according to the service address to be upgraded and the port to be upgraded.

[0135] In the embodiment of the present invention, a Trivial File Transfer Protocol (TFTP) is used to transfer files between a TFT client and a TFTP server. TFTP performs file transfer based on the UDP protocol and is generally used to transfer files in a local area network.

[0136] In the embodiment of the present invention, the target service device acts as a TFTP server, and the device to be upgraded acts as a TFT client. The device to be upgraded sends an upgrade instruction to the target service device according to the target service address and the target port number, and the upgrade instruction includes the service address to be upgraded and the port to be upgraded, see the 2nd to 3rd bytes, and the 20th to 23rd bytes in Table 1. A connection is established between the target service device and the device to be upgraded according to the target service address, the target port number, the service address to be upgraded, and the port to be upgraded to transfer the upgrade file.

[0137] Next, the specific process of the target service device feeding back the upgrade file to the device to be upgraded according to the information to be upgraded is introduced. Specifically, step S4 includes:

[0138] S41. The target service device determines the target information to be upgraded corresponding to the information to be upgraded. If the information to be upgraded is consistent with the target information to be upgraded, a matching request is sent to the device to be upgraded, so that the device to be upgraded feeds back an upgrade instruction according to the matching request.

[0139] In an embodiment of the present invention, after receiving the upgrade broadcast, each candidate device will compare its own candidate upgrade information with the information to be upgraded. If the information to be upgraded is consistent with the candidate upgrade information, the candidate device sends a matching request to the device to be upgraded. The multiple candidate devices include a target service device. The target service device compares whether the target information to be upgraded is consistent with the information to be upgraded. If they are consistent, a matching request is sent to the device to be upgraded.

[0140] Specifically, when the information to be upgraded includes a partition name and a partition version number, step S41 includes:

[0141] S41a1. Determine a target candidate partition according to the partition name, wherein the target candidate partition name corresponding to the target candidate partition is consistent with the partition name.

[0142] In an embodiment of the present invention, when the information to be upgraded includes a partition name and a partition version number, the target service device determines a target candidate partition that is consistent with the partition name. For example, if the partition name is system, the target service device determines a partition named system in itself, which is the target candidate partition.

[0143] S41a2: If the target candidate partition version number corresponding to the target candidate partition is equal to or higher than the partition version number, a matching request is sent to the device to be upgraded.

[0144] In the embodiment of the present invention, the target candidate partition version number is the version number corresponding to the target candidate partition in the target device, and the so-called target candidate partition version number is equal to or higher than the partition version number, which means that the value corresponding to the target candidate partition version number is equal to or higher than the value corresponding to the partition version number. If the target candidate partition version number corresponding to the target candidate partition is equal to or higher than the partition version number, a matching request is sent to the device to be upgraded, and the matching request is the matching request corresponding to the target candidate device, and the matching request at least includes the target candidate partition name and the target candidate partition version number.

[0145] For example, the partition version number is 2.21. If the target candidate partition version number is 2.21, the target candidate partition version number is equal to the partition version number, and the target candidate device sends a matching request to the device to be upgraded; if the target candidate partition version number is 2.22, the target candidate partition version number is higher than the partition version number, and the target candidate device sends a matching request to the device to be upgraded; if the target candidate partition version number is 2.20, the target candidate partition version number is less than the partition version number, and no matching request is sent to the device to be upgraded.

[0146] When the information to be upgraded includes the system name and the system version number, step S41 includes:

[0147] S41b1. Obtain a target candidate system name. If the target candidate system name is consistent with the system name, obtain a version number of the target candidate system.

[0148] In an embodiment of the present invention, when the information to be upgraded includes a system name and a system version number, the target service device determines a target candidate system that is consistent with the system name. For example, if the system name is type 1 and the system name of the target service device is also system 1, the target candidate system version number is obtained.

[0149] S41b2: If the target candidate system version number is equal to or higher than the system version number, send a matching request to the device to be upgraded.

[0150] In an embodiment of the present invention, the so-called target candidate system version number is equal to or higher than the system version number, which means that the numerical value corresponding to the target candidate system version number is greater than or equal to the numerical value corresponding to the system version number. If the target candidate system version number is equal to or higher than the system version number, a matching request is sent to the device to be upgraded, and the matching request includes at least the target candidate system name and the target candidate system version number.

[0151] For example, referring to Table 2, the candidate devices include candidate device 1, candidate device 2, and candidate device 3. The candidate system name corresponding to candidate device 1 is type 1, the candidate system name corresponding to candidate device 2 is type 2, and the candidate system name corresponding to candidate device 3 is type 3, wherein the candidate system version numbers corresponding to type 1 include: V102 and V108, the candidate system version numbers corresponding to type 2 include: V220, V221, and V225, and the candidate system version numbers corresponding to type 3 include V301. If the system name is type 1 and the system version number is V102, then after the candidate devices include candidate device 1, candidate device 2, and candidate device 3 receiving the upgrade broadcast, only candidate device 1 will feedback the matching request to the device to be upgraded.

[0152] In an embodiment of the present invention, the matching request fed back by the target service device includes the target candidate system name, the target candidate system version number, the target service address and the target port number of the target service device, and the target service address and the target port number of the target service device are used for the device to be upgraded to send an upgrade instruction to the target candidate device.

[0153] Table 2

[0154]

[0155] In an embodiment of the present invention, the information to be upgraded includes a partition name and a partition version number, or the information to be upgraded includes a system name and a system version number; in an embodiment of the present invention, the candidate upgrade information includes a candidate partition name and a candidate partition version number, or the candidate upgrade information includes a candidate system name and a candidate system version number. Correspondingly, the matching request includes a target candidate partition name and a target partition version number, or the matching request includes a target candidate system and a target candidate system version number.

[0156] S42: The target service device receives the upgrade instruction and feeds back the upgrade file to the device to be upgraded according to the upgrade instruction.

[0157] In the embodiment of the present invention, only the target service device receives the instruction to be upgraded. If the information to be upgraded includes the system name and the system version number, the target service device creates a system image according to the instruction to be upgraded, obtains the upgrade file corresponding to the system name, and transmits the upgrade file to the device to be upgraded by using a data stream. If the information to be upgraded includes the partition name and the partition version number, the target service device creates a partition image corresponding to the partition name according to the instruction to be upgraded, obtains the upgrade file corresponding to the partition name, and transmits the upgrade file to the device to be upgraded by using a data stream.

[0158] The embodiment of the present invention also provides an upgrade system, see Figure 4, the upgrade system includes a device to be upgraded and multiple candidate devices, wherein the multiple candidate devices include a target service device 10, and the multiple candidate devices and the device to be upgraded 20 are in the same local area network;

[0159] The device to be upgraded 20 is used to determine the to-be-upgraded information corresponding to the system when a system failure occurs in the device to be upgraded; send an upgrade broadcast corresponding to the to-be-upgraded information to the local area network where the device to be upgraded is located, and obtain an upgrade file sent by the candidate device based on the upgrade broadcast; upgrade the system according to the upgrade file to achieve system upgrade of the device to be upgraded;

[0160] The target service device 10 is used to receive the upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes the information to be upgraded; and feed back the upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded can be upgraded according to the upgrade file.

[0161] The embodiment of the present invention also provides a computer device, which may be a terminal, and the internal structure is as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an upgrade method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0162] Those skilled in the art will understand that Figure 5 What is shown is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0163] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0164] When a system failure occurs in the device to be upgraded, determine the information to be upgraded corresponding to the system; send an upgrade broadcast corresponding to the information to be upgraded to the local area network where the device to be upgraded is located, and obtain the upgrade file sent by the candidate device based on the upgrade broadcast; upgrade the system according to the upgrade file to achieve system upgrade of the device to be upgraded; or receive the upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes the information to be upgraded; and feed back the upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded can be upgraded according to the upgrade file.

[0165] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0166] When a system failure occurs in the device to be upgraded, the corresponding information to be upgraded of the system is determined; an upgrade broadcast corresponding to the information to be upgraded is sent to the local area network where the device to be upgraded is located, and an upgrade file sent by the candidate device based on the upgrade broadcast is obtained; the system is upgraded according to the upgrade file to achieve system upgrade of the device to be upgraded.

[0167] Alternatively, an upgrade broadcast sent by the device to be upgraded is received, wherein the upgrade broadcast includes information to be upgraded; and an upgrade file is fed back to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file.

[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. An upgrading method, characterized in that: Applied to a device to be upgraded in an upgrade system, the upgrade system further comprising a candidate device, the candidate device and the device to be upgraded being in the same local area network, the method comprising: When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system; Sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast; Upgrading the system according to the upgrade file to achieve system upgrade of the device to be upgraded; When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system includes: When a startup failure occurs in the system of the device to be upgraded, restart the system to enter the boot program; Determine the data in each partition of the system according to the boot program to obtain first verification codes respectively corresponding to each partition; Obtaining a second verification code corresponding to each of the partitions, wherein the second verification code is a verification code generated when the system is successfully started; The information to be upgraded is determined according to the first verification codes and the second verification codes.

2. The method according to claim 1, characterized in that: The determining the information to be upgraded according to the first verification codes and the second verification codes includes: For each partition, if the first check code corresponding to the partition is inconsistent with the second check code corresponding to the partition, obtain the partition name and partition version number corresponding to the partition; The information to be upgraded is obtained according to the partition name and the partition version number.

3. The method according to claim 2, characterized in that The step of determining the information to be upgraded according to the first verification codes and the second verification codes further includes: For any partition, if the first verification code corresponding to the partition is consistent with the second verification code corresponding to the partition, then the system name and system version number corresponding to the system are obtained; The information to be upgraded is obtained according to the system name and the system version number.

4. The method according to claim 1, characterized in that The upgrade system includes a plurality of candidate devices, wherein the plurality of candidate devices include a target service device; the step of sending an upgrade broadcast corresponding to the information to be upgraded to a local area network where the device to be upgraded is located, and obtaining an upgrade file sent by the candidate device based on the upgrade broadcast, comprises: Sending an upgrade broadcast corresponding to the upgrade information to the local area network where the device to be upgraded is located, so that the multiple candidate devices can feedback multiple matching requests according to the upgrade broadcast; determining a target service device according to the multiple matching requests; An upgrade instruction is sent to the target service device, so that the target service device feeds back an upgrade file according to the upgrade instruction.

5. The method according to claim 4, characterized in that For a candidate device, the matching request corresponding to the candidate device includes candidate upgrade information corresponding to the candidate device; The determining the target service device according to the multiple matching requests includes: Taking any one of the candidate upgrade information satisfying a preset condition among the multiple candidate upgrade information as the target upgrade information, wherein the preset condition includes: the target upgrade information is consistent with the information to be upgraded, or the target upgrade information is the highest version of the candidate upgrade information among the multiple candidate upgrade information; The candidate device corresponding to the target to-be-upgraded information is used as the target service device.

6. The method according to claim 5, characterized in that The target information to be upgraded includes: the target service address and target port number of the simple file transfer protocol corresponding to the target service device; the sending of the upgrade instruction to the target service device so that the target service device can feedback the upgrade file according to the upgrade instruction includes: An upgrade instruction is sent to the target service device according to the target service address and the target port number, wherein the upgrade instruction includes the service address to be upgraded and the port to be upgraded of the simple file transfer protocol corresponding to the device to be upgraded, so that the target service device can feedback the upgrade file according to the service address to be upgraded and the port to be upgraded.

7. An upgrading method, characterized in that: Applied to a target service device in an upgrade system, the upgrade system includes multiple candidate devices, the target service device is one of the multiple candidate devices, the upgrade system also includes a device to be upgraded, the candidate device and the device to be upgraded are in the same local area network, the method includes: Receiving an upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes information to be upgraded; Feedback an upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file; When a startup failure occurs in the system of the device to be upgraded, the device to be upgraded determines the upgrade information corresponding to the system, including: When a startup failure occurs in the system of the device to be upgraded, the system is restarted to enter the boot program; the data in each partition of the system is determined according to the boot program to obtain the first verification code corresponding to each partition; the second verification code corresponding to each partition is obtained, wherein the second verification code is the verification code generated when the system is successfully started; the information to be upgraded is determined according to the first verification codes and the second verification codes.

8. The method according to claim 7, characterized in that Feeding back the upgrade file to the device to be upgraded according to the information to be upgraded includes: Determine the target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, send a matching request to the device to be upgraded, so that the device to be upgraded feeds back an upgrading instruction according to the matching request; The upgrade instruction is received, and an upgrade file is fed back to the device to be upgraded according to the upgrade instruction.

9. The method according to claim 8, characterized in that The determining target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, sending a matching request to the device to be upgraded, comprises: When the information to be upgraded includes a partition name and a partition version number, determining a target candidate partition according to the partition name, wherein the target candidate partition name corresponding to the target candidate partition is consistent with the partition name; If the target candidate partition version number corresponding to the target candidate partition is equal to or higher than the partition version number, a matching request is sent to the device to be upgraded.

10. The method according to claim 8, characterized in that The determining target information to be upgraded corresponding to the information to be upgraded, and if the information to be upgraded is consistent with the target information to be upgraded, sending a matching request to the device to be upgraded, comprises: When the information to be upgraded includes a system name and a system version number, obtaining a target candidate system name, and if the target candidate system name is consistent with the system name, obtaining the target candidate system version number, wherein the target candidate system is a system of the target service device; If the target candidate system version number is equal to or higher than the system version number, a matching request is sent to the device to be upgraded.

11. An upgrade system, characterized in that: The upgrade system includes a device to be upgraded and multiple candidate devices, wherein the multiple candidate devices include a target service device, and the multiple candidate devices and the device to be upgraded are in the same local area network; The device to be upgraded is used to determine the to-be-upgraded information corresponding to the system when a startup failure occurs in the system of the device to be upgraded; send an upgrade broadcast corresponding to the to-be-upgraded information to the local area network where the device to be upgraded is located, and obtain an upgrade file sent by the candidate device based on the upgrade broadcast; upgrade the system according to the upgrade file to achieve system upgrade of the device to be upgraded; The target service device is configured to receive an upgrade broadcast sent by the device to be upgraded, wherein the upgrade broadcast includes information to be upgraded; and feed back an upgrade file to the device to be upgraded according to the information to be upgraded, so that the device to be upgraded is upgraded according to the upgrade file; When a startup failure occurs in the system of the device to be upgraded, determining the upgrade information corresponding to the system includes: When a startup failure occurs in the system of the device to be upgraded, the system is restarted to enter the boot program; the data in each partition of the system is determined according to the boot program to obtain the first verification code corresponding to each partition; the second verification code corresponding to each partition is obtained, wherein the second verification code is the verification code generated when the system is successfully started; the information to be upgraded is determined according to the first verification codes and the second verification codes.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 or any one of claims 7 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 or any one of claims 7 to 10 are implemented.

Citation Information

Patent Citations

  • System and method for automatically upgrading network devices in batch in factory

    CN105450455A

  • NVR software partner repair method and system

    CN106648973A

  • Equipment upgrading method and device and household appliance

    CN108376078A

  • A BOOT area code online upgrading method, a heliostat controller and a heliostat

    CN109901867A

  • Apparatus and method for upgrading software of targetsystem using wireless LAN

    KR1020050063528A