A device upgrading method and apparatus, intelligent power supply, and storage medium

By using the intelligent power supply to download requests and the device firmware acquisition mechanism, the problem of startup failure caused by power failure during device upgrades has been solved, thus improving the reliability of device upgrades and optimizing flash space, and avoiding the risk of device bricking.

CN122195460APending Publication Date: 2026-06-12ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2024-12-12
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The problem of power failure during equipment upgrades causing equipment to fail to start normally, especially for some products that cannot be upgraded or whose power loss during the upgrade process is irreversible, poses risks of bricking the equipment and wasting flash memory.

Method used

The intelligent power supply sends a download request broadcast to identify the download device and sends the upgrade configuration information to the download device to obtain the device firmware. The intelligent power supply obtains the device firmware and performs the upgrade, avoiding boot failure caused by device power failure. It does not rely on the boot program and reduces the flash memory usage.

Benefits of technology

This improves the reliability of the device upgrade process, is not limited by the main control chip, allows any device to be upgraded, reduces flash memory usage, and avoids the risk of device bricking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122195460A_ABST
    Figure CN122195460A_ABST
Patent Text Reader

Abstract

The application discloses a device upgrading method and device, an intelligent power supply and a storage medium. The method comprises the following steps: when an intelligent power supply of a device to be upgraded detects that an upgrading event of the device to be upgraded is triggered, the intelligent power supply sends a download request broadcast; the intelligent power supply determines a download device from all intelligent devices responding to the download request broadcast, and sends upgrading configuration information of the device to be upgraded to the download device, so that the download device acquires device firmware corresponding to the device to be upgraded based on the upgrading configuration information; and the intelligent power supply acquires the device firmware sent by the download device, and upgrades the device to be upgraded based on the device firmware. The scheme solves the problem that the device is bricked and cannot be started due to power failure in the device upgrading process, and not only can the device upgrading be no longer limited by a master control chip, so that upgrading operation of any device is realized, but also the device upgrading is independent of a boot program and does not need to back up a partition, so that the occupied space of a flash is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment upgrade technology, and in particular to an equipment upgrade method, apparatus, intelligent power supply and storage medium. Background Technology

[0002] With the development of technology, various embedded products are increasingly entering people's lives, and upgrading embedded products has always been a key focus of product development. Continuous product upgrades can improve the user experience, address user pain points, and enhance product competitiveness without increasing user costs. However, if an unexpected power outage occurs during the upgrade process, the device firmware may only be partially burned, causing the device to fail to boot. Furthermore, some products may be unable to undergo OTA upgrades due to limitations of the main control chip. Therefore, resolving the issue of some products being unable to upgrade or experiencing irrecoverable power outages during upgrades is of paramount importance in product hardware and software design. Summary of the Invention

[0003] This invention provides a device upgrade method, apparatus, intelligent power supply, and storage medium, which solves the problem of device failure and inability to start due to power loss during the upgrade process.

[0004] According to one aspect of the present invention, a device upgrade method is provided, comprising:

[0005] When the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered, the smart power supply sends a download request broadcast.

[0006] The smart power supply determines the download device from all smart devices that respond to the download request broadcast, and sends the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information.

[0007] The smart power supply acquires the device firmware sent by the downloading device and upgrades the device to be upgraded based on the device firmware.

[0008] According to another aspect of the present invention, a device upgrade apparatus is provided, comprising:

[0009] The proxy download request broadcasting module is used to send a proxy download request broadcast when the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered.

[0010] The upgrade configuration information sending module is used by the smart power supply to determine the download device from all smart devices that respond to the download request broadcast, and send the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information.

[0011] The device upgrade module is used by the smart power supply to obtain the device firmware sent by the downloading device, and to upgrade the device to be upgraded based on the device firmware.

[0012] According to another aspect of the present invention, a smart power supply is provided, the smart power supply comprising:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the device upgrade method according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the device upgrade method described in any embodiment of the present invention.

