Battery mutual charging-based data compression method and device, electronic equipment and storage medium

By encoding and assigning values ​​to status flags and channel flags in battery inter-charging scenarios, efficient and lossless compression of status and channel information is achieved, solving the problem of large data transmission volume in battery inter-charging scenarios, meeting the real-time monitoring requirements of LoRa communication, and improving the control efficiency of battery inter-charging process.

CN122138211APending Publication Date: 2026-06-02GUANGDONG LYRIC ROBOT INTELLIGENT AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG LYRIC ROBOT INTELLIGENT AUTOMATION CO LTD
Filing Date
2026-01-31
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In battery charging scenarios, existing technologies struggle to effectively compress large amounts of state information and physical parameter data, making it impossible for LoRa communication to meet the needs of real-time monitoring and rapid control.

Method used

By acquiring the raw data of the battery charging scenario, encoding and assigning values ​​based on status flags and channel flags, and utilizing the partitioning processing of status bit fields and channel bit fields, efficient and lossless compression of status information and channel information is achieved.

Benefits of technology

It significantly reduces data packet size, making it suitable for low-bandwidth communication scenarios such as LoRa, ensuring real-time and complete reporting of production data, and improving the monitoring and control efficiency of battery intercharging processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138211A_ABST
    Figure CN122138211A_ABST
Patent Text Reader

Abstract

This application discloses a data compression method, apparatus, electronic device, and storage medium based on battery inter-charging. The method includes: acquiring raw data from a battery inter-charging scenario; wherein the raw data includes a status flag and a channel flag; determining the status type and status data based on the status flag; encoding the status data into a first target bit of a preset status bit field based on the status type to obtain status bit field data; assigning a value to a second target bit of a preset channel bit field based on the channel flag to obtain channel bit field data; and integrating the status bit field data and the channel bit field data to obtain compressed data. This invention records status information and channel information in bit field format, enabling efficient and lossless compression of various types of data during battery inter-charging, and can be widely applied in the field of data compression technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data compression technology, and in particular to a data compression method, apparatus, electronic device and storage medium based on battery mutual charging. Background Technology

[0002] During the battery charging process, the battery charging board and its tray need to move frequently between different storage locations. The complex production environment and large workshop space make traditional wired and conventional wireless communication methods unsuitable. Therefore, low-power, long-range wireless communication methods such as LoRa are typically used in industrial settings. However, LoRa communication has a limited payload capacity per data packet, while the amount of status information, physical parameters, and event data generated during battery charging is substantial. Directly transmitting raw data would not meet the requirements for real-time monitoring and rapid, precise control of the production process.

[0003] In existing technologies, clustering and other methods can be used to compress data to reduce data transmission volume. However, in battery charging scenarios, there are many types of parameters. If methods such as K-value clustering are used, the actual values ​​of various parameters deviate significantly from the cluster center values. This results in a significant increase in the storage space required to record these deviation values, leading to poor data compression or even failure to achieve effective compression. Summary of the Invention

[0004] The main objective of this application is to propose a data compression method, apparatus, electronic device, and storage medium based on battery mutual charging, in order to solve at least one problem in the prior art. This application can efficiently realize data compression based on battery mutual charging.

[0005] To achieve the above objectives, one aspect of this application proposes a data compression method based on battery cross-charging, the method comprising:

[0006] Obtain raw data for battery charging scenarios; the raw data includes status flags and channel flags; The state type and state data are determined based on the state flag. The state data is then encoded into the first target bit of the preset state bit field based on the state type to obtain the state bit field data. The second target bit of the preset channel bit field is assigned a value based on the channel flag to obtain the channel bit field data; Compressed data is obtained by integrating status bit field data and channel bit field data.

[0007] In some embodiments, the status type includes process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. When the status type is process operation status, the status data is encoded into the first target bit of the preset status bit field based on the status type, including the following steps: The state data is enumerated and encoded to obtain the encoded value; The bits of the first region of the preset state bit field are overwritten and assigned values ​​based on the encoded values.

[0008] In some embodiments, enumerating and encoding the state data to obtain encoded values ​​includes the following steps: Based on the state data, the corresponding encoding value is obtained by looking up the pre-defined enumeration encoding table; The enumeration coding table is constructed by enumerating different production states of the process operation based on a preset number of bits of coding set.

