Data transmission method and energy storage device

By actively sending incremental data packets and sending full data packets when necessary, the problem of data asynchrony and storage resource consumption caused by incremental data packet loss is solved, achieving efficient data transmission synchronization and integrity.

CN116347266BActive Publication Date: 2025-10-21ECOFLOW INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310289717.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2025-10-21
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

Existing technologies suffer from data asynchrony issues due to incremental data packet loss during data transmission, which consumes terminal storage resources and increases the probability of data transmission errors, while also consuming significant amounts of cloud network data traffic.

Method used

After sending the full data packet for the first time, the slave device actively sends incremental data packets. When it receives a full data packet request from the host, it sends the current full data packet. By generating incremental data packets and marking sequence codes on the slave device, the probability of data transmission errors and network traffic are reduced.

Benefits of technology

It enables real-time data synchronization, reduces the probability of data transmission errors and network traffic consumption, and improves the integrity and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116347266B_ABST
    Figure CN116347266B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method and an energy storage device. The data transmission method comprises the following steps: after sending a full data packet to a host, comparing the full data packet in a current detection period and a historical full data packet and generating an incremental data packet; wherein the full data packet comprises collected data received in the current detection period; the collected data is sent by a data collection unit in each detection period after the data collection unit is powered on; the incremental data packet is sent to the host; and when a full data request sent by the host is received, the full data packet in the current detection period is sent to the host, wherein the full data request is sent by the host when the incremental data packet is not received for more than a first preset time length. The data transmission method provided by the application can improve the synchronization and integrity in the data transmission process, and reduce network data flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transmission, and in particular to a data transmission method and energy storage device. Background Art

[0002] In the field of data collection and synchronization, when the collected data content and data structure are relatively fixed, incremental data transmission is often used to save network data traffic. However, when network fluctuations occur, data desynchronization may occur due to incremental data packet loss.

[0003] To address this issue, the related art approach involves the cloud proactively sending data request packets to the terminal, with each request packet having a corresponding identifier. Upon receiving the request packet from the cloud, the terminal sends the corresponding incremental data to the cloud and stores the incremental data and the corresponding identifier locally. If the incremental data packet is lost—that is, the cloud does not receive the response data corresponding to the request packet's identifier—the cloud sends the data request packet again using the same identifier. Upon receiving the data request packet, the terminal first determines whether the identifier in the data request packet is a historical identifier. If it is, the terminal sends the historical incremental data corresponding to the identifier to the cloud. If it is not, the terminal sends the new incremental data to the cloud. However, this approach requires, on the one hand, the terminal to store all historical incremental data and historical identifiers, and then, upon receiving a data request packet from the cloud, to query the historical identifier data. This undoubtedly consumes storage resources within the terminal, reduces data transmission speed, and increases the likelihood of data transmission errors. Furthermore, because the cloud needs to send a data request packet before obtaining incremental data, it consumes a significant amount of network data traffic. Summary of the Invention

[0004] To solve the above problems, the present application provides a data transmission method and energy storage device, which can reduce data flow and the probability of data transmission errors.

[0005] The first aspect of the present application provides a data transmission method, which is applied to a slave device, and the slave device establishes a communication connection with a host device. The data transmission method includes: after sending a full data packet to the host device, comparing the full data packet in the current detection cycle with the historical full data packet and generating an incremental data packet; wherein the full data packet includes the collected data received in the current detection cycle; the collected data is sent by the data acquisition unit in each detection cycle after power is turned on; sending the incremental data packet to the host device; when receiving a full data request sent by the host device, sending the full data packet in the current detection cycle to the host device, wherein the full data request is sent by the host device when the incremental data packet is not received for more than a first preset time period.

[0006] In one embodiment, a full data packet in a current detection cycle is compared with a historical full data packet and an incremental data packet is generated, including: receiving collected data sent by each data collection unit, combining all collected data to form a full data packet; comparing the full data packet currently received with the historical full data packet of the previous detection cycle to determine the incremental data; and generating the incremental data packet based on the incremental data.

[0007] In one embodiment, the full data packet in the current detection cycle is compared with the historical full data packet and an incremental data packet is generated, which also includes: marking a sequence code for the determined incremental data to form an incremental data packet, and the several sequence codes generated in different detection cycles meet the preset rules, and the sequence code is used to identify the incremental data packets of different detection cycles.