[0017] In the device upgrade scheme of this invention, when the smart power supply of the device to be upgraded detects that an upgrade event of the device to be upgraded has been triggered, the smart power supply sends a download request broadcast. The smart power supply determines the download device from all smart devices responding to the download request broadcast and sends the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information. The smart power supply obtains the device firmware sent by the download device and upgrades the device to be upgraded based on the device firmware. The technical solution provided by this invention solves the problem of device bricking and inability to boot due to power failure during device upgrades. It not only removes the limitation of the main control chip on device upgrades, thus enabling upgrade operations on any device and improving device reliability, but also eliminates the need for a boot program and backup partitions, reducing flash memory usage.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of a device upgrade method provided in Embodiment 1 of the present invention;

[0021] Figure 2 This is a schematic diagram of the electrical connection between a smart device and a smart power supply, provided in an embodiment of the present invention.

[0022] Figure 3 A schematic diagram of a device upgrade process provided in an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of the structure of an equipment upgrade device provided in Embodiment 2 of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an intelligent power supply for implementing the device upgrade method of this embodiment of the invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] In related technologies, different products employ different upgrade strategies. Current upgrade solutions mainly include: Solution 1: Online upgrades are not supported for some products with simple functions and low costs. Solution 2: Devices are not backed up, and power outages are not permitted during the upgrade process. Solution 3: Devices use an A+B upgrade scheme. Specifically, a boot program is first burned into the device. The device has two built-in application programs, A and B. When the device runs from partition A, an upgrade will upgrade partition B. Once partition B's upgrade is complete and verification is successful, the bootloader switches to partition B as the running partition. If the upgrade fails or verification fails, the running partition is not switched. This process is repeated for each upgrade. Solution 4: Devices use an A+A upgrade scheme. Specifically, a boot program is first burned into the device. The device has two built-in identical application programs, A1 and A2. The device boots from partition A1 each time. During each program upgrade, the upgrade package is burned to the backup partition A2 and verified. Once verification is successful, an upgrade flag is configured, and the device restarts. After the device restarts, it checks whether the upgrade flag is set and also checks the version information of the backup partition A2. If the upgrade flag is set, it copies the latest program from the backup partition A2 to the running partition A1 and then starts the device.

[0028] However, all four upgrade solutions mentioned above still have various problems and cannot truly guarantee a permanent upgrade without bricking the device. Solution 1: Due to certain chip selection issues, OTA upgrades are not possible. Serious problems necessitate factory repair, hindering user experience and competitiveness. Solution 2: The device lacks a backup partition, saving flash space, but power outages during the upgrade process can corrupt the device's operating program, preventing normal startup and remote recovery, requiring factory repair. Solutions 3 and 4: By adding a backup partition, the problem of device failure during upgrades due to power loss is minimized, but the presence of a backup partition leads to some flash memory waste. Furthermore, both solutions include a boot program. While this partition usually doesn't need upgrading, it may be necessary in special cases, such as flash partition changes. Power outages during boot program upgrades still present the same problems as Solution 2, failing to ensure true device recovery.

[0029] Example 1

[0030] Figure 1 This is a flowchart illustrating a device upgrade method according to Embodiment 1 of the present invention. This embodiment is applicable to upgrading smart devices. The method can be executed by a device upgrade device, which can be implemented in hardware and / or software and can be configured within a smart power supply. Figure 1 As shown, the method includes:

[0031] S110. When the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered, the smart power supply sends a download request broadcast.

