Data compression method based on charging pile, charging pile and storage medium

By classifying and grading compression of charging pile data, the problem of limited storage resources of charging piles is solved, ensuring the integrity and reliability of charging data, and improving the efficiency of data management.

CN119441967APending Publication Date: 2025-02-14AUTEL UNITED CREATION SOFTWARE DEV CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411423227.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Charging piles have limited storage resources, making it difficult to ensure the integrity and reliability of charging data, especially when the network is interrupted.

Method used

The data compression method based on the charging pile is adopted, by acquiring a variety of charging data, classifying the data according to preset classification rules, determining the available storage resources of the charging pile, and hierarchically compressing the charging data according to the storage priority of the data set.

Benefits of technology

Under the condition of limited storage resources of charging piles, ensure the integrity and reliability of charging data, improve the efficiency of data management, and avoid data loss and inaccurate billing information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441967A_ABST
    Figure CN119441967A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of data processing, in particular to a data compression method based on a charging pile, the charging pile and a storage medium, and the method comprises the steps: obtaining various charging data of the charging pile; according to a preset classification rule, classifying the charging data to divide the charging data into a plurality of data sets, all the charging data in the same data set corresponding to the same storage priority, and the storage priorities of the charging data in different data sets being different; determining available storage resources of the charging pile; and based on the available storage resource of the charging pile, according to the storage priority of each data set, compressing the charging data of at least one data set. According to the method, various charging data are classified according to the storage priorities, on the premise that available storage resources of the charging pile are met, graded compression is performed on the charging data according to the storage priorities, and data compression is more reasonable while data reliability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of data processing, and in particular to a data compression method based on a charging pile, a charging pile, and a storage medium. Background Art

[0002] The charging network for new energy vehicles usually includes charging piles, charging stations, charging network management systems and corresponding cloud platforms. The charging network management system usually controls the data of each charging pile in the charging station, collects the charging data related to the charging piles in real time, and sends it to the cloud platform to generate the corresponding billing information. According to different billing rules, the billing mode of the cloud platform mainly includes: charging by usage time, that is, users pay according to the charging time; and charging by electricity, users pay according to the actual amount of electricity consumed by charging. For any billing mode, the accuracy of charging data is the prerequisite for ensuring the reliability of billing information, so the reliability of charging data collected by the cloud platform must be guaranteed.

[0003] However, due to the complexity and diversity of real-world scenarios, current charging piles often find it difficult to ensure the stability of network connections, and unstable network connections can easily lead to data transmission interruptions, thus affecting the reliability of billing information. Therefore, charging piles need to have a certain data storage capacity to store charging data in a timely manner when the network is interrupted, so that the stored charging data can be fully transmitted to the cloud platform when the network is restored, ensuring that the billing process of the cloud platform is not disturbed. However, since the data storage capacity of charging piles is not high, a reasonable data compression solution is urgently needed to ensure the integrity and reliability of charging data stored in charging piles under the premise of limited storage resources of charging piles. Summary of the invention

[0004] One purpose of the embodiments of the present application is to provide a data compression method based on a charging pile, a charging pile, and a computer-readable storage medium to solve the technical problem of how to ensure the integrity and reliability of charging data stored in the charging pile under the premise of limited storage resources of the charging pile.

[0005] In a first aspect, an embodiment of the present application provides a data compression method based on a charging pile, which is applied to a control device of the charging pile, and the method includes:

[0006] Acquire a variety of charging data of the charging pile; classify the charging data according to preset classification rules to divide the charging data into multiple data sets, each of the data sets includes at least one charging data, all charging data in the same data set corresponds to the same storage priority, and the storage priority of charging data in different data sets is different; determine the available storage resources of the charging pile; based on the available storage resources of the charging pile, compress the charging data of at least one data set among the multiple data sets according to the storage priority of each data set.

[0007] In combination with the first aspect, in a possible implementation method, the charging data includes core data, secondary data and non-critical data. The core data includes status information of the charging pile and meter data of the charging pile. The secondary data includes hardware information of the charging pile and event log of the charging pile. The non-critical data includes environmental information of the charging pile and real-time log of the charging pile.

[0008] In combination with the first aspect, in a possible implementation manner, classifying the charging data according to a preset classification rule to divide the charging data into multiple data sets includes:

[0009] Obtain a preset keyword list, wherein the preset keyword list includes multiple baseline keywords and a classification attribute to which each baseline keyword belongs; determine a target attribute and a target keyword, wherein the target attribute is any classification attribute in the preset keyword list, and the target keyword includes all baseline keywords belonging to the target attribute in the preset keyword list; and classify the charging data according to the target attribute and the target keyword.

[0010] In combination with the first aspect, in a possible implementation manner, each type of charging data corresponds to a reference keyword, and the classifying the charging data according to the target attribute and the target keyword includes:

[0011] Create a target set, the target set is used to store charging data corresponding to the target attribute; based on the target keyword, traverse the charging data to extract target data from the target data, the target data includes at least one charging data, and the benchmark keyword corresponding to the target data belongs to the target keyword; store the target data in the target set, and after detecting that the target data has been stored in the target set, redetermine the target attribute and the target keyword.

[0012] In combination with the first aspect, in a possible implementation manner, determining the available storage resources of the charging pile includes:

[0013] Determine the preset total storage resources of the charging pile; determine the used storage resources of the charging pile; calculate the available storage resources of the charging pile based on the preset total storage resources and the used storage resources of the charging pile, the available storage resources being the difference between the preset total storage resources and the used storage resources.

[0014] In combination with the first aspect, in a possible implementation manner, compressing charging data of at least one data set among the multiple data sets based on available storage resources of the charging pile according to storage priorities corresponding to each data set includes:

[0015] Determine the storage resource occupancy rate of the charging pile, where the storage resource occupancy rate is used to indicate the ratio of the available storage resources of the charging pile to the preset total storage resources of the charging pile; perform daemon thread monitoring on the charging pile to detect in real time whether the storage resource occupancy rate is greater than a preset first threshold; when it is detected that the storage resource occupancy rate is greater than the preset first threshold, compress the charging data according to the storage priority corresponding to each data set.

[0016] In combination with the first aspect, in a possible implementation manner, when the storage resource occupancy rate is greater than a preset first threshold, compressing the charging data according to the storage priority corresponding to each data set includes:

[0017] When it is detected that the storage resource occupancy rate is greater than a preset first threshold, a first data compression ratio is determined, and the first data compression ratio is used to indicate the proportion of the data to be compressed in the charging data; according to the first data compression ratio, a first data set is determined in the charging data in an order of storage priority corresponding to each data set; based on a preset data compression algorithm, the charging data in the first data set is compressed, and the preset data compression algorithm is a lossless compression algorithm.

[0018] In combination with the first aspect, in a possible implementation manner, the method further includes:

[0019] When it is detected that the storage resource occupancy rate is greater than a first preset threshold, determine whether the storage resource occupancy rate is greater than a second preset threshold; if so, determine a second data compression ratio and a data deletion ratio, the data compression ratio being used to indicate the ratio of the data to be compressed to the charging data, and the data deletion ratio being used to indicate the ratio of the data to be deleted to the charging data; according to the data compression ratio and the data deletion ratio, in the order of storage priority corresponding to each data set, determine a first data set and a second data set in the charging data; delete the charging data in the first data set, and compress the charging data in the second data set based on a preset data compression algorithm.

[0020] In a second aspect, an embodiment of the present application further proposes a charging pile, which is provided with a memory and a processor, the memory is connected to the processor, the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic device implements the data compression method based on the charging pile as described in the first aspect.

[0021] In a third aspect, the embodiment of the present application further proposes a data compression device based on a charging pile, comprising:

[0022] A data acquisition module is used to acquire various charging data of the charging pile;

[0023] a data classification module, configured to classify the charging data according to a preset classification rule, so as to divide the charging data into a plurality of data sets, each of which includes at least one type of charging data, all charging data in the same data set correspond to the same storage priority, and charging data in different data sets have different storage priorities;

[0024] A resource detection module, used to determine the available storage resources of the charging pile;

[0025] The data compression module is used to compress the charging data of at least one data set among the multiple data sets based on the available storage resources of the charging pile and according to the storage priority of each data set.

[0026] In a fourth aspect, an embodiment of the present application further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the data compression method based on the charging pile as described in the first aspect.

[0027] The embodiments of the present application can achieve the following technical effects:

[0028] The method proposed in the embodiment of the present application, when used for data compression of a charging pile, first obtains a variety of charging data of the charging pile, and classifies the charging data according to a preset classification rule to divide the charging data into multiple data sets, wherein each of the data sets includes at least one type of charging data, all charging data in the same data set corresponds to the same storage priority, and the storage priority of charging data in different data sets is different. At the same time, the available storage resources of the charging pile are determined, and finally, based on the available storage resources of the charging pile, the charging data is hierarchically compressed according to the storage priority corresponding to each data set.

[0029] Based on this method, various charging data are first divided into data sets with different storage priorities according to preset classification rules, and then the charging data can be hierarchically compressed according to the order of storage priority. Based on this, under the condition of limited storage resources of the charging pile, the storage priority is used to reflect the order of charging data during data compression, so that the data compression process can be hierarchically adjusted according to actual needs. While ensuring the integrity and reliability of the charging data stored in the charging pile, it can also effectively improve the efficiency of data management. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0031] Figure 1 A schematic diagram of a data compression system provided in an embodiment of the present application;

[0032] Figure 2 A schematic diagram of a data compression method based on a charging pile provided in an embodiment of the present application;

[0033] Figure 3 A schematic diagram of the structure of a data compression device based on a charging pile provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of the structure of a control device for a charging pile provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0036] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0037] For a better explanation of this application, please refer to Figure 1 , Figure 1 A schematic diagram of a data compression system is shown in FIG. Figure 1 As shown, the charging system includes a charging pile 10, a control device 20 of the charging pile and a server side 30. The charging pile 10 is communicatively connected with the control device 20 of the charging pile and the server side 30 respectively. The charging pile 10 is used to provide charging services for various types of vehicles, and various charging data related to its working process can be sent to the charging management device 10. The control device 20 can control the charging pile 10 to intelligently compress various charging data. The charging pile 10 sends the compressed data to the server side 30 in real time. Finally, the server side 30 parses and processes the compressed data provided by the control device 20, thereby executing charging billing and charging management and control of the charging pile 10.

[0038] It is easy to understand that since the main function of the control device 20 includes controlling the charging pile 10 to compress and forward the charging data, at least a communication module and a data processing module should be integrated thereon, and control instructions are transmitted through the communication module, and the charging pile 10 is controlled to perform data compression through the data processing module. Figure 1 The control device 20 shown is set independently of the charging pile 10. In addition, the control device 20 can also adopt an architecture combined with the charging pile 10, that is, the data processing function is integrated on the charging pile 10. The above two architectures can be set by the implementers according to the needs of the specific scenario.

[0039] As a feasible implementation mode, in the form of a control device 20 integrated in a charging pile 10, after obtaining a variety of charging data of the charging pile 10, the charging data are classified according to preset classification rules to divide the charging data into multiple data sets, each of which includes at least one charging data, all charging data in the same data set corresponds to the same storage priority, and the storage priority of charging data in different data sets is different, and then the available storage resources of the charging pile are determined, and based on the available storage resources of the charging pile, the charging data of at least one data set in the multiple data sets are compressed according to the storage priority of each data set.

[0040] Furthermore, based on the above Figure 1 In the application scenario shown, a data compression method based on a charging pile is proposed, which can be executed by the control device of the above charging pile. Figure 2 , the data compression method comprises:

[0041] Step S10, obtaining various charging data of the charging pile;

[0042] It should be noted that in this embodiment, the collection and storage of charging data are performed by an independent charging management device, which can be regarded as the host computer of the charging pile and has the authority to manage the charging data related to the charging pile.

[0043] In some embodiments, the control device is configured to be independent of the charging pile's own architecture. In this mode, the charging pile is provided with a necessary communication module, which is connected to the control device via Wi-Fi or a mobile network (such as 4G, 5G, etc.) to enable the control device to control the charging pile. For example, after the user starts charging, the charging pile synchronously sends charging data such as charging time, power, voltage, current, etc. to the charging management device through the communication module, and the charging management device can store and analyze these data.

[0044] In other embodiments, the control device is configured to be integrated into the charging pile's own architecture. In this mode, the necessary functional modules (including corresponding software modules and hardware resources) for implementing the charging management device are integrated into the charging pile's own management system. Furthermore, the charging pile's own management system can collect and store various types of charging data generated by the charging pile in real time, and send this part of charging data to an external server at a certain period to better ensure the real-time nature of data collection.