[0008] In one embodiment, when there are multiple data acquisition units, the full data packet in the current detection cycle and the historical full data packet are compared and an incremental data packet is generated, including: receiving the collected data sent by the data acquisition unit as the full data packet of the data acquisition unit; comparing the current full data packet of the data acquisition unit with the historical full data packet of the previous detection cycle to determine the incremental data of the data acquisition unit; and generating an incremental data packet of the corresponding data acquisition unit based on the incremental data of the data acquisition unit.

[0009] In one embodiment, the full data packet in the current detection cycle is compared with the historical full data packet and an incremental data packet is generated, which also includes: marking the incremental data of the data acquisition unit with an identification code and a sequence code to form an incremental data packet of the data acquisition unit, wherein the identification code of the incremental data packet generated by the same data acquisition unit is the same, and the sequence codes of the incremental data packets of different detection cycles of the same data acquisition unit comply with preset rules; the sequence code is used to identify the incremental data packets of different detection cycles, and the identification code is used to identify the incremental data packets of different data acquisition units.

[0010] In one embodiment, the data transmission method further includes: storing the current full data packet and clearing the full data packet of the previous detection cycle.

[0011] In one embodiment, the data transmission method further includes: when no collected data is received within a second preset time interval from the last time collected data was received, determining that the incremental data is empty; generating an incremental data packet with an empty payload and sending it to the host.

[0012] The second aspect of the present application also provides a data transmission method applied to the host, including: entering an incremental receiving state after receiving a full data packet sent by a slave at any time; in the incremental receiving state, receiving an incremental data packet sent by the slave, and when no incremental data packet is received for more than a first preset time length, sending a full data request to the slave, and entering a full receiving state; in the full receiving state, entering an incremental receiving state after receiving a full data packet sent by the slave.

[0013] In one embodiment, when the incremental data packet is also marked with a sequence code, the data transmission method further includes: obtaining the sequence code on each incremental data packet; when the sequence codes on two adjacent incremental data packets received do not meet the preset rules, sending a full data request to the slave device and entering a full data receiving state.

[0014] The third aspect of the present application further provides an energy storage device, and the energy storage device is used as a slave to establish a communication connection with a host. The energy storage device includes a battery pack, a processor, a memory, multiple functional modules and corresponding data acquisition units. Each data acquisition unit is used to collect working data of the corresponding functional module to generate collected data. The data acquisition unit is communicatively connected to the processor. The memory is used to store one or more programs. When the one or more programs are executed by the processor, the energy storage device implements any of the above data transmission methods applied to the slave.

[0015] A fourth aspect of the present application further provides an electronic device, which functions as a host and is communicatively connected to an energy storage device. The electronic device includes a memory and a processor. The memory is configured to store one or more programs, and when the one or more programs are executed by the processor, the electronic device implements any of the above methods for transmitting data to the host.

[0016] The data transmission method provided by the present application, on the one hand, after sending a full data packet to the host for the first time, the slave actively sends an incremental data packet, so that the slave can actively send the incremental data packet to the host without the host sending an incremental data request, thereby achieving real-time data synchronization while reducing data traffic. On the other hand, after sending a full data packet to the entire machine for the first time, when the slave receives the host's full data request, the slave will then send the full data packet at the current moment to the host, which can ensure the integrity of the data during the data transmission between the slave and the host and reduce the possibility of data transmission errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0018] Figure 1 A schematic diagram of an implementation environment of a data transmission method according to an embodiment of the present application.

[0019] Figure 2 A flowchart of a data transmission method applied to a slave device provided in one embodiment of the present application.

[0020] Figure 3 This is a schematic diagram of sub-steps of step S210 in one embodiment of the present application.

[0021] Figure 4 This is a schematic diagram of sub-steps of step S210 in another embodiment of the present application.

[0022] Figure 5 A flowchart of a data transmission method applied to a host provided in one embodiment of the present application.

[0023] Figure 6 This is a functional block diagram of an energy storage device and a functional block diagram of an electronic device provided in one embodiment of the present application.

[0024] Description of main component symbols

[0025] 10—Slave 110, 210, 410, 510—Processor 20—Master

[0026] 310, 420 - data acquisition unit 40 - energy storage device 430 - functional module 440, 520 - memory