[0032] The device to be upgraded can be any smart device, such as smart home devices and smart mobility devices. For example, let's take a smart home device as an example. Figure 2 This is a schematic diagram illustrating the electrical connection between a smart device and a smart power supply, provided as an embodiment of the present invention. Figure 2As shown, to reduce the number of devices connected to the home network, the smart power supply does not connect to the internet independently. Instead, the smart power supplies of various smart devices can communicate with each other via power line carrier communication. This interoperability between smart power supplies, between smart devices and smart power supplies, and through the smart device connection scheme, enables communication between the smart power supply and the home network. The smart power supply can be electrically connected to the smart device via a USB cable. The power line in the USB cable supplies power to the smart device, while the data line is used for data communication and transmission between the smart power supply and the smart device. Different interface protocols are implemented for different smart devices, such as SPI, UART, and SWD. When the smart power supply detects a change in power consumption from zero to some, it considers a smart device to be connected. The smart power supply sends a keep-alive message to the smart device using a pre-defined communication protocol to maintain the device's connection. Simultaneously, it obtains and saves the smart device's firmware version, firmware download address, Flash type, upgrade protocol, etc.

[0033] In this embodiment of the invention, the smart power supply electrically connected to the device to be upgraded via a USB cable is referred to as the smart power supply of the device to be upgraded. When the smart power supply of the device to be upgraded detects that an upgrade event of the device to be upgraded has been triggered, the smart power supply of the device to be upgraded broadcasts a download request. For example, when the smart power supply of the device to be upgraded receives an upgrade instruction sent by the device to be upgraded, it determines that the smart power supply of the device to be upgraded has detected that an upgrade event of the device to be upgraded has been triggered.

[0034] Optionally, the smart power supply of the device to be upgraded detects that an upgrade event of the device to be upgraded has been triggered, including: determining that an upgrade event of the device to be upgraded has been triggered when the smart power supply of the device to be upgraded detects that the device to be upgraded is in an abnormal state; or, determining that an upgrade event of the device to be upgraded has been triggered when the smart power supply of the device to be upgraded receives an upgrade command sent by the device to be upgraded. In this embodiment of the invention, when the smart power supply of the device to be upgraded detects that the device to be upgraded is in a suspended state, it determines that the device to be upgraded is in an abnormal state. Optionally, the smart power supply of the device to be upgraded detects that the device to be upgraded is in an abnormal state, including: determining that the device to be upgraded is in an abnormal state when the smart power supply of the device to be upgraded cannot keep the device to be upgraded alive; or, the smart power supply of the device to be upgraded acquires the power consumption waveform of the device to be upgraded, and determines that the device to be upgraded is in an abnormal state when the power consumption waveform meets preset power consumption abnormality characteristics. For example, if the device to be upgraded is in a suspended state, the device to be upgraded cannot keep the device to be upgraded alive. Therefore, if the smart power supply of the device to be upgraded detects that it cannot keep the device to be upgraded alive, it determines that the device to be upgraded is in an abnormal state. For another example, the smart power supply of the device to be upgraded acquires the power consumption waveform of the device to be upgraded and performs power consumption waveform detection. If the power consumption waveform of the device to be upgraded meets the preset power consumption abnormality characteristics, such as the power consumption waveform of the device to be upgraded meeting the characteristics of abnormal device operation or continuous restart, then it is determined that the device to be upgraded is in an abnormal state.

[0035] When the smart power supply of the device to be upgraded detects that the device is in an abnormal state, it determines that the upgrade event of the device to be upgraded has been triggered. Optionally, if the user needs to force an upgrade of the device to be upgraded, the user can send an upgrade command to the device to be upgraded. The device to be upgraded responds to the upgrade command input by the user and sends an upgrade command to the smart power supply through the main control chip. When the smart power supply receives the upgrade command sent by the main control chip of the device to be upgraded, it determines that the upgrade event of the device to be upgraded has been triggered.

[0036] When the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered, the smart power supply of the device to be upgraded enters the master control upgrade mode and broadcasts a download request through the power line carrier unit.

[0037] S120. The smart power supply determines the downloading device from all smart devices that respond to the downloading request broadcast, and sends the upgrade configuration information of the device to be upgraded to the downloading device, so that the downloading device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information.

