Data fingerprint generation method and device for new energy detection data
By mapping new energy detection data into RGB images and extracting key features, and encrypting the hash operation with timestamp splicing hashing to generate data fingerprints, the uniqueness and integrity of new energy detection data is solved, and rapid traceability and cross-version compatibility are achieved.
Patent Information
- Application Number
- CN202510407234.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-02
AI Technical Summary
New energy detection data is large in size, frequent version iterations, and high similarity of multi-source heterogeneous data, which makes it difficult to guarantee data uniqueness, easy to tamper with, and low traceability efficiency.
Map the voltage and current data sequences into RGB triplets to generate color image data, extract key feature sets and splice them with timestamps for hashing operations, use private key encryption to generate data fingerprints, store them in the database, and use asymmetric encryption to ensure the uniqueness and integrity of the data.
The generated data fingerprint is unique, supports fast integrity verification and anti-forgery, realizes cross-version and cross-standard compatibility, reduces computing and storage overhead, and ensures data traceability efficiency.
Smart Images

Figure CN120257380A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new energy detection, and specifically to a method and device for generating data fingerprints for new energy detection data. Background Art
[0002] Data Fingerprinting is a technology used to generate unique identifiers (i.e., "fingerprints") for data, which helps to quickly identify and compare data sets or data items. This concept is similar to human fingerprints, where each fingerprint is unique and can be used to uniquely identify a person. In the fields of data management, network security, and information technology, data fingerprints are widely used to ensure data integrity, security, and consistency. Data integrity verification is achieved by comparing the current fingerprint of the data with the previously generated fingerprint to check if the data has been tampered with or damaged during transmission or storage.
[0003] As the proportion of new energy increases, the grid connection standard test results of new energy equipment at home and abroad are receiving more and more attention, including low voltage ride-through tests, high voltage ride-through tests, and grid adaptability tests, etc. Based on these data, further work on the electromechanical and electromagnetic modeling of converters and new energy power stations will be carried out. The above-mentioned detection data presents the characteristics of multiple groups and high sampling rates, with the total data volume reaching several gigabytes or 10 GB. Moreover, the test results are similar between a set of test data of the same type of inverter and the test data of different types of inverters. With the increase in the number of detected converters, the iteration of software versions, and the re-conduction of tests after the revision of standards, the management of detection data has been put on the agenda. Existing methods only roughly judge whether the data belongs to the same test by the range of test time. Therefore, a new method is needed to ensure the uniqueness and integrity of detection data, thereby laying a foundation for the rapid traceability, anti-counterfeiting, and unified management of data. Summary of the Invention
[0004] The present invention proposes a method and device for generating data fingerprints for new energy detection data, aiming to solve the problems in the prior art such as the difficulty in ensuring data uniqueness, the vulnerability of integrity to tampering, and the low traceability efficiency due to the large volume of detection data, frequent version iterations, and high similarity of multi-source heterogeneous data. The technical solutions provided by the present invention are as follows:
[0005] In a first aspect, the present invention provides a method for generating a data fingerprint for new energy detection data, including the following steps:
[0006] Step 1, mapping the voltage and current data sequences into RGB triples according to the mapping rules to generate corresponding color image data;
[0007] Step 2: Extract the feature metrics of the image from the color image data through image processing and recognition techniques, convert the feature metrics into a formatted string with a fixed precision, and connect them with delimiters to form a key feature set;
[0008] Step 3: Perform a hash operation on the concatenation of the color image data and the timestamp to generate an image-timestamp combined hash value;
[0009] Step 4: Concatenate the key feature set with the image-timestamp combined hash value, and use a private key to encrypt and generate a data fingerprint; the generated data fingerprint is stored in a database or storage system for future verification.
[0010] Preferably, the mapping rule for mapping the voltage and current data sequences to RGB triples is: normalize the three-phase voltage values and current values corresponding to each time series and map them to the R-channel value, G-channel value, and B-channel value respectively; each RGB pixel corresponds to the voltage or current sampling data within a time window.
[0011] Preferably, the formula for normalization processing is:
[0012] Voltage RGB channel value = [255 * U / 1.5U n rounded down;
[0013] Current RGB channel value = [255 * I / 1.5I n rounded down;
[0014] where U and I are the three-phase voltage and current data, and U n and I n are the rated voltage and rated current of the inverter.
[0015] Preferably, for the concatenation of the color image data and the timestamp, arrange the feature vectors of each RGB triple in sequence according to the file generation order and time order.
[0016] Preferably, the key feature set includes three-phase unbalance degree, color volatility, synergy coefficient, oversaturation risk, and color mutation density.
[0017] Preferably, after concatenating the key feature set with the image-timestamp combined data hash value, generate a timestamp digest through a hash operation, and jointly encrypt the digest and the original timestamp.
[0018] Preferably, the encryption method is to sign the concatenated data with a private key, and then publish the public key and the signature to allow anyone to verify the authenticity of the data, where the public-private key pair uses the elliptic curve asymmetric encryption algorithm.
[0019] Second aspect, a data fingerprint verification method for new energy detection data, verifying the data fingerprint generated by the above method, decrypting the data fingerprint using the public key, separating the key feature set and the image hash value, comparing the key feature set and the image hash value of the original data, and verifying the data integrity and authenticity. The verification rules are as follows:
[0020] If both the key feature set and the image hash value match the original data, it is determined that the data has not been tampered with;
[0021] If the image hash value does not match but the key feature set matches, the tampering area is located as the pixel block with hash conflict in the RGB image.
[0022] Third aspect, a data fingerprint generation device for new energy detection data, used to implement the above method, characterized by including:
[0023] Data mapping module: converting the voltage and current sequences into RGB images;
[0024] Feature extraction module: extracting the key feature set from the RGB image;
[0025] Hash generation module: generating the corresponding hash value after splicing the timestamp and the color image data;
[0026] Fingerprint generation module: encrypting the key feature set, the timestamp and the hash value of the color image data with the private key after splicing;
[0027] Storage module: saving the data fingerprint and the associated public key metadata.
[0028] Preferably, the data mapping module supports configuration rules: dynamically selecting the mapping channel according to the input data type, and adapting the generalization mapping interface for non-electric data sources.
[0029] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0030] First, by fusing the binding encryption of the timestamp, device characteristic parameters and key indicators of the test process, the generated data fingerprint is unique, avoiding the confusion and repeated storage of the same type / version of test data.
[0031] Second, based on the direct extraction of key features and the hierarchical hash verification mechanism, it supports the rapid integrity verification of massive high-sampling-rate data (GB level), reducing the calculation and storage overhead.
[0032] Third, using asymmetric encryption and spatio-temporal correlation design, it ensures that the data fingerprint cannot be forged, and can quickly locate the data source through feature matching after decryption, realizing anti-counterfeiting and accurate traceability.
[0033] IV. Through dynamic feature weight configuration and mapping rule scalability, it adapts to the update and iteration of new energy grid connection standards, avoids the invalidation of historical data caused by standard revisions, and can achieve cross-version and cross-standard compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0035] Figure 1 is the overall flowchart of the method of the present invention.
[0036] Figure 2 is the flowchart of data conversion RGB values of the present invention.
[0037] Figure 3 is the flowchart of obtaining key features of the present invention.
[0038] Figure 4 is the flowchart of splicing various types of data of the present invention.
[0039] Figure 5 is the flowchart of asymmetric encryption of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0041] Please refer to Figure 1 , the present invention provides a technical solution:
[0042] Embodiment 1:
[0043] A method for generating a data fingerprint for new energy detection data, as Figure 1 shown, includes the following steps:
[0044] Step 1, map the voltage and current data sequences into RGB triples according to the mapping rule to generate corresponding color image data; the mapping rule is: normalize the three-phase voltage values and current values corresponding to each time series and map them into R channel values, G channel values, and B channel values respectively; each RGB pixel corresponds to voltage or current sampling data within a time window. This method defines the mathematical relationship between voltage and current and RGB triples, ensuring data reversibility and visualization uniqueness.
[0045] Converting data into RGB images and extracting key features from the images has the following advantages compared to directly extracting features from the original data: First, visualization and intuitive understanding. The image form can intuitively display the patterns, distributions, and trends of the data, facilitating the human eye to quickly observe anomalies and changes. This conversion can transform the time-domain information of time-series data into spatial distributions, presenting complex time-series relationships in an image structure for easy analysis. Second, leveraging mature image processing techniques. As an input, the image can utilize a large number of pre-trained models and image recognition technologies to improve the accuracy and robustness of extracting key features, providing corresponding datasets for subsequent deep learning. Third, data structuring and information integration. After mapping different types of data (such as voltage and current) to RGB channels respectively, not only the respective numerical information is retained, but also the relationships between them (such as balance, synergy, etc.) can be reflected. This mapping can reduce the dimensionality of multi-dimensional data to a unified color image form, facilitating subsequent unified processing and comparison. Finally, the advantage of anti-tampering. Image data generally has strong redundancy and structured features, making it relatively more difficult to hide unauthorized tampering. Therefore, in some application scenarios, image-form data is less likely to be maliciously modified or forged. In addition, images can combine technologies such as digital watermarks and signatures to further enhance the integrity verification of the data, thereby improving security.
[0046] In this embodiment, the process of converting data into RGB values is as Figure 2 shown. Perform FFT calculations on three-phase voltage and three-phase current data to obtain the effective value sequences of the fundamental waves. The data are respectively the time series t, three-phase voltage data U arms 、U brms 、U crms and three-phase current data I arms 、I brms 、I crms , where (Uarms, Ubrms, Ucrms) corresponds to the color of pixel 1 (Iarms, Ibrms, Icrm) corresponds to the color of pixel 2
[0047] To make all values fall between 0 - 255, perform normalization processing:
[0048]
[0049] where, U n 、I n are the rated voltage and rated current of the inverter, and the other data follow the same pattern. t represents the time series, starting from 1 at the beginning.
[0050] Step 2: From the color image data, extract the feature set of the image through image processing and recognition technologies, and corresponding to the feature indicators, use the feature indicator values as the key feature set. The key feature set includes the three-phase unbalance degree, color volatility, synergy coefficient, over-saturation risk, and color mutation density, as Figure 3 shown.
[0051] The Phase Balance Index (PBI) reflects the consistency of the means of the three channels (R / G / B). The closer the value is to 0, the more balanced it is. Its physical meaning is the balance of three-phase voltage / current. The calculation is shown in formula (3):
[0052]
[0053] mean represents the mean of the corresponding color channel, std() is the standard deviation of the mean, max() is the maximum value of the mean, and the normal value range should be less than 0.05.
[0054] The Color Fluctuation Index (CFI) reflects the mean of the variances of the three channels and measures the fluctuation amplitude. Its physical meaning is the degree of voltage / current fluctuation. The calculation formula (4) is as follows:
[0055]
[0056] Var() is the variance of a single channel. Under normal circumstances, CFI should be less than 100. A value between 100 and 300 is considered a slight fluctuation, and a value above 300 is considered abnormal.
[0057] The Cross-Channel Correlation (CCC) reflects the minimum value of the pairwise correlation coefficients of the three channels. Its physical meaning is the synergy of the three-phase changes (the closer the value is to 1, the more stable it is). The calculation formula (5) is as follows:
[0058] CCC = min(Corr(R,G), Corr(G,B), Corr(R,B)) #(5)
[0059] Corr() is the correlation coefficient of two values. Under normal circumstances, CCC should be greater than 0.8.
[0060] The Over-Saturation Risk (OSR) reflects the proportion of pixels close to 255 in any channel. Its physical meaning is the overvoltage or overcurrent risk. The calculation formula (6) is as follows:
[0061]
[0062] N is the total number of pixels in any channel, and OSR should be less than 0.01; otherwise, there is a risk of overload.
[0063] The color mutation density (Edge Density, ED) reflects the proportion of the color mutation area extracted by Canny edge detection, and its physical meaning is transient events (such as load mutation, arc fault). The calculation formula (7) is as follows:
[0064]
[0065] The transient events that may occur during startup or shutdown should be controlled within a certain range.
[0066] The channel discrepancy (Channel Discrepancy, CD) reflects the maximum difference ratio of the means of the three channels, and its physical meaning is single-phase abnormality (such as open phase, short circuit). The calculation formula (8) is as follows:
[0067]
[0068] CD should be less than 1.2; otherwise, there may be an open-phase abnormality.
[0069] Convert the above indicators into formatted strings with fixed precision and connect them with delimiters as the key feature set.
[0070] Step 3: Perform a hash operation on the concatenation of the color image data and the timestamp to generate an image-timestamp joint hash value. The hash function used is such as SHA-256, as Figure 4 shown.
[0071] Concatenate the RGB values of the color image data generated by segmenting the voltage and current data sequences according to time windows, and arrange each RGB triple in sequence according to the file generation order and the time recurrence order to generate a feature vector with a fixed length. Feature extraction adapts to the characteristics of time-series data, and at the same time, the RGB triple values reduce the storage overhead.
[0072] Specifically, all data is organized into a three-dimensional array (t, 2*m, color) in the order of voltage first and then current, where t is the data length, related to the time length, m is the number of test data. Since a test data corresponds to 2 pixel colors (voltage and current) at a certain moment, the total is equal to 2m, and color is the RGB expression corresponding to this pixel point. The expression is as follows:
[0073] For the test data of one device
[0074]
[0075] For the test data of multiple devices, stack them column by column
[0076]
[0077] The hash generation process is as follows: concatenate the timestamp with the sequence generated by the triple as in formula (11); hash the concatenated sequence as in formula (12), where T is the timestamp sequence, S is the concatenated string, and H is the hash value:
[0078] S = str(T) ‖ str(R, G, B) #(11)
[0079] H = SHA256(str(S)) #(12)
[0080] Step 4, concatenate the key feature set with the image-timestamp joint hash value, generate a timestamp digest through hash operation, and jointly encrypt the digest and the original timestamp to prevent timestamp forgery, enhance the ability to resist replay attacks, and at the same time prevent hash collisions caused by similar data, as Figure 5 shown.
[0081] The encryption method process is as follows: use the private key of the detection company to sign the concatenated data, and then publish the public key and the signature to allow anyone to verify the authenticity of the data. The public-private key pair adopts the elliptic curve asymmetric encryption algorithm, such as the x25519 curve.
[0082] The X25519 curve equation G is
[0083] y 2 = x 3 + 486662x 2 + x mod 2 255 - 19 #(13)
[0084] The formula for generating the elliptic curve encryption private key a is
[0085] a = 32-byte random number #(14)
[0086] The formula for generating the elliptic curve encryption public key A is
[0087] A = a * G #(15)
[0088] The elliptic curve encryption formula and decryption formula are
[0089] C = a * H #(16)
[0090] M = A * C #(17)
[0091] C is the result after asymmetric encryption, that is, the generated data fingerprint, and M is the result after decryption, which is H. The formulas here are just formal formulas from a mathematical operation perspective to vividly illustrate this encryption process. In practice, it is more complex due to multiplicative inverses, random number selection, etc.
[0092] The generated data fingerprints are stored in a database or storage system for future comparison and verification.
[0093] Example 2:
[0094] A data fingerprint verification method for new energy detection data. When verifying the data fingerprints generated in Example 1, the public key is used to decrypt the data fingerprints, separating the key feature set and the image hash value. By comparing the key feature set and the image hash value of the original data, the data integrity and authenticity are verified. The verification rules are as follows:
[0095] If both the key feature set and the image hash value match the original data, it is determined that the data has not been tampered with;
[0096] If the image hash value does not match but the key feature set matches, the tampered area is located as the pixel block with hash conflict in the RGB image.
[0097] Example 3:
[0098] A data fingerprint generation device for new energy detection data, used to implement the method described in Example 1, including:
[0099] Data mapping module: Converts voltage and current sequences into RGB images; the data mapping module supports configurable rules: dynamically selects mapping channels according to the input data type and adapts the generalization mapping interface for non-electric data sources;
[0100] Feature extraction module: Extracts the key feature set from the color image data;
[0101] Hash generation module: Generates the corresponding hash value after splicing the timestamp and the color image data;
[0102] Fingerprint generation module: Spliced the key feature set, timestamp and the hash value of the color image data and encrypts them with the private key;
[0103] Storage module: Saves the data fingerprints and the associated public key metadata.
[0104] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for generating data fingerprints for new energy detection data, characterized in that, Including the following steps: Step 1: Map the voltage and current data sequences into RGB triples according to the mapping rule to generate corresponding color image data; Step 2: Extract the feature indicators of the image from the color image data through image processing and recognition techniques, convert the feature indicators into formatted strings with fixed precision, and connect them with delimiters as the key feature set; Step 3: Perform a hash operation on the concatenation of the color image data and the timestamp to generate an image-timestamp joint hash value; Step 4: Concatenate the key feature set and the image-timestamp joint hash value, and encrypt them using a private key to generate a data fingerprint; the generated data fingerprint is stored in a database or storage system for future verification.
2. The data fingerprint generation method for new energy detection data according to claim 1, wherein The mapping rule for mapping the voltage and current data sequences in Step 1 into RGB triples is: Normalize the three-phase voltage values and current values corresponding to each time series and map them into R-channel values, G-channel values, and B-channel values respectively; each RGB pixel corresponds to the voltage or current sampling data within a time window.
3. A method for generating a data fingerprint for new energy detection data according to claim 2, characterized in that, The formula for normalization processing is: Voltage RGB channel value = [255 * U / 1.5U n Rounded down; Current RGB channel value = [255 * I / 1.5I n Rounded down; Among them, U and I are three-phase voltage and current data, where U n , and I n are the rated voltage and rated current of the inverter.
4. A method for generating a data fingerprint for new energy detection data according to claim 3, characterized in that, In Step 3, the color image data and the timestamp are concatenated, and the feature vectors of each RGB triple are arranged in sequence according to the file generation order and time order.
5. A method for generating a data fingerprint for new energy detection data according to claim 1, characterized in that The key feature set includes three-phase unbalance degree, color volatility, synergy coefficient, oversaturation risk, and color mutation density.
6. A method for generating a data fingerprint for new energy detection data according to claim 5, characterized in that, In Step 4, after concatenating the key feature set and the image-timestamp joint data hash value, generate a timestamp digest through a hash operation, and encrypt the digest and the original timestamp together.
7. A method for generating a data fingerprint for new energy detection data according to claim 6, characterized in that The encryption method is to sign the concatenated data with a private key, and then publish the public key and the signature to allow anyone to verify the authenticity of the data, where the public-private key pair adopts the elliptic curve asymmetric encryption algorithm.
8. A data fingerprint verification method for new energy detection data, characterized in that, To verify the data fingerprint generated by the method according to any one of claims 1-7, decrypt the data fingerprint using the public key, separate the key feature set and the image hash value, compare the key feature set and the image hash value of the original data, and verify the data integrity and authenticity. The verification rules are: If both the key feature set and the image hash value match the original data, it is determined that the data has not been tampered with; If the image hash value does not match but the key feature set matches, the tampering area is located as the pixel block with hash conflict in the RGB image.
9. A data fingerprint generation device for new energy detection data, which is used to implement the method described in any one of claims 1-6, and is characterized in that, Including: Data mapping module: Convert the voltage and current sequences into RGB images; Feature extraction module: Extract the key feature set from the RGB image; Hash generation module: Concatenate the timestamp and the color image data and generate the corresponding hash value; Fingerprint generation module: Concatenate the key feature set, the timestamp, and the color image data hash value and encrypt them with a private key; Storage module: Save the data fingerprint and the associated public key metadata.
10. The data fingerprint generation device for new energy detection data according to claim 9, wherein, The data mapping module supports configurable rules: Dynamically select the mapping channels according to the input data type, and adapt the generalization mapping interface for non-electric power data sources.
Citation Information
Patent Citations
Method and system for applying metadata to data sets of file objects
CA2668306A1
Data asset tracing method based on multi-scale pooling hash data fingerprints
CN117155576A
Data fusion sharing method for multi-source heterogeneous power big data
CN119311655A
Method, apparatus and device for verifying authenticity of image, and storage medium and service end
WO2018120459A1