[0009] In some embodiments, the status type includes process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. When the status type is protection status, the status data is encoded into the first target bit of the preset status bit field based on the status type, including the following steps: The process step events are determined based on the state data; different process step events correspond to different bits in the second region. Perform a bitwise OR operation on the bits corresponding to all process step events present in the status data.

[0010] In some embodiments, physical quantity data is shaped and transformed to obtain shaped numerical data, including the following steps: When the physical quantity data is decimal, it is converted into integer data based on a preset resolution to obtain integer numerical data.

[0011] In some embodiments, assigning a value to the second target bit of a preset channel bit field based on the channel flag includes the following steps: When the channel flag is the whole board flag, assign values ​​to all bits in the preset channel bit field; When the channel flag is not the whole board flag, the trigger channel is determined according to the channel flag, and the bit corresponding to the trigger channel in the preset channel bit field is assigned a value; In the battery inter-charging scenario, each battery inter-charging channel corresponds to a single bit in the preset channel bit field.

[0012] In some embodiments, the battery intercharging channels in the battery intercharging scenario are connected in series, and the second target bit of the preset channel bit field is assigned a value based on the channel flag, including the following steps: Identify all abnormal channels and their corresponding times of occurrence based on channel markers; The first abnormal channel to appear is selected as the target channel based on the time of the abnormality occurrence. Assign values ​​to the bits corresponding to the target channel in the preset channel bit field; In the battery inter-charging scenario, each battery inter-charging channel corresponds to a single bit in the preset channel bit field.

[0013] To achieve the above objectives, another aspect of this application proposes a data compression device based on battery mutual charging, the device comprising: The first module is used to acquire raw data for battery charging scenarios; the raw data includes status flags and channel flags. The second module is used to determine the state type and state data based on the state flag, and to encode the state data into the first target bit of the preset state bit field based on the state type to obtain the state bit field data. The third module is used to assign values ​​to the second target bit of the preset channel bit field based on the channel flag to obtain the channel bit field data; The fourth module is used to integrate the status bit field data and channel bit field data to obtain compressed data.

[0014] To achieve the above objectives, another aspect of the embodiments of this application proposes an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0016] To achieve the above objectives, another aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0017] The embodiments of this application include at least the following beneficial effects: This application provides a data compression method, apparatus, electronic device, and storage medium based on battery intercharging. This scheme acquires raw data from a battery intercharging scenario; wherein the raw data includes a status flag and a channel flag; the status type and status data are determined based on the status flag; the status data is encoded into a first target bit of a preset status bit field based on the status type to obtain status bit field data; a second target bit of a preset channel bit field is assigned a value based on the channel flag to obtain channel bit field data; and compressed data is obtained by integrating the status bit field data and the channel bit field data. The embodiments of this invention record status information and channel information in bit field form, enabling efficient and lossless compression of multiple types of data during battery intercharging. The embodiments of this invention significantly reduce data packet size, making it suitable for low-bandwidth communication scenarios such as LoRa, ensuring the requirements for real-time and complete reporting of production data, and effectively improving the monitoring and control efficiency of the battery intercharging process. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of an implementation environment for a data compression method based on battery mutual charging provided in an embodiment of this application; Figure 2 This is a flowchart of a data compression method based on battery mutual charging provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a data compression device based on battery mutual charging provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring 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 those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0020] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when," "in response to a determination," or "in the event of a determination."

[0021] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0022] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0023] In related technologies, clustering and other methods can be used to compress data to reduce data transmission volume. However, in battery charging scenarios, there are many types of parameters. If methods such as K-value clustering are used, the actual values ​​of various parameters deviate significantly from the cluster center values. This results in a significant increase in the storage space required to record these deviation values, leading to poor data compression or even failure to achieve effective compression.

[0024] In view of this, this invention provides a data compression method, apparatus, electronic device, and storage medium based on battery intercharging. This solution acquires raw data from a battery intercharging scenario; the raw data includes status flags and channel flags; based on the status flags, the status type and status data are determined; based on the status type, the status data is encoded into a first target bit of a preset status bit field to obtain status bit field data; based on the channel flags, a second target bit of a preset channel bit field is assigned a value to obtain channel bit field data; based on the status bit field data and the channel bit field data, compressed data is obtained by integrating them. This invention records status information and channel information in bit field form, enabling efficient and lossless compression of various types of data during battery intercharging. This invention significantly reduces data packet size, making it suitable for low-bandwidth communication scenarios such as LoRa, ensuring the real-time and complete reporting requirements of production data, and effectively improving the monitoring and control efficiency of the battery intercharging process.

