Relay-based equipment upgrading circuit and method and storage medium
By using a relay-based device upgrade circuit, intelligent devices are automatically triggered to enter upgrade mode, solving the problem of low intelligence caused by manual operation in existing technologies and achieving efficient and reliable firmware upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GEER TECH CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-28
AI Technical Summary
The current firmware upgrade process for smart devices relies on manual operation, resulting in low intelligence and making it difficult to achieve efficient and reliable firmware upgrades.
The device upgrade circuit adopts a relay-based approach. The master device sends high and low level drive signals to control the relay, forming a synchronous signal path. This automatically triggers the slave device to enter upgrade mode and sends firmware upgrade data through a serial communication link.
It enables precise control of signal triggering timing without manual intervention, improving the intelligence and efficiency of firmware upgrades, reducing operational complexity and cost, and enhancing the continuity and yield of batch upgrades.
Smart Images

Figure CN121935192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment upgrade technology, and in particular to relay-based equipment upgrade circuits, methods, and storage media. Background Technology
[0002] Firmware upgrades for smart devices (such as smart wearables, AR devices, VR devices, etc.) are a frequent and crucial operation. Currently, firmware burning relies on dedicated debugging serial ports or bootloader modes. During this process, the device must enter upgrade mode within a specific timing window. This requires operators to precisely control the signal triggering timing and maintain a synchronization signal for several seconds. In other words, the synchronization signal needs to be triggered manually by the user, such as pressing the reset button of the device to be upgraded to put the device into upgrade mode. However, this method relies too heavily on manual operation, resulting in low intelligence in firmware upgrades.
[0003] Therefore, improving the intelligence of firmware upgrades has become an urgent problem to be solved.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a relay-based device upgrade circuit, method, and storage medium, aiming to solve the technical problem of how to improve the intelligence of firmware upgrades.
[0006] To achieve the above objectives, this application proposes a relay-based device upgrade circuit, which includes: Main equipment; The master device and the slave device are connected to form a serial communication link; The relay, the master device, and the slave device are connected in sequence. The master device sends a high-level drive signal to the relay, which closes the relay to form a synchronization signal path from the master device to the slave device. The master device sends a preset synchronization signal to the slave device through the synchronization signal path. If the master device receives feedback information from the slave device indicating that it has detected the synchronization signal, it sends a low-level drive signal to the relay, which opens the relay. The master device then sends the preset firmware upgrade data to the slave device through the serial communication link to upgrade the firmware of the slave device.
[0007] Optionally, the relay-based device upgrade circuit includes at least one relay. For each relay, the relay includes an input terminal, a common terminal, and a normally open port. The input terminal is connected to the first master port of the master device, the common terminal is connected to the first slave port of the slave device, and the normally open port is connected to the second slave port of the slave device.
[0008] Optionally, the relay includes a first switch and a normally closed port. In response to the relay receiving a high-level drive signal sent by the master device, the first switch is connected to the common terminal and the normally open port respectively; In response to the relay receiving a low-level drive signal from the master device, the first switch connects to the common terminal and the normally closed port respectively.
[0009] Optionally, the relay-based device upgrade circuit also includes a serial port module. The second master port of the master device is connected to the first end of the serial port module, and the third slave port of the slave device is connected to the second end of the serial port module.
[0010] Optionally, the relay-based device upgrade circuit also includes a conversion module. The conversion module includes a first conversion port and multiple second conversion ports, which are respectively connected to the input terminals of multiple relays, wherein each second conversion port is connected to the input terminal of one relay. The first conversion port of the conversion module is connected to the first main port of the master device.
[0011] Furthermore, to achieve the above objectives, this application proposes a relay-based device upgrade method, which is applied to the main device of the aforementioned relay-based device upgrade circuit. The relay-based device upgrade method includes: A high-level drive signal is sent to the relay, which closes the relay, thus forming a synchronization signal path from the master device to the slave device. A preset synchronization signal is sent to the slave device through the synchronization signal path; If feedback information indicating that the device has detected a synchronization signal is received from the device, a low-level drive signal is sent to the relay to drive the relay to disconnect. The preset firmware upgrade data is sent to the slave device through the serial communication link between the master and slave devices to upgrade the firmware of the slave device.
[0012] Optionally, if feedback information indicating that the slave device has detected a synchronization signal is received from the slave device, the step of sending a low-level drive signal to the relay to drive the relay to disconnect further includes: If feedback information indicating that the device has detected a synchronization signal is received from the slave device within a first preset time range, a low-level drive signal is sent to the relay after the relay is closed for a first preset time period, driving the relay to open.
[0013] Optionally, after the step of sending a preset synchronization signal to the slave device through the synchronization signal path, the method further includes: If no feedback information indicating that the device has detected a synchronization signal is received from the device within the first preset time range, then the synchronization signal path is checked for abnormalities. If no abnormality is found, a low-level drive signal is sent to the relay, causing the relay to disconnect, and the step of sending a high-level drive signal to the relay is repeated.
[0014] Optionally, the relay-based device upgrade method also includes: After sending the preset firmware upgrade data to the slave device, read the firmware upgrade progress data of the slave device and check whether the firmware upgrade progress data is abnormal; If the firmware upgrade progress data is abnormal, it is determined that the firmware upgrade from the device has failed, and the step of sending a high-level drive signal to the relay is re-executed.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the relay-based device upgrade method described above.
[0016] In this application, a relay-based device upgrade circuit is configured, comprising a master device, a slave device, and a relay. The master device sends a high-level drive signal to the relay, causing the relay to close and forming a synchronization signal path from the master device to the slave device. A synchronization signal is then sent to the slave device through this path. Upon receiving feedback from the slave device indicating that it has detected the synchronization signal, the master device sends a low-level drive signal to the relay, causing it to open. Preset firmware upgrade data is then sent to the slave device via a serial communication link between the master and slave devices to perform a firmware upgrade. This allows the master device to perform a firmware upgrade on the slave device without relying on precise control of the signal triggering timing by an operator. Instead, the relay-based device upgrade circuit enables precise control of the signal triggering timing, and intervention in the synchronization signal path between the master and slave devices is achieved through the closing control of the relay. This eliminates the need for manual intervention, improving the efficiency and intelligence of firmware upgrades on slave devices. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the framework of the first embodiment of the relay-based device upgrade circuit in this application; Figure 2 This is a schematic diagram of the architecture of the second embodiment of the relay-based device upgrade circuit in this application; Figure 3 This is another schematic diagram of the architecture of the second embodiment of the relay-based device upgrade circuit in this application; Figure 4 This is yet another architectural schematic diagram of the second embodiment of the relay-based device upgrade circuit in this application; Figure 5 This is yet another schematic diagram of the architecture of the second embodiment of the relay-based device upgrade circuit in this application; Figure 6 This is a flowchart illustrating the third embodiment of the relay-based device upgrade method in this application; Figure 7 This is a schematic diagram illustrating a scenario for the relay-based device upgrade method of this application; Figure 8 This is a schematic diagram of a relay-based device upgrade method in this application; Figure 9 This is a schematic diagram of the hardware operating environment involved in the relay-based device upgrade method in this application embodiment.
[0020] Explanation of icon numbers 100. Master device; 200. Slave device; 300. Relay; 400. Serial port module; 500. Conversion module; 110. First master port; 120. Second master port; 210. First slave port; 220. Second slave port; 230. Third slave port; 310. Common terminal; 320. Normally open port; 330. Input terminal; K1. First switch; 340. Normally closed port; 410. First terminal; 420. Second terminal; 510. First conversion port; 520. Second conversion port; 10. Computer; 20. AR glasses.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0024] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0025] In this application, unless otherwise expressly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0026] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0027] Optionally, in the field of smart wearables, especially AR glasses, firmware upgrades are a frequent and crucial operation during research, development, production, testing, and post-maintenance. Currently, firmware burning relies on dedicated debug serial ports or bootloader modes. A key limitation of this upgrade process is that the device must enter upgrade mode within a specific timing window. This typically requires operators to precisely control the signal trigger timing and maintain a synchronization signal for several seconds. For mass production, this manual operation not only constitutes a bottleneck in production efficiency but also leads to fluctuations in product yield and increased upgrade costs due to the difficulty in precisely controlling the timing signal. Furthermore, in production lines or testing environments where multiple devices are processed in parallel, operators must manually identify and connect the target device to be upgraded, further increasing operational complexity and the risk of human error. Although some automation solutions attempt to use universal interface switching or simple level control, a complete solution that integrates automatic device identification and high-reliability physical signal triggering is still lacking. Therefore, this application provides an innovative control strategy based on programmable relays, constructing a highly reliable, fully automatic upgrade triggering system through a relay-based device upgrade circuit.
[0028] Optionally, the relay-based device upgrade circuit of this application embodiment can be applied to firmware upgrades of various smart devices. For example, it can be used for firmware upgrades of AR glasses. By intelligently identifying software devices, a hardware control circuit with a programmable relay as the core (i.e., a relay-based device upgrade circuit) is used to generate hardware level signals with specific timing, thereby accurately simulating manual button operation and constructing an upgrade startup channel independent of the main operating system. This achieves full automation and high-precision timing control of the firmware upgrade process, from signal generation to system mode switching.
[0029] Optionally, the embodiments of this application can avoid the problems of low production efficiency, poor consistency, cumbersome operation and high cost caused by relying on manual operation. It can also realize the use of an automatic device identification mechanism, in which the master device can actively discover and locate the target device to be burned, such as the slave device to be upgraded. It can replace manual search and connection to the slave device. It can also realize the synchronous signal triggering based on relay control by setting a device upgrade circuit based on relay. Through programmatic precise control, the synchronous signal triggering time required for the slave device to enter the upgrade mode can be stably shortened from the original 8 seconds of manual operation to 6 seconds. It has intelligent fault tolerance and self-recovery capabilities, and integrates a system-level abnormal handling mechanism. It can automatically identify abnormal states in the burning process and perform initialization reset and process retry, which greatly improves the continuity and overall yield of batch burning.
[0030] This application provides a relay-based device upgrade circuit. In the first embodiment, refer to... Figure 1 , Figure 1 This is a schematic diagram of a relay-based device upgrade circuit according to this application. The relay-based device upgrade circuit includes: Main equipment 100, The slave device 200 and the master device 100 are connected to the slave device 200 to form a serial communication link; Relay 300, master device 100, relay 300 and slave device 200 are connected in sequence; Specifically, the master device 100 sends a high-level drive signal to the relay 300, causing the relay 300 to close, thus forming a synchronization signal path from the master device 100 to the slave device 200. The master device 100 sends a preset synchronization signal to the slave device 200 through the synchronization signal path. If the master device 100 receives feedback information from the slave device 200 indicating that the slave device 200 has detected the synchronization signal, it sends a low-level drive signal to the relay 300, causing the relay 300 to open. The master device 100 then sends the preset firmware upgrade data to the slave device 200 through the serial communication link to perform a firmware upgrade on the slave device 200.
[0031] Optionally, the master device 100 can be used to perform firmware upgrades on other devices that require firmware upgrades. It can include firmware upgrade versions of other devices (such as slave devices) and can be terminal devices such as servers, computers, or master control computer execution devices. The slave device 200 can be a device requiring firmware upgrades, such as AR glasses. The relay 300 can be of model number JQC-3FF-SZ 5V.
[0032] Optionally, two communication links can be established between the master device 100 and the slave device 200, namely a long-term serial communication link and a short-term synchronization signal path.
[0033] Optionally, the master device 100 may be configured with a software program (i.e., a computer program) for detecting and performing firmware upgrades on the slave device 200. This program identifies whether the slave device 200 needs a firmware upgrade. When a firmware upgrade is determined to be required, the master device 100 sends a high-level drive signal to the relay 300, causing the relay 300 to close and forming a synchronization signal path from the master device 100 to the slave device 200. A preset synchronization signal is then sent to the slave device 200 through this synchronization signal path. If feedback information indicating that the slave device 200 has detected the synchronization signal is received from the slave device 200, a low-level drive signal is sent to the relay 300, causing the relay 300 to open. The preset firmware upgrade data is then sent to the slave device 200 via a serial communication link to perform a firmware upgrade on the slave device 200.
[0034] Optionally, the master device 100 can connect to multiple slave devices 200 simultaneously to perform firmware upgrades on the multiple slave devices 200. The master device 100 can broadcast an identity query command to the multiple slave devices 200, parse the response data packets returned by the multiple slave devices 200, determine the slave device 200 to be upgraded and its device identifier based on the parsing result, and establish a relay-based device upgrade circuit between the master device 100 and the slave devices 200 based on the device identifier.
[0035] Optionally, when the master device 100 detects a user-triggered burning command (i.e., a virtual or physical command to instruct the slave device 200 to perform a firmware upgrade), the master device 100 will start at least one thread (such as a main thread and a sub-thread). The main thread is used to synchronize the signals between the master device and the slave device, as well as to perform the firmware upgrade process for the slave device, while the sub-thread is used to monitor the firmware upgrade process of the slave device.
[0036] Optionally, in the relay-based device upgrade circuit between the master device 100 and the slave device 200 to be upgraded, the master device 100 continuously sends control signals (i.e., high-level drive signals) to the relay 300. In response to the high-level drive signals sent by the master device 100, the relay 300 enters a closed state, so that the synchronization signal path between the master device 100 and the slave device 200 is connected. Through the connected synchronization signal path, a synchronization signal (an electrical signal) is sent to the slave device 200. The MCU (microcontroller unit) in the slave device 200 will detect whether the synchronization signal is received in real time. If the synchronization signal is received, the MCU will be reset so that the slave device 200 enters the upgrade mode and sends feedback information indicating that the slave device 200 has detected the synchronization signal to the master device 100.
[0037] Optionally, after receiving feedback information indicating that the slave device 200 has detected a synchronization signal, the master device 100 can determine that the slave device 200 has entered the upgrade mode. At this time, the master device 100 can enter the burning process, that is, the master device 100 stops sending high-level drive signals to the relay 300, and instead sends low-level drive signals to the relay 300. The relay 300 responds to the low-level drive signal sent by the master device 100 and enters the disconnected state, so that the synchronization signal path between the master device 100 and the slave device 200 is disconnected. The master device 100 will send the preset firmware upgrade data corresponding to the slave device 200 to the slave device 200 through the serial communication link, so that the slave device 200 can perform firmware upgrade according to the received preset firmware upgrade data until the upgrade is completed.
[0038] Optionally, during the firmware upgrade process of the slave device 200, the master device 100 can monitor the firmware upgrade process of the slave device 200 through its sub-thread, poll and diagnose the burning status in real time, and autonomously complete the initialization of error isolation and recovery processes.
[0039] In this embodiment, a relay-based device upgrade circuit is configured, comprising a master device 100, a slave device 200, and a relay 300. The master device 100 sends a high-level drive signal to the relay 300, causing the relay 300 to close, thus forming a synchronization signal path from the master device 100 to the slave device 200. A synchronization signal is then sent to the slave device 200 through this path. Upon receiving feedback from the slave device 200 indicating that it has detected a synchronization signal, a low-level drive signal is sent to the relay 300, causing the relay 300 to open. Preset firmware upgrade data is then transmitted between the master device 100 and the slave device. The serial communication link between the master device 100 and the slave device 200 is sent to the slave device 200 to upgrade the firmware of the slave device 200. This allows the master device 100 to upgrade the firmware of the slave device 200 without relying on the operator to precisely control the signal triggering timing. Instead, the signal triggering timing can be precisely controlled by the relay-based device upgrade circuit. Furthermore, the synchronization signal path between the master device 100 and the slave device 200 is controlled by closing the relay 300. This eliminates the need for manual intervention, improving the efficiency and intelligence of firmware upgrades for the slave device 200.
[0040] Furthermore, based on the above embodiments, referring to Figures 2-5 This application presents a second embodiment of a relay-based device upgrade circuit.
[0041] Optionally, refer to Figure 2 The relay-based device upgrade circuit includes at least one relay 300. For each relay 300, the relay 300 includes an input terminal 330, a common terminal 310 and a normally open port 320. The input terminal 330 is connected to the first master port 110 of the master device 100, the common terminal 310 is connected to the first slave port 210 of the slave device 200, and the normally open port 320 is connected to the second slave port 220 of the slave device 200.
[0042] Alternatively, the master device 100 can connect to multiple slave devices 200 via one or more relays 300, such as four slave devices 200.
[0043] Optionally, if the number of relays 300 is n (n is an integer greater than 1), such as relays (1-n), then n relays 300 can be connected in parallel between the master device 100 and the slave device 200.
[0044] Optionally, the same connection method can be set for each relay 300, that is, the first master port 110 of the master device 100 can be connected to the input terminal 330 of the relay 300, and the first slave port 210 and the second slave port 220 of the slave device 200 can be connected to the common port 310 (i.e., COM port) and the normally open port 320 (i.e. NO port) of the relay 300, respectively.
[0045] Optionally, the positive and negative terminals of the coil of relay 300 can be connected to the positive and negative terminals of an external power supply, respectively, or they can be connected to the main device 100, through which the main device 100 provides power to relay 300.
[0046] Optionally, in Figure 2 Based on, refer to Figure 3 The relay 300 includes a first switch K1 and a normally closed port 340. The first switch K1 can be a selector switch, which can selectively contact the normally open port 320 or the normally closed port 340.
[0047] In response to the relay 300 receiving a high-level drive signal sent by the master device 100, the first switch K1 is connected to the common terminal 310 and the normally open port 320 respectively. In response to the relay 300 receiving a low-level drive signal sent by the master device 100, the first switch K1 connects the common terminal 310 and the normally closed port 340 respectively.
[0048] Optionally, the master device 100 can also send an upgrade preparation command to the slave device 200 via a serial communication link to inform the slave device 200 that it is ready to perform a firmware upgrade. Then, it sends a high-level drive signal to the relay 300, and the drive voltage of the sent high-level drive signal must meet the minimum pull-in voltage requirement of the relay 300, i.e.: ,in, The driving voltage for the high-level drive signal. This is the minimum pull-in voltage of relay 300.
[0049] Optionally, when relay 300 detects the driving voltage corresponding to the high-level driving signal sent by the main device 100, its internal electromagnetic coil is energized to generate an excitation magnetic field, triggering the mechanical contacts of relay 300 to complete the closing action (i.e., at this time, the first switch K1 is connected to the common terminal 310 and the normally open port 320 respectively). At this time, a conductive path is formed between the COM port (i.e., common terminal 310) and the NO port (i.e., normally open port 320) of the relay. This physical connection state is equivalent to performing a key press operation on the device side, thereby automatically establishing and maintaining the synchronization signal path required for the device to enter the upgrade mode. The synchronization signal is continuously applied to the specific trigger port of the AR glasses.
[0050] Optionally, the master device 100 can also send a low-level drive signal to the relay 300. After receiving the low-level drive signal from the master device 100, the internal electromagnetic coil of the relay 300 is de-energized, triggering the mechanical contacts of the relay 300 to open. At this time, the first switch K1 is connected to the common terminal 310 and the normally closed port 340 respectively, and the synchronization signal path is cut off. At this time, there is no synchronization signal path between the master device 100 and the slave device 200.
[0051] Optionally, in Figure 3 Based on, refer to Figure 4 The relay-based device upgrade circuit also includes a serial port module 400. The second master port 120 of the master device 100 is connected to the first end 410 of the serial port module 400, and the third slave port 230 of the slave device 200 is connected to the second end 420 of the serial port module 400.
[0052] Optionally, the master device 100 can establish a serial communication link with the slave device 200 through the serial port module 400, and data transmission between the master device 100 and the slave device 200 can be realized through this serial communication link. For example, the master device 100 sends the firmware upgrade data of the slave device 200 to the serial port module 400, and the serial port module 400 then sends it to the slave device 200. After receiving the firmware upgrade data, the slave device 200 performs a firmware upgrade.
[0053] Optionally, refer to Figure 5 The relay-based device upgrade circuit also includes a conversion module 500. The conversion module 500 includes a first conversion port 510 and multiple second conversion ports 520. The multiple second conversion ports 520 are respectively connected to the input terminals 330 of multiple relays 300, wherein one second conversion port 520 is connected to the input terminal 330 of one relay 300. The first conversion port 510 of the conversion module 500 is connected to the first main port 110 of the main device 100.
[0054] Alternatively, the conversion module 500 can be a selection module, such as a multiplexer switch.
[0055] Optionally, the master device 100 can be connected to multiple relays 300 via a conversion module, and can be connected to multiple slave devices 200 via multiple relays 300 respectively. Each relay 300 can be connected to multiple slave devices 200 (e.g., slave device (1) 200 to slave device (m) 200, where m is a positive integer and greater than or equal to n).
[0056] Optionally, after the master device 100 determines that the slave device 200 that needs to be upgraded (e.g., the slave device 200 connected to the relay (1) 300 (i.e., slave device (1) 200)) is to be upgraded, it can send a synchronization signal to the conversion module 500. The conversion module 500 connects the relay (1) 300 and disconnects the connection with other relays 300 (e.g., relay (n) 300), and then forwards the synchronization signal to the relay (1) 300 so that the relay (1) 300 is connected, thereby establishing a synchronization signal path between the master device 100 and the slave device 200 connected to the relay (1) 300.
[0057] Optionally, a second conversion module (such as a selector switch) can be provided between the relay 300 and the multiple slave devices 200, and the second conversion module is connected to the master device 100. For example, multiple slave devices 200 are connected in parallel on one side of the second conversion module, and multiple relays 300 are connected in parallel on the other side.
[0058] Optionally, after determining that the slave device 200 (e.g., the slave device 200 connected to the relay (1) 300) needs firmware upgrade, the master device 100 can first control the conversion module 500 to connect the path between the master device 100 and the relay (1) 300, and control the second conversion module to connect the path between the slave device 200 and the relay (1) 300. The master device 100 sends a synchronization signal to the conversion module 510 and to the relay (1) 300 to close the relay (1) 300, then transmits it to the second conversion module, and finally to the slave device 200.
[0059] In this embodiment, by establishing connections between relay 300 and master device 100 and slave device 200 respectively, the state of the synchronization signal path between master device 100 and slave device 200 can be determined according to different drive signals sent by master device 100. Furthermore, a serial communication link between master device 100 and slave device 200 can be established according to serial port module 400 to realize data interaction between master device 100 and slave device 200. In addition, a conversion module 500 can be set so that master device 100 can perform firmware upgrades on multiple slave devices 200, thereby improving the efficiency of firmware upgrades and thus improving the intelligence of firmware upgrades.
[0060] Based on any of the above embodiments, a third embodiment of this application is proposed. In the third embodiment, a relay-based device upgrade method is provided, which can be applied to the main device of the relay-based device upgrade circuit in any of the above embodiments. Figure 6 The relay-based device upgrade method includes steps S10-S40.
[0061] Step S10: Send a high-level drive signal to the relay to drive the relay to close, thus forming a synchronization signal path from the master device to the slave device; Optionally, after establishing the relay-based device upgrade circuit as described in any of the above embodiments, a relay-based device upgrade program can be set in the master device to perform firmware upgrades on the slave device.
[0062] Optionally, the master device can automatically identify whether the slave device needs a firmware upgrade. If it is determined that a firmware upgrade is needed, the master device can start its own burning program to perform the burning process to upgrade the firmware of the slave device.
[0063] Optionally, the master device can broadcast an identity query command to the slave device via a serial communication link, obtain the response data packet from the slave device, parse it to determine the device identifier of the slave device that needs firmware upgrade, and then execute steps S10-S40 to upgrade the firmware of the slave device.
[0064] Optionally, the master device can generate a continuous high-level drive signal and send it to the relay to control the relay to close. That is, the first switch of the relay is connected to the common terminal and the normally open port respectively. At this time, the relay is connected, forming a synchronization signal path between the master device, the relay and the slave device.
[0065] Step S20: Send a preset synchronization signal to the slave device through the synchronization signal path; Optionally, a preset synchronization signal (such as a voltage signal within a certain voltage range, or a high-level drive signal) can be generated and sent to the slave device through a synchronization signal path. After detecting the synchronization signal sent by the master device, the slave device can send back feedback information indicating that the slave device has detected the synchronization signal. If the slave device does not detect the synchronization signal sent by the master device within a certain time range (such as 6 seconds), it can send back feedback information indicating that the slave device has not detected the synchronization signal.
[0066] Step S30: If feedback information indicating that the slave device has detected a synchronization signal is received from the slave device, a low-level drive signal is sent to the relay to drive the relay to disconnect. Optionally, when the master device receives feedback information from the slave device indicating that the slave device has detected a synchronization signal, such as the slave device's MCU (Microcontroller Unit) detecting a synchronization signal, it can perform a reset process and enter upgrade mode. At this time, the master device can enter the burning state to burn the firmware upgrade data to the slave device and disconnect the synchronization signal path between the master device and the slave device.
[0067] Optionally, the master device can convert the high-level drive signal sent to the relay into a low-level drive signal to drive the relay to disconnect. That is, the first switch of the relay is connected to the common terminal and the normally closed port respectively, and the synchronization signal path is in the disconnected state.
[0068] Optionally, in step S30, if feedback information indicating that the slave device has detected a synchronization signal is received from the slave device, the step of sending a low-level drive signal to the relay to drive the relay to disconnect is further included in step a10.
[0069] Step a10: If feedback information indicating that the slave device has detected a synchronization signal is received from the slave device within a first preset time range, then after the relay is closed for a first preset time, a low-level drive signal is sent to the relay to drive the relay to open.
[0070] Optionally, the master device can conduct multiple firmware upgrade experiments on the slave device in advance to determine the time required for the slave device to enter upgrade mode, and use this as the first preset time, such as 6 seconds. During the actual firmware upgrade process of the slave device, the master device can send a high-level drive signal to the relay for the first preset time to close the relay. The time for forming the synchronization signal path is the first preset time. Within the first preset time, the master device detects feedback information sent by the slave device indicating that the slave device has detected the synchronization signal (i.e., the slave device's MCU can be considered to have been successfully reset and entered upgrade mode). After the first preset time is reached, the master device can send a low-level drive signal to the relay, the relay coil is de-energized, the relay contacts open, the synchronization signal path is cut off, and firmware upgrade data is sent to the slave device to perform a firmware upgrade on the slave device.
[0071] Optionally, the first preset time can be the signal holding time of the high-level drive signal, which is shorter than the time consumed by manually triggering the device to enter upgrade mode, i.e.: ; in, The time consumed for manually triggering the device to enter upgrade mode, for example, 8 seconds; The duration for which the signal is held, for example, 6 seconds; To allow for time savings.
[0072] Optionally, this embodiment takes less time than manually triggering the device to enter upgrade mode, significantly improving the overall efficiency of firmware upgrades for slave devices.
[0073] Optionally, the upgrade efficiency of the device can be determined by an efficiency prediction model, and the function formula corresponding to the efficiency prediction model can be shown in Formula 1 below.
[0074] (Formula 1); in, For efficiency, the time consumed by manually triggering the device to enter upgrade mode. It can be 8 seconds, the first preset time. If it can be 6 seconds, then the efficiency... It is 25%.
[0075] In a mass production environment, i.e., an overall environment where firmware upgrades are performed on multiple slave devices, the system throughput improvement factor K can satisfy the following formula 2.
[0076] (Formula 2); Optionally, If the firmware transmission time is 2 seconds, then K can be 1.25, meaning the throughput will double.
[0077] Optionally, this embodiment can increase the firmware upgrade success rate of slave devices to 99.9%, and when batch processing firmware upgrades of multiple slave devices, the success rate shows an exponential increase in reliability. That is, this embodiment not only achieves a significant improvement in single-operation efficiency, but also achieves a leapfrog improvement in throughput and system reliability in batch production scenarios, providing a reliable technical guarantee for the large-scale production and efficient maintenance of smart wearable devices.
[0078] Optionally, after step S20, which involves sending a preset synchronization signal to the slave device via the synchronization signal path, steps b10-b20 are also included.
[0079] Step b10: If no feedback information indicating that the slave device has detected a synchronization signal is received from the slave device within the first preset time range, then detect whether there is an abnormality in the synchronization signal path. In step b20, if there is no abnormality, a low-level drive signal is sent to the relay to drive the relay to disconnect, and the step of sending a high-level drive signal to the relay is executed again.
[0080] Optionally, the first preset time range can be a pre-set time range, such as 6 seconds.
[0081] Optionally, if the master device does not receive feedback information from the slave device indicating that the slave device has detected a synchronization signal within a first preset time range, that is, it can be assumed that the MCU of the slave device may not have detected the synchronization signal, the synchronization signal path can be detected to determine whether there is an abnormality. The detection method can be to use a detection program or other detection device (such as ammeter detection) to detect the relay.
[0082] If an anomaly is found in the synchronization signal path, the type of anomaly is determined and displayed on the output. For example, the relay itself may be damaged, causing the synchronization signal path to be disconnected, or the relay may not receive the high-level drive signal sent by the master device.
[0083] If it is determined that there is no abnormality in the synchronization signal path, the connection between the relay and the master device and the slave device can be disconnected, and the master device, relay and slave device can be reconnected. Then, a low-level drive signal is sent to the relay to drive the relay to open. After a certain period of time (e.g., 2 seconds), a high-level drive signal is sent to the relay again to drive the relay to close, forming a synchronization signal path from the master device to the slave device. That is, step S10 is executed again.
[0084] In this embodiment, when the master device does not receive the corresponding feedback information within a first preset time range, it can detect whether there is an abnormality in the synchronization signal path between the master device and the slave device. If it is determined that there is no abnormality, the synchronization signal path is disconnected and then reconnected, and the subsequent device upgrade process for the slave device continues, thereby ensuring the effective performance of the firmware upgrade for the slave device.
[0085] Step S40: The preset firmware upgrade data is sent to the slave device through the serial communication link between the master device and the slave device to upgrade the firmware of the slave device.
[0086] Optionally, in response to the master device receiving feedback information from the slave device indicating that the slave device has detected a synchronization signal, it can be assumed that the slave device has entered the upgrade mode. The master device can then send the preset firmware upgrade data (such as the system version data of the MCU in the slave device) to the slave device via the serial communication link to upgrade the firmware of the slave device.
[0087] For example, refer to Figure 7 If the master device is computer 10 and the slave device is AR glasses 20, then computer 10 can establish a serial communication link with AR glasses 20 and can identify the relay 300 which is in an idle state. Computer 10, relay 300 and AR glasses 20 are connected in sequence to form a relay-based device upgrade circuit. The computer can perform firmware upgrade processing on AR glasses in accordance with steps S10-S40 and in conjunction with the relay-based device upgrade circuit.
[0088] Based on any of the above embodiments, a fourth embodiment of this application is proposed. In the fourth embodiment, the relay-based device upgrade method further includes steps c10-c20.
[0089] Step c10: After sending the preset firmware upgrade data to the slave device, read the firmware upgrade progress data of the slave device and check whether the firmware upgrade progress data is abnormal. In step c20, if the firmware upgrade progress data is abnormal, it is determined that the firmware upgrade from the device has failed, and the step of sending a high-level drive signal to the relay is re-executed.
[0090] Optionally, the master device can be configured with dual threads, including a main thread and a sub-thread. The main thread is used for signal synchronization between the master and slave devices, as well as for the firmware upgrade process of the slave device. The sub-thread is used to monitor the firmware upgrade process of the slave device. For example, the main thread in the master device is used to execute steps S10-S40, and the sub-thread in the master device is used to execute steps c10-c20.
[0091] Optionally, after the main thread sends the preset firmware upgrade data to the slave device, a sub-thread in the main device can be started. The sub-thread can read the firmware upgrade progress data of the slave device through the serial communication link and detect whether the firmware upgrade progress data is abnormal (such as the slave device upgrade failing, or it being fixed at a fixed progress point within a time range (such as 1 hour)). If the firmware upgrade progress data is abnormal, the main device can determine that the slave device firmware upgrade has failed, that is, the main device has failed to burn data. At this time, steps S10-S40 can be repeated, and the firmware upgrade process of the slave device can be repeated. If it is determined that the slave device has failed to upgrade the firmware for a preset number of consecutive times (such as 3 times), the device upgrade process is terminated, and the corresponding upgrade information is output to inform the user that the slave device upgrade has failed.
[0092] In this embodiment, by setting a sub-thread in the master device to monitor the upgrade process of the slave device, and actively re-upgrading the firmware when it is determined that the firmware upgrade of the slave device has failed, the intelligence of the firmware upgrade can be improved.
[0093] In addition, refer to Figure 8 If the master device is a PC and the slave device is AR glasses, the main thread on the PC can be started before the computer begins the burning process. The computer can first search for the glasses device via the serial communication link (i.e., determine the glasses device that needs firmware upgrade). If a glasses device that needs firmware upgrade is found, the computer then searches for a relay. If there is an available relay between the PC and the glasses device, the relay is connected to form a relay-based device upgrade circuit. If the master device determines that there is no glasses device that needs firmware upgrade, or that there is no available relay (or there is no relay between the glasses device and the computer), the corresponding device upgrade process ends.
[0094] In a relay-based device upgrade circuit, the main device can first perform initial signal processing, such as Flash_Index=0, SYNC=0, and then check if Flash_Index<3? That is, determine whether the number of firmware upgrades for the glasses device within the current time period is less than 3. If it is not less than 3, the process can be terminated directly, and it can be determined that the firmware upgrade for the glasses device has failed. If it is less than 3, the MCU can be programmed, that is, the PC can enter the programming process and wait for the SYNC signal (i.e., the synchronization signal). The PC can send a high-level drive signal to the relay, drive the relay to close [b'\xa0\x02\x01\xa3'], form a synchronization signal path (Sleep(1)), and then determine whether the MCU of the glasses device has detected the SYNC signal. If it has not detected it, then determine that the sent SYNC<N? (That is, determine whether the number of synchronization signals sent is less than N (N is a positive integer) times). If so, and the SYNC++ operation is executed, the PC can send a low-level drive signal to the relay, causing the relay to disconnect [b'\xa0\x02\x00\xa2'], and wait for the SYNC signal again. If not, mark the exception type (such as the exception type of relay damage) and end.
[0095] When the MCU of the glasses device detects the SYNC signal, the PC can continuously output a high-level SYNC signal (i.e., a high-level drive signal) to cause the relay to close for a certain period of time, such as 6 seconds after the relay closes. Then, the PC can output a low-level drive signal to the relay (i.e., continuously output a low-level SSYNC-6 seconds) to drive the relay to open. At this time, the PC can perform the flashing process, enter the flashing state, and send the preset firmware upgrade data to the glasses device to upgrade the firmware. Then, it checks if the flashing was successful. If yes, the process ends; otherwise, it updates the Flash_Index count (e.g., Flash_Index++) and re-executes the step of checking if Flash_Index < 3.
[0096] Optionally, when starting MCU programming on the PC, a sub-thread can be started on the PC, i.e., starting multi-threaded monitoring of the glasses device's MCU (i.e., starting multi-threaded monitoring of the MCU in the diagram). The programming operation is performed on the PC. When the preset firmware upgrade data is sent to the glasses device, the sub-thread automatically reads the firmware upgrade progress data from the MCU (i.e., automatically reading MCU data in the diagram) and performs log queries to determine if there are any upgrade anomalies. If an upgrade anomaly is detected, i.e., the firmware upgrade progress data is abnormal, it is determined that the device firmware upgrade has failed, and an anomaly type diagnosis can be performed (e.g., SUCCESS_FLAG = FALSE). Synchronization variables are updated to re-execute the step of sending a high-level drive signal to the relay. If no upgrade anomaly is detected, the system continues to check if there are any preset anomaly keywords in the log data (i.e., keywords detected in the diagram). If an anomaly keyword is detected (e.g., SUCCESS_FLAG = TRUE), it is determined that the firmware upgrade progress data is abnormal, and the device firmware upgrade has failed. Synchronization variables are updated to re-execute the step of sending a high-level drive signal to the relay. If no anomaly keyword is detected, the log query operation can continue.
[0097] In this embodiment, a relay-based device upgrade circuit is set up, including a master device, a slave device, and a relay. The master device sends a high-level drive signal to the relay, causing the relay to close and forming a synchronization signal path from the master device to the slave device. A synchronization signal is then sent to the slave device through this synchronization signal path. Upon receiving feedback information from the slave device indicating that it has detected a synchronization signal, the master device sends a low-level drive signal to the relay, causing it to open. The preset firmware upgrade data is then sent to the slave device through the serial communication link between the master and slave devices to perform a firmware upgrade. This allows the master device to perform a firmware upgrade on the slave device without relying on operators to precisely control the signal triggering timing. Instead, the relay-based device upgrade circuit can precisely control the signal triggering timing, and the synchronization signal path between the master and slave devices is controlled by the closing of the relay. This eliminates the need for manual intervention, improving the efficiency and intelligence of firmware upgrades on slave devices.
[0098] Furthermore, this application provides an electronic device, which can be a master device, a slave device, or a device upgrade circuit including a relay, and can include at least one processor; and a memory communicatively connected to at least one processor; wherein the memory stores instructions executable by at least one processor, the instructions being executed by at least one processor to enable at least one processor to perform the relay-based device upgrade method in the above embodiment 1.
[0099] The following is for reference. Figure 9 The figure illustrates a structural diagram of an electronic device suitable for implementing embodiments of this application. The electronic devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The devices shown in the figure are merely examples and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0100] The electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for device operation. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0101] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application 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, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0102] The electronic device provided in this application, employing the relay-based device upgrade method described in the above embodiments, can solve the technical problem of intelligent firmware upgrades. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the relay-based device upgrade method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0103] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0104] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0105] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the relay-based device upgrade method in the above embodiments.
[0106] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having 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 fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0107] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0108] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, enable the electronic device to perform the steps in the aforementioned relay-based device upgrade method.
[0109] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and 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 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).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. 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 a 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, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0111] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0112] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described relay-based device upgrade method, thereby solving the technical problem of how to improve the intelligence of firmware upgrades. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the relay-based device upgrade method provided in the above embodiments, and will not be repeated here.
[0113] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the relay-based device upgrade method described above.
[0114] The computer program product provided in this application solves the technical problem of how to improve the intelligence of firmware upgrades. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the relay-based device upgrade method provided in the above embodiments, and will not be repeated here.
[0115] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A relay-based device upgrade circuit, characterized in that, The relay-based device upgrade circuit includes: Main equipment; The master device is connected to the slave device to form a serial communication link; The master device, the relay, and the slave device are connected in sequence. The master device sends a high-level drive signal to the relay, causing the relay to close and forming a synchronization signal path from the master device to the slave device. A preset synchronization signal is sent to the slave device through the synchronization signal path. If feedback information indicating that the slave device has detected the synchronization signal is received from the slave device, a low-level drive signal is sent to the relay, causing the relay to open. Preset firmware upgrade data is then sent to the slave device through the serial communication link to upgrade the firmware of the slave device.
2. The relay-based device upgrade circuit as described in claim 1, characterized in that, The relay-based device upgrade circuit includes at least one relay. For each of the relays, the relay includes an input terminal, a common terminal, and a normally open port. The input terminal is connected to the first master port of the master device, the common terminal is connected to the first slave port of the slave device, and the normally open port is connected to the second slave port of the slave device.
3. The relay-based device upgrade circuit as described in claim 2, characterized in that, The relay includes a first switch and a normally closed port. In response to the relay receiving a high-level drive signal sent by the master device, the first switch is connected to the common terminal and the normally open port respectively; In response to the relay receiving a low-level drive signal sent by the master device, the first switch connects to the common terminal and the normally closed port respectively.
4. The relay-based device upgrade circuit as described in claim 1, characterized in that, The relay-based device upgrade circuit also includes a serial port module. The second master port of the master device is connected to the first end of the serial port module, and the third slave port of the slave device is connected to the second end of the serial port module.
5. The relay-based device upgrade circuit as described in claim 1, characterized in that, The relay-based device upgrade circuit also includes a conversion module. The conversion module includes a first conversion port and multiple second conversion ports, the multiple second conversion ports being respectively connected to the input terminals of multiple relays, wherein each second conversion port is connected to the input terminal of one relay; The first conversion port of the conversion module is connected to the first main port of the main device.
6. A device upgrade method based on relays, characterized in that, The main device applied to the relay-based device upgrade circuit as described in any one of claims 1-5, wherein the relay-based device upgrade method comprises: A high-level drive signal is sent to the relay to drive the relay to close, thus forming a synchronization signal path from the master device to the slave device. A preset synchronization signal is sent to the slave device through the synchronization signal path; If feedback information indicating that the slave device has detected the synchronization signal is received from the slave device, a low-level drive signal is sent to the relay to drive the relay to disconnect. The preset firmware upgrade data is sent to the slave device through the serial communication link between the master device and the slave device to upgrade the firmware of the slave device.
7. The relay-based device upgrade method as described in claim 6, characterized in that, The step of sending a low-level drive signal to the relay to drive the relay to disconnect if feedback information indicating that the slave device has detected the synchronization signal is received from the slave device further includes: If feedback information indicating that the slave device has detected the synchronization signal is received from the slave device within a first preset time range, then after the relay is closed for a first preset time period, a low-level drive signal is sent to the relay to drive the relay to open.
8. The relay-based device upgrade method as described in claim 7, characterized in that, After the step of sending a preset synchronization signal to the slave device through the synchronization signal path, the method further includes: If no feedback information indicating that the slave device has detected the synchronization signal is received from the slave device within a first preset time range, then the synchronization signal path is checked for abnormality. If no abnormality is found, a low-level drive signal is sent to the relay to drive the relay to disconnect, and the step of sending a high-level drive signal to the relay is repeated.
9. The relay-based device upgrade method as described in claim 6, characterized in that, The relay-based device upgrade method further includes: After sending the preset firmware upgrade data to the slave device, read the firmware upgrade progress data of the slave device and check whether the firmware upgrade progress data is abnormal; If the firmware upgrade progress data is abnormal, it is determined that the slave device firmware upgrade has failed, and the step of sending a high-level drive signal to the relay is re-executed.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the relay-based device upgrade method as described in any one of claims 6 to 9.