[0027] 450—Battery Pack 4501—Battery Cell DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0029] It should be noted that when a component is considered to be "connected to" another component, it can be directly connected to the other component or there may be an intermediate component. When a component is considered to be "disposed on" another component, it can be directly disposed on the other component or there may be an intermediate component. The terms "top", "bottom", "upper", "lower", "left", "right", "front", "back", and similar expressions used herein are for illustrative purposes only.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application.

[0031] In this application, "plurality" refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0032] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application as detailed in the appended claims.

[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0034] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0035] In the field of data collection and synchronization, when the collected data content and data structure are relatively fixed, incremental data transmission is often used to save network data traffic. However, when network fluctuations occur, data desynchronization may occur due to incremental data packet loss.

[0036] To address this issue, the related art approach involves the cloud proactively sending data request packets to the terminal, with each request packet having a corresponding identifier. Upon receiving the request packet from the cloud, the terminal sends the corresponding incremental data to the cloud and stores the incremental data and the corresponding identifier locally. If the incremental data packet is lost—that is, the cloud does not receive the response data corresponding to the request packet's identifier—the cloud sends the data request packet again using the same identifier. Upon receiving the data request packet, the terminal first determines whether the identifier in the data request packet is a historical identifier. If it is, the terminal sends the historical incremental data corresponding to the identifier to the cloud. If it is not, the terminal sends the new incremental data to the cloud. However, this approach requires, on the one hand, the terminal to store all historical incremental data and historical identifiers, and then, upon receiving a data request packet from the cloud, to query the historical identifier data. This undoubtedly occupies the terminal's storage resources, reduces data transmission speed, and increases the likelihood of data transmission errors. Furthermore, because the cloud needs to send a data request packet before obtaining incremental data, it consumes a significant amount of network traffic.

[0037] Based on this, the present application provides a data transmission method, energy storage device, apparatus, electronic device and computer-readable storage medium to reduce data traffic and the probability of data transmission errors.

[0038] First, see Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment for a data transmission method according to an embodiment of the present application. The implementation environment includes a slave device 10 and a host device 20. A wired or wireless communication connection is pre-established between the slave device 10 and the host device 20. The slave device generates a full data packet or an incremental data packet based on the received collected data and sends it to the host device 20.

[0039] The slave 10 includes a processor 110, and the host 20 includes a processor 210. The processor 110 is communicatively connected to a number of data acquisition units 310 (i.e., including wired and wireless connections), and each data acquisition unit 310 can be used to obtain collected data and send the acquired collected data to the processor 110. The processor 110 is used to receive and process the collected data to generate an incremental data packet or a full data packet and send it to the host 20. The processor 210 in the host 20 determines whether data packet loss occurs based on the received incremental data packet, and when the processor 210 confirms that data packet loss occurs, it sends a full request to the slave 10. It is understandable that in some embodiments, after receiving the incremental data packet or the full data packet, the host 20 may also send corresponding data or control instructions to the slave 10, and this application will not go into details here.

[0040] It is understood that in some embodiments, the processor 110 and the plurality of data acquisition units 310 are located on the same electronic device. The data acquisition units 310 are configured to collect operating data from different modules on the electronic device to generate collected data, and then transmit the collected data to the processor 110. In this manner, the processor 110 transmits the incremental data packets or full data packets generated based on the collected data to the master 20. Specifically, the slave 10 may be an energy storage device, a self-moving device, or other device capable of collecting operational data.

[0041] In other embodiments, the slave 10 may be a first electronic device in a communication system. The communication system also includes a plurality of second electronic devices. Among them, the first electronic device is the host in the communication system, and the plurality of second electronic devices are slaves in the communication system. And the processor 110 is provided on the first electronic device. A plurality of data acquisition units 120 are respectively provided on the first electronic device and the plurality of second electronic devices. In this way, the plurality of data acquisition units 120 respectively collect working data on the first electronic device and the plurality of second electronic devices to generate a plurality of groups of collected data and send them to the processor 110. Specifically, the communication system may be a communication system composed of a plurality of electronic devices, for example, it may be a communication system composed of a plurality of energy storage devices. The communication system may also be a smart home system composed of electronic devices such as energy storage devices, refrigerators, air conditioners, and televisions, etc., and this application does not limit this.

[0042] Understandably, the host 20 can be a device that supports data reception, such as an energy storage device, a smart phone, an in-vehicle computer, a tablet computer, a laptop computer, or a wearable device. The host 20 can also be a server, for example, an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and there is no limitation here.