[0025] It is understood that the data compression method based on battery charging provided by this invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or 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 communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.

[0026] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the present invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0027] Server 101 can be a standalone physical server, a server cluster or distributed system consisting 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 communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0028] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0029] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.

[0030] For example, based on Figure 1 The implementation environment shown in this embodiment of the invention provides a data compression method based on battery charging. The following description uses the application of this data compression method based on battery charging in server 101 as an example. It can be understood that this data compression method based on battery charging can also be applied in terminal 102.

[0031] Reference Figure 2 , Figure 2 This is an optional flowchart of a data compression method based on battery mutual charging provided in an embodiment of the present invention. The execution subject of the data compression method based on battery mutual charging can be any of the aforementioned computer devices (including servers or terminals). Figure 2 The method may include, but is not limited to, steps S100 to S500.

[0032] S100: Obtain raw data for battery charging scenarios; The raw data includes status flags and channel flags; For example, in some specific implementations, production data is collected in real time during the operation of the lower-level machine (such as the battery charging board controller). For example, the current state is collected as "charging state" (state flag), the channel that triggers this state is "channel 3" (channel flag), and the battery voltage is collected as "3.851V", the battery current is "1.235A", etc. (physical quantity data).

[0033] Specifically, the embodiments of the present invention clarify the scope of input data for compression processing, laying the foundation for subsequent adoption of differentiated compression strategies for different types of data, so that the compression method closely matches the actual data composition of the battery cross-charging process.

[0034] S200: Determine the state type and state data based on the state flag, and encode the state data into the first target bit of the preset state bit field based on the state type to obtain the state bit field data; It should be noted that the status type includes process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. In some embodiments, when the status type is process operation status, the following steps may be included: enumerating and encoding the status data to obtain the encoded value; overwriting the bits of the first region of the preset status bit field based on the encoded value; and encoding the status data to the first target bit of the preset status bit field based on the status type.

[0035] For example, in some specific implementations, the first 7 bits (bit0-bit6) of the status bit field (uint64) can be preset as the first area to record the process operation status (such as idle, charging, discharging, and completed); the subsequent bits are the second area to record the protection status. Taking the current status as "charging" as an example, the code value is found to be 2 (binary 010) by looking up the table. The system will clear all bits in the first area and then write the code value 2 (overwrite assignment) to ensure that the area only reflects the latest process operation status.

[0036] Specifically, the embodiments of the present invention isolate the process operation state and the protection state through physical partitioning; specifically, the process operation state is updated in an "overwrite" manner, which can ensure that the area always represents the current unique and valid process stage, thereby effectively avoiding logical confusion caused by the residue of historical states and enhancing the clarity and reliability of the state representation.

[0037] It should be noted that in some embodiments, enumerating and encoding the state data to obtain the encoded value may include the following steps: based on the state data, looking up the corresponding encoded value using a preset enumeration encoding table; wherein, the enumeration encoding table is constructed by enumerating different production states of the process operation state based on a preset set of encoding bits.

[0038] For example, in some specific implementations, an enumeration encoding table can be predefined, such as: {"Idle": 0, "Charging": 1, "Discharging": 2, "Floating Charge": 3, ...}. When the slave device's state is "Discharging", the encoded value 2 is obtained directly by looking up the table. Only 2-3 bits are needed to represent this state, instead of recording the entire string "Discharging".

[0039] Specifically, the embodiments of the present invention utilize the lookup table method for enumeration encoding, simplifying the compression process of state information into a single fast table lookup operation, which is extremely efficient. Specifically, the embodiments of the present invention can use a small number of bits (e.g., n bits can represent 2^n states) to replace the lengthy original description, which is the core means to achieve efficient and lossless compression of state data.

[0040] It should be noted that the status type includes process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. In some embodiments, when the status type is protection status, encoding the status data into the first target bit of the preset status bit field based on the status type may include the following steps: determining the process step event based on the status data; wherein, different process step events correspond to different bits in the second region; performing bitwise OR assignment on the bits corresponding to all process step events existing in the status data.

