An uninterruptible power supply upgrade method, system, and medium
By employing a dual-program area design and dynamic verification mechanism, and using a serial port channel to achieve online upgrades of UPS equipment, the problems of interruption risk and low transmission efficiency in existing UPS firmware upgrades are solved. This enables safe and stable upgrades of uninterruptible power supplies, improving upgrade success rate and system robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MARS VALLEY TECH CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-06-16
AI Technical Summary
Existing UPS firmware upgrade solutions suffer from issues such as business interruption risk, high reliance on manual intervention, lack of reliable rollback mechanisms, and low transmission efficiency, making them particularly difficult to meet business continuity requirements in industrial control and medical emergency scenarios.
Employing a dual-program area design, dynamic verification mechanism, and multiple-attempt upload strategy, the firmware of the uninterruptible power supply is upgraded online via a serial port channel. This includes receiving upgrade data, verifying it, and copying it to the operating area. Combined with CRC cyclic redundancy check and real-time data comparison, a closed-loop monitoring system is constructed.
It enables safe and stable firmware upgrades without interrupting the power supply to the load, improving the upgrade success rate and system robustness, and shortening the upgrade time for large-capacity firmware.
Smart Images

Figure CN122219953A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of uninterruptible power supply (UPS) technology, and more specifically, to a UPS upgrade method, system, and medium. Background Technology
[0002] Firmware upgrades for uninterruptible power supplies (UPS) are crucial for ensuring stable operation and expanding functionality. Current mainstream upgrade methods require a shutdown procedure: first, disconnect the load and shut down the inverter; then, switch to maintenance mode; and finally, complete the firmware update via USB or a local operating interface. This operating mode is increasingly revealing its incompatibility with business continuity requirements in core scenarios such as industrial control, data centers, and emergency medical services. Furthermore, due to hardware transmission limitations, the upgrade process suffers from a bottleneck of only 128 bytes of data transmitted per frame, directly impacting upgrade efficiency and security.
[0003] Existing UPS firmware upgrade solutions have two significant drawbacks: First, the mainstream downtime upgrade mode carries the risk of business interruption. Scenarios such as financial transactions and ICU (Intensive Care Unit) life support equipment cannot tolerate millisecond-level power outages. Second, they rely heavily on manual intervention, requiring on-site operation by engineers, which not only results in delayed response but is also prone to failure due to human error. Third, there is no reliable rollback mechanism; if the new firmware contains anomalies, it can cause system crashes, with recovery taking up to several hours. Fourth, there is a lack of real-time monitoring; fluctuations in key parameters such as voltage and frequency cannot be detected during the upgrade process, which can easily trigger a chain of failures. Another type is the TCP / IP network remote upgrade solution adopted by some manufacturers. This solution relies on the network protocol stack of the main control system. Once the firmware is damaged, the network function will fail, thus falling into the dilemma of "upgrade deadlock". The serial port (RS232 / RS485) is the underlying hardware interface of UPS. It has physical layer reliability independent of the main control system, but it has not been used to build a closed-loop upgrade system. Moreover, it is also limited by the transmission of 128 bytes per frame. When facing large-capacity programs, the upgrade time can be more than half an hour. If transmission interruption or data error occurs during the process, it is very easy to cause the chip to freeze, resulting in upgrade failure. Summary of the Invention
[0004] To enable safe, stable, and rollback-enabled online firmware upgrades via serial port without interrupting power supply to the load or disassembling the UPS equipment, in a first aspect, embodiments of the present invention provide an uninterruptible power supply (UPS) upgrade method, applied to UPS equipment, the method comprising:
[0005] In response to receiving an upgrade command from the host computer, it receives upgrade data;
[0006] Erase the data in the backup area and write the upgrade data into the backup area;
[0007] In response to receiving a verification command from the host computer, the upgrade data in the backup area is verified to obtain a verification result;
[0008] In response to a successful verification result, the upgrade data in the backup area is copied to the running area.
[0009] As one possible implementation, the method further includes:
[0010] In response to the verification result being unsuccessful, an error code is sent to the host computer.
[0011] As one possible implementation, after erasing the data in the backup area and writing the upgrade data to the backup area, the method further includes:
[0012] Send a first response instruction to the host computer, wherein the first response instruction is used to indicate that the upgrade data has been received;
[0013] Receive the next frame of upgrade data;
[0014] Write the next frame upgrade data into the backup area;
[0015] A second response instruction is sent to the host computer, the second response instruction being used to indicate that the next frame of upgrade data has been received.
[0016] As one possible implementation, verifying the upgrade data in the backup area to obtain a verification result includes:
[0017] Calculate the CRC cyclic redundancy check value of the upgrade data in the backup area;
[0018] The CRC cyclic redundancy check value of the upgrade data in the backup area is compared with the preset expected check value to obtain the comparison result;
[0019] If the comparison results are consistent, the verification result is considered successful.
[0020] If the comparison results are inconsistent, the verification result is that the verification failed.
[0021] Secondly, embodiments of the present invention provide an uninterruptible power supply (UPS) upgrade method, applied to a host computer, the method comprising:
[0022] In response to receiving an upgrade control command, an upgrade command is sent to the UPS device corresponding to the upgrade control command;
[0023] Upgrade data is sent to the UPS device according to the preset protocol;
[0024] Send a verification command to the UPS device;
[0025] If no error code is received within a preset time, an upgrade success notification will be sent.
[0026] As one possible implementation, the method further includes:
[0027] Upon receiving an error code, a failure notification is issued and a log is logged.
[0028] As one possible implementation, sending upgrade data to the UPS device according to a preset protocol includes:
[0029] Send upgrade data to the UPS device;
[0030] In response to receiving the first reply command sent by the UPS device, the next frame of upgrade data is sent to the UPS device;
[0031] Receive the second response command sent by the UPS device.
[0032] As one possible implementation, sending the verification command to the UPS device includes:
[0033] In response to receiving the reply command corresponding to the last frame of upgrade data, a verification command is sent to the UPS device.
[0034] Thirdly, embodiments of the present invention provide an uninterruptible power supply (UPS) upgrade system, the system comprising: a host computer and a UPS device;
[0035] The host computer is used to respond to receiving an upgrade control command by sending an upgrade command to the UPS device corresponding to the upgrade control command; and to send upgrade data to the UPS device according to a preset protocol.
[0036] The UPS device is used to erase the data in the backup area and write the upgrade data into the backup area; in response to receiving a verification command from the host computer, it verifies the upgrade data in the backup area and obtains a verification result; in response to the verification result being successful, it copies the upgrade data in the backup area to the running area.
[0037] Fourthly, embodiments of the present invention provide a readable storage medium having executable instructions stored thereon, wherein the executable instructions, when executed by a processor, implement the method as described in either the first or second aspect.
[0038] The uninterruptible power supply (UPS) upgrade method, system, and medium provided in the embodiments of the present invention are applied to UPS equipment, including: receiving upgrade data in response to receiving an upgrade command issued by a host computer; erasing data in the backup area and writing the upgrade data into the backup area; verifying the upgrade data in the backup area in response to receiving a verification command issued by the host computer and obtaining a verification result; and copying the upgrade data in the backup area to the running area in response to the verification result being successful. Thus, by introducing a dual-program area design, a dynamic verification mechanism, and a multiple-attempt upload and rollback strategy, not only is system downtime unnecessary, but abnormal risks during the upgrade process are also effectively avoided, improving the upgrade success rate and system robustness. Attached Figure Description
[0039] Figure 1 This is an exemplary architecture diagram in which an embodiment of the present invention can be applied;
[0040] Figure 2 This is a flowchart of one embodiment of the uninterruptible power supply upgrade method for UPS equipment provided by the present invention;
[0041] Figure 3 This is a flowchart of another embodiment of the uninterruptible power supply upgrade method for UPS equipment provided in this invention;
[0042] Figure 4 This is a flowchart of one embodiment of the uninterruptible power supply upgrade method for a host computer provided by the present invention;
[0043] Figure 5 This is a flowchart of another embodiment of the uninterruptible power supply upgrade method for host computers provided by the present invention;
[0044] Figure 6 This is an upgrade-related operation interface diagram of an embodiment of the uninterruptible power supply upgrade method applied to a host computer provided by the present invention;
[0045] Figure 7 This is a schematic diagram of the structure of a computer suitable for implementing embodiments of the present disclosure. Detailed Implementation
[0046] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] Figure 1 An exemplary system architecture 100 is shown, to which embodiments of the uninterruptible power supply upgrade methods, apparatuses, electronic devices and storage media of this disclosure can be applied.
[0049] like Figure 1 As shown, the system architecture 100 may include a host computer 101, a UPS device 102, and a network 103. The network 103 is used as a medium to provide a communication link between the host computer 101 and the UPS device 102. The network 103 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0050] Users can use the host computer 101 to interact with the UPS device 102 via the network 103 to upgrade the UPS device, etc. Various communication client applications can be installed on the host computer 101, such as upgrade applications, voice recognition applications, short video social applications, audio and video conferencing applications, live video streaming applications, document editing applications, input method applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0051] The host computer 101 can be either hardware or software. When the host computer 101 is hardware, it can be various electronic devices with a display screen, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc. When the host computer 101 is software, it can be installed on the terminal devices listed above. It can be implemented as multiple software programs or software modules (e.g., to provide upgrade services) or as a single software program or software module. No specific limitations are made here.
[0052] UPS device 102 is a power supply device with uninterrupted power supply capability. Its internal firmware controls the various functions and operating logic of the device. In practical application scenarios, the host computer 101 sends upgrade commands and related data to UPS device 102 through network 103 to initiate the firmware upgrade process.
[0053] It should be understood that Figure 1The number of host computers 101 and UPS devices 102 shown is merely illustrative. Depending on implementation needs, any number of host computers 101 and UPS devices 102 can be included.
[0054] Continue to refer to Figure 2 The document illustrates a process 200 of an embodiment of the uninterruptible power supply (UPS) upgrade method according to the present invention. This UPS upgrade method is applied to a UPS device, which receives instructions and executes the upgrade process, possessing autonomous judgment and fault tolerance capabilities. Process 200 includes the following steps 201 to 204:
[0055] Step 201: In response to receiving the upgrade command issued by the host computer, receive the upgrade data.
[0056] Upon receiving an upgrade command from the host computer, the system begins receiving upgrade data. This upgrade data, actively transmitted from the host computer to the device, typically consists of the firmware file to be upgraded, such as a binary program file with the .bin extension. This process may be completed via serial port, Ethernet, or wireless communication to ensure complete and reliable data transmission to the UPS equipment.
[0057] Step 202: Erase the data in the backup area and write the upgrade data into the backup area.
[0058] The system performs a data erase operation on the backup storage area of the device and writes the received upgrade data to this backup area. UPS devices typically have a dual-program storage area structure, including a Running Area and a Backup Area. The Running Area stores the currently running firmware version, while the Backup Area is specifically used to temporarily store new upgrade files, providing redundancy for reliable upgrades. This way, upgrade failures will not affect current operation.
[0059] It should be noted that during data transmission, segmented confirmation transmission can be adopted. This involves receiving upgrade data; erasing data from the backup area and writing the upgrade data into the backup area; sending a first reply instruction to the host computer, indicating that the upgrade data has been received. Then, the next frame of upgrade data is received; the next frame of upgrade data is written into the backup area; a second reply instruction is sent to the host computer, indicating that the next frame of upgrade data has been received… and so on, until the last frame of upgrade data is received. Each frame of data requires ACK confirmation to ensure completeness and accuracy.
[0060] Step 203: In response to receiving the verification command issued by the host computer, verify the upgrade data in the backup area and obtain the verification result.
[0061] Upon receiving a verification command, the UPS system performs an integrity check on the upgrade data written to the backup area and generates a verification result. This verification process is typically executed by the MCU within the UPS device. It calculates the CRC (Cyclic Redundancy Check) value of the upgrade data in the backup area and compares it with a preset expected verification value (which can be sent from the host computer to any upgrade data). If they match, the verification is considered successful; otherwise, it is considered unsuccessful, indicating a potential error during data transmission or storage.
[0062] Step 204: In response to the verification result being successful, the upgrade data in the backup area is copied to the running area.
[0063] If the verification is successful, the upgrade data in the backup area will be completely copied to the running area, completing the firmware update. Specifically, after confirming successful verification, the device will automatically perform a data copy operation, overwriting the contents of the backup area to the running area. After copying is complete, the system will perform a restart operation to load and run the new firmware version. If any of the above steps fail (such as verification failure or copying error), the UPS device will interrupt the upgrade process and return the corresponding error code to the host computer for fault diagnosis and handling.
[0064] See further Figure 3 , Figure 3 This document illustrates a specific process for upgrading UPS (Uninterruptible Power Supply) equipment. Initially, the UPS operates normally. The UPS first checks if it has received an upgrade command from the host computer: if not, it continues normal operation; if so, the program jumps to the upgrade procedure area. Upon entering the upgrade procedure area, the system checks if it has received the first frame of data: if not, the process remains in its current state (no subsequent branch is specified, so it defaults to waiting); if it has received the first frame, it erases the backup area and populates the data. After data population, a verification command is received, and the system performs data verification, determining if the verification was successful: if verification fails, an error command is sent; if successful, the process proceeds to the next step, determining if the copying is complete. Regarding the "copying complete" determination: if copying is incomplete, the process returns to the "erase backup area and populate data" step and re-executes the data population operation; if copying is complete, the process copies the backup area to the operating area. After copying from the backup area to the operating area, the process ends (presumably returning to normal equipment operation or completing the upgrade loop).
[0065] In summary, the uninterruptible power supply (UPS) upgrade method proposed in this invention constructs a physically isolated redundancy mechanism through a dual-program area design. The independent storage structure of the running area and the backup area ensures that the original firmware is always completely preserved during the upgrade process. The dynamic verification mechanism adopts dual verification of CRC cyclic redundancy check and real-time data comparison. The first round of integrity detection is completed during the data writing stage, and a secondary verification process triggered by the verification command is used to form a closed-loop quality monitoring system. The multi-attempt upload strategy designed for abnormal scenarios such as network fluctuations can automatically retransmit unacknowledged data frames. With the fallback mechanism, the original firmware version is automatically restored after three consecutive transmission failures, effectively avoiding the risk of system paralysis caused by upgrade interruption. This solution breaks through the limitations of traditional serial port transmission. Through packet compression and intelligent scheduling algorithms, the data volume of a single frame is increased to 2024 bytes, reducing the upgrade time of large-capacity firmware to one-sixth of the original solution.
[0066] Continue to refer to Figure 4 This document illustrates a specific flow 300 of an embodiment of the uninterruptible power supply (UPS) upgrade method according to the present invention. This method is primarily applied to a host computer, which plays a core control role throughout the upgrade process, responsible for sending upgrade packages and transmitting control commands, and monitoring key state changes during the upgrade process. Flow 300 specifically includes the following steps 301 to 305:
[0067] Step 301: In response to receiving the upgrade control command, send an upgrade command to the UPS device corresponding to the upgrade control command.
[0068] In practice, the host computer is typically a computer or a control terminal with corresponding processing capabilities. The user first needs to import the .bin file to be upgraded, i.e., the new version of the firmware, into the dedicated upgrade software running on the host computer. In the software interface, the user must correctly select the serial port number and communication baud rate connected to the UPS equipment to ensure that the physical communication parameters match. Then, the user clicks the "Enter Upgrade" button, triggering the system to generate and send upgrade control commands.
[0069] Step 302: Send upgrade data to the UPS device according to the preset protocol.
[0070] The host computer first sends a "Get Version Number" command to confirm the current device status and initiate the handshake process. Upon receiving this command, the MCU (Microcontroller Unit) in the UPS device immediately responds and returns its current firmware version information, thus establishing a reliable bidirectional communication channel between the two. When transmitting upgrade data, the host computer first sends the first frame of data to the UPS device and waits for the device to return an acknowledgment signal (ACK). Only after receiving an ACK response will the host computer continue to send subsequent data frame by frame. To ensure transmission reliability, after sending each frame of data, the system waits for an ACK confirmation from the UPS device. If no ACK is received within a preset timeout period, the host computer will automatically retransmit the current frame of data, effectively preventing data loss.
[0071] Step 303: Send a verification command to the UPS device.
[0072] After all upgrade data frames have been successfully sent, the host computer will send a verification command to the UPS device, requesting the device to verify the integrity of the received upgrade data to ensure that no errors or damage have occurred during data transmission.
[0073] Step 304: In response to the failure to receive an error code within a preset time, an upgrade success notification is issued.
[0074] If the UPS device returns a response without any error codes, it indicates that the entire upgrade process has been successfully completed. At this point, the host computer will generate and display a success message, notifying the user that the device firmware has been successfully updated.
[0075] Step 305: In response to receiving the error code, issue an upgrade failure notification and log the process.
[0076] If the UPS device returns an error code, it indicates that an exception or failure occurred during the upgrade process. In this case, the host computer will immediately display a clear "Upgrade Failed" message and automatically record relevant error information and operation logs for subsequent analysis and troubleshooting. Users can choose to retry the upgrade operation or terminate the current process, depending on the situation.
[0077] See further Figure 5 , Figure 5 This document illustrates the specific process for upgrading an uninterruptible power supply (UPS) applied to a host computer. The process begins with relevant personnel opening the host computer software and accessing the [see...] section. Figure 6The upgrade-related operation interface is accessed. Then, select the serial port number corresponding to the MCU connection of the UPS device and set the matching baud rate to complete the communication parameter configuration. Click the software version number to trigger the upgrade function entry; click the "Enter Upgrade" option to start the upgrade process; open the prepared upgrade bin file and confirm that the upgrade file is ready. Determine if a response command has been received from the UPS device: if so, send the first frame of data to the corresponding MCU device on the host computer according to the preset protocol; if not, return and click the software version number. After sending the first frame of data to the corresponding MCU device on the host computer, determine if a response command has been received from the MCU: if no response command has been received from the MCU, a pop-up window will display "Upgrade failed," and the upgrade process will terminate; if a response command has been received from the MCU, proceed to the subsequent data transmission stage. Subsequent data transmission and judgment: Determine if the currently transmitted data is the last frame of data: If it is not the last frame of data, continue to transmit the remaining data, and repeat the "is it the last frame of data" judgment in this step after transmission is completed; If it is the last frame of data, execute the next operation - send the verification command of the entire program to the host computer; After sending the verification command, check again whether a reply command has been received from the MCU: If no reply command has been received from the MCU, a pop-up window will display "upgrade failed", and the upgrade process will terminate; If a reply command has been received from the MCU, a pop-up window will display "upgrade successful", and the upgrade process will be completed.
[0078] In summary, the uninterruptible power supply (UPS) upgrade method proposed in this invention constructs a complete closed-loop control system through the collaborative interaction between the host computer and the UPS equipment. The host computer, as the core control terminal, not only undertakes the functions of sending upgrade packages and scheduling transmission commands, but also ensures the reliability of the upgrade process through real-time status monitoring and anomaly handling mechanisms. Its frame-by-frame confirmation transmission strategy and timeout retransmission mechanism effectively solve the data packet loss problem in serial communication. Combined with the dual verification system formed by CRC check on the device side, it ensures the integrity and accuracy of the upgrade data. The log recording function designed for upgrade failure scenarios can completely trace the operation trajectory and error codes, providing maintenance personnel with accurate fault location information. This solution, through standardized communication protocols and modular software design, achieves compatibility and adaptation with equipment from different manufacturers, significantly improving the automation level and maintenance efficiency of UPS equipment firmware upgrades in power systems.
[0079] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer 400 suitable for implementing the electronic device of the present invention. Figure 7 The computer 400 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0080] like Figure 7As shown, computer 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of computer 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0081] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows computer 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 A computer 400 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0082] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by a processing device 401, it performs the functions defined in the methods of the embodiments of the present invention.
[0083] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device or apparatus, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be executed by instructions, used by a device or apparatus, or used in conjunction with it. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with instructions, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0084] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0085] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2 or Figure 3 The methods illustrated in the embodiments and their alternative implementations are as follows.
[0086] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or cloud server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or using a combination of dedicated hardware and computer instructions.
[0088] The units or modules described in the embodiments of the present invention can be implemented in software or hardware. In some cases, the user identifier of a unit or module does not constitute a limitation on the unit itself.
[0089] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. A method for upgrading an uninterruptible power supply, characterized in that, Applied to UPS equipment, the method includes: In response to receiving an upgrade command from the host computer, it receives upgrade data; Erase the data in the backup area and write the upgrade data into the backup area; In response to receiving a verification command from the host computer, the upgrade data in the backup area is verified to obtain a verification result; In response to a successful verification result, the upgrade data in the backup area is copied to the running area.
2. The method according to claim 1, characterized in that, The method further includes: In response to the verification result being unsuccessful, an error code is sent to the host computer.
3. The method according to claim 1, characterized in that, After erasing the data in the backup area and writing the upgrade data to the backup area, the method further includes: Send a first response instruction to the host computer, wherein the first response instruction is used to indicate that the upgrade data has been received; Receive the next frame of upgrade data; Write the next frame upgrade data into the backup area; A second response instruction is sent to the host computer, the second response instruction being used to indicate that the next frame of upgrade data has been received.
4. The method according to claim 1, characterized in that, The verification of the upgrade data in the backup area, to obtain the verification result, includes: Calculate the CRC cyclic redundancy check value of the upgrade data in the backup area; The CRC cyclic redundancy check value of the upgrade data in the backup area is compared with the preset expected check value to obtain the comparison result; If the comparison results are consistent, the verification result is considered successful. If the comparison results are inconsistent, the verification result is that the verification failed.
5. A method for upgrading an uninterruptible power supply, characterized in that, Applied to a host computer, the method includes: In response to receiving an upgrade control command, an upgrade command is sent to the UPS device corresponding to the upgrade control command; Upgrade data is sent to the UPS device according to the preset protocol; Send a verification command to the UPS device; If no error code is received within a preset time, an upgrade success notification will be sent.
6. The method according to claim 5, characterized in that, The method further includes: Upon receiving an error code, a failure notification is issued and a log is logged.
7. The method according to claim 5, characterized in that, Sending upgrade data to the UPS device according to a preset protocol includes: Send upgrade data to the UPS device; In response to receiving the first reply command sent by the UPS device, the next frame of upgrade data is sent to the UPS device; Receive the second response command sent by the UPS device.
8. The method according to claim 5, characterized in that, Sending a verification command to the UPS device includes: In response to receiving the reply command corresponding to the last frame of upgrade data, a verification command is sent to the UPS device.
9. An uninterruptible power supply (UPS) upgrade system, characterized in that, The system includes: a host computer and a UPS device; The host computer is used to respond to receiving an upgrade control command by sending an upgrade command to the UPS device corresponding to the upgrade control command; and to send upgrade data to the UPS device according to a preset protocol. The UPS device is used to erase the data in the backup area and write the upgrade data into the backup area; in response to receiving a verification command from the host computer, it verifies the upgrade data in the backup area and obtains a verification result; in response to the verification result being successful, it copies the upgrade data in the backup area to the running area.
10. A readable storage medium having executable instructions stored thereon, characterized in that, When the executable instructions are executed by the processor, they implement the method as described in any one of claims 1-8.