[0038] In this embodiment of the invention, after the smart power supply broadcasts a download request, all other smart devices capable of executing the download request respond via power line carrier communication through their connected smart power supply. These other smart devices that send download responses are referred to as smart devices responding to the download request broadcast. There can be one or more smart devices responding to the download request broadcast; this embodiment does not limit the number of smart devices responding to the download request broadcast. The smart power supply determines the download device from all smart devices responding to the download request broadcast. For example, it can randomly select one smart device from all smart devices responding to the download request broadcast, or it can select the smart device that sends the fastest download response, or it can determine the download device based on a pre-set download device selection strategy. It should be noted that this embodiment does not limit the method of determining the download device.

[0039] After identifying the device to be upgraded, the smart power supply establishes point-to-point communication with it. The smart power supply sends upgrade configuration information, such as the model, firmware version, and firmware download address of the device to be upgraded, to the device, enabling it to obtain the corresponding firmware. For example, the device can request to download the firmware corresponding to the device to be upgraded from the firmware download address based on the model and firmware version information.

[0040] S130, the smart power supply obtains the device firmware sent by the downloading device, and upgrades the device to be upgraded based on the device firmware.

[0041] In this embodiment of the invention, after the proxy download device obtains the device firmware corresponding to the device to be upgraded, it can transmit the device firmware to the smart power supply of the device to be upgraded via power line carrier communication. The smart power supply obtains the device firmware transmitted by the proxy download device and upgrades the device to be upgraded based on the device firmware. Optionally, the smart power supply obtaining the device firmware sent by the proxy download device includes: the smart power supply obtaining the device firmware sent by the smart power supply of the proxy download device via power line carrier communication; wherein, after the proxy download device obtains the device firmware corresponding to the device to be upgraded, the proxy download device sends the device firmware to the smart power supply of the proxy download device. It can be understood that after the proxy download device obtains the device firmware corresponding to the device to be upgraded, the proxy download device sends the device firmware to the smart power supply of the proxy download device, the smart power supply of the proxy download device receives the device firmware, and transmits the device firmware to the smart power supply of the device to be upgraded via power line carrier communication.

[0042] Optionally, upgrading the device to be upgraded based on the device firmware includes: performing a power-off and restart operation on the device to be upgraded, and simultaneously switching the communication interface with the device to be upgraded to the corresponding device upgrade mode according to the flash type of the device to be upgraded; upgrading the device to be upgraded based on the device firmware in the device upgrade mode. In this embodiment of the invention, after receiving the device firmware sent by the downloading device, the smart power supply of the device to be upgraded performs a forced power-off and restart operation on the device to be upgraded, and simultaneously switches the communication interface between the smart power supply and the device to be upgraded to the corresponding device upgrade mode according to the obtained flash type of the device to be upgraded. The device upgrade mode corresponding to the communication interface between the smart power supply and the device to be upgraded varies depending on the flash type of the device to be upgraded. The smart power supply transmits the device firmware to the device to be upgraded based on the communication protocol corresponding to the device upgrade mode, so that the device to be upgraded can be upgraded based on the device firmware. Figure 2 As shown, the flash memory of a smart device can be located either inside or outside the main control chip. Flash memory located inside the main control chip is called internal flash, and flash memory located outside the main control chip is called external flash. When the flash memory of a smart device is external, the data line in the USB cable used for electrical connection between the smart power supply and the smart device connects both the main control chip and the external flash. However, at any given time, the smart device can only choose to communicate with the smart power supply via either the main control chip or the external flash through the link selection unit. When the smart device fails to boot or in the default configuration, the smart power supply communicates with the external flash in the smart device. When the smart device is functioning normally, the smart device switches to communication between the main control chip and the smart power supply via the link switching unit. When the smart device has built-in flash memory, the smart power supply is electrically connected to the programming port of the smart device's main control chip through the data line in the USB cable. When the smart device is functioning normally, the smart power supply communicates with the smart device's main control chip. When the smart device is malfunctioning, the smart power supply performs the programming function. In the process of the smart power supply performing the programming function, communication protocols such as UART, SPI, SWD, and USB can be used.