[0041] For example, in some specific implementations, multiple protections may be triggered simultaneously, such as "temperature limit protection" (corresponding to bit 18) and "current limit protection" (corresponding to bit 16) occurring at the same time. The system will determine the corresponding bits of these two events in the second region, and then perform a bitwise OR operation: new status bit field value = original status bit field value | (1<<18) | (1<<16). In this way, the two protection states are recorded simultaneously in the status bit field.

[0042] Specifically, the embodiments of the present invention use a bitwise OR method to accumulate and record the protection status, allowing multiple concurrently occurring protection events to be identified in a single status bit field. This method achieves both compression and complete preservation of all abnormal information, thereby ensuring the comprehensiveness of production safety monitoring.

[0043] S300. Assign a value to the second target bit of the preset channel bit field based on the channel flag to obtain the channel bit field data; It should be noted that, in some embodiments, assigning a value to the second target bit of the preset channel bit field based on the channel flag may include the following steps: when the channel flag is a whole board flag, assigning a value to all bits of the preset channel bit field; when the channel flag is not a whole board flag, determining the trigger channel according to the channel flag, and assigning a value to the bit corresponding to the trigger channel in the preset channel bit field; wherein, in the battery mutual charging scenario, each battery mutual charging channel corresponds to a single bit in the preset channel bit field.

[0044] For example, in some specific implementations, assuming there are 32 channels in the system (corresponding to 32-bit channel bit fields), when a protection is triggered by "channel 5", bit 5 is set to 1. If a fault affecting the entire interconnection board occurs (such as a power supply abnormality), the channel flag is set to "board flag", and all 32 bits are set to 1, indicating that all channels need to be stopped or enter protection mode.

[0045] Specifically, the embodiments of the present invention provide a flexible and accurate channel event recording mechanism; specifically, different assignment strategies are adopted for individual channel events and whole board events, which can accurately record local problems and efficiently transmit global faults, thereby enabling the host computer to make correct control decisions quickly.

[0046] It should be noted that in the battery inter-charging scenario, the battery inter-charging channels are connected in series. In some embodiments, the second target bit of the preset channel bit field is assigned a value based on the channel flag, which may include the following steps: determining all abnormal channels and their corresponding abnormal occurrence times according to the channel flag; taking the first abnormal channel as the target channel based on the abnormal occurrence time; assigning a value to the bit corresponding to the target channel in the preset channel bit field; wherein, in the battery inter-charging scenario, each battery inter-charging channel corresponds to a separate bit in the preset channel bit field.

[0047] For example, in some specific implementations, such as on a 32-channel interconnect board connected in series, if channel 8 experiences an anomaly (overvoltage) first, the system records its channel position. Subsequently, channel 15 also experiences an anomaly, but due to the series connection, the entire board has already stopped due to the anomaly of channel 8, and the anomaly of channel 15 will not be processed in this operation. The system still only records channel 8 as the abnormal channel. Only after maintenance and restart can the system detect and record the anomaly of channel 15.

[0048] Specifically, this embodiment of the invention utilizes the characteristics of a series circuit (an anomaly in one channel causes the entire board to stop) to simplify the recording requirement for anomaly channels from "recording all anomalies" to "recording the first anomaly". Specifically, the method of this embodiment of the invention sacrifices multiple alarm reporting (reporting the first one each time) to achieve a significant compression of channel bit field data (e.g., reducing from 32 bits to only the number of bits needed to record one channel address), enabling a highly efficient engineering compromise in specific scenarios.

[0049] S400: Based on status bit field data and channel bit field data, compressed data is obtained by integration; For example, in some specific embodiments, the present invention splices and packages the state bit field data (uint64, 8 bytes), the integer numerical data after conversion of multiple physical quantities (e.g., current uint32, voltage uint16, etc.), and the channel bit field data (uint32, 4 bytes) generated in the aforementioned steps according to a predefined data packet structure to form a complete, compressed data frame.

[0050] Specifically, the embodiments of the present invention integrate various types of data that have undergone efficient compression into a unified data packet format, which can significantly reduce the size of the entire data frame. This enables high-frequency, low-latency production data reporting under bandwidth-limited communication methods such as LoRa, meeting the needs of real-time monitoring.

