Data collector based on OTA upgrade adapting to multiple devices and use method thereof
By using a data acquisition device that is based on OTA upgrades, a single device can be compatible with multiple types of lithium battery devices, solving the problem of incompatibility of communication protocols between multiple brands of devices, reducing the inventory cost of the acquisition device and improving operation and maintenance efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN DONESTY ECOMMERCE CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-05
Smart Images

Figure CN122152334A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data acquisition technology, and in particular to a data acquisition device based on OTA upgrades that can adapt to multiple devices and its usage method. Background Technology
[0002] With the rapid development of the new energy industry, lithium batteries, with their advantages of high energy density and long cycle life, have been widely used in various fields such as new energy vehicles, energy storage systems, and portable electronic devices. In the full lifecycle management of lithium batteries, the Battery Management System (BMS) and peripheral equipment such as chargers and inverters play a crucial role. The operating status data of these devices (such as battery voltage, current, temperature, and charging efficiency) are the core basis for ensuring the safe operation of lithium batteries, optimizing performance, and extending their service life. Therefore, the reliability and efficiency of the data acquisition process are of paramount importance.
[0003] Currently, the lithium battery and related peripheral equipment market presents a multi-brand, multi-specification landscape. To achieve product differentiation and technological barriers, different manufacturers often use custom communication protocols for their BMS, chargers, and other equipment, lacking a unified industry standard. To achieve data collection from these devices, existing technologies generally adopt a "one device, one specific data collector" approach, that is, configuring a dedicated data collector for different device types and communication protocols.
[0004] Due to incompatible communication protocols among different devices, existing data collectors require custom development for a single protocol, resulting in a single collector only being compatible with specific brands or models of equipment. In scenarios where multiple devices coexist, such as lithium battery production workshops and energy storage power stations, companies need to configure corresponding data collectors for each type of equipment. This not only increases equipment procurement costs but also leads to a wide variety of data collectors, with a large number of idle dedicated data collectors occupying inventory resources, resulting in serious resource waste. Summary of the Invention
[0005] The purpose of this invention is to provide a data acquisition device and its usage method that are compatible with multiple devices based on OTA upgrades. This invention can overcome the communication protocol and hardware connection barriers of different types of lithium battery devices, enabling a single acquisition device to be compatible with multiple types of devices.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for using a data acquisition device that adapts to multiple devices based on OTA upgrades, characterized by comprising the following steps: Step S1: Connect the data acquisition unit to the host computer, select the corresponding firmware upgrade package, and send the upgrade command to upgrade the firmware. Step S2: After receiving the upgrade preparation instruction, the data acquisition unit will set an upgrade flag in the backup area and then jump to run the firmware upgrade code; Step S3: Run the firmware upgrade code. First, determine whether the flag in the backup area requires an OTA upgrade. Step S4: After the upgrade is complete, clear the upgrade flag in the backup area and jump to the upgraded APP code to run; Step S5: After the firmware upgrade is completed, the software high and low level control maps the stored wiring sequence to each interface, and the positive and negative power supplies are connected to the data acquisition unit through the first switch and switched to the corresponding wiring sequence. After the device is powered on, the controller's communication circuit is connected to the data acquisition unit through the second switch and switched to the corresponding wiring sequence.
[0007] Furthermore, the determination of whether the flag in the backup area needs an OTA upgrade proceeds as follows: when it is determined that no upgrade is needed, the system continues to run the current version of the software; when it is determined that an upgrade is needed, the code in the APP area is copied to the APP backup area. During this period, the host computer will issue an upgrade preparation command again to confirm that the data acquisition unit has processed and is ready to receive the firmware. After the second confirmation, the host computer starts to send firmware data in packets, one packet of data at a time. After the upgrade is completed, the upgrade flag in the backup area is cleared, and the system jumps to the upgraded APP code to run.
[0008] Furthermore, in step S3, if an upgrade fails, the acquisition failure occurs. When the data sent by the host computer is "packet lost," the data acquisition unit receives incorrect data and replies to the host computer that the single packet data reception error has occurred. The system can immediately revert to the original stable version in the running area. When the data acquisition unit replies to the host computer that the data is "packet lost," causing the host computer to not receive the correct data, it will resend the most recent packets of data until the correct data is received.
[0009] Furthermore, the host computer is a mobile app or a computer.
[0010] Furthermore, the data acquisition unit adopts an RJ45 interface, the first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch.
[0011] A data acquisition device that adapts to multiple devices based on OTA upgrades includes a data acquisition device body. The data acquisition device is connected to the positive and negative terminals of a power supply via a first switch, and the data acquisition device is connected to the communication circuit of a controller via the first switch.
[0012] Furthermore, the first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch, which can be used to connect the power supply to any line.
[0013] The beneficial effects of this invention are as follows: This invention achieves multiple value-added benefits through an integrated design of "flexible hardware wiring sequence adaptation + dynamic software OTA upgrade + upgrade security assurance". It integrates with existing scalable protocol libraries using interfaces such as RJ45 for communication with devices and USB for firmware upgrades and power supply switching, breaking through the communication protocols and hardware connection barriers of different types of lithium battery devices. This allows a single data collector to be compatible with multiple types of devices, completely changing the traditional "one device, one specific data collector" model, reducing data collector inventory costs by 80% and minimizing resource waste. At the same time, the remote OTA upgrade and hardware interface adaptive adjustment functions shorten the adaptation time after device switching to less than 3 minutes. Combined with a unified device model, it greatly simplifies management processes, reduces labor costs, and significantly improves operation and maintenance efficiency. The dual-partition storage and fault tolerance mechanism reduce the "bricking" rate of upgrade failures from 2% to below 0.5%, avoiding device failures caused by upgrade anomalies and ensuring the continuity and reliability of operation and maintenance. Attached Figure Description
[0014] Figure 1 A schematic diagram of the line sequence channel switching of this invention. Detailed Implementation
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Please see Figure 1 The present invention provides an embodiment: a method for using a data collector adapted to multiple devices based on OTA upgrades, characterized by the following steps: Step S1: Connect the data acquisition unit to the host computer, select the corresponding firmware upgrade package, and send the upgrade command to upgrade the firmware. Step S2: After receiving the upgrade preparation instruction, the data acquisition unit will set an upgrade flag in the backup area and then jump to run the firmware upgrade code; Step S3: Run the firmware upgrade code. First, determine whether the flag in the backup area requires an OTA upgrade. Step S4: After the upgrade is complete, clear the upgrade flag in the backup area and jump to the upgraded APP code to run; Step S5: After the firmware upgrade is complete, the software high / low level control maps the stored wiring sequence to each interface. The positive and negative power supplies are connected to the data acquisition unit via the first switch and switched to the corresponding wiring sequence. After the device is powered on, the controller's communication circuit is connected to the data acquisition unit via the second switch and switched to the corresponding wiring sequence. Since the positive and negative power supplies of the data acquisition unit need to be switched to the corresponding wiring sequence after the firmware upgrade and must be maintained, the device can only be powered on after switching to the correct wiring sequence. Other communication lines can be switched after the device is powered on. Taking the RJ45 interface as an example, the data acquisition unit connects to the device. The RJ45 has 8 wires, with 8 magnetic latching relays for both positive and negative power, allowing the internal power supply to be connected to any wire. The remaining communication lines each use 8 conventional switches for control and can also be connected to any wire. After the OTA upgrade is complete, the software high / low level control maps the stored wiring sequence to each interface and the corresponding protocol. Furthermore, this invention includes a protection mechanism. Upon initiating an OTA upgrade, all wiring sequence switches are immediately turned off to prevent damage caused by firmware upgrades to devices with different wiring sequences while the device is already communicating with another device. For example... Figure 1 As shown in the diagram, there are two power lines and two communication lines. If the data acquisition unit has already switched the fixed wiring sequence through firmware upgrade, for example, the power line is switched to position 1-2 and the communication line is switched to position 5-6, after the firmware upgrade is completed, first switch the power line to position 1-2. The power switch will remain on after switching, even if the device is powered off. This allows the data acquisition unit to be connected to the power supply after being connected to the corresponding device. When the device is powered on, the communication line is then switched to position 5-6.
[0017] Please continue reading. Figure 1 As shown, in one embodiment of the present invention, the determination of whether the flag in the backup area needs an OTA upgrade further involves: when it is determined that no upgrade is needed, the system continues to run the current version of the software; when it is determined that an upgrade is needed, the code in the APP area is copied to the APP backup area. During this period, the host computer will issue an upgrade preparation command again to confirm that the data acquisition unit has processed and is ready to receive the firmware. After the second confirmation, the host computer starts to send firmware data in packets, performing dynamic upgrades sequentially in a one-packet-one-response manner. After the upgrade is completed, the upgrade flag in the backup area is cleared, and the system jumps to the upgraded APP code to run. The present invention adopts a dual-partition storage module design, divided into an APP area and an APP backup area. When an upgrade fails, the system can immediately revert to the original stable version in the running area, avoiding the device becoming unusable. Multiple OTA methods all use the same protocol, and multiple methods use a mutex lock to identify firmware upgrades. When an upgrade starts in one way, the firmware upgrade function of other methods is blocked to prevent conflicts.
[0018] Please continue reading. Figure 1As shown in one embodiment of the present invention, when an upgrade fails in step S3, the failure situation is as follows: when the data sent by the host computer is "packet lost", the data acquisition unit receives incorrect data and replies to the host computer that the single packet data reception error occurs. The system can immediately revert to the original stable version in the running area. When the data acquisition unit replies to the host computer that the data is "packet lost", causing the host computer to not receive the correct data, it will resend the most recent packets of data until the correct data is received.
[0019] Please continue reading. Figure 1 As shown, in one embodiment of the present invention, the host computer is a mobile app or a computer. When the host computer is a computer, the data acquisition unit communicates with the computer via USB. When using a mobile app, it connects to the data acquisition unit remotely via Bluetooth / WiFi. The host computer or mobile app connects to the data acquisition unit and selects the corresponding firmware upgrade package, performs OTA upgrade to match the device wiring sequence switching and protocol firmware, and switches the wiring sequence.
[0020] Please continue reading. Figure 1 As shown, in one embodiment of the present invention, the data acquisition device adopts an RJ45 interface, the first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch.
[0021] Please see Figure 1 The present invention provides another embodiment: a data acquisition device for adapting to multiple devices based on OTA upgrade, including a data acquisition device body, wherein the data acquisition device is connected to the positive and negative terminals of the power supply through a first switch, and the data acquisition device is connected to the communication circuit of the controller through the first switch.
[0022] Please continue reading. Figure 1 As shown, in one embodiment of the present invention, the first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch, which can be used to connect the power supply to any line.
[0023] This invention operates on the following principles: Through an integrated design combining flexible hardware wiring sequence adaptation, dynamic OTA software upgrades, and upgrade security assurance, it achieves multiple value-added benefits. Leveraging RJ45 and other interfaces, it integrates with existing scalable protocol libraries. RJ45 is used for device communication, while the USB interface is used for firmware upgrades and power supply wiring sequence switching. This breaks through the communication protocols and hardware connection barriers of different types of lithium battery devices, enabling a single data collector to be compatible with multiple types of devices. This completely changes the traditional "one device, one specific data collector" model, reducing data collector inventory costs by 80% and minimizing resource waste. Simultaneously, remote OTA upgrades and adaptive hardware interface adjustments shorten the adaptation time after device switching to less than 3 minutes. Combined with a unified device model, this significantly simplifies management processes, reduces labor costs, and significantly improves operational efficiency. Furthermore, dual-partition storage and fault-tolerance mechanisms reduce the upgrade failure rate ("bricked") from 2% to below 0.5%, preventing device failures caused by upgrade anomalies and ensuring operational continuity and reliability.
[0024] The above description is only a preferred embodiment of the present invention and should not be construed as a limitation of this application. All equivalent changes and modifications made in accordance with the scope of the patent application of the present invention should be covered by the present invention.
Claims
1. A method for using a data collector adapted to multiple devices based on OTA upgrades, characterized in that: Includes the following steps: Step S1: Connect the data acquisition unit to the host computer, select the corresponding firmware upgrade package, and send the upgrade command to upgrade the firmware. Step S2: After receiving the upgrade preparation instruction, the data acquisition unit will set an upgrade flag in the backup area and then jump to run the firmware upgrade code; Step S3: Run the firmware upgrade code. First, determine whether the flag in the backup area requires an OTA upgrade. Step S4: After the upgrade is complete, clear the upgrade flag in the backup area and jump to the upgraded APP code to run; Step S5: After the firmware upgrade is completed, the software high and low level control maps the stored wiring sequence to each interface. The positive and negative power supplies are connected to the data acquisition unit through the first switch and switched to the corresponding wiring sequence. After the device is powered on, the controller's communication circuit is connected to the data acquisition unit through the second switch and switched to the corresponding wiring sequence.
2. The method for using a data acquisition device adapted to multiple devices based on OTA upgrades according to claim 1, characterized in that: The determination of whether the flag in the backup area needs an OTA upgrade further involves: when it is determined that no upgrade is needed, the system continues to run the current version of the software; when it is determined that an upgrade is needed, the code in the APP area is copied to the APP backup area. During this period, the host computer will issue an upgrade preparation command again to confirm that the data acquisition unit has processed and is ready to receive the firmware. After the second confirmation, the host computer starts to send firmware data in packets, one packet of data at a time. After the upgrade is completed, the upgrade flag in the backup area is cleared, and the system jumps to the upgraded APP code to run.
3. The method for using a data acquisition device adapted to multiple devices based on OTA upgrades according to claim 1, characterized in that: When an upgrade fails in step S3, the failure situation is as follows: when the data sent by the host computer is "packet lost", the data acquisition unit receives incorrect data and replies to the host computer that the single packet data reception error has occurred. The system can immediately revert to the original stable version in the running area. When the data acquisition unit replies to the host computer that the data is "packet lost", causing the host computer to not receive the correct data, it will resend the most recent packets of data until the correct data is received.
4. The method for using a data acquisition device adapted to multiple devices based on OTA upgrades according to claim 1, characterized in that: The host computer is a mobile app or a computer.
5. The method for using a data acquisition device adapted to multiple devices based on OTA upgrades according to claim 1, characterized in that: The data acquisition unit uses an RJ45 interface, the first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch.
6. A data acquisition device for OTA upgrade and multi-device adaptation, applicable to the method of using the data acquisition device for OTA upgrade and multi-device adaptation as described in claim 1, characterized in that: It includes a data acquisition unit, which is connected to the positive and negative terminals of a power supply via a first switch, and is also connected to the communication circuit of a controller via the first switch.
7. A data acquisition device for multiple devices based on OTA upgrade as described in claim 6, characterized in that: The first switch is an 8-channel magnetic latching relay, and the second switch is an 8-channel MOSFET control switch, which can be used to connect the power supply to any line.