[0043] It is understandable that the slave machine 10 can communicate with the data acquisition unit 310 and the host 20 through a serial communication method in wired communication, such as a controller area network (CAN) bus, a parallel communication method; or at least one of 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), 5G (fifth generation mobile information technology), Wi-Fi, Bluetooth and other communication methods in wireless communication, and this application does not limit this.

[0044] See also Figure 2 , Figure 2 This is a flow chart of a data transmission method provided in one embodiment of the present application. The data transmission method is applied to a slave 10 and can be executed by a processor 110 on the slave 10. The data transmission method includes:

[0045] Step S210: After sending the full data packet to the host, compare the full data packet in the current detection cycle with the historical full data packet and generate an incremental data packet; wherein, the full data packet includes the collected data received in the current detection cycle; the collected data is sent by the data acquisition unit in each detection cycle after power is turned on.

[0046] It is understandable that after the data acquisition unit is powered on, it collects the working data of the corresponding connected device to be detected to generate a heartbeat packet including the collected data. The data acquisition unit also sends the collected data to the processor by reporting the heartbeat packet.

[0047] Among them, the detection cycle refers to the time interval between two adjacent rounds of heartbeat packets reported by all data acquisition units. In other words, all data acquisition units connected to the slave's processor complete reporting of heartbeat packets within each detection cycle. For example, when a serial communication method is adopted between the slave's processor and the data acquisition unit, all data acquisition units report heartbeat packets in sequence within the same detection cycle; when a parallel communication method is adopted between the slave's processor and the data acquisition unit, all data acquisition units can synchronously report heartbeat packets within the same detection cycle. It is understandable that the length of the detection cycle can be adjusted according to actual needs.

[0048] The slave's processor generates a full data packet and an incremental data packet based on the received collected data. The slave also includes a memory, and historical full data packets can be cached in a preset area of ​​the memory. The historical full data packet is the full data packet generated by the processor during the previous detection cycle. When the slave's processor receives collected data during the current detection cycle, it compares it with the historical full data packet in the memory to obtain new data and generates an incremental data packet based on the new data.

[0049] The slave's processor also generates and stores full data packets based on the collected data received during the current detection cycle, and clears the full data packets generated during the previous detection cycle. It is understood that when the slave and data acquisition unit are just powered on, the historical full data packets can be the full data packets stored when the slave was last powered on; the historical full data packets can also be data packets with an empty payload.

[0050] It is understandable that the collected data generated by different data collection units can be data of the same type (or the same format) or different types (or different formats). For example, the collected data can be resource occupancy data, CPU usage data, or memory usage data; in other embodiments, the collected data can also be data used to determine the existence of a communication connection between the electronic device and the receiving device when there is no data change between the previous and next detection cycles; in other embodiments, the collected data can also be battery data type or signal data type, which are generally data with a higher transmission frequency when the electronic device is in an idle state or working state; in other embodiments, the collected data can also be data that changes between the previous and next detection cycles, such as changes in the percentage of remaining battery power, changes in the status of the positioning signal, etc.

[0051] Understandably, before executing step S210, the slave 10 has established a communication connection with the host 20. Thus, after the slave 10 establishes a communication connection with the host 20, the slave can send data to the host, and the slave 10 first sends a full data packet to the host.

[0052] Step S220: Send the incremental data packet to the host.

[0053] In the present application, after the host receives the full data packet, it enters the incremental receiving state. And in step S220, after sending the full data packet, the slave actively sends an incremental data packet to the host without the host sending an incremental data request in advance. In some embodiments, the slave can periodically send incremental data packets to the host. Among them, when there is no new data compared to the historical full data packet according to the collected data reported by the data collection unit, an incremental data packet with an empty payload is sent to the host.

[0054] Step S230: When a full data request is received from the host, the full data packet in the current detection cycle is sent to the host, wherein the full data request is sent by the host when no incremental data packet is received for more than a first preset time.

[0055] Understandably, in some embodiments, when the host fails to receive an incremental data packet for a period exceeding a first preset time, it may be due to a network anomaly or other error, resulting in data packet loss. In this case, the host sends a full data request to the slave and switches to a full data reception state. Understandably, after the host enters the full data reception state, it suspends receiving incremental data packets but can receive full data packets.