[0043] Optionally, the communication interface with the device to be upgraded is switched to the corresponding device upgrade mode according to the flash type of the device to be upgraded. This includes: when the flash type of the device to be upgraded is external flash, controlling the communication link between the smart power supply and the external flash of the device to be upgraded to be established, and switching the communication interface with the device to be upgraded to SPI mode; upgrading the device to be upgraded based on the device firmware in the device upgrade mode includes: the smart power supply writing the device firmware into the external flash of the device to be upgraded in the SPI mode, so that the device to be upgraded is upgraded based on the device firmware written into the external flash. For example, when the flash of the device to be upgraded is external flash, controlling the communication link between the smart power supply and the external flash of the device to be upgraded to be established, that is, controlling the smart power supply to communicate with the external flash of the device to be upgraded, and switching the communication interface of the smart power supply to SPI mode. In SPI mode, the smart power supply directly writes the device firmware of the device to be upgraded into the external flash of the device to be upgraded based on the SPI communication protocol, and the device to be upgraded is upgraded based on the device firmware written into the external flash.

[0044] Optionally, the communication interface with the device to be upgraded is switched to device upgrade mode according to the flash type and device upgrade protocol of the device to be upgraded. This includes: when the flash type of the device to be upgraded is built-in flash, controlling the communication link between the smart power supply and the main control chip of the device to be upgraded to be connected, and switching the communication interface with the device to be upgraded to the upgrade interface mode supported by the device to be upgraded; upgrading the device to be upgraded based on the device firmware in the device upgrade mode, including: the smart power supply sends the device firmware to the main control chip of the device to be upgraded based on the device upgrade protocol in the upgrade interface mode supported by the device to be upgraded, so that the device to be upgraded can be upgraded based on the device firmware. For example, if the flash memory of the device to be upgraded is built-in, the communication link between the intelligent power supply and the main control chip of the device to be upgraded is established. This means the intelligent power supply communicates with the main control chip of the device to be upgraded and switches the communication interface with the device to the upgrade interface mode supported by the device. The upgrade interface mode supported by the device corresponds to the interface protocol of the device to be upgraded. For example, if the interface protocol of the device to be upgraded is UART, then the upgrade interface mode supported by the device is UART mode; similarly, if the interface protocol of the device to be upgraded is SWD, then the upgrade interface mode supported by the device is SWD mode. Under the upgrade interface mode supported by the device to be upgraded, the intelligent power supply burns the device firmware into the main control chip of the device to be upgraded based on the device upgrade protocol. For example, if the upgrade interface mode is SWD mode, then the intelligent power supply burns the device firmware into the main control chip of the device to be upgraded based on the SWD protocol. The device to be upgraded then performs an upgrade based on the device firmware burned into the main control chip.

[0045] Optionally, once the upgrade of the device is complete, the smart power supply will force a power outage and restart of the device.

[0046] For example, Figure 3 This is a schematic diagram of a device upgrade process provided by an embodiment of the present invention. Combined with the description of the above embodiments, it can be understood that... Figure 3 To understand, it will not be discussed further here. Figure 3 To elaborate further.

[0047] The device upgrade method of this invention involves the following steps: When the smart power supply of the device to be upgraded detects that an upgrade event of the device to be upgraded has been triggered, the smart power supply broadcasts a download request. The smart power supply determines a download device from all smart devices responding to the download request broadcast and sends the upgrade configuration information of the device to be upgraded to the download device, so that the download device obtains the device firmware corresponding to the device to be upgraded based on the upgrade configuration information. The smart power supply obtains the device firmware sent by the download device and upgrades the device to be upgraded based on the device firmware. The technical solution provided by this invention solves the problem of device bricking and inability to boot due to power failure during device upgrades. It not only removes the limitation of the main control chip for device upgrades, enabling upgrades for any device and improving device reliability, but also eliminates the need for a boot program and backup partitions, reducing flash memory usage.

[0048] Example 2

[0049] Figure 4 This is a schematic diagram of a device upgrade apparatus provided in Embodiment 2 of the present invention. Figure 4 As shown, the device includes:

[0050] The proxy download request broadcasting module 410 is used to send a proxy download request broadcast when the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered.

[0051] The upgrade configuration information sending module 420 is used by the smart power supply to determine the download device from all smart devices that respond to the download request broadcast, and to send the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information.

[0052] The device upgrade module 430 is used for the smart power supply to obtain the device firmware sent by the downloading device, and to upgrade the device to be upgraded based on the device firmware.

[0053] Optionally, the download request broadcasting module includes:

[0054] The first upgrade event triggering unit is configured to determine that an upgrade event for the device to be upgraded is triggered when the smart power supply of the device to be upgraded detects that the device is in an abnormal state; or...

[0055] The second upgrade event triggering unit is used to determine that the upgrade event of the device to be upgraded has been triggered when the smart power supply of the device to be upgraded receives the upgrade instruction sent by the device to be upgraded.

[0056] Optionally, the second upgrade event triggering unit is used for:

[0057] When the smart power supply of the device to be upgraded fails to stay active, the device to be upgraded is determined to be in an abnormal state; or...

[0058] The intelligent power supply of the device to be upgraded acquires the power consumption waveform of the device to be upgraded, and when the power consumption waveform meets the preset power consumption abnormality characteristics, it determines that the device to be upgraded is in an abnormal state.

[0059] Optionally, the device upgrade module includes:

[0060] The device upgrade mode switching unit is used to perform a power-off restart operation on the device to be upgraded, and simultaneously switch the communication interface with the device to be upgraded to the corresponding device upgrade mode according to the flash type of the device to be upgraded.

[0061] The device upgrade unit is used to upgrade the device to be upgraded based on the device firmware in the device upgrade mode.

[0062] Optionally, a device upgrade mode switching unit is used for:

[0063] When the flash type of the device to be upgraded is external flash, the communication link between the smart power supply and the external flash of the device to be upgraded is turned on, and the communication interface with the device to be upgraded is switched to SPI mode;

[0064] The device upgrade unit is used for:

[0065] The intelligent power supply writes the device firmware into the external flash of the device to be upgraded in the SPI mode, so that the device to be upgraded can be upgraded based on the device firmware written into the external flash.

[0066] Optionally, a device upgrade mode switching unit is used for:

[0067] When the flash type of the device to be upgraded is built-in flash, the communication link between the smart power supply and the main control chip of the device to be upgraded is turned on, and the communication interface with the device to be upgraded is switched to the upgrade interface mode supported by the device to be upgraded.

[0068] Equipment upgrade unit, used for:

[0069] The intelligent power supply sends the device firmware to the main control chip of the device to be upgraded based on the device upgrade protocol of the device to be upgraded in the upgrade interface mode supported by the device to be upgraded, so that the device to be upgraded can be upgraded based on the device firmware.

[0070] Optional, device upgrade module, used for:

[0071] The smart power supply obtains the device firmware sent by the smart power supply of the downloading device via power line carrier communication; wherein, after the downloading device obtains the device firmware corresponding to the device to be upgraded, the downloading device sends the device firmware to the smart power supply of the downloading device.

[0072] The device upgrade apparatus provided in the embodiments of the present invention can execute the device upgrade method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0073] Example 3

[0074] Figure 5 A schematic diagram of the structure of a smart power supply 10 that can be used to implement embodiments of the present invention is shown. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.

[0075] like Figure 5 As shown, the smart power supply 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the smart power supply 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0076] Multiple components in the smart power supply 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, optical disk, etc.; and a communication unit 19, such as a network card, modem, wireless transceiver, etc. The communication unit 19 allows the smart power supply 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0077] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as device upgrade methods.

[0078] In some embodiments, the device upgrade method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the smart power supply 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the device upgrade method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the device upgrade method by any other suitable means (e.g., by means of firmware).