[0045] In this embodiment, the various charging data of the charging pile include core data, secondary data and non-critical data. The core data includes but is not limited to the status information of the charging pile and the meter data of the charging pile. The secondary data includes but is not limited to the hardware information of the charging pile and the event log of the charging pile. The non-critical data includes but is not limited to the environmental information of the charging pile and the real-time log of the charging pile.

[0046] According to the characteristics and uses of charging data, charging data can be divided into core data, secondary data and non-critical data (in descending order of importance) according to its importance. Specifically, core data plays a key role in the operation of charging piles, while secondary data is mostly used to ensure the stable operation of the system. Non-critical data refers to environmental information related to charging piles, etc.

[0047] As an example, the status information of the charging pile mainly includes the operating status of the charging pile, the charging connection status, the charging process status, etc. This information can be used for the processing and control of charging orders; the meter data of the charging pile mainly includes real-time data such as power, voltage, current, etc. during the charging process. This data can be used for billing and monitoring of the charging process.

[0048] The hardware information of the charging pile mainly includes the model, manufacturer information, firmware version, etc. of the charging pile, which can be used for the management and daily maintenance of the charging pile; the event log of the charging pile mainly includes the event record, fault information, alarm information, etc. of the charging pile, which can be used for troubleshooting and system maintenance.

[0049] The environmental information of the charging pile mainly includes the latitude and longitude of the location of the charging pile, ambient temperature, humidity, etc., which is used for environmental monitoring and management of the charging pile; the real-time log of the charging pile mainly includes the real-time operation log of the charging pile, debugging information, etc., which is used for auxiliary debugging and system optimization.

[0050] Step S20, classifying the charging data according to a preset classification rule to divide the charging data into a plurality of data sets, each of the data sets including at least one type of charging data, all charging data in the same data set corresponding to the same storage priority, and charging data in different data sets having different storage priorities;

[0051] In this embodiment, preset classification rules are used to classify charging data. After executing the classification process based on the preset classification rules, various different charging data can be stored according to the dimension of storage priority. After a certain storage priority is determined, all charging data corresponding to the storage priority can be extracted, providing a basis for data selection compression in subsequent steps.

[0052] It is necessary to explain that storage priority refers to the necessity of storing all kinds of charging data completely for limited storage resources. For multiple types of data with different storage priorities, the necessity of storing charging data with relatively high storage priority completely is also relatively high. That is, in the case of limited storage resources, high storage priority data should be stored completely as much as possible. At the same time, it is easy to understand that in the case of limited storage resources, in order to ensure that high storage priority data is stored completely, low storage priority data should be compressed under necessary conditions. Under extreme conditions (severe shortage of storage resources), some low storage priority data can also be deleted, and some medium storage priority data can be appropriately compressed to ensure that high storage priority data is stored completely.

[0053] Specifically, assuming that a charging pile includes multiple charging data {d1, d2, d3...}, and the multiple charging data correspond to n storage priorities, based on this, classification is performed according to preset classification rules and it is divided into n data sets, including {k1, k2...kn}, wherein each data set in k1~kn is composed of at least one charging data, assuming that the data set k1 includes charging data d1 and d2, after the classification is completed, it can be determined that the storage priority of d1 and d2 is the same. At the same time, if the storage priority corresponding to k1 is less than k2, then for d1 and d2, the storage priority of the charging data they refer to is less than the storage priority of any charging data in k2.

[0054] Step S30, determining the available storage resources of the charging pile;

[0055] Step S40 : compressing the charging data of at least one of the multiple data sets based on the available storage resources of the charging pile and according to the storage priority of each data set.

[0056] In this embodiment, the available storage resources of the charging pile refer to the difference between the preset total storage resources of the charging pile and the used storage resources, that is, the remaining amount of the preset total storage resources of the charging pile minus the used storage resources. On this basis, the available storage resources of the charging pile should be reasonably allocated so that it can store the charging data as completely as possible.

[0057] At the same time, since the storage priority of each data set is different, when the available storage resources of the charging pile are insufficient to support the complete storage of all charging data, it is necessary to satisfy the complete storage of the charging data corresponding to the high storage priority as much as possible according to the level of storage priority, to ensure that the operation of the charging pile is not affected as much as possible, and to appropriately compress the charging data corresponding to the low storage priority to save space as much as possible.