[0051] It should be noted that the original data may also include physical quantity data. Correspondingly, the compressed data also integrates the shaped numerical data corresponding to the physical quantity data. In some embodiments, the method may also include the following steps: performing shaped transformation on the physical quantity data to obtain shaped numerical data.

[0052] In some embodiments, the process of shaping physical quantity data to obtain shaped numerical data may include the following steps: when the physical quantity data is a decimal, converting the physical quantity data into integer data based on a preset resolution to obtain shaped numerical data. Specifically, the shaped numerical calculation can be performed by multiplying the physical quantity data by the reciprocal of the predetermined unit relative to the preset resolution.

[0053] For example, in some specific implementations, during system initialization, the unit of current is agreed to be 0.1mA, and the resolution is 1. When a current value of "1234.5mA" is acquired, its integer value can be calculated as: 1234.5 / 0.1 = 12345. During data transmission and parsing, both parties are aware of this agreement, so the integer value 12345 can be directly restored to its physical meaning.

[0054] Specifically, the embodiments of the present invention can avoid using floating-point numbers in communication data packets. Specifically, by pre-agreeing on a minimum resolution, the decimal is converted into an integer, which not only compresses the data length, but also eliminates the precision problems and platform compatibility problems that may be caused by floating-point number transmission, and can effectively improve the stability and reliability of the system.

[0055] In some optional implementations, the method of the present invention can be applied not only to battery intercharging scenarios, but also to battery testing scenarios and battery storage monitoring scenarios.

[0056] For example, in some specific implementations, in the battery mutual charging scenario, the raw data can come from physical quantities such as voltage, current, and temperature of the battery panel during the battery mutual charging process, as well as the process operation status, protection status, and trigger flags of each battery channel. In battery testing scenarios, raw data can come from voltage, current, internal resistance, and corresponding test step status and channel alarm flags collected during battery charge and discharge testing. In battery storage monitoring scenarios, raw data can come from the voltage, temperature, insulation resistance of battery stacks or energy storage battery clusters, as well as the corresponding health status and abnormal channel indicators.

[0057] To explain in detail the principles of the technical solution of this application, the overall process of this application will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principles of this application and should not be regarded as a limitation of this application.

[0058] First, it should be noted that in the battery intercharging process, the battery intercharging board and its tray need to move frequently between storage locations, and the production environment is harsh with large distances between workshop spaces. Traditional wired and wireless communication methods are not suitable, so LoRa communication is adopted. However, the LoRa communication method can only contain a small amount of data in a single data packet, while the amount of information data generated in the production process is large. In order to ensure real-time monitoring of production data and rapid control of the production process, the production data needs to be compressed.

[0059] In view of this, embodiments of the present invention provide a data compression method based on battery mutual charging. In some specific application scenarios, the technical solution of embodiments of the present invention can be implemented as follows: During the production process, the production status of multiple channels is enumerated, and 2^n production status records are recorded by using n-bit encoding, which reduces data redundancy in specific production status records and achieves efficient and lossless data compression.

[0060] For example, in battery mutual charging, there are 4 states of baud rate. If the direct recording method is used, the baud rate needs 8-16 bits to record. After using the enumeration method, the baud rate only needs 2 bits to record. The lower-level machine's real-time data frame contains two bit fields used to identify the process status: a status bit field and a channel bit field. The status saving interface process is as follows: 1. Receive the status and channel flags to be saved; 2. Processing the status bit field: Determine if the status is a process operation status. If yes, overwrite the first seven bits of the status, i.e., clear the first seven bits and assign the new status. If no, determine if the status is a protection status, and use a bitwise OR operation to save the status to the bit field after the seventh bit. 3. Processing Channel Bit Fields: Identify whether it is a whole-board flag. If so, set all channel bit fields to 1, indicating that all channels have triggered protection. If not, set the specified bit field to 1, indicating that a specific channel has triggered protection. Since the whole board will stop after protection is triggered, there is no situation where one channel triggers protection and another channel triggers protection again.

[0061] In some optional implementations, the embodiments of the present invention can also achieve the following auxiliary innovations: Auxiliary innovation point 1: Divide the enumeration into regions; Technical point association: Divide the enumeration into regions, and partition the state of normal operation and the state of protection operation into state partitions; Technical effect: While compressing the state, it distinguishes between normal state and protection state, preventing protection from failing to execute due to shared data bits.