[0056] After receiving the full data request, the slave stops sending incremental data packets during the current detection cycle and generates a full data packet based on the collected data received during the current detection cycle to send to the master. After receiving the full data packet, the master enters the incremental receive state again. Understandably, after entering the incremental receive state, the master suspends receiving full data packets but can receive incremental data packets.

[0057] After the slave sends the full data packet again, it continues to send the incremental data packet in the next adjacent detection cycle to the master. In this way, even if the slave loses data during the data transmission process, the data between the slave and the master can be synchronized again by executing step S230.

[0058] In summary, the data transmission method provided by the present application, on the one hand, after sending a full data packet to the host for the first time, the slave actively sends an incremental data packet, without the host sending an incremental data request, and under normal circumstances, only the slave needs to communicate in one direction, and the slave does not need to frequently send full data packets, so that data synchronization between the host and the slave can be achieved while greatly reducing data traffic; on the other hand, when the slave receives the full data request sent by the host, it can quickly identify network anomalies and send the full data packet in the current detection cycle to the host, thereby ensuring that the data synchronization between the host and the slave is immediate, improving the data integrity during the data transmission process between the slave and the host, and reducing the probability of data transmission errors.

[0059] Please continue reading Figure 3 In some embodiments, step S210 includes:

[0060] Step S310: receiving the collected data sent by each data collection unit, and combining all collected data into a full data packet.

[0061] In step S310, the processor of the slave receives the collected data sent by each data acquisition unit during the same detection cycle and packages all the collected data into a full data packet. In some embodiments, the packaged full data packet is also marked with a full data flag. In this way, when the slave sends the full data packet to the master, the master can confirm that the received data packet is a full data packet based on the full data flag.

[0062] Step S320: Compare the currently received full data packet with the historical full data packet of the previous detection cycle to determine the incremental data.

[0063] Understandably, the historical full data packet is the full data packet formed by combining and packaging all the collected data received by the slave processor in the previous detection cycle. The incremental data is the newly acquired or updated collected data obtained by each data collection unit in the current detection cycle.

[0064] Step S330: Generate an incremental data packet based on the incremental data.

[0065] In step S330, the processor of the slave performs packaging processing on the incremental data to generate an incremental data packet. Correspondingly, the incremental data packet is also marked with an incremental data tag. In this way, when the slave sends the incremental data packet to the master, the master can confirm that the received data packet is an incremental data packet based on the incremental data tag.

[0066] Thus, by executing steps S310 to S330, the slave does not need to store each incremental data packet, which does not occupy too much memory space. Moreover, the slave can package the incremental data in each detection cycle into an incremental data packet and send it to the host, thereby further saving network data traffic.

[0067] In some embodiments, step S210 further includes:

[0068] The incremental data is marked with a sequence code to form an incremental data packet, and the sequence codes generated in different detection cycles conform to a preset rule. The sequence code is used to identify the incremental data packets in different detection cycles. In other words, the sequence code is a sequence identifier, and this sequence identifier is used to indicate the order of the incremental data packets generated in different detection cycles.

[0069] In some embodiments, the slave can use a positive integer as a sequence identifier, where the smaller the value of the sequence code, the higher the order. Thus, the preset rule can be that the sequence code marked in the incremental data packet generated in the current detection cycle is the value of the sequence code marked in the incremental data packet generated in the previous detection cycle plus 1. In some embodiments, the slave can also use other ordered character sets as sequence identifiers, such as English letters or Roman characters.

[0070] It is understandable that the preset rule may also be a variation based on an ordered character set. For example, in some embodiments, the preset rule may be S=T*K+P, where S is the sequence code of the current detection cycle, T is the sequence code of the previous detection cycle, and K and P may be preset parameters. This application does not limit the sequence identifier and the preset rule.

[0071] Understandably, the host can pre-calculate the verification sequence code based on preset rules. Furthermore, when the host receives an incremental data packet, it can determine whether the verification sequence code for the current detection cycle is consistent with the sequence code in the received incremental data packet. If the host determines that the verification sequence code is consistent with the sequence code in the received incremental data packet, the host determines that no data loss occurred during the data transmission process. If the host determines that the verification sequence code is inconsistent with the sequence code in the received incremental data packet, the host determines that data loss occurred during the data transmission process, switches from the incremental reception state to the full reception state, and sends a full data request to the slave.

