Charging data storage method, electronic device and computer program product
By setting dynamic thresholds and multi-dimensional screening methods based on attribute characteristics during charging of new energy vehicles, the problem of significant distortion of charging data is solved, efficient screening and storage is achieved, and data accuracy and system response speed are improved.
Patent Information
- Application Number
- CN202510352090.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-08
AI Technical Summary
In the charging process of new energy vehicles, the data average method causes significant distortion of data, which cannot accurately reflect the actual situation during the charging process, and cannot effectively screen out key data points, resulting in data redundancy and slow system response speed.
The dynamic threshold is set based on the attribute characteristics of the charging data. Through the multi-dimensional filtering method, the target charging data whose data changes meet the preset dynamic threshold are selected, and different expiration times are set to reduce redundant data storage.
It improves the accuracy and integrity of charging data screening, reduces the amount of redundant data, improves the system response speed and data storage efficiency, and enhances the flexibility and adaptability of data.
Smart Images

Figure CN120277033A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a charging data storage method, an electronic device, and a computer program product. Background Art
[0002] Currently, a large amount of data is generated during the charging process of new energy vehicles, including but not limited to key parameters such as power, voltage, current, and battery temperature. To reduce the data storage volume, the industry generally adopts a method of taking the average value of data within a fixed sampling period, that is, taking the average value of the sampled data at a certain time interval and using this average value to replace all the data within that time period.
[0003] Although the above method can effectively compress the data volume, in the case of large data fluctuations, using the average value will mask important details and change trends, resulting in significant data distortion and unable to accurately reflect the actual situation during the charging process. Summary of the Invention
[0004] According to various embodiments of the present application, a charging data storage method, an electronic device, and a computer program product are provided, which can improve the accuracy of data screening and reduce the storage volume of redundant data.
[0005] In a first aspect, the present application provides a charging data storage method, which includes:
[0006] Obtain an initial charging data sequence of a charging device in a charging state; the initial charging data sequence corresponds to at least one attribute feature; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, select target charging data whose data change situation meets a preset dynamic threshold; store the target charging data sequence formed by the target charging data; wherein, the dynamic threshold is set based on the attribute feature, and the values of the dynamic thresholds corresponding to different levels of the attribute feature are different; the data change situation is determined based on the magnitude relationship between two adjacent data in the initial charging data sequence.
[0007] By the above method, for the initial charging data sequence, based on different levels corresponding to each attribute feature, the corresponding dynamic threshold is used to screen the target charging data, so that for the initial charging data sequence, valuable charging data can be accurately screened from multiple dimensions, making the screened target charging data better reflect the state of the charging process; and when screening based on multiple attribute features, key data points can be screened more comprehensively; when storing the target charging data sequence, the redundant data volume can be reduced. Compared with a single fixed threshold, while improving the screening accuracy, the unnecessary data processing burden is reduced, and the response speed of the system is improved; it has strong usability and practicality.
[0008] In a possible implementation of the first aspect, the attribute features include the charging period corresponding to the initial charging data sequence; selecting target charging data whose data change condition meets a preset dynamic threshold based on different levels corresponding to at least one attribute feature includes:
[0009] For the initial charging data sequence, calculate the absolute value of the difference between two adjacent data; for the first sub-charging data sequence of different charging periods, select the target charging data whose absolute value meets the threshold corresponding to different charging periods; wherein, the first sub-charging data sequence is obtained by dividing the initial charging data sequence based on different periods of the charging period; the data change condition is determined based on the absolute value of the difference between two adjacent data; the dynamic threshold includes the thresholds corresponding to different charging periods.
[0010] In a possible implementation of the first aspect, the attribute features include the total data volume level of the initial charging data sequence; selecting target charging data whose data change condition meets a preset dynamic threshold based on different levels corresponding to at least one attribute feature for the initial charging data sequence includes:
[0011] For the initial charging data sequence, calculate the absolute value of the difference between two adjacent data; for the initial charging data sequence of different total data volume levels, select the target charging data whose absolute value meets the threshold corresponding to different total data volume levels; wherein, the dynamic threshold includes the thresholds corresponding to different total data volume levels; the data change condition is determined based on the absolute value of the difference between two adjacent data.
[0012] In a possible implementation of the first aspect, the attribute features include the data change rate of the initial charging data sequence; selecting target charging data whose data change condition meets a preset dynamic threshold based on different levels corresponding to at least one attribute feature for the initial charging data sequence includes:
[0013] For the initial charging data sequence, calculate the change rate between two adjacent data; for the second sub-charging data sequence of different change rates, select the target charging data whose change rate meets the threshold corresponding to different change rates; wherein, the second sub-charging data sequence is obtained by dividing the initial charging data sequence based on different data change rates; the dynamic threshold includes the thresholds corresponding to different change rates; the data change condition is determined based on the change rate between two adjacent data.
[0014] In a possible implementation of the first aspect, the attribute features include at least two of the charging period corresponding to the initial charging data sequence, the total data volume level, and the data change rate; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes:
[0015] For the sub-charging data sequence corresponding to the first period of the charging period, selecting target charging data whose data change situation meets a preset first dynamic threshold; for the sub-charging data sequence corresponding to the second period of the charging period, selecting target charging data whose data change situation meets a preset second dynamic threshold; wherein, the first dynamic threshold is set based on the charging period, the second dynamic threshold is set based on the total data volume level or the data change rate, the initial charging data sequence includes the sub-charging data sequence, and the dynamic threshold includes the first dynamic threshold and the second dynamic threshold.
[0016] In a possible implementation of the first aspect, for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes:
[0017] When the absolute value of the difference between the first data and the second data is greater than the dynamic threshold, selecting the second data as the target charging data; or, when the change rate of the first data and the second data is greater than the dynamic threshold, selecting the second data as the target charging data; wherein, the initial charging data sequence includes the first data and the second data.
[0018] In a possible implementation of the first aspect, the method further includes:
[0019] Sending a query instruction to the charging device based on a preset polling period; the query instruction is used to query the charging data of the charging device in the charging state; receiving the charging data sent by the charging device based on the query instruction to obtain the initial charging data sequence.
[0020] In a possible implementation of the first aspect, the method further includes:
[0021] Setting a first expiration time for the target charging data, and setting a second expiration time for the redundant data other than the target charging data in the initial charging data sequence; the second expiration time is earlier than the first expiration time; when the storage time of the target charging data reaches the first expiration time, deleting the target charging data; when the storage time of the redundant data reaches the second expiration time, deleting the redundant data.
[0022] In a possible implementation of the first aspect, the method further includes:
[0023] Receiving a data screening policy sent by a user or a management platform; the data screening policy is a policy for screening data based on at least one of a charging period, a total data volume level, and a data change rate of the initial charging data sequence; based on the data screening policy, for the initial charging data sequence, selecting target charging data whose data change situation meets a preset dynamic threshold.
[0024] In a second aspect, the present application provides a charging data storage device, and the device includes:
[0025] An acquisition unit, configured to acquire an initial charging data sequence of a charging device in a charging state; the initial charging data sequence corresponds to at least one attribute feature;
[0026] A screening unit, configured to, for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, select target charging data whose data change situation meets a preset dynamic threshold;
[0027] A storage unit, configured to store a target charging data sequence formed by the target charging data;
[0028] Wherein, the dynamic threshold is set based on the attribute feature, and the values of the dynamic thresholds corresponding to different levels of the attribute feature are different; the data volume of the target charging data sequence is smaller than the data volume of the initial charging data sequence; the data change situation is determined based on the magnitude relationship between two adjacent data in the initial charging data sequence.
[0029] In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the method described in any item of the first aspect is implemented.
[0030] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any item of the first aspect is implemented.
[0031] In a fifth aspect, the present application provides a computer program product, and when the computer program product runs on a device, the device is enabled to execute the method described in any item of the first aspect above.
[0032] It can be understood that the beneficial effects of the above second aspect to the fifth aspect can refer to the relevant descriptions in the first aspect above, and will not be elaborated here. Description of the Drawings
[0033] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0034] Figure 1 Schematic diagram of the system architecture of the application scenario provided by the embodiment of the present application;
[0035] Figure 2 Schematic diagram of the implementation process of the charging data storage method provided by the embodiment of the present application;
[0036] Figure 3 Schematic diagram of the charging data coordinates provided by the embodiment of the present application;
[0037] Figure 4 Schematic diagram of the overall architecture of the charging data storage method provided by the embodiment of the present application;
[0038] Figure 5 Schematic diagram of the structure of the charging data storage device provided by the embodiment of the present application;
[0039] Figure 6 Schematic diagram of the structure of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0040] The following will describe in detail the embodiments of the technical solutions of the present application in conjunction with the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, so they are only examples and cannot be used to limit the protection scope of the present application.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above drawings are intended to cover non-exclusive inclusion.
[0042] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specifically defined.
[0043] References to "embodiments" in this specification mean that the particular features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0044] In the description of the embodiments of the present application, the term "and / or" is merely a relationship describing the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally represents an "or" relationship between the associated objects before and after.
[0045] In the field of new energy vehicle charging, data collection, as a key link connecting charging facilities and the cloud platform, plays a crucial role in ensuring charging safety, optimizing charging efficiency, and enhancing the user experience. In recent years, with the booming development of the new energy vehicle market, how to manage a large amount of data has attracted increasing attention. In particular, a large amount of data generated during the charging process, including but not limited to key parameters such as power, voltage, current, and battery temperature. However, during the charging process that lasts for several hours, a large part of this data is redundant. How to extract key data from the vast amount of data for storage is a difficult problem that engineers in the charging field will face.
[0046] Currently, the industry uses the average value of data for a period of time to replace the data for that period. However, during a period with large data fluctuations, using the average value method greatly reduces the authenticity of the data, making the statistical data seriously distorted, masking important details and changing trends in the data sequence, and unable to objectively restore the real curve. Additionally, by using a fixed threshold to control the data volume, in the complex or frequently dynamically changing charging process, the integrity and accuracy of the filtered data cannot be ensured. Furthermore, as user requirements increase, diverse user needs cannot be met.
[0047] To address the above technical problems, the embodiments of the present application provide a method for storing charging data. It can set corresponding dynamic thresholds at different levels based on the attribute characteristics of the charging data, enabling the screening of charging data in multiple dimensions. While reducing unnecessary redundant data, it improves the accuracy of the screened data. By screening out key data that can fully reflect the charging process in multiple dimensions, the integrity of the screened charging data is ensured, fully reflecting details such as the adjustment of charging power, changes in battery temperature, and fluctuations in voltage and current during the charging process. This not only improves the flexibility and adaptability of the system but also enhances the integrity and reliability of the data.
[0048] Please refer toFigure 1 , Figure 1 is a schematic diagram of the system architecture of the application scenario provided by the embodiment of the present application; as Figure 1 shown, the system may include a cloud server 10 and a charging device 20 (such as a charging pile), and the cloud server 10 is communicatively connected to the charging device 20. During the charging process of the charging device 20 for other devices such as a car, charging data during the charging process, such as charging power, battery temperature, voltage, current and other data, is recorded. The cloud server 10 may send a query instruction to the charging device 20 to obtain the charging data; for example, the cloud server 10 sends a query instruction to the charging device 20 through a preset polling period to obtain the charging data of the charging device 20 during the entire charging cycle.
[0049] Exemplarily, the charging device 20 may include components such as a charging controller, a data storage module, and a communication module. Among them, the charging controller is responsible for the management of the charging process, the data storage module is used to temporarily store the charging data recorded during the charging process, and the communication module is used for communication and interaction with the cloud server. During the charging process, the charging device continuously detects the charging status and stores the recorded charging data locally; when receiving a query instruction from the cloud, the charging device 20 uploads the stored charging data to the cloud server.
[0050] Exemplarily, the cloud server 10 may regularly query the charging data from the charging device 20. For example, the polling period may be set to query once every 5 seconds. After the cloud server obtains the charging data, it stores the charging data in the database. If the data acquisition fails during one polling, it waits for the next polling period to continue the acquisition; the charging data saved by the cloud server each time is the charging data recorded by the charging device within 5 seconds. Among them, the cloud server may be configured with at least one data screening strategy, and this data screening strategy is set based on the attribute characteristics of the charging data. Based on the data screening strategy, the charging data is screened from different dimensions to remove redundant data, and important target charging data is obtained and the target charging data is saved.
[0051] Exemplarily, at least one data screening strategy is configured in the cloud server 10, and the cloud server 10 may select one or more of the data screening strategies based on the attribute characteristics of the obtained charging data, and screen the charging data from multiple dimensions based on different levels of the attribute characteristics.
[0052] In addition, as Figure 1As shown, the system may further include a management platform 30 for the charging device 20 and a mobile terminal 40. The cloud server 10 may also receive a data screening policy indicated by the management platform 30 as being available for use; alternatively, the mobile terminal 40 receives a configuration instruction input by the user based on a policy configuration interface, and notifies the cloud server 10 of the data screening policy indicated by the configuration instruction, and the cloud server 10 performs data screening. Among them, the management platform can be logged in through the web side, and is responsible for controlling the charging device 20, as well as selecting a data screening policy and a storage scheme.
[0053] Correspondingly, after the cloud server screens out important target charging data, it sets a corresponding expiration time for each piece of charging data, and deletes the corresponding expired data after the storage time reaches the expiration time, so as to ensure that the data of the cloud server does not increase infinitely and reduce the storage pressure of the database; for example, a first storage duration is set for the screened important target charging data, and a second storage duration is set for other redundant data except the target charging data, and the first storage duration can be greater than the second storage duration; after the storage time of the target charging data reaches the first storage duration, the target charging data is deleted, and after the storage time of the redundant data reaches the second storage duration, the redundant data is deleted.
[0054] Based on the above system architecture, the following introduces the specific implementation process of the charging data storage method through embodiments.
[0055] Please refer to Figure 2 , Figure 2 which is a schematic diagram of the implementation process of the charging data storage method provided by the embodiment of the present application. The execution subject of this method can be Figure 1 the cloud server 10 shown in Figure 2 As shown, the charging data storage method may include the following steps:
[0056] S201, obtain an initial charging data sequence of the charging device in the charging state; the initial charging data sequence corresponds to at least one attribute feature.
[0057] In some embodiments, the cloud server is communicatively connected to the charging device, and the charging device can record charging data in real time during the charging process; the cloud server obtains the charging data recorded by the charging device based on the communicative connection. Among them, the charging data may be data recorded by the charging device in real time during the charging process, or historical data recorded by the charging device.
[0058] Exemplarily, for a charging order, the charging device can record all charging data during the process of the order until the charging order is completed. The cloud server obtains all charging data corresponding to the charging order based on the communication connection to obtain an initial charging data sequence. The initial charging data sequence can have at least one attribute feature, such as charging period, total data volume, data change rate and other characteristic parameters, and the attribute features of the initial charging sequence are represented by the above characteristic parameters.
[0059] Correspondingly, the cloud server can process the initial charging data sequence to determine the characteristic parameters corresponding to the initial charging data sequence. For example, the charging period is determined based on the change of charging data or the change of charging time during the charging process; the total data volume is obtained by counting the initial charging data; the data change rate is calculated based on the difference between two adjacent data in the initial charging data sequence. The cloud server determines at least one attribute feature based on the obtained initial charging data sequence.
[0060] In some embodiments, the method further includes:
[0061] Sending a query instruction to the charging device based on a preset polling period; the query instruction is used to query the charging data of the charging device in the charging state; receiving the charging data sent by the charging device based on the query instruction to obtain an initial charging data sequence.
[0062] Exemplarily, the cloud server sends a query instruction to the charging device once every preset polling period, such as every 5 seconds or 10 seconds, to obtain the charging data returned by the charging device; and when the field error code returned by the charging device is zero, it indicates that the acquisition of charging data is successful.
[0063] Exemplarily, the query instruction is an instruction to request charging data from the charging device, which can include the type of charging data requested, such as current, voltage, temperature, charging power, etc.; when there are multiple charging devices, the query instruction can also include the device identifier of the charging device to indicate the charging device to be queried. Through the query instruction, the cloud server can actively obtain the real-time charging data of the charging device and can also request specific data fields, thereby ensuring the integrity of the acquired charging data.
[0064] Exemplarily, the charging data returned by the charging device can include data such as voltage, current, temperature, and charging status (such as charging, charging completed, fault, etc.) during the charging process. The initial charging data sequence is a set of charging data obtained through multiple polls, which records the state information and change trend of the charging device at different times; by querying the charging data multiple times, an initial charging data sequence is formed, providing a reliable data basis for subsequent data screening and analysis.
[0065] Through the polling mechanism, the cloud server can timely obtain the real-time charging data of the charging device to ensure the continuity and timeliness of the data. Among them, the polling period can be flexibly adjusted according to actual needs. For example, the polling period can be shortened for high-frequency monitoring scenarios and extended for low-frequency monitoring scenarios.
[0066] S202. For the initial charging data sequence, based on different levels corresponding to at least one attribute feature, select the target charging data whose data change situation meets the preset dynamic threshold.
[0067] In some embodiments, each attribute feature of the initial charging data sequence can be correspondingly divided into multiple different levels; for example, the charging period corresponding to the early charging stage, the mid-charging stage, and the late charging stage based on time sequence, the first data volume level, the second data volume level, and the third data volume level corresponding to the total data volume, and the first change rate and the second change rate corresponding to the data change rate.
[0068] Exemplarily, the dynamic threshold is set based on the attribute feature. The data screening conditions set for different levels corresponding to each attribute feature are used to determine whether the data change situation meets the requirements, so as to screen out the target charging data that meets the requirements; the values of the dynamic thresholds corresponding to different levels of the attribute feature are different. For example, the early charging stage in the charging period corresponds to the first threshold, the mid-charging stage corresponds to the second threshold, and the late charging stage corresponds to the third threshold; the data change situation is determined based on the magnitude relationship between two adjacent data in the initial charging data sequence. For example, the change situation of the data is determined based on the difference between two adjacent data.
[0069] For example, during the charging process, for data segments with frequent data changes or large change amplitudes, set corresponding smaller thresholds. During the data screening process, more charging data can meet the set thresholds, so as to retain more key data; for data segments with small change amplitudes, set corresponding larger thresholds, and redundant data can be reduced during the data screening process. The above dynamic threshold can be a threshold for measuring the change trend between two adjacent data. If the change trend between two adjacent data meets the preset dynamic threshold, the latter data of the two data points can be saved. During the screening process of the initial charging data, the threshold for data screening is dynamically adjusted according to the change trend of the charging data, so as to retain more detailed data and reduce unnecessary redundant data.
[0070] In some embodiments, the attribute feature includes the charging period corresponding to the initial charging data sequence, and the charging period includes the initial charging stage, the mid-charging stage, and the late charging stage; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting the target charging data whose data change situation meets the preset dynamic threshold includes:
[0071] A1. For the initial charging data sequence, calculate the absolute value of the difference between two adjacent data points.
[0072] Exemplarily, as Figure 3 shown, taking the charging power data as an example, for the charging periods of the charging process, it is divided into three periods: a, b, and c. Among them, period a corresponds to the initial stage of charging, period b corresponds to the middle stage of charging, and period c corresponds to the later stage of charging. For example, for two adjacent charging power data A and B in period a, calculate the absolute value of the power difference between the two data points to determine the change trend between adjacent data.
[0073] A2. For the first sub-charging data sequence of different charging periods, select the target charging data whose absolute value meets the thresholds corresponding to different charging periods. The first sub-charging data sequence is obtained by dividing the initial charging data sequence based on different periods of the charging period; the dynamic threshold includes the thresholds corresponding to different charging periods.
[0074] Exemplarily, for the sub-charging data sequence in the initial stage of charging, select the target charging data whose absolute value meets the first threshold. For the sub-charging data sequence in the middle stage of charging, select the target charging data whose absolute value meets the second threshold. For the sub-charging data sequence in the later stage of charging, select the target charging data whose absolute value meets the third threshold.
[0075] Among them, the sub-charging data sequence is obtained by dividing the initial charging data sequence based on different levels of one kind of attribute feature; the dynamic threshold includes the first threshold, the second threshold, and the third threshold, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold; the data change situation is determined based on the absolute value of the difference between two adjacent data points.
[0076] Exemplarily, when this attribute feature is the charging period, the different levels corresponding to this charging period can include the early stage of charging, the middle stage of charging, and the later stage of charging. During the process of screening the charging data, the value of the dynamic threshold can be dynamically adjusted based on different levels corresponding to one kind of attribute feature of the initial charging data sequence. For example, for the charging data in the initial stage of charging, based on the first threshold for data screening, if the change situation between two adjacent data points reaches the first threshold, then retain the latter data; when it comes to the charging data corresponding to the middle stage of charging, then switch the first threshold to the second threshold for data screening; correspondingly, when it comes to the charging data corresponding to the later stage of charging, switch the second threshold to the third threshold for data screening.
[0077] Exemplarily, based on the above example, taking the charging power data as an example, since the data changes significantly in the initial stage of charging, more data needs to be retained to reflect the power change during the charging process. While the change amplitude is relatively small in the middle stage of charging and almost unchanged in the later stage of charging, the first threshold is set to be greater than the second threshold, and the second threshold is greater than the third threshold. For different data segments, data screening is performed based on different thresholds respectively, so that more key charging data can be retained in the initial stage of charging, and redundant data can be reduced in the middle and later stages of charging.
[0078] Among them, the dynamic threshold can be set based on the data change trend. For example, the corresponding dynamic threshold is set based on the difference between two adjacent data. By means of the mechanism of dynamically updating the threshold during the data screening process, it can automatically determine whether a data point is a key data and determine whether long-term storage is required in the later stage. Thus, for different data segments, the data points with significant changes within the data segment are saved, the amount of redundant data is reduced, and the authenticity and integrity of the data are ensured to adapt to different charging stages and data fluctuations.
[0079] For example, Figure 3 the charging data A, B, C, D, E, and F shown in respectively correspond to two adjacent data at different time periods. Initial stage of charging (period a): In this stage, the data changes greatly, and the numerical difference between two adjacent data (A and B respectively) is also large. A larger threshold (the first threshold) is adopted, that is, if |B - A| > the first threshold, then save B. It ensures that only the data points with significant changes are retained in the case of drastic data fluctuations. Middle stage of charging (period b): In this stage, the data tends to be stable, but there may still be important inflection points and mutation points. A medium threshold (the second threshold) is adopted, that is, if |D - C| > the second threshold, then save D. This helps to capture the key changes in the data sequence while reducing redundant data. Later stage of charging (period c): In this stage, the data changes little and is relatively stable. A smaller threshold (the third threshold) is adopted, that is, if |F - E| > the third threshold), then save F, ensuring that even in the case of stable data, small but important changes can be captured.
[0080] Exemplarily, according to different stages (initial stage, middle stage, later stage) of the charging duration, the threshold for data screening is automatically adjusted. For example, in the initial stage of charging and during abnormal fluctuations, a lower threshold can be adopted to record more details and ensure that important charging data is not missed, by adopting a lower threshold to capture more details; a higher threshold is adopted during the stable charging period to reduce redundant data.
[0081] It should be noted that the above description of each period of the charging process is only exemplary. For different charging data and the change trends of the data, other sub-charging data sequences can also be divided, and no specific limitation is made here. To further improve the refined data screening process, more charging stages and corresponding thresholds can be set to meet the requirements of different application scenarios and ensure the efficiency and accuracy of data management and storage. For example, by setting multiple time period intervals (such as 0 - 30 minutes, 30 - 90 minutes, after 90 minutes), each interval corresponding to different threshold rules, it is ensured that charging data can be efficiently screened at different charging stages.
[0082] In some embodiments, the attribute features include the total data volume level of the initial charging data sequence. The total data volume includes a first data volume level, a second data volume level, and a third data volume level, where the first data volume level is lower than the second data volume level, and the second data volume level is lower than the third data volume level. For the initial charging data sequence, based on different levels corresponding to at least one attribute feature, the target charging data whose data change situation meets the preset dynamic threshold is selected, including:
[0083] B1. For the initial charging data sequence, calculate the absolute value of the difference between two adjacent data. Based on the same implementation principle as in step A1, calculate the absolute value of the difference between two adjacent data in the initial data sequence.
[0084] B2. For the initial charging data sequences with different total data volume levels, select the target charging data whose absolute value meets the threshold corresponding to the different total data volume levels. The dynamic threshold includes the thresholds corresponding to different total data volume levels.
[0085] Exemplarily, when the total data volume level of the initial charging data sequence is the first data volume level, for the initial charging data sequence, select the target charging data whose absolute value meets the fourth threshold. Or, when the total data volume level of the initial charging data sequence is the second data volume level, for the initial charging data sequence, select the target charging data whose absolute value meets the fifth threshold. Or, when the total data volume level of the initial charging data sequence is the third data volume level, for the initial charging data sequence, select the target charging data whose absolute value meets the sixth threshold.
[0086] Exemplarily, when the attribute feature is the total data volume level, the different levels corresponding to the total data volume level may include the first data volume level, the second data volume level, and the third data volume level. To optimize data storage and ensure the data integrity of charging data sequences of different scales, multiple levels can be set according to the overall data volume, and corresponding thresholds can be configured for each level. Among them, the total data volume level may correspond to the data volume range divided based on the data volume of each charging order, so as to determine the corresponding total data volume level for the data volume range corresponding to the total number included in the initial charging sequence; for example, when the data volume in the initial charging data sequence is small, determine the data volume range corresponding to the first data volume level, when the data volume is medium, determine the data volume range corresponding to the second data volume level, and when the data volume is large, determine the data volume range corresponding to the third data volume level.
[0087] Among them, different dynamic thresholds are set for different total data volume levels. The dynamic thresholds may include a fourth threshold, a fifth threshold, and a sixth threshold, the fourth threshold is less than the fifth threshold, and the fifth threshold is less than the sixth threshold; the data change situation is determined based on the absolute value of the difference between two adjacent data.
[0088] Exemplarily, after determining the total data volume of the initial charging data sequence, determine the data volume range to which the total data volume belongs, and then determine the corresponding total data volume level, select the dynamic threshold corresponding to the total data volume level, and perform data screening.
[0089] For example, when the total data volume in the initial charging data sequence is small (such as total data volume < the first data volume), it corresponds to the first data volume level, and a smaller threshold (the fourth threshold) is adopted to ensure that more data points are saved. Without affecting the database performance, relatively detailed data records are retained to provide more comprehensive charging data. When the total data volume in the initial charging data sequence is at a medium level (such as the first data volume < total data volume < the second data volume), it corresponds to the second data volume level, and a medium threshold (the fifth threshold) is adopted, that is, if the absolute value of the numerical difference between two adjacent data |D2 - D1| > the fifth threshold, then save D2; on the basis of ensuring data integrity, moderately reduce redundant data and relieve the pressure on the database. When the total data volume in the initial charging data sequence is large (such as total data volume > the second data volume), it corresponds to the third data volume level, and a larger threshold (the sixth threshold) is adopted, and only key data points with large changes are retained; by removing more redundant data, ensure the efficient operation of the database, and at the same time, important charging data during the charging process can also be captured. For example, when the data volume collected by a single charging order is less than 100, it belongs to a small data volume; when it is greater than 3000, it indicates a large data volume; when it is between the two quantities, it is a medium data volume.
[0090] Among them, the cloud server can dynamically adjust the threshold according to the actual total data volume to ensure that a more appropriate data screening strategy can be adopted under different total data volumes, achieving more effective data storage. By real-time monitoring the total data volume that has been collected, setting different thresholds according to the size of the data volume, and dynamically adjusting the threshold based on the total number of data sequences when performing data screening; ensuring that key data can be retained for the charging data of charging orders of different scales, and providing a complete charging curve. For example, when the data volume is small, a more stringent threshold is adopted to capture more changes; when the data volume is large, the threshold is appropriately relaxed to reduce unnecessary data records.
[0091] It should be noted that the above division of the total data volume level of the charging data is only an exemplary illustration, and other division ranges of the total data volume can also be set for the charging data under different application scenarios, which are not specifically limited here. In order to further improve the refined data screening process, the total data volume level can also be divided more finely. For example, more intermediate level division criteria are added (such as dividing more refined third data volume and fourth data flow criteria between the first data volume and the second data volume, etc.) to ensure that the charging data of various total data volume levels can be comprehensively and efficiently screened and processed, so as to achieve the accurate presentation and effective management of the charging curve.
[0092] In some embodiments, the attribute feature includes the data change rate of the initial charging data sequence. The data change rate includes a first change rate and a second change rate, and the first change rate is greater than the second change rate; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes:
[0093] C1. For the initial charging data sequence, calculate the change rate between adjacent two data.
[0094] C2. For the second sub-charging data sequence with different change rates, select the target charging data whose change rate meets the threshold corresponding to the different change rates. The second sub-charging data sequence is obtained by dividing the initial charging data sequence based on different data change rates; the dynamic threshold includes the thresholds corresponding to different change rates.
[0095] Exemplarily, for the initial charging data sequence, select the target charging data whose change rate meets the initial threshold. When the change rate is greater than the first change rate, adjust the dynamic threshold to the seventh threshold, and select the target charging data whose change rate meets the seventh threshold. When the change rate is less than or equal to the first change and greater than or equal to the second change rate, adjust the dynamic threshold to the eighth threshold, and select the target charging data whose change rate meets the eighth threshold. When the change rate is less than the second change rate, adjust the dynamic threshold to the ninth threshold, and select the target charging data whose change rate meets the ninth threshold.
[0096] For example, by calculating the change rate of each pair of adjacent data in the original charging data sequence, the speed and amplitude of the fluctuation of the charging data in a short time are determined. For example, by calculating the absolute value of the difference between the first data D1 and the second data D2, and then based on the absolute value and the time interval △t between the first data and the second data, the change rate is calculated.
[0097] Among them, the initial threshold can be a threshold set based on historical data and is used to initially screen data points. When the change rate corresponding to the first data and the second data is greater than the initial threshold, the second data is selected as the target charging data. The dynamic threshold can include the initial threshold, the seventh threshold, the eighth threshold, and the ninth threshold, where the seventh threshold is less than the eighth threshold, and the eighth threshold is less than the ninth threshold; the data change situation is determined based on the change rate between two adjacent data.
[0098] Exemplarily, when the attribute feature is the data change rate, different levels corresponding to the data change rate can include the first change rate and the second change rate. Based on the calculation of the change rate of each pair of adjacent data, during the data screening process based on the initial threshold, when it is detected that the change rate of the charging data exceeds the preset first change rate, it is determined that the current charging data is in the high change rate stage, and the dynamic threshold is adjusted to the smaller seventh threshold for data screening to ensure that all significantly changed data points in this stage are captured; for example, when the battery is charging rapidly or fluctuating abnormally, using a lower threshold can record more charging details. When it is detected that the change rate of the charging data is at a medium level, such as between the first change rate and the second change rate, it is determined that the current charging data is in the medium change rate stage, and the dynamic threshold is adjusted to the medium eighth threshold for data screening to balance data integrity and redundancy. When it is detected that the change rate of the charging data is lower than the second threshold, it is determined that the current charging data is in the low change rate stage, and the dynamic threshold is adjusted to the larger ninth threshold for data screening to reduce the recording of unnecessary data and thus retain the key change points of the charging data; for example, during the stable charging period, using the larger ninth threshold can effectively reduce the amount of target charging data.
[0099] Among them, based on the change rate of the data sequence, multiple dynamic thresholds can be switched at any time, such as switching from the seventh threshold to the eighth threshold or from the ninth threshold to the seventh threshold, etc. The switching order of the thresholds is not restricted, and the threshold for screening the target charging data is dynamically adjusted based on the actual situation of the change rate.
[0100] By monitoring the change rate of charging data in real time, the threshold is dynamically adjusted according to the change rate. For example, when the change rate exceeds a certain higher change rate value, switch to a lower threshold to capture more details; when the change rate is lower than a certain lower change rate value, switch to a higher threshold to reduce redundant data; thus ensuring more details are captured in the high change rate stage and redundant data is reduced in the low change rate stage, guaranteeing the authenticity and integrity of the data.
[0101] In some embodiments, the attribute features include at least two of the charging period corresponding to the initial charging data sequence, the total data volume level, and the data change rate; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, target charging data whose data change condition meets a preset dynamic threshold is selected, including:
[0102] For the sub-charging data sequence corresponding to the first period of the charging period, target charging data whose data change condition meets a preset first dynamic threshold is selected; for the sub-charging data sequence corresponding to the second period of the charging period, target charging data whose data change condition meets a preset second dynamic threshold is selected.
[0103] Wherein, the first dynamic threshold is set based on the charging period, the second dynamic threshold is set based on the total data volume level or the data change rate, the initial charging data sequence includes sub-charging data sequences, and the dynamic threshold includes the first dynamic threshold and the second dynamic threshold.
[0104] Exemplarily, based on the three data screening strategies described in the above embodiments, two or more data screening strategies can also be combined and used. By combining multi-dimensional indicators such as the data change rate and the absolute value difference, the importance of the data is comprehensively judged to ensure that key data is effectively saved. For the charging data segments (sub-charging data sequences) with different attribute features, different data screening strategies are used for data screening; for example, the change amplitude and frequency of the first sub-charging data sequence in the initial charging stage are relatively large, and the feature of the charging period in the corresponding attribute features is more prominent, then based on the dynamic threshold corresponding to the initial charging stage in the data screening strategy based on the charging period, the first sub-charging data sequence is screened; correspondingly, for the remaining charging data, one or two of the other two strategies can also be selected based on its data change condition for data screening.
[0105] Or, the initial charging data sequence can be screened respectively based on the three data screening strategies, and after completion, the obtained target charging data sequences are complemented or screened again to obtain more accurate charging data.
[0106] By integrating multiple threshold update mechanisms, multi-strategy collaborative work is achieved. For example, the threshold can also be dynamically adjusted according to the data volume at the initial and later stages of charging to ensure efficient data screening at different stages. Based on the above method, efficient screening of key data is achieved, reducing the demand for high-performance hardware and further lowering manufacturing and operating costs.
[0107] In some embodiments, for an initial charging data sequence, based on different levels corresponding to at least one attribute feature, target charging data whose data change situation meets a preset dynamic threshold is selected, including:
[0108] When the absolute value of the difference between the first data and the second data is greater than the dynamic threshold, the second data is selected as the target charging data; or, when the change rate between the first data and the second data is greater than the dynamic threshold, the second data is selected as the target charging data; wherein the initial charging data sequence includes the first data and the second data.
[0109] Exemplarily, for the above data screening strategy based on the charging period and the total data volume, data screening can be performed by calculating the absolute value of the difference between two adjacent data and comparing whether the absolute value is greater than a preset dynamic threshold; or, for the above data screening strategy based on the data change rate, data screening is performed by calculating the change rate between two adjacent data and comparing whether the change rate is greater than a preset dynamic threshold.
[0110] In some embodiments, the method further includes:
[0111] Receiving a data screening strategy sent by a user or a management platform; the data screening strategy is a strategy for screening data based on at least one of the charging period, the total data volume level, and the data change rate of the initial charging data sequence; based on the data screening strategy, for the initial charging data sequence, target charging data whose data change situation meets a preset dynamic threshold is selected.
[0112] Exemplarily, as Figure 1 shown, the data screening strategy adopted by the cloud server for data screening can be instructed by the management platform of the charging device, or can be instructed by the user through a mobile terminal; the instruction sent by the mobile terminal can also include an update rule for the dynamic threshold, for example, a multi-strategy combination method is adopted for different data intervals, or reference standards corresponding to different levels of each attribute feature are set according to the requirements of the scenario application scenario, etc.
[0113] Exemplarily, the mobile terminal may be configured with a charging management application program, and the application program is provided with a graphical configuration interface; after the application program is started, an intuitive and easy-to-use graphical interface can be provided, and the user can easily set the threshold update rule through operations such as dragging and clicking; for example, the update rule for the dynamic threshold that can select or configure the corresponding screening strategy based on the display effect (such as fine data, normal); the application program can support the user to select one or more of the strategies for the first charging process. For example, in the case of strictly controlling the data scale, each charging data can be judged by the screening criteria of three attribute features at the same time, and only the data that meets the three screening criteria can be saved to better control the data scale.
[0114] In addition, the application program also supports the user to create, edit, delete and export custom rules to form a rule library for threshold update, which is convenient for subsequent use and sharing. The application program is also provided with version control and permission management. By introducing the rule version management and permission control mechanism, it is ensured that sensitive rules can only be modified by authorized personnel, and the stability and security of the system are guaranteed.
[0115] In the above manner, the user can customize the rules according to the real-time changes, further optimize the data screening logic, and ensure that the system can still operate efficiently in a complex environment; the user can easily configure the custom rules through the graphical interface without complex programming or professional skills, reducing the usage threshold and maintenance cost of the system. The user can flexibly configure the threshold update rule according to the specific requirements and application scenarios, enhancing the adaptability of the system and the user experience. For example, in scenarios such as electric vehicle charging stations, industrial equipment monitoring, and smart home systems, the user can customize suitable threshold rules to achieve refined management.
[0116] S203, store the target charging data sequence composed of the target charging data. The data volume of the target charging data sequence is smaller than the data volume of the initial charging data sequence.
[0117] In the following embodiments, the cloud server can set different expiration times and storage priorities according to different data magnitudes (small, medium, large), and store the target charging data sequence and other redundant data to ensure that important target charging data is stored for a long time while redundant data is cleared in time.
[0118] Exemplarily, the cloud server can divide the data into three levels: small, medium, and large according to the data volume; for example, small data volume, medium data volume, and large data volume; among them, the data volume of the small data volume is small, and it is usually confirmed as the key target charging data sequence; the data volume of the medium data volume is medium, and it is confirmed that it may include some redundant data; the data volume of the large data volume is large, and it can be confirmed as other redundant data. For different data volumes, corresponding expiration times are set; for example, for the charging data of the small data volume, a longer expiration time is set to ensure that important target charging data is stored for a long time; for the medium data volume: a medium expiration time is set to balance the storage space and the data retention requirements; for the charging data of the large data volume, a shorter expiration time is set to clean up redundant data in time and release the storage space.
[0119] Alternatively, storage priorities are set according to the data volume; for example, for the charging data of the small data volume, a high priority is set, so that the target charging data sequence of the small data volume is preferentially stored and retained for a long time; for the charging data of the medium data volume, a medium priority is set, so that the data of the medium data volume is stored and managed according to the requirements; for the charging data of the large data volume, a low priority is set, so that the redundant data of the large data volume is preferentially cleaned up or compressed and stored.
[0120] By dividing the data volume and setting different expiration times and storage priorities, the utilization of storage resources is optimized; ensuring that important target charging data is stored for a long time, while redundant data is cleaned up in time, improving the storage efficiency; reducing the storage of redundant data, reducing the storage cost; dynamically adjusting the storage strategy according to the data volume to adapt to different application requirements.
[0121] In some embodiments, the method further includes:
[0122] Set a first expiration time for the target charging data, and set a second expiration time for the redundant data other than the target charging data in the initial charging data sequence; the second expiration time is earlier than the first expiration time; when the storage time of the target charging data reaches the first expiration time, delete the target charging data; when the storage time of the redundant data reaches the second expiration time, delete the redundant data.
[0123] Exemplarily, the system sets different expiration times according to the importance of the data. The expiration time of important data is longer, while that of redundant data is shorter, thus ensuring that the stored data is always key information. By setting different expiration times and storage priorities for different scenarios, the system can effectively manage storage resources; important target charging data is given a longer expiration time, while redundant data is cleared within a shorter time, ensuring that only key information is always saved in the database and saving storage space; compared with the traditional fixed threshold method, the present invention significantly reduces the amount of data to be stored, reduces the pressure on the storage device, extends the service life of the device, and reduces the maintenance cost; by reducing the storage of redundant data, the system reduces the risk of sensitive data leakage and enhances data security.
[0124] As Figure 4 shown, the schematic diagram of the overall architecture of the charging data storage method provided by the embodiment of the present application, based on the same implementation principle as the above embodiment, will not be elaborated here. The overall process of this method is as follows:
[0125] 1. The cloud server sends a query instruction to the charging device;
[0126] 2. The charging device returns charging data to the cloud server;
[0127] 3. The cloud server determines target charging data and redundant data by adopting different data screening strategies based on the configured adaptive data storage policy;
[0128] 4. The cloud server saves the charging data to the database, performs long-term preservation operations on the target charging data, and performs expiration deletion operations on the redundant data.
[0129] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0130] Corresponding to the charging data storage method provided in the above embodiment, as Figure 5 shown, the charging data storage device provided by the embodiment of the present application, the schematic diagram of the structure of the charging data storage device provided by the embodiment of the present application. For the sake of illustration, only the parts related to the embodiment of the present application are shown.
[0131] The charging data storage device includes:
[0132] An acquisition unit 51, configured to acquire an initial charging data sequence of the charging device in a charging state; the initial charging data sequence corresponds to at least one attribute feature;
[0133] A screening unit 52, configured to select target charging data whose data change condition meets a preset dynamic threshold for the initial charging data sequence based on different levels corresponding to at least one attribute feature;
[0134] A storage unit 53, configured to store the target charging data sequence formed by the target charging data;
[0135] Wherein, the dynamic threshold is set based on the attribute feature, and the values of the dynamic thresholds corresponding to different levels of the attribute feature are different; the data change condition is determined based on the magnitude relationship between two adjacent data in the initial charging data sequence.
[0136] In a possible implementation manner, the attribute feature includes the charging period corresponding to the initial charging data sequence; the screening unit is further configured to calculate the absolute value of the difference between two adjacent data for the initial charging data sequence; for the first sub-charging data sequences corresponding to different charging periods, select the target charging data whose absolute value meets the thresholds corresponding to different charging periods; wherein, the first sub-charging data sequences are obtained by dividing the initial charging data sequence based on different periods of the charging period; the data change condition is determined based on the absolute value of the difference between two adjacent data; the dynamic threshold includes the thresholds corresponding to different charging periods.
[0137] In a possible implementation manner, the attribute feature includes the total data volume level of the initial charging data sequence; the screening unit is further configured to calculate the absolute value of the difference between two adjacent data for the initial charging data sequence; for the initial charging data sequences corresponding to different total data volume levels, select the target charging data whose absolute value meets the thresholds corresponding to different total data volume levels; wherein, the dynamic threshold includes the thresholds corresponding to different total data volume levels; the data change condition is determined based on the absolute value of the difference between two adjacent data.
[0138] In a possible implementation manner, the attribute feature includes the data change rate of the initial charging data sequence; the screening unit is further configured to calculate the change rate between two adjacent data for the initial charging data sequence; for the second sub-charging data sequences corresponding to different change rates, select the target charging data whose change rate meets the thresholds corresponding to different change rates; wherein, the second sub-charging data sequences are obtained by dividing the initial charging data sequence based on different data change rates; the dynamic threshold includes the thresholds corresponding to different change rates; the data change condition is determined based on the change rate between two adjacent data.
[0139] In a possible implementation, the attribute features include at least two of the charging period corresponding to the initial charging data sequence, the total data volume level, and the data change rate; the screening unit is further configured to, for the sub-charging data sequence corresponding to the first period of the charging period, select target charging data whose data change condition meets a preset first dynamic threshold; for the sub-charging data sequence corresponding to the second period of the charging period, select target charging data whose data change condition meets a preset second dynamic threshold; wherein, the first dynamic threshold is set based on the charging period, the second dynamic threshold is set based on the total data volume level or the data change rate, the initial charging data sequence includes the sub-charging data sequence, and the dynamic threshold includes the first dynamic threshold and the second dynamic threshold.
[0140] In a possible implementation, the screening unit is further configured to, when the absolute value of the difference between the first data and the second data is greater than the dynamic threshold, select the second data as the target charging data; or, when the change rate of the first data and the second data is greater than the dynamic threshold, select the second data as the target charging data; wherein, the initial charging data sequence includes the first data and the second data.
[0141] In a possible implementation, the acquisition unit is further configured to send a query instruction to the charging device based on a preset polling period; the query instruction is used to query the charging data of the charging device in the charging state; receive the charging data sent by the charging device based on the query instruction to obtain the initial charging data sequence.
[0142] In a possible implementation, the storage unit is further configured to set a first expiration time for the target charging data and set a second expiration time for the redundant data other than the target charging data in the initial charging data sequence; the second expiration time is earlier than the first expiration time; when the storage time of the target charging data reaches the first expiration time, delete the target charging data; when the storage time of the redundant data reaches the second expiration time, delete the redundant data.
[0143] In a possible implementation, the screening unit is further configured to receive a data screening policy sent by a user or a management platform; the data screening policy is a policy for screening data based on at least one of the charging period, the total data volume level, and the data change rate of the initial charging data sequence; based on the data screening policy, for the initial charging data sequence, select target charging data whose data change condition meets a preset dynamic threshold.
[0144] In the embodiments of the present application, through various dynamic threshold update mechanisms based on real-time changes such as charging duration, total data volume, data change rate, etc. and user-defined rules, efficient data screening and storage management are achieved; not only the flexibility and adaptability of the system are improved, but also the integrity and reliability of the data are enhanced.
[0145] Figure 6 Fig. shows a schematic hardware structure diagram of the electronic device 6.
[0146] As Figure 6 shown, the electronic device 6 of this embodiment includes: at least one processor 61 ( Figure 6 only one is shown in the figure), a memory 62, and a computer program 63 that can run on the processor 61 is stored in the memory 62. When the processor 61 executes the computer program 63, the steps in the above method embodiments are implemented, such as Figure 1 S201 to S203 shown in the figure. Alternatively, when the processor 61 executes the computer program 63, the functions of each module / unit in the above device embodiments are implemented. The electronic device 6 may be the cloud server in the above embodiments.
[0147] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 6. In other embodiments of the present application, the electronic device 6 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0148] The electronic device 6 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art can understand that Figure 6 this is only an example of the electronic device 6 and does not constitute a limitation on the electronic device 6. It may include more or fewer components than shown in the figure, or combine certain components, or have different components. For example, the server may further include an input and sending device, a network access device, a bus, etc.
[0149] The above-mentioned processor 61 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0150] A memory may also be provided in the processor 61 for storing instructions and data. In some embodiments, the memory in the processor 61 is a cache memory. This memory can store the instructions or data that the processor 61 has just used or recycled. If the processor 61 needs to use the instruction or data again, it can be directly called from the said memory. This avoids repeated accesses, reduces the waiting time of the processor 61, and thus improves the efficiency of the system.
[0151] In some embodiments, the above-mentioned memory 62 may be an internal storage unit of the electronic device 6, such as the hard disk or memory of the electronic device 6. The memory 62 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the electronic device 6. Further, the memory 62 may also include both the internal storage unit and the external storage device of the electronic device 6. The memory 62 is used to store the operating system, application programs, BootLoader, data, and other programs, such as the program code of a computer program. The memory 62 may also be used to temporarily store the data that has been sent or will be sent.
[0152] In addition, in each embodiment of the present application, the various functional units may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0153] It should be noted that the above structure of the electronic device is only an exemplary illustration. Based on different application scenarios, it may also include other entity structures, and the entity structure of the electronic device is not limited herein.
[0154] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0155] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which when executed by a processor, can implement the steps in the above method embodiments.
[0156] An embodiment of the present application provides a computer program product, which when running on a server, enables the server to implement the steps in the above method embodiments.
[0157] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps in the above method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0158] The electronic device, computer storage medium, and computer program product provided in the above embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the method provided above, and will not be elaborated here.
[0159] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0160] It should be understood that the above is only to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can obviously make various equivalent modifications or changes according to the above examples. For example, in the various embodiments of the above detection method, some steps may not be necessary, or some steps may be newly added, etc. Or any combination of any two or any multiple of the above embodiments. The solutions after such modifications, changes or combinations also fall within the scope of the embodiments of the present application.
[0161] It should also be understood that the classification of the manners, situations, categories, and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features in various manners, categories, situations, and embodiments can be combined without conflict.
[0162] It should further be understood that in the various embodiments of the present application, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0163] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0164] In the embodiments provided in the present application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
[0167] Finally, it should be noted that the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.
Claims
1. A charging data storage method, characterized in that, The method includes: Obtaining an initial charging data sequence of a charging device in a charging state; the initial charging data sequence corresponds to at least one attribute feature; For the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold; Storing the target charging data sequence formed by the target charging data; Wherein, the dynamic threshold is set based on the attribute feature, and the values of the dynamic thresholds corresponding to different levels of the attribute feature are different; the data change situation is determined based on the magnitude relationship between two adjacent data in the initial charging data sequence.
2. The method according to claim 1, wherein The attribute feature includes the charging period corresponding to the initial charging data sequence; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes: For the initial charging data sequence, calculating the absolute value of the difference between two adjacent data; For the first sub-charging data sequences of different charging periods, selecting target charging data whose absolute value meets the thresholds corresponding to different charging periods; Wherein, the first sub-charging data sequence is obtained by dividing the initial charging data sequence based on different periods of the charging period; the data change situation is determined based on the absolute value of the difference between two adjacent data; the dynamic threshold includes the thresholds corresponding to different charging periods.
3. The method according to claim 1, characterized in that, The attribute feature includes the total data volume level of the initial charging data sequence; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes: For the initial charging data sequence, calculating the absolute value of the difference between two adjacent data; For the initial charging data sequences of different total data volume levels, selecting target charging data whose absolute value meets the thresholds corresponding to different total data volume levels; Wherein, the dynamic threshold includes the thresholds corresponding to different total data volume levels; the data change situation is determined based on the absolute value of the difference between two adjacent data.
4. The method according to claim 1, wherein The attribute feature includes the data change rate of the initial charging data sequence; for the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes: For the initial charging data sequence, calculating the change rate between two adjacent data; For the second sub-charging data sequences of different change rates, selecting target charging data whose change rate meets the thresholds corresponding to different change rates; Wherein, the second sub-charging data sequence is obtained by dividing the initial charging data sequence based on different data change rates; the dynamic threshold includes the thresholds corresponding to different change rates; the data change situation is determined based on the change rate between two adjacent data.
5. The method according to claim 1, characterized in that For the initial charging data sequence, based on different levels corresponding to at least one attribute feature, selecting target charging data whose data change situation meets a preset dynamic threshold includes: If the absolute value of the difference between the first data and the second data is greater than the dynamic threshold, select the second data as the target charging data; or, If the change rate between the first data and the second data is greater than the dynamic threshold, select the second data as the target charging data; wherein, the initial charging data sequence includes the first data and the second data.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Sending a query instruction to the charging device based on a preset polling period; the query instruction is used to query the charging data of the charging device in the charging state; Receiving the charging data sent by the charging device based on the query instruction to obtain the initial charging data sequence.
7. The method according to any one of claims 1 to 5, characterized in that The method further includes: Setting a first expiration time for the target charging data, and setting a second expiration time for redundant data other than the target charging data in the initial charging data sequence; the second expiration time is earlier than the first expiration time; When the storage time of the target charging data reaches the first expiration time, deleting the target charging data; when the storage time of the redundant data reaches the second expiration time, deleting the redundant data.
8. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Receiving a data screening policy sent by a user or a management platform; the data screening policy is a policy for screening data based on at least one of the charging period, total data volume level, and data change rate of the initial charging data sequence; Based on the data screening policy, for the initial charging data sequence, selecting target charging data whose data change situation meets a preset dynamic threshold.
9. An electronic device, characterized in that, It includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
10. A computer program product, characterized in that, When the computer program product runs on a device, the device is caused to execute the method according to any one of claims 1 to 8 above.