[0062] Referring to the process step event list in Table 1 below, the division method is as follows: the first 7 bits of the process step event represent the process record status; when the lower-level machine judges the status, if it is any of the first seven bits, it will overwrite the first seven bits; if it is a subsequent protection bit, it will be saved in a bitwise OR manner; "not shared" means that each protection bit is separate, and multiple bits are bitwise ORed and uploaded simultaneously. Table 1

[0063] Second innovative feature: Unit settings maintain the shape data; Technical point association: The units of data parameters appearing in the production process are set to the minimum resolution; Technical effect: The unit of decimal data generated during battery mutual charging is set to its minimum resolution. The effect is to avoid floating-point numbers and sign bits, and data collection can be completed using only integer variables, which can reduce the number of bits in the data packet.

[0064] Referring to the example in Table 2 below, the resolution information is pre-defined. Generally, the voltage unit is 0.1mV, and the pre-defined unit can be updated and modified by the program. The battery capacity data is the actual value recorded using float (a core indicator of battery mutual charging).

[0065] Table 2

[0066] Supporting innovation point 3: The data package includes step recording event data; Technical point association: The data packet contains multiple bits for recording process events. Each bit corresponds to an enumerated protection content, and setting it to 0 means that the protection has not been triggered. Technical effect: Replacing the responsible process step event information with an enumeration method achieves data compression, with each bit corresponding to a protection, to accommodate concurrent process step events.

[0067] Referring to Table 3 below (an excerpted example of the correspondence between different channel bits and process events), multiple channels are used for separate recording, with each channel corresponding to one type of event, and reserved channels are available.

[0068] Supporting innovation point 4: The data packet contains an abnormal channel bit field; Technical relevance: Abnormal channel bit fields are recorded using an address-style data logging method; Technical benefits: For example, when monitoring 32 battery charging channels, if each channel is monitored individually, 32 bits of data are required for one-to-one correspondence. By using address-style data, the channel bit sequence only needs to be pre-set, and the abnormal channel can be identified with only log232=5 bits, saving data bits. The inter-charge board channels are connected in series. If one channel malfunctions, the entire unit will malfunction. Therefore, it is only necessary to record the first channel that malfunctions. If multiple channels malfunction, the first malfunctioning channel is still recorded. After the malfunction is repaired, another malfunction can be detected upon restarting. In practice, it is rare for a single channel to have multiple malfunctions. Therefore, this compression method is used to obtain compressed data by handling multiple malfunctions.

[0069] In summary, the data compression method based on battery intercharging provided in this embodiment of the invention, by enumerating and encoding the state information and partitioning it, converts physical quantities into integer values ​​and records channel information in bit field form, thereby achieving efficient and lossless compression of various types of data during battery intercharging. Specifically, the method in this embodiment of the invention significantly reduces the data packet size, making it suitable for low-bandwidth communication scenarios such as LoRa, ensuring real-time and complete reporting of production data, and thus improving the monitoring and control efficiency of the battery intercharging process.

[0070] like Figure 3 As shown in the figure, this application embodiment also provides a data compression device 900 based on battery mutual charging, which may include: The first module 910 is used to acquire raw data for battery mutual charging scenarios; the raw data includes status flags and channel flags. The second module 920 is used to determine the state type and state data based on the state flag, and to encode the state data into the first target bit of the preset state bit field based on the state type to obtain the state bit field data. The third module 930 is used to assign a value to the second target bit of the preset channel bit field based on the channel flag to obtain the channel bit field data; The fourth module 940 is used to integrate compressed data based on status bit field data and channel bit field data.

[0071] The content of the method embodiments in this application is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0072] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned data compression method based on battery charging. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0073] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0074] Please see Figure 4 , Figure 4 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes: The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the data compression method based on battery mutual charging according to the embodiments of this application. Input / output interface 1003 is used to implement information input and output; The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004); The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0075] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data compression method based on battery mutual charging.

[0076] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0077] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0078] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0079] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0080] The data compression method, device, electronic device, and storage medium based on battery intercharging provided in this application acquire raw data from a battery intercharging scenario. The raw data includes status flags and channel flags. Based on the status flags, the status type and status data are determined. Based on the status type, the status data is encoded into a first target bit of a preset status bit field to obtain status bit field data. Based on the channel flags, a second target bit of a preset channel bit field is assigned a value to obtain channel bit field data. Based on the status bit field data and the channel bit field data, compressed data is obtained. This invention records status information and channel information in bit field form, enabling efficient and lossless compression of various types of data during battery intercharging. This invention significantly reduces data packet size, making it suitable for low-bandwidth communication scenarios such as LoRa, ensuring the real-time and complete reporting of production data, and effectively improving the monitoring and control efficiency of the battery intercharging process.

[0081] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A data compression method based on battery mutual charging, characterized in that, Includes the following steps: Obtain raw data for battery charging scenarios; wherein, the raw data includes status flags and channel flags; Based on the state flag, the state type and state data are determined, and based on the state type, the state data is encoded into the first target bit of the preset state bit field to obtain state bit field data; The second target bit of the preset channel bit field is assigned a value based on the channel flag to obtain the channel bit field data; Compressed data is obtained by integrating the state bit field data and the channel bit field data.

2. The data compression method based on battery mutual charging according to claim 1, characterized in that, The status types include process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. When the status type is the process operation status, encoding the status data into the first target bit of the preset status bit field based on the status type includes the following steps: The state data is enumerated and encoded to obtain the encoded value; The bits of the first region of the preset state bit field are overwritten and assigned values ​​based on the encoded value.

3. The data compression method based on battery mutual charging according to claim 2, characterized in that, The process of enumerating and encoding the state data to obtain the encoded value includes the following steps: Based on the state data, the corresponding encoding value is obtained by looking up a preset enumeration encoding table; The enumeration encoding table is constructed by enumerating different production states of the process operation state based on a preset number of encoding bits.

4. The data compression method based on battery mutual charging according to claim 1, characterized in that, The status types include process operation status and protection status. The preset status bit field is pre-divided into a first region and a second region through status partitioning. When the status type is the protection status, encoding the status data into the first target bit of the preset status bit field based on the status type includes the following steps: The process step event is determined based on the state data; wherein, different process step events correspond to different bits in the second region; Perform a bitwise OR operation on the bits corresponding to all the work step events present in the status data.

5. The data compression method based on battery mutual charging according to claim 1, characterized in that, The raw data also includes physical quantity data collected under the battery scenario, and the compressed data further integrates the shaped numerical data corresponding to the physical quantity data. The method also includes the following steps: The physical quantity data is shaped and transformed to obtain shaped numerical data.

6. The battery-based data compression method according to claim 5, characterized in that, The process of shaping the physical quantity data to obtain shaped numerical data includes the following steps: When the physical quantity data is a decimal, it is converted into integer data based on a preset resolution to obtain the integer numerical data.

7. The data compression method based on battery mutual charging according to claim 1, characterized in that, Assigning a value to the second target bit of the preset channel bit field based on the channel flag includes the following steps: When the channel flag is a whole board flag, assign values ​​to all bits of the preset channel bit field; When the channel flag is not the board flag, the trigger channel is determined according to the channel flag, and the bit corresponding to the trigger channel in the preset channel bit field is assigned a value; In the battery inter-charging scenario, each battery inter-charging channel corresponds to a single bit in the preset channel bit field.

8. The data compression method based on battery mutual charging according to claim 1, characterized in that, In the battery inter-charging scenario, the battery inter-charging channels are connected in series. Assigning a value to the second target bit of the preset channel bit field based on the channel flag includes the following steps: All abnormal channels and their corresponding occurrence times are determined based on the channel markers. Based on the time of occurrence of the anomaly, the first channel with the anomaly is selected as the target channel. Assign values ​​to the bits corresponding to the target channel in the preset channel bit field; In the battery inter-charging scenario, each battery inter-charging channel corresponds to a single bit in the preset channel bit field.

9. A data compression device based on battery mutual charging, characterized in that, The device includes: The first module is used to acquire raw data for battery charging scenarios; wherein, the raw data includes status flags and channel flags; The second module is used to determine the state type and state data based on the state flag, and to encode the state data into the first target bit of the preset state bit field based on the state type to obtain state bit field data. The third module is used to assign a value to the second target bit of the preset channel bit field based on the channel flag to obtain channel bit field data; The fourth module is used to integrate the state bit field data and the channel bit field data to obtain compressed data.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.