[0058] Taking the above steps as an example, when the available storage resources of the charging pile are sufficient, the charging management device will give priority to retaining the core data, and moderately compress the secondary data and non-critical data. As an example, the secondary data and non-critical data can be losslessly compressed through Huffman coding. Huffman coding is a lossless compression algorithm, that is, no data will be lost during the compression and decompression process, and the compressed data can be completely restored to the original data. In general, Huffman coding achieves efficient compression of data by constructing an optimal coding tree to represent characters with higher frequency with shorter codes, but can completely restore the original data during the decompression process without losing any information. Huffman coding usually performs well in terms of compression rate, especially for charging data, because charging data usually has a certain degree of repetitive data, so a higher compression rate can be achieved.

[0059] Furthermore, in the above embodiment, the charging data is classified according to preset classification rules to divide the charging data into multiple data sets, including: obtaining a preset keyword list, the preset keyword list includes multiple benchmark keywords, and the classification attribute to which each benchmark keyword belongs; determining a target attribute and a target keyword, the target attribute is any one of the classification attributes in the preset keyword list, and the target keyword includes all benchmark keywords belonging to the target attribute in the preset keyword list; and classifying the charging data according to the target attribute and the target keyword.

[0060] Among them, the preset keyword list is used to indicate the correspondence between the benchmark keywords and the classification attributes. One benchmark keyword corresponds to only one classification attribute, and one classification attribute may include multiple benchmark keywords. The benchmark keyword defines the keyword type of all charging data of the charging pile. The types of different charging data are determined by the benchmark keywords corresponding to each type of charging data, and then the classification attributes of each charging data can be determined by the keyword list.

[0061] At present, the standard data protocol commonly used by various types of charging piles on the market is usually the OCPP (Open Charge Point Protocol) protocol. Taking OCPP as an example, this protocol defines specific information keywords to identify the different states and operations of charging pile equipment, providing a standardized way for charging pile management and data interaction. Based on this, keywords for various charging data can be identified, and further used as feature identifiers for each type of charging data. The above keyword list can be changed in real time according to actual needs. For example, the benchmark keywords A, B, and C are first set to correspond to classification attribute J, and then it can be adjusted to keywords A and B corresponding to classification attribute l, and keyword C still corresponds to classification attribute j.

[0062] More specifically, each type of charging data corresponds to a benchmark keyword, and the target data is classified according to the target attributes and the target keywords, including: creating a target set, the target set being used to store the charging data corresponding to the target attributes; based on the target keyword, traversing the charging data to extract target data from the target data, the target data including at least one type of charging data, and the benchmark keyword corresponding to the target data belongs to the target keyword; storing the target data into the target set, and after detecting that the target data has been stored in the target set, redetermining the target attributes and target keywords.

[0063] The target data set is used to store all charging data corresponding to the target keyword, and the target data to be stored in the target set can be determined by traversing and identifying the keywords of all charging data.

[0064] Furthermore, in the above embodiment, determining the available storage resources of the charging pile includes: determining the preset total storage resources of the charging pile; determining the used storage resources of the charging pile; and calculating the available storage resources of the charging pile based on the preset total storage resources and the used storage resources of the charging pile, the available storage resources being the difference between the preset total storage resources and the used storage resources.

[0065] In an embodiment, the management system or management software integrated in the charging pile itself can be used to confirm the used storage resources of the charging pile in real time, and in subsequent steps, the daemon thread can be used to determine whether the storage threshold for compressing data has been reached. If reached, non-critical data will be gradually cleaned up and critical data will be compressed.

[0066] Furthermore, in the above embodiment, based on the available storage resources of the charging pile, the charging data is hierarchically compressed according to the storage priority corresponding to each data set, including: determining the storage resource occupancy rate of the charging pile, the storage resource occupancy rate is used to indicate the ratio of the available storage resources of the charging pile to the preset total storage resources of the charging pile; monitoring the charging pile by a daemon thread to detect in real time whether the storage resource occupancy rate is greater than a preset first threshold; when it is detected that the storage resource occupancy rate is greater than the preset first threshold, compressing the charging data according to the storage priority corresponding to each data set.

[0067] Specifically, when the storage resource occupancy rate is greater than a preset first threshold, the charging data is compressed according to the storage priority corresponding to each data set, including:

[0068] When it is detected that the storage resource occupancy rate is greater than a preset first threshold, a first data compression ratio is determined, and the first data compression ratio is used to indicate the proportion of the data to be compressed in the charging data; according to the first data compression ratio, a first data set is determined in the charging data in an order of storage priority corresponding to each data set; based on a preset data compression algorithm, the charging data in the first data set is compressed, and the preset data compression algorithm is a lossless compression algorithm.

[0069] Among them, the first data set is used to indicate the specific range of charging data that needs to be compressed under the condition that the storage resource occupancy rate is greater than the preset first threshold value. It includes one or more data sets among the multiple classified data sets. The storage priority of these one or more data sets is the lowest among all data sets. Therefore, when the current storage resources are insufficient, this type of charging data is compressed first.

[0070] In this embodiment, the first preset threshold corresponds to a first data compression ratio, which can be set in advance or calculated in real time through multiple algorithms in actual application scenarios. According to the first data compression ratio, a fixed data compression range can be determined, that is, the data volume of the data to be compressed. Based on the size limit of the data volume, the data set with the lowest storage priority is continuously selected from multiple data sets in order from low to high storage priority until the data volume of the selected first data set reaches the limit of the first data compression ratio, and finally compressed through a preset data compression algorithm (such as Huffman coding in the above embodiment).

[0071] More specifically, when it is detected that the storage resource occupancy rate is greater than a first preset threshold, it is also necessary to determine whether the storage resource occupancy rate is greater than a second preset threshold; if so, determine a second data compression ratio and a data deletion ratio, the data compression ratio being used to indicate the proportion of the data to be compressed in the charging data, and the data deletion ratio being used to indicate the proportion of the data to be deleted in the charging data; according to the data compression ratio and the data deletion ratio, in the order of storage priority corresponding to each data set, determine a first data set and a second data set in the charging data; delete the charging data in the first data set, and compress the charging data in the second data set based on a preset data compression algorithm.

[0072] It is easy to understand that when the storage resource occupancy rate is greater than the first preset threshold, it is further judged whether the storage resource occupancy rate is greater than the second preset threshold to determine whether the current storage resources have reached the extreme condition that some data must be deleted for normal storage. If it is determined to be so, a second data compression ratio and a data deletion ratio are determined in all charging data. The data deletion ratio indicates the amount of data to be deleted, and then based on the amount of data limited by the data deletion ratio, some charging data is deleted.

[0073] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0074] As another aspect of the embodiment of the present application, the embodiment of the present application further provides a data compression device based on a charging pile. The data compression device based on a charging pile can be a software module, which includes several instructions stored in a memory, and the processor can access the memory and call the instructions for execution to complete the data compression method based on the charging pile described in the above embodiments.

[0075] In some embodiments, the data compression device based on the charging pile can also be constructed by hardware devices. For example, the data compression device based on the charging pile can be constructed by one or more chips, and each chip can work in coordination with each other to complete the data compression method based on the charging pile described in the above embodiments. For another example, the data compression device based on the charging pile can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISCMachine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components.

[0076] As a possible implementation, please refer to Figure 3 , Figure 3 The figure shows a schematic diagram of a data compression device based on a charging pile, the device comprising:

[0077] The data acquisition module 310 is used to acquire various charging data of the charging pile;

[0078] A data classification module 320, configured to classify the charging data according to a preset classification rule, so as to divide the charging data into a plurality of data sets, each of which includes at least one type of charging data, all charging data in the same data set correspond to the same storage priority, and charging data in different data sets have different storage priorities;

[0079] A resource detection module 330, used to determine the available storage resources of the charging pile;

[0080] The data compression module 340 is used to compress the charging data in a hierarchical manner according to the storage priority of each data set based on the available storage resources of the charging pile.

[0081] In one possible implementation, the data classification module 320, when used to classify the charging data according to preset classification rules so as to divide the charging data into multiple data sets, is specifically used to: obtain a preset keyword list, the preset keyword list includes multiple benchmark keywords, and a classification attribute to which each benchmark keyword belongs; determine a target attribute and a target keyword, the target attribute is any one of the classification attributes in the preset keyword list, and the target keyword includes all benchmark keywords belonging to the target attribute in the preset keyword list; and classify the charging data according to the target attribute and the target keyword.

