Watermark identification method and system based on measurement data partition and storage medium
By partitioning and embedding power data, the traceability problem in power data transmission is solved, data security and credibility are improved, and accurate traceability of data sources and flow directions are achieved.
Patent Information
- Application Number
- CN202411107409.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-10
AI Technical Summary
The prior art is difficult to trace the source and flow of data during power data transmission, resulting in the threat of data security and credibility.
Using a watermark identification method based on metered data partition, by obtaining the data to be issued by the target, calculating the importance index of data attributes for partitioning, and embedding the partition data based on the watermark information, generating a sub-watermark and embed key to realize Tag and trace data.
It realizes accurate traceability of the transmission and application flow direction of power data, improves the security and credibility of data, and enhances the enterprise data security management capabilities.
Smart Images

Figure CN119106407A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power information processing, and more specifically, to a watermark identification method, system and storage medium based on metering data partitioning. Background Art
[0002] With the rapid development of information technology and the continuous optimization of the global energy structure, the collection, transmission and analysis of energy data have become an important part of the energy management field. The power industry is a major energy producer and carbon emitter. As an important tool for carbon emission management, power metering plays a key supporting role. However, with the increasing complexity of energy systems and the frequent exchange of data, how to ensure the interactive security and application traceability of energy data has become an urgent problem to be solved. The existing traditional data transmission traceability mechanism mainly relies on encryption technology and access control. Although these methods can ensure the confidentiality and integrity of data during transmission, they are unable to trace the source and flow of data. Once the data is tampered with or illegally obtained during transmission, it is often difficult to trace its original source and flow path, which poses a great threat to the security and credibility of the data.
[0003] Therefore, a watermark identification method based on metering data partitioning is needed. Summary of the invention
[0004] The present invention proposes a watermarking method, system and storage medium based on metering data partitioning to solve the problem of how to perform watermarking on metering data.
[0005] In order to solve the above problem, according to one aspect of the present invention, a watermark identification method based on metering data partition is provided, the method comprising:
[0006] Get the target data to be sent and watermark information;
[0007] Calculating the importance index of each data attribute in the target data to be sent, constructing an attribute business relevance ranking set based on the importance index, and performing data partitioning based on the attribute business relevance ranking set;
[0008] Based on the watermark information, watermarks are embedded in the partitioned target data to be sent, and the target data to be sent marked by the watermark is obtained.
[0009] Preferably, the step of obtaining the target data to be sent and the watermark information includes:
[0010] Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data;
[0011] The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
[0012] Preferably, calculating the importance index of each data attribute in the target data to be sent includes:
[0013] impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′),
[0014]
[0015] Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′),
[0016]
[0017] Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m}, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
[0018] Preferably, the step of embedding a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark includes:
[0019] Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ.
[0020] generating a sub-watermark and an embedding key based on the watermark information;
[0021] According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
[0022] Preferably, the method of generating a sub-watermark and an embedding key based on the watermark information comprises:
[0023] The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W),
[0024]
[0025] Determine the embedded key using the following methods, including:
[0026] (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ;
[0027] (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1;
[0028] (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
[0029] Preferably, the method further comprises:
[0030] When the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters, if the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side detects the application level of the current data and applies for the corresponding key based on the detected application level to remove the watermark.
[0031] According to another aspect of the present invention, a watermark identification system based on metering data partitioning is provided, the system comprising:
[0032] A data acquisition unit, used to acquire target data to be sent and watermark information;
[0033] A data partitioning unit, used to calculate the importance index of each data attribute in the target data to be sent, construct an attribute business relevance ranking set based on the importance index, and perform data partitioning based on the attribute business relevance ranking set;
[0034] The watermark identification unit is used to embed the watermark into the partitioned target data to be sent based on the watermark information, and obtain the target data to be sent marked with the watermark.
[0035] Preferably, the data acquisition unit acquires the target data to be sent and the watermark information, including:
[0036] Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data;
[0037] The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
[0038] Preferably, the data partitioning unit calculates the importance index of each data attribute in the target data to be sent, including:
[0039] impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′),
[0040]
[0041] Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′),
[0042]
[0043] Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m}, T i Take x for the attribute X in B′ iThe data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
[0044] Preferably, the watermark identification unit embeds a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark, including:
[0045] Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ.
[0046] generating a sub-watermark and an embedding key based on the watermark information;
[0047] According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
[0048] Preferably, the watermark identification unit generates a sub-watermark and an embedding key based on the watermark information, including:
[0049] The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W),
[0050]
[0051] Determine the embedded key using the following methods, including:
[0052] (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ;
[0053] (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1;
[0054] (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
[0055] Preferably, the system further comprises:
[0056] The key application unit is used for detecting the application level of the current data when the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters. If the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side will apply for the corresponding key according to the detected application level to remove the watermark.
[0057] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, any step of a watermark identification method based on metering data partitioning is implemented.
[0058] According to another aspect of the present invention, the present invention provides an electronic device, including:
[0059] The computer-readable storage medium described above; and
[0060] One or more processors are used to execute the program in the computer-readable storage medium.
[0061] The present invention provides a watermark identification method, system and storage medium based on metering data partitioning, the method comprising: obtaining target data to be sent and watermark information; calculating the importance index of each data attribute in the target data to be sent, constructing an attribute business relevance ranking set based on the importance index, and performing data partitioning based on the attribute business relevance ranking set; embedding watermarks into the partitioned target data to be sent based on the watermark information, and obtaining the target data to be sent marked with watermarks. The present invention performs data partitioning by screening the data attributes of the data to be sent and the degree of business relevance, and uses a watermark embedding method to embed watermark information into metering data of different partitions, so that watermark extraction can be performed on demand after being sent to each provincial side, thereby realizing the transmission of metering data and tracing the application flow, and improving the enterprise data security management capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0063] Figure 1 It is a flowchart of a watermark identification method 100 based on metering data partitioning according to an embodiment of the present invention;
[0064] Figure 2 A schematic diagram of a specific process of a watermark identification method based on metering data partitioning according to an embodiment of the present invention;
[0065] Figure 3A flowchart of attribute association calculation based on the Gini coefficient and information gain according to an embodiment of the present invention;
[0066] Figure 4 A schematic diagram of a data partitioning process according to an embodiment of the present invention;
[0067] Figure 5 A schematic diagram of a metering data encryption process based on partition watermark embedding according to an embodiment of the present invention;
[0068] Figure 6 It is a schematic diagram of test results according to an embodiment of the present invention;
[0069] Figure 7 Schematic diagram of the structure of a watermark identification system 700 based on metering data partitioning according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0071] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0072] In order to solve the problem that once the data is tampered with or illegally obtained during transmission, it is often difficult to trace its original source and flow path, which poses a great threat to the security and credibility of the data. With the help of watermark technology, the present invention constructs a data transmission flow tracing scheme suitable for the interactive collaboration of two-level metering data of "headquarters side-provincial side". By embedding specific watermark information in different data partitions, the marking and tracking of the data are achieved. This method can not only retain the original information of the data to the greatest extent, but also ensure the accurate tracing of the source and flow of the data without affecting the normal use of the data, thereby improving the security and credibility of the data, and providing strong technical support for the data transmission sharing of energy metering and carbon metering.
[0073] Figure 1 FIG. 1 is a flow chart of a watermark identification method 100 based on metering data partitioning according to an embodiment of the present invention. Figure 1As shown, the watermark identification method based on metering data partitioning provided by the embodiment of the present invention partitions the data by screening the data attributes of the data to be sent and the degree of business relevance, and uses the watermark embedding method to embed watermark information into the metering data of different partitions, so that the watermark can be extracted on demand after being sent to each province, thereby realizing the transmission of metering data and the tracing of application flow, and improving the enterprise data security management capability. The watermark identification method 100 based on metering data partitioning provided by the embodiment of the present invention starts from step 101, and obtains the target data to be sent and the watermark information in step 101.
[0074] Preferably, the step of obtaining the target data to be sent and the watermark information includes:
[0075] Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data;
[0076] The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
[0077] Combination Figure 2 As shown, in the present invention, based on the new generation of electricity information collection system, the energy metering data to be transmitted from the provincial side to the headquarters side is obtained, including energy metering data and carbon metering data. After preprocessing, the initial sample set A is constructed, and the remaining energy metering data to be sent from the headquarters side is obtained on the basis of sample set A. After summarizing and collating, the initial sample set B is constructed, that is, the target data to be sent. Among them, in the data upload stage, each province will upload the metering data embedded with its own identity ID information to the headquarters side. After receiving the data, the headquarters side extracts the watermark information through the watermark extraction algorithm, so as to trace the source of each data. Among them, in the two-level data transmission process between the headquarters side and the provincial side, the identity ID information source and destination of each transmission node of the metering data can be recorded through a special monitoring system and stored in a log file.
[0078] In step 102, the importance index of each data attribute in the target data to be sent is calculated, an attribute business relevance ranking set is constructed based on the importance index, and data partitioning is performed based on the attribute business relevance ranking set.
[0079] Preferably, calculating the importance index of each data attribute in the target data to be sent includes:
[0080] impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′),
[0081]
[0082] Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′),
[0083]
[0084] Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m}, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
[0085] Combination Figure 2 As shown, in the present invention, in the data sending stage, based on the target data to be sent (i.e., sample B), the importance of data attributes is sorted using information gain and Gini coefficient methods, and an attribute business correlation set is constructed, and data partitioning is performed based on the level of attribute business correlation.
[0086] Combination Figure 3 As shown, the specific process is as follows:
[0087] D1. Use maximum and minimum normalization to preprocess the initial sample set B and output the preprocessed sample set B′;
[0088] D2. Based on the initial sample set B′, use the information gain and Gini coefficient methods to calculate the degree of relevance between each condition attribute of the data and the business, sort the relevance priority, and output the relevance index sorting set;
[0089] D3. Based on the relevance ranking set, the importance index of each attribute is obtained. The higher the index, the higher the relevance to the business. The data can be partitioned according to the attribute relevance ranking.
[0090] Taking the three business types of data collection, remote control, and abnormal information alarm of electricity consumption of the new generation of electricity consumption information collection system as an example, the information gain rate and Gini coefficient of each data condition attribute in the data set B′ are calculated to determine the degree of correlation between each data attribute and each business, and the secret parameters a and b are set as attribute correlation indexes.
[0091] Information gain: measures the value of data set B′ by attribute X i (1≤i≤m) The purity is improved after the partition. Assuming that the dataset B′ is divided into attribute X i If we divide the attribute X i The information gain is:
[0092] Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′)
[0093]
[0094] Among them, p i is the probability of the distribution state of each class in the data set B′, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of determines the amount of information needed to determine the category to which the data belongs. The measure of the degree of relevance to the business is to see how much information the attribute can bring to the classification system. The more information it brings, the more important the attribute is, and the higher the relevance to the business.
[0095] Information gain rate: Based on the data set B′, the information gain rate GainRatio(X,B′) is used to measure the importance of the conditional attribute X to the partitioned data set:
[0096]
[0097] Where Gain(X,B′) represents the information gain of the data set partitioned by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after the data set B′ is partitioned by attribute X, and the value range of attribute X is {x1,x2,…,x m}, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset Ti The number of data included.
[0098] When attribute X is a continuous attribute, the binary method is used to discretize the continuous attribute. Assuming that attribute X has z attribute values, the attribute values are sorted from small to large, and the average value of adjacent attribute values is selected as the partition point n, thereby dividing the data set into two data subsets greater than or equal to n and less than n, a total of z-1 partition points can be formed, and then the information gain rate under each partition point is calculated and the maximum value is selected as the information gain rate of the continuous attribute.
[0099] Gini coefficient: Data set B′ contains Q data from q categories. According to attribute X, the data set is divided into subsets B′1 and B′2. The number of data contained in these two data subsets is Q1 and Q2 respectively. Then the Gini coefficient of attribute X is defined as:
[0100]
[0101] Among them, p j It represents the probability that the jth sample data belongs to the target category.
[0102] Attribute importance index: For the conditional attribute X in the data set B′, set parameters a and b to satisfy 0<a<1, 0<b<1, and a+b=1, then the importance index of attribute X is defined as:
[0103] impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′)Since the parameters a and b are only known by the headquarters during the calculation process, the data receiver, i.e. the provincial side, cannot reverse the calculation process or determine the properties of the embedded watermark.
[0104] The present invention obtains the importance index of each attribute based on the attribute business relevance ranking set. The higher the index, the higher the business relevance. The data can be partitioned according to the attribute business relevance ranking. Figure 4 As shown, Figure 4 In the data, service 1 (F1) represents the data part unique to service 1, so the data attributes with high correlation with the service should be stored in this part, which is also convenient for subsequent watermark encryption; service 2 (F2) and service 3 (F3) have the same meaning as service 1 (F1). F1,2 represents the part where service 1 and service 2 data overlap; F1,3 represents the part where service 1 and service 3 data overlap; F2,3 represents the part where service 2 and service 3 data overlap; F1,2,3 represents the part where service 1, service 2 and service 3 data overlap.
[0105] In step 103, a watermark is embedded in the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked by the watermark.
[0106] Preferably, the step of embedding a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark includes:
[0107] Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ.
[0108] generating a sub-watermark and an embedding key based on the watermark information;
[0109] According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
[0110] Preferably, the method of generating a sub-watermark and an embedding key based on the watermark information comprises:
[0111] The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W),
[0112]
[0113] Determine the embedded key using the following methods, including:
[0114] (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ;
[0115] (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1;
[0116] (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
[0117] In the present invention, the data application level is preset, and then based on the data partitions divided in the previous step, a watermark partition embedding algorithm is used to embed watermarks into the data to be sent down from the headquarters side, and the metering data with embedded watermark information is output.
[0118] Combination Figure 5 As shown, the specific process is as follows:
[0119] E1. Based on the data and data partitions obtained in step 102, define a data application level.
[0120] In step E1, the data application level QaD represents the impact of watermark embedding on data availability, QaD = σ(σ∈[0,γ-1],σ∈N), and γ is the number of data partitions.
[0121] The data application level has γ cases: when QaD = 0, it means that all data partitions are embedded with watermarks; QaD = γ-1, it means that only one data partition is embedded with a watermark. The higher the QaD value, the fewer data partitions are embedded with watermarks and the higher the data availability; conversely, the more data partitions are embedded with watermarks, the lower the data availability. After receiving the data, the provincial side can first use the data with a lower QaD. If the availability of the data cannot meet the needs of the provincial side, it can apply for the relevant key from the headquarters side to improve the quality of data application. The improvement of QaD will not affect the effectiveness of the watermark.
[0122] E2. The identity ID information of each data receiver is used as the watermark information to be embedded, and then the watermark information is preprocessed, including dividing sub-watermarks and generating keys.
[0123] In step E2, the watermark information is converted into a watermark W in decimal form through ASCII code, and W is divided into γ sub-watermarks. In the specific division process, the watermark is divided into γ sub-watermarks of the same length in sequence. The sub-watermark length len(W sub [i]) = len(W) / γ, all sub-watermarks constitute a sub-watermark set.
[0124] Given a watermark W, split it into γ sub-watermarks W[i] to form a sub-watermark set W sub , during the embedding process, γ sub-watermarks are embedded into γ data partitions:
[0125]
[0126] The implementation of partition watermark embedding requires partition embedding key sk. The generation process of sk is as follows:
[0127] ① Calculate sk_(γ-1)=H(ske), where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of the data partition γ.
[0128] ② Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the watermark embedding key of data partition γ-1.
[0129] ③ Repeat step ② until sk_0=H(sk_1) is obtained and the calculation is completed.
[0130] Therefore, the partition embedding keys of each data partition constitute a key chain. When watermark embedding or level-upgrading is performed on the first h data partitions, only sk_h-1 needs to be known.
[0131] E3. Based on the data to be sent in the sample set, a watermark embedding algorithm is used to embed watermarks in different data partitions, and the data set to be sent with identity ID information is output.
[0132] Among them, in step E3, based on the set number of data partitions γ and the preset data application level (numerically, the number of data partitions is equal to the number of data application levels), the embedded hash value is calculated through the primary key and the partition embedding key sk, and the tuples and attribute values to be embedded in the watermark are selected in turn. The partition embedding of the watermark is implemented based on the XOR operation.
[0133] Preferably, the method further comprises:
[0134] When the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters, if the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side detects the application level of the current data and applies for the corresponding key based on the detected application level to remove the watermark.
[0135] In the present invention, the headquarters side sends the energy metering data embedded with watermark information to each province side. If the current data availability cannot meet the business needs of the province side, the province side can first detect the current data application level, and then apply for relevant keys from the headquarters side to remove the watermarks in some data partitions to improve data availability.
[0136] Taking business 1, business 2 and business 3 in step 102 as an example, assuming that the importance priority among the three businesses is business 1>business 2>business 3, when the headquarters sends data, the data involved in the entire business 3 is the data part that can be used directly, including F3, F1,3, F2,3 and F1,2,3. If these data cannot meet the business development needs of the province, it is necessary to apply to the headquarters for the keys of F2 and F1,2; if it still cannot meet the business needs at this time, you can apply for the key of F1.
[0137] In addition, in the present invention, when the province distributes the data without authorization from the headquarters, the headquarters can extract watermark information from the data, determine the specific province where the data was leaked by comparing the extracted ID identity information, complete the data transmission flow tracing, and verify the tracing accuracy of the model by comparing with the transmission records in the system log file, and output the metering data transmission flow tracing model.
[0138] The method of the present invention has the following advantages:
[0139] 1. Aiming at the problem of the impact of traditional watermark embedding on data availability, the present invention first uses the Gini coefficient and information gain to screen data attributes with high business relevance and partition the data based on the data to be sent from the headquarters, and then divides the watermark information to be embedded into multiple sub-watermarks. The purpose of watermark preprocessing is to avoid a significant impact on data quality during the watermark embedding process. During the embedding process, multiple sub-watermarks are respectively embedded in multiple data partitions, thereby protecting data availability;
[0140] 2. Traditional watermarks are usually only embedded once. When the watermark is destroyed or extracted in advance, it will lead to the problem that copyright verification cannot be performed. Before watermark embedding, this patent first divides the data to be sent into multiple data partitions. Each data partition uses an independent key to control the location and value of the watermark information, so as to achieve watermark embedding in partitions. The watermarks in each data partition can be verified for copyright, thereby realizing data traceability;
[0141] 3. In order to solve the problem of resource waste and low efficiency caused by the one-size-fits-all approach of traditional watermark extraction, the headquarters in the present invention pre-sets the data application level before data distribution. After sending it to each province, it chooses not to extract watermarks, extracts watermarks once, or extracts watermarks multiple times according to the different requirements of each recipient for data quality. This avoids the low efficiency and surge in queued tasks caused by multiple data sending from the headquarters to a certain extent, saves resources and improves the efficiency of processing various data services between the two-level platforms of "headquarters side and province side".
[0142] The present invention tests and verifies the accuracy and reliability of the proposed method by tracing the transmission direction of 100 sets of metering data. The Bit Correct Ratio (BCR) represents the difference between the extracted watermark and the original watermark. In the traceability accuracy test, the Bit Correct Ratio (BCR) is used as an indicator to measure the accuracy of model tracing. The larger the BCR, the more complete the extracted watermark information is, and the more accurately it can reflect the identity information of the recipient, thereby determining the transmission direction of the data, which is defined as follows:
[0143] BCR=1-BER
[0144]
[0145] Among them, W t represents the number of correct watermark bits extracted, W represents the number of original watermark bits, and BER represents the bit error rate, that is, the number of incorrect watermark bits extracted accounts for the number of original watermark bits.
[0146] The experimental results of 5 groups randomly selected are shown below. The accuracy verification results of the method proposed in this patent are as follows: Figure 6 As shown. Figure 6From the experimental results, it can be seen that the average data tracing accuracy of the method proposed in the present invention is greater than 85%, and the data tracing accuracy of different groups shows strong stability and consistency. The experimental results show that the present invention constructs a unified watermark identification model based on the classification and grading strategy based on metering data, and realizes accurate tracing of the data transmission flow by extracting and analyzing the identity information in the watermark, thereby ensuring the authenticity and credibility of the data. The method proposed in the present invention effectively improves the accuracy and efficiency of data tracing, helps power supply companies to better coordinate and interact with the two-level data of the "headquarters side-provincial side", promotes the rapid development of the power industry, and has very important practical significance and application value for improving my country's energy and economic development level.
[0147] Figure 7 FIG. 7 is a schematic diagram of a watermark identification system 700 based on metering data partitioning according to an embodiment of the present invention. Figure 7 As shown, a watermark identification system 700 based on metering data partitioning provided in an embodiment of the present invention includes: a data acquisition unit 701, a data partitioning unit 702 and a watermark identification unit 703.
[0148] Preferably, the data acquisition unit 701 is used to acquire target data to be sent and watermark information.
[0149] Preferably, the data acquisition unit 701 acquires the target data to be sent and the watermark information, including:
[0150] Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data;
[0151] The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
[0152] Preferably, the data partitioning unit 702 is used to calculate the importance index of each data attribute in the target data to be sent, construct an attribute business relevance ranking set based on the importance index, and perform data partitioning based on the attribute business relevance ranking set.
[0153] Preferably, the data partitioning unit 702 calculates the importance index of each data attribute in the target data to be sent, including:
[0154] impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′),
[0155]
[0156] Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′),
[0157]
[0158] Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m}, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
[0159] Preferably, the watermark identification unit 703 is used to embed a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark.
[0160] Preferably, the watermark identification unit 703 embeds a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark, including:
[0161] Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ.
[0162] generating a sub-watermark and an embedding key based on the watermark information;
[0163] According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
[0164] Preferably, the watermark identification unit 703 generates a sub-watermark and an embedding key based on the watermark information, including:
[0165] The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W),
[0166]
[0167] Determine the embedded key using the following methods, including:
[0168] (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ;
[0169] (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1;
[0170] (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
[0171] Preferably, the system further comprises:
[0172] The key application unit is used for detecting the application level of the current data when the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters. If the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side will apply for the corresponding key according to the detected application level to remove the watermark.
[0173] The watermark marking system 700 based on metering data partitions in the embodiment of the present invention corresponds to the watermark marking method 100 based on metering data partitions in another embodiment of the present invention, and will not be described in detail herein.
[0174] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, any step of a watermark identification method based on metering data partitioning is implemented.
[0175] According to another aspect of the present invention, the present invention provides an electronic device, including:
[0176] The computer-readable storage medium described above; and
[0177] One or more processors are used to execute the program in the computer-readable storage medium.
[0178] The invention has been described above with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.
[0179] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise therein. All references to "a / said / the [means, components, etc.]" are to be openly interpreted as at least one instance of said means, components, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not necessarily have to be performed in the exact order disclosed, unless explicitly stated otherwise.
[0180] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0182] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A watermark identification method based on metering data partitioning, characterized in that: The method comprises: Get the target data to be sent and watermark information; Calculating the importance index of each data attribute in the target data to be sent, constructing an attribute business relevance ranking set based on the importance index, and performing data partitioning based on the attribute business relevance ranking set; Based on the watermark information, watermarks are embedded in the partitioned target data to be sent, and the target data to be sent marked by the watermark is obtained.
2. The method according to claim 1, characterized in that The step of obtaining the target data to be sent and the watermark information includes: Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data; The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
3. The method according to claim 1, characterized in that Calculating the importance index of each data attribute in the target data to be sent, including: impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′), Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′), Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m }, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
4. The method according to claim 1, characterized in that: The step of embedding a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked by the watermark includes: Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ. generating a sub-watermark and an embedding key based on the watermark information; According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
5. The method according to claim 4, characterized in that Generating a sub-watermark and an embedding key based on the watermark information includes: The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W), Determine the embedded key using the following methods, including: (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ; (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1; (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
6. The method according to claim 1, characterized in that The method further comprises: When the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters, if the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side detects the application level of the current data and applies for the corresponding key based on the detected application level to remove the watermark.
7. A watermark identification system based on metering data partitioning, characterized in that: The system comprises: A data acquisition unit, used to acquire target data to be sent and watermark information; A data partitioning unit, used to calculate the importance index of each data attribute in the target data to be sent, construct an attribute business relevance ranking set based on the importance index, and perform data partitioning based on the attribute business relevance ranking set; The watermark identification unit is used to embed the watermark into the partitioned target data to be sent based on the watermark information, and obtain the target data to be sent marked with the watermark.
8. The system according to claim 7, characterized in that The data acquisition unit acquires the target data to be sent and the watermark information, including: Collecting energy metering data transmitted from the provincial side to the headquarters side and energy metering data determined by the headquarters side based on the business needs of the provincial side, so as to obtain the target data to be sent; wherein the energy metering data includes: energy metering data and carbon metering data; The identity ID information of the corresponding province embedded in the energy metering data transmitted from the province to the headquarters is extracted to obtain watermark information.
9. The system according to claim 71, characterized in that The data partitioning unit calculates the importance index of each data attribute in the target data to be sent, including: impt_index(X)=a×GainRatio(X,B′)+b×Gini(X,B′), Gain(X i ,B′)=Entropy(B′)-Entropy(X i ,B′), Where impt_index(X) is the importance index of attribute X; a and b are attribute relevance indexes; B′ is the target data to be sent after preprocessing, and GainRatio(X,B′) is the value of the data attribute X. i The information gain of Gini(X,B′) is the data attribute X. i Gini coefficient; Gain(X,B′) represents the information gain of dividing the data set by attribute X, Split_info(X) represents the consistency of the data set distribution with respect to the attribute after dividing B′ by attribute X, and the value range of attribute X is {x1,x2,…,x m }, T i Take x for the attribute X in B′ i The data subset consisting of data records of |T i | represents the data subset T i The number of data included; p i is the probability of the distribution state of each class in the target data B′ after preprocessing, Entropy(X i ,B′) is a data in B′ based on its attribute X i The value of is the amount of information needed to determine the category to which the data belongs; Entropy(B′) is the amount of all information needed in B′ to determine the category to which a certain data belongs; h is the number of samples.
10. The system according to claim 7, characterized in that The watermark identification unit embeds a watermark into the partitioned target data to be sent based on the watermark information to obtain the target data to be sent marked with the watermark, including: Assume that n represents the number of partitions where watermarks are embedded; the data application level is QaD = σ (σ = γ-n, σ∈[0,γ-n], σ∈N), γ is the number of data partitions; N is a set of non-negative integers; n≤γ. generating a sub-watermark and an embedding key based on the watermark information; According to the data application level, watermarks are embedded in different data partitions based on the sub-watermark and the embedding key to obtain target data to be sent marked by the watermark.
11. The system according to claim 10, characterized in that The watermark identification unit generates a sub-watermark and an embedding key based on the watermark information, including: The watermark information is converted into watermark data W through ASCII code, and the watermark data W is divided into γ sub-watermarks W[i] to form a sub-watermark set W sub ; Among them, the length of the watermark data is len(W), Determine the embedded key using the following methods, including: (1) Calculate sk_(γ-1)=H(ske); where H(·) is a hash function, ske is a randomly set key generator, and sk(γ-1) is the embedded key of data partition γ; (2) Calculate sk_(γ-2)=H(sk(γ-1)) to obtain the embedded key of data partition γ-1; (3) Repeat step (2) until sk_0 = H(sk_1) is obtained, and then end.
12. The system according to claim 7, characterized in that The system further comprises: The key application unit is used for detecting the application level of the current data when the provincial side receives the target data to be sent with embedded watermark information sent by the headquarters. If the availability of the current data obtained cannot meet the business needs of the provincial side, the provincial side will apply for the corresponding key according to the detected application level to remove the watermark.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
14. An electronic device, characterized in that: include: The computer readable storage medium as claimed in claim 13; as well as One or more processors are used to execute the program in the computer-readable storage medium.