[0072] Furthermore, when the slave receives a full data request, the slave clears the sequence code of the current incremental data packet. When the slave sends a full data packet again, the slave again marks the sequence code of the incremental data packet generated in each detection cycle according to the preset rule.

[0073] It can be understood that marking the sequence code on the incremental data packet can further facilitate the host to determine whether data packet loss occurs, which is conducive to ensuring the synchronization and integrity of data transmission between the slave and the host.

[0074] Please continue reading Figure 4 In other embodiments, when there are multiple data acquisition units, step S210 may include:

[0075] Step S410: receiving the collected data sent by the data collection unit as a full data packet of the data collection unit.

[0076] In this embodiment, a full data packet is the collected data received by the corresponding data acquisition unit during the current detection cycle. The full data packet is also marked with a full data tag. Each full data packet is also marked with a tag code, which is used to identify the full data packet of a different data acquisition unit. Thus, after the slave establishes a communication connection with the host and when the slave receives a full data request, the slave sends a full data packet corresponding to each data acquisition unit to the host. The host can identify the full data packet of the corresponding data acquisition unit based on the full data tag and tag code on the full data packet.

[0077] Step S420: Compare the current full data packet of the data acquisition unit with the historical full data packet at the previous moment to determine the incremental data of the data acquisition unit.

[0078] In step S420, the historical full data packet is the collected data received by the corresponding data collection unit in the previous detection cycle. The incremental data is the newly acquired or updated collected data by the corresponding data collection unit in the current detection cycle.

[0079] Step S430: generating an incremental data packet corresponding to the data acquisition unit according to the incremental data of the data acquisition unit.

[0080] In step S430, the slave's processor packages the incremental data corresponding to each data unit to generate an incremental data packet. Accordingly, the incremental data packet in step S430 is also marked with an incremental data tag. Thus, when the slave sends the incremental data packet to the master, the master can confirm that the received data packet is an incremental data packet based on the incremental data tag.

[0081] Thus, by executing steps S410 to S430, the slave device does not need to store each incremental data packet, thus eliminating the need for excessive memory space. Furthermore, the slave device can package the incremental data collected by the corresponding data acquisition unit during each detection cycle into incremental data packets and transmit them to the master device. In this way, the master device can confirm the operating status of the device under test connected to the corresponding data acquisition unit based on the received incremental data packets, facilitating subsequent more precise control or maintenance of the device under test.

[0082] In some embodiments, step S210 further includes:

[0083] The incremental data from the data acquisition unit is labeled with an identification code and a sequence code to form an incremental data packet for the data acquisition unit. Incremental data packets generated by the same data acquisition unit have the same identification code, and sequence codes for incremental data packets from the same data acquisition unit at different times conform to pre-set rules. Understandably, the sequence code is used to identify incremental data packets at different times, and the identification code is used to identify incremental data packets from different data acquisition units.

[0084] It is understandable that the sequence code in this embodiment and the sequence code in the previous embodiment can satisfy the same preset rules, which will not be described in detail here. For relevant introduction, please refer to the above.

[0085] Similarly, when the slave receives a full data request, it clears the sequence code of the current incremental data packet to zero. When the slave sends a full data packet again, it again marks the sequence code of the incremental data packet generated in each detection cycle according to the preset rules.

[0086] It is understood that the sequence code, marker code, identification code, full data marker, and incremental data marker can be integer data including a predetermined number of bits on the corresponding data packet. It is understood that in some embodiments, the marker code in step S410 can also be replaced by an identification code.

[0087] It can be understood that marking the serial code and identification code on the incremental data packet corresponding to the data acquisition unit can, on the one hand, make it easier for the host to determine whether data loss occurs, which is conducive to ensuring the synchronization and integrity of data transmission between the slave and the host; on the other hand, it can make it easier for the host to confirm the working status of the device to be detected connected to each data acquisition unit, which is conducive to the implementation of independent control of each device to be detected.

[0088] In some embodiments, step S210 further includes:

[0089] When no collected data is received within the second preset time period, determining that the incremental data is empty;

[0090] Generates a delta packet with an empty payload and sends it to the host.