[0082] In one possible implementation, the data classification module 320, when used to classify the target data according to the target attributes and the target keywords, is specifically used to: create a target set, the target set being used to store charging data corresponding to the target attributes; based on the target keywords, traverse the charging data to extract target data from the target data, the target data including at least one type of charging data, and the benchmark keyword corresponding to the target data belongs to the target keyword; store the target data in the target set, and after detecting that the target data has been stored in the target set, redetermine the target attributes and target keywords.

[0083] In one possible implementation, the resource detection module 330, when used to determine the available storage resources of the charging pile, is specifically used to: determine the preset total storage resources of the charging pile; determine the used storage resources of the charging pile; and calculate the available storage resources of the charging pile based on the preset total storage resources and the used storage resources of the charging pile, wherein the available storage resources are the difference between the preset total storage resources and the used storage resources.

[0084] In one possible implementation, the data compression module 340, when used to perform hierarchical compression on the charging data based on the available storage resources of the charging pile and according to the storage priority corresponding to each data set, is specifically used to: determine the storage resource occupancy rate of the charging pile, wherein the storage resource occupancy rate is used to indicate the ratio of the available storage resources of the charging pile to the preset total storage resources of the charging pile; perform daemon thread monitoring on the charging pile to detect in real time whether the storage resource occupancy rate is greater than a preset first threshold; when it is detected that the storage resource occupancy rate is greater than the preset first threshold, compress the charging data according to the storage priority corresponding to each data set.

[0085] In one possible implementation, the data compression module 340, when used to compress the charging data according to the storage priority corresponding to each data set when the storage resource occupancy rate is greater than a preset first threshold, is specifically used to: determine a first data compression ratio when it is detected that the storage resource occupancy rate is greater than the preset first threshold, the first data compression ratio being used to indicate the proportion of the data to be compressed in the charging data; determine a first data set in the charging data according to the first data compression ratio and in the order of the storage priority corresponding to each data set; and compress the charging data in the first data set based on a preset data compression algorithm, the preset data compression algorithm being a lossless compression algorithm.

[0086] In one possible implementation, the data compression module 340 is also used to: when it is detected that the storage resource occupancy rate is greater than a first preset threshold, determine whether the storage resource occupancy rate is greater than a second preset threshold; if so, determine a second data compression ratio and a data deletion ratio, the data compression ratio being used to indicate the ratio of the data to be compressed to the charging data, and the data deletion ratio being used to indicate the ratio of the data to be deleted to the charging data; according to the data compression ratio and the data deletion ratio, in the order of storage priority corresponding to each data set, determine a first data set and a second data set in the charging data; delete the charging data in the first data set, and compress the charging data in the second data set based on a preset data compression algorithm.

[0087] Further, see Figure 4 , Figure 4 4 is a schematic diagram of a charging management device provided in an embodiment of the present application, so as to implement the data compression method based on the charging pile in the above embodiment, and have the necessary hardware structure to achieve the data processing capability required to implement the above method. The charging management device includes one or more processors 41 and a memory 42. The memory 42 is connected to one or more processors 41, for example, connected to the processor 41 via a bus.

[0088] The processor 41 is configured to support the charging management device to perform the corresponding functions in the method in the above method embodiment. The processor 41 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0089] The memory 42 is used to store program codes, etc. The memory 42 may include a volatile memory (VM), such as a random access memory (RAM); the memory 42 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 42 may also include a combination of the above-mentioned types of memories.

[0090] The memory 42 can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the data compression method based on the charging pile in the embodiment of the present application. The processor 41 executes various functional applications and data processing of the data compression method based on the charging pile and the data compression device based on the charging pile by running the non-volatile software programs, instructions and modules stored in the memory 42, that is, realizes the functions of each module or unit of the data compression method based on the charging pile and the data compression device based on the charging pile provided in the above method embodiment.

[0091] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function. The data storage area may store data created based on the use of a data compression device based on a charging pile, etc. In some embodiments, the memory 42 may optionally include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the data compression device based on the charging pile via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] One or more modules are stored in the memory 42. When executed by one or more processors 41, the charging pile-based data compression method in any of the above-mentioned method embodiments is executed, for example, the method steps described in the above-mentioned method embodiments are executed to realize the functions of the modules described in the above-mentioned device embodiments.

[0093] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the data compression method based on the charging pile as in the aforementioned embodiment.