[0079] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0081] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0082] To provide user interaction, the systems and techniques described herein can be implemented on a smart power supply having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the smart power supply. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0083] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0084] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0085] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0086] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for upgrading equipment, characterized in that, include: When the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered, the smart power supply sends a download request broadcast. The smart power supply determines the download device from all smart devices that respond to the download request broadcast, and sends the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information. The smart power supply acquires the device firmware sent by the downloading device and upgrades the device to be upgraded based on the device firmware.

2. The method according to claim 1, characterized in that, The smart power supply of the device to be upgraded detects that an upgrade event has been triggered, including: When the smart power supply of the device to be upgraded detects that the device is in an abnormal state, it determines that the upgrade event of the device to be upgraded has been triggered; or... When the smart power supply of the device to be upgraded receives the upgrade command sent by the device to be upgraded, it determines that the upgrade event of the device to be upgraded has been triggered.

3. The method according to claim 2, characterized in that, The intelligent power supply of the device to be upgraded detects that the device is in an abnormal state, including: When the smart power supply of the device to be upgraded fails to stay active, the device to be upgraded is determined to be in an abnormal state; or... The intelligent power supply of the device to be upgraded acquires the power consumption waveform of the device to be upgraded, and when the power consumption waveform meets the preset power consumption abnormality characteristics, it determines that the device to be upgraded is in an abnormal state.

4. The method according to claim 1, characterized in that, Upgrading the device to be upgraded based on the device firmware includes: Perform a power-off and restart operation on the device to be upgraded, and simultaneously switch the communication interface with the device to the corresponding device upgrade mode according to the flash type of the device to be upgraded. In the device upgrade mode, the device to be upgraded is upgraded based on the device firmware.

5. The method according to claim 4, characterized in that, Based on the flash type of the device to be upgraded, the communication interface with the device to be upgraded will be switched to the corresponding device upgrade mode, including: When the flash type of the device to be upgraded is external flash, the communication link between the smart power supply and the external flash of the device to be upgraded is turned on, and the communication interface with the device to be upgraded is switched to SPI mode; Upgrading the device to be upgraded based on the device firmware in the device upgrade mode includes: The intelligent power supply writes the device firmware into the external flash of the device to be upgraded in the SPI mode, so that the device to be upgraded can be upgraded based on the device firmware written into the external flash.

6. The method according to claim 4, characterized in that, Based on the flash type and device upgrade protocol of the device to be upgraded, the communication interface with the device to be upgraded will be switched to device upgrade mode, including: When the flash type of the device to be upgraded is built-in flash, the communication link between the smart power supply and the main control chip of the device to be upgraded is turned on, and the communication interface with the device to be upgraded is switched to the upgrade interface mode supported by the device to be upgraded. Upgrading the device to be upgraded based on the device firmware in the device upgrade mode includes: The intelligent power supply sends the device firmware to the main control chip of the device to be upgraded based on the device upgrade protocol of the device to be upgraded in the upgrade interface mode supported by the device to be upgraded, so that the device to be upgraded can be upgraded based on the device firmware.

7. The method according to claim 1, characterized in that, The smart power supply acquires the device firmware sent by the downloading device, including: The smart power supply obtains the device firmware sent by the smart power supply of the downloading device via power line carrier communication; wherein, after the downloading device obtains the device firmware corresponding to the device to be upgraded, the downloading device sends the device firmware to the smart power supply of the downloading device.

8. An equipment upgrade device, characterized in that, include: The proxy download request broadcasting module is used to send a proxy download request broadcast when the smart power supply of the device to be upgraded detects that the upgrade event of the device to be upgraded has been triggered. The upgrade configuration information sending module is used by the smart power supply to determine the download device from all smart devices that respond to the download request broadcast, and send the upgrade configuration information of the device to be upgraded to the download device, so that the download device can obtain the device firmware corresponding to the device to be upgraded based on the upgrade configuration information. The device upgrade module is used by the smart power supply to obtain the device firmware sent by the downloading device, and to upgrade the device to be upgraded based on the device firmware.

9. A smart power supply, characterized in that, The intelligent power supply includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the device upgrade method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the device upgrade method according to any one of claims 1-7.