[0091] Among them, the second preset time length is less than the first preset time length. It is understandable that under normal circumstances, the data acquisition unit regularly reports heartbeat packets to the processor of the slave. In this way, when the processor of the slave does not receive the collected data within the second preset time length from the last time the collected data was received, it is possible that an error has occurred in the corresponding data acquisition unit and / or the device to be detected connected to the data acquisition unit. In this way, the processor determines that the incremental data is empty, and generates an incremental data packet with an empty payload and sends it to the host to prioritize ensuring normal communication with the host. In some embodiments, the slave may also issue a corresponding error reminder message to repair the error of the data acquisition unit and its corresponding device to be detected.

[0092] Understandably, when the slave receives the collected data reported by the data acquisition unit again, the slave generates an incremental data packet with the incremental data and sends it to the master. In this way, by performing the above steps, the steps of disconnecting and re-establishing the communication connection between the slave and the master can be reduced when an error occurs in the data acquisition unit.

[0093] It is understandable that the above-mentioned steps can be applied to Figure 3 and Figure 4 The data transmission methods mentioned in these two embodiments.

[0094] Please continue reading Figure 5 Another embodiment of the present application further provides a data transmission method that can be applied to a host and executed by a processor of the host. The data transmission method includes:

[0095] Step S510: After receiving a full data packet sent by a slave at any time, enter the incremental receiving state.

[0096] Among them, after the host enters the incremental receiving state, it suspends receiving full data packets, but can receive incremental data packets.

[0097] Step S520: In the incremental receiving state, receiving the incremental data packet sent by the slave, when the incremental data packet is not received for more than the first preset time length, sending a full data request to the slave, and entering the full receiving state.

[0098] It is understandable that after the host enters the full receiving state, it suspends receiving incremental data packets, but can receive full data packets.

[0099] Step S530: In the full receiving state, after receiving the full data packet sent by the slave, entering the incremental receiving state.

[0100] In some embodiments, when the incremental data packet is marked with a sequence code, the data transmission method further includes:

[0101] Get the sequence code on each incremental data packet;

[0102] When the sequence codes on two adjacent incremental data packets received do not meet the preset rules, a full data request is sent to the slave device and the slave device enters the full data receiving state.

[0103] It is understandable that for the specific working process of the host, please refer to the specific part about the host above, which will not be repeated here.

[0104] Please continue reading Figure 6 One embodiment of the present application further provides an energy storage device 40 and an electronic device 50. The energy storage device 40 acts as a slave, the electronic device 50 acts as a host, and the energy storage device 40 and the electronic device 50 establish a communication connection for transmitting data and / or control instructions to each other.

[0105] Specifically, the energy storage device 40 includes a processor 410, a battery pack 450, a memory 440, multiple functional modules 430, and corresponding data acquisition units 420. Each data acquisition unit 420 is used to collect operating data from the corresponding functional module 430 to generate collected data. The data acquisition unit 420 is communicatively connected to the processor 410. The memory 440 is used to store one or more programs. When the one or more programs are executed by the processor 410, the energy storage device 40 implements the data transmission method applied to the slave device as described in any of the above items. The specific execution process is described above and will not be repeated here.

[0106] In some embodiments, the plurality of functional modules 430 may include a battery management system (BMS) module, a power conversion module, etc. In this way, the collected data may include but is not limited to battery voltage, battery current, the status of the charge and discharge switch tubes and the battery output power, the input and output data of the power conversion module, and other data.

[0107] As will be understood, the battery pack 450 includes at least one battery cell 4501. The battery pack 450 can be used to power electronic components within the energy storage device 40. For example, the battery pack 450 can power the processor 410 and several functional modules 430. In some embodiments, the energy storage device 40 can receive electrical energy to charge the battery pack 450, and the energy storage device 40 can also power external power-consuming devices through the battery pack 450.

[0108] The electronic device 50 includes a processor 510 and a memory 520. The memory 520 is used to store one or more programs. When the one or more programs are executed by the processor 510, the electronic device 50 implements the data transmission method applied to the host as described in any of the above items. The specific execution process is described above and will not be repeated here.

[0109] It is understandable that the electronic device 50 can be an electronic device that supports data reception, or it can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server, and this application is not limited to this. Specifically, when the electronic device 50 is a cloud server, the energy storage device 40 reports the full data packet and the incremental data packet to the cloud server, which is conducive to remote control of the energy storage device 40 or maintenance of the energy storage device 40.

[0110] The present application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method in the above technical solution. The computer-readable medium can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, apparatus, or device.