[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0095] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data compression method based on a charging pile, characterized in that: A control device applied to a charging pile, the method comprising: Obtain various charging data of charging piles; Classifying the charging data according to a preset classification rule to divide the charging data into a plurality of data sets, each of the data sets including at least one type of charging data, all charging data in the same data set corresponding to one storage priority, and charging data in different data sets having different storage priorities; Determining available storage resources of the charging pile; Based on the available storage resources of the charging pile, the charging data of at least one data set among the multiple data sets are compressed according to the storage priority corresponding to each data set.

2. The method according to claim 1, characterized in that The charging data includes core data, secondary data and non-critical data. The core data includes status information of the charging pile and meter data of the charging pile. The secondary data includes hardware information of the charging pile and event log of the charging pile. The non-critical data includes environmental information of the charging pile and real-time log of the charging pile.

3. The method according to claim 1, characterized in that The classifying the charging data according to a preset classification rule to divide the charging data into a plurality of data sets includes: Acquire a preset keyword list, wherein the preset keyword list includes a plurality of base keywords and a classification attribute to which each base keyword belongs; Determine a target attribute and a target keyword, wherein the target attribute is any classification attribute in a preset keyword list, and the target keyword includes all reference keywords belonging to the target attribute in the preset keyword list; The charging data is classified according to the target attribute and the target keyword.

4. The method according to claim 3, characterized in that Each type of charging data corresponds to a reference keyword, and the charging data is classified according to the target attribute and the target keyword, including: Creating a target set, the target set being used to store charging data corresponding to the target attribute; Based on the target keyword, traverse the charging data to extract target data from the target data, the target data including at least one type of charging data, and the base keyword corresponding to the target data belongs to the target keyword; The target data is stored in the target set, and after detecting that the target data has been stored in the target set, the target attribute and the target keyword are re-determined.

5. The method according to claim 1, characterized in that: The determining the available storage resources of the charging pile includes: Determining a preset total storage resource of the charging pile; Determining the used storage resources of the charging pile; The available storage resources of the charging pile are calculated according to the preset total storage resources and the used storage resources of the charging pile, and the available storage resources are the difference between the preset total storage resources and the used storage resources.

6. The method according to claim 1, characterized in that The compressing the charging data of at least one of the multiple data sets based on the available storage resources of the charging pile according to the storage priority corresponding to each data set includes: Determine a storage resource occupancy rate of the charging pile, where the storage resource occupancy rate is used to indicate a ratio of available storage resources of the charging pile to a preset total storage resource of the charging pile; Performing daemon thread monitoring on the charging pile to detect in real time whether the storage resource occupancy rate is greater than a preset first threshold; When it is detected that the storage resource occupancy rate is greater than a preset first threshold, the charging data is compressed according to the storage priority corresponding to each data set.

7. The method according to claim 6, characterized in that When it is detected that the storage resource occupancy rate is greater than a preset first threshold, compressing the charging data according to the storage priority corresponding to each data set includes: When it is detected that the storage resource occupancy rate is greater than a preset first threshold, determining a first data compression ratio, where the first data compression ratio is used to indicate the ratio of the data to be compressed to the charging data; According to the first data compression ratio, and in the order of storage priorities corresponding to the data sets, determining a first data set in the charging data; The charging data in the first data set is compressed based on a preset data compression algorithm, and the preset data compression algorithm is a lossless compression algorithm.

8. The method according to claim 7, characterized in that The method further comprises: When detecting that the storage resource occupancy rate is greater than a first preset threshold, determining whether the storage resource occupancy rate is greater than a second preset threshold; If yes, determine a second data compression ratio and a data deletion ratio, wherein the data compression ratio is used to indicate the ratio of the data to be compressed to the charging data, and the data deletion ratio is used to indicate the ratio of the data to be deleted to the charging data; According to the data compression ratio and the data deletion ratio, and in the order of storage priorities corresponding to the data sets, a first data set and a second data set are determined in the charging data; The charging data in the first data set is deleted, and the charging data in the second data set is compressed based on a preset data compression algorithm.

9. A charging pile, characterized in that: The charging pile is provided with a memory and a processor, the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the electronic device implements the data compression method based on the charging pile as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the data compression method based on the charging pile as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Data hierarchical compression storage method, energy storage management system and device and storage medium

    CN121217147A