[0111] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0112] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0113] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0114] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0115] Furthermore, the above-described figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention and are not intended to be limiting. It is readily understood that the processes illustrated in the above-described figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0116] In addition, those skilled in the art should recognize that the above embodiments are merely intended to illustrate the present application and are not intended to limit the present application. As long as they are within the spirit of the present application, appropriate changes and modifications to the above embodiments are within the scope of the present application.

Claims

1. A data transmission method, applied to a slave device, wherein the slave device establishes a communication connection with a host device, characterized in that: The data transmission method includes: After sending a full data packet to the host, compare the full data packet in the current detection cycle with the historical full data packet and generate an incremental data packet; wherein the full data packet includes the collected data received in the current detection cycle; the collected data is sent by the data acquisition unit in each detection cycle after power is turned on; Periodically sending the incremental data packet to the host; When receiving a full data request sent by the host, sending the full data packet in the current detection cycle to the host, wherein the full data request is sent by the host when the incremental data packet is not received for more than a first preset time period; When the collected data is not received within the second preset time period, determining that the incremental data is empty; Generate the incremental data packet with an empty payload and send it to the host.

2. The data transmission method according to claim 1, wherein: The comparing of the full data packet in the current detection period with the historical full data packet and generating the incremental data packet includes: receiving the collected data sent by each of the data collection units, and combining all the collected data to form the full data packet; Comparing the currently received full data packet with the historical full data packet of the previous detection cycle to determine incremental data; The incremental data packet is generated according to the incremental data.

3. The data transmission method according to claim 2, wherein: The step of comparing the full data packet in the current detection period with the historical full data packet and generating the incremental data packet further includes: The determined incremental data mark sequence code forms the incremental data packet, and a plurality of the sequence codes generated in different detection cycles conform to a preset rule, and the sequence code is used to identify the incremental data packets of different detection cycles.

4. The data transmission method according to claim 1, wherein: There are multiple data acquisition units; comparing the full data packet in the current detection period with the historical full data packet and generating an incremental data packet, including: receiving the collected data sent by the data collection unit as the full data packet of the data collection unit; Comparing the current full data packet of the data acquisition unit with the historical full data packet of the previous detection cycle to determine the incremental data of the data acquisition unit; An incremental data packet corresponding to the data acquisition unit is generated according to the incremental data of the data acquisition unit.

5. The data transmission method according to claim 4, wherein: The step of comparing the full data packet in the current detection period with the historical full data packet and generating the incremental data packet further includes: The incremental data of the data acquisition unit is marked with an identification code and a sequence code to form an incremental data packet of the data acquisition unit, wherein the identification code of the incremental data packet generated by the same data acquisition unit is the same, and the sequence codes of the incremental data packets of different detection cycles of the same data acquisition unit comply with preset rules; the sequence code is used to identify the incremental data packets of different detection cycles, and the identification code is used to identify the incremental data packets of different data acquisition units.

6. The data transmission method according to any one of claims 2 to 5, characterized in that: The method further comprises: The current full data packet is stored, and the full data packet of the previous detection cycle is cleared.

7. A data transmission method, applied to a host, wherein the host establishes a communication connection with a slave, characterized in that: The data transmission method includes: After receiving the full data packet sent by the slave at any time, it enters the incremental receiving state; In the incremental receiving state, receiving an incremental data packet sent by the slave, wherein the incremental data packet is sent periodically by the slave and includes a data packet with an empty payload; When the incremental data packet is not received for more than a first preset time period, a full data request is sent to the slave device to enter a full data receiving state; In the full receiving state, after receiving the full data packet sent by the slave, the incremental receiving state is entered.

8. The data transmission method according to claim 7, wherein: The incremental data packet is marked with a sequence code, and the method further comprises: Obtaining the sequence code on each of the incremental data packets; When the sequence codes on two adjacent incremental data packets received do not meet the preset rules, the full data request is sent to the slave device to enter the full data receiving state.

9. An energy storage device, characterized in that: The energy storage device is used as a slave to establish a communication connection with the host. The energy storage device includes a battery pack, a processor, a memory, multiple functional modules and corresponding data acquisition units. Each of the data acquisition units is used to collect working data of the corresponding functional module to generate collected data. The data acquisition unit is communicatively connected to the processor. The memory is used to store one or more programs. When the one or more programs are executed by the processor, the energy storage device implements the data transmission method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Alarm transmission method

    CN101924662A