Attribute and label-based data processing method, data tracing method, and device, equipment, and medium thereof
By determining attribute weights in power data, selecting non-important attributes and splitting digital labels, the problems of the existing technology's application difficulties in multi-attribute and complex analysis scenarios and the overall damage of labels are solved, and higher digital label robustness and data security are achieved.
Patent Information
- Application Number
- CN202411320676.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing digital labeling technology is difficult to apply when dealing with multi-attribute and complex analysis scenarios, and some data forwarding will destroy the integrity of digital labels and reduce its robustness and data security.
By determining the weight of each attribute of the source data, selecting non-important attributes and splitting the numerical tags into sub-labels, inserting the decimal part of the numerical value of the non-important attributes respectively to achieve multi-point insertion and reduce the impact of labels on the source data.
It improves the robustness and data security of digital tags, can effectively handle multi-attribute and complex analysis scenarios, and avoids some data forwarding to destroy the integrity of the tag.
Smart Images

Figure CN118861174B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data security technology, and in particular to a method for processing data based on attributes and labels, a method for tracing data, and a device, equipment, and medium thereof. Background Art
[0002] Power data plays an important role in the informatization of power systems and big data applications. It not only reflects the actual electricity consumption of residents and enterprises, but also covers a wide range of application scenarios and deep-level use value. With the continuous development of power system informatization and power big data applications, sensitive data, as an important part of power marketing data, is frequently distributed and shared within the system to support power big data analysis applications. Even after desensitization, sensitive data still has the potential risk of unauthorized forwarding and leakage.
[0003] Traditional sensitive data solutions mainly use data encryption technology (including symmetric encryption and asymmetric encryption technology), permission management, data detection system establishment and firewalls. In addition, an effective solution for the protection of sensitive data is to add tags to sensitive data, which is a widely used method to identify and protect the ownership of sensitive data. The core idea is to insert some artificial information into the sensitive data to mark the unique identity of the sensitive data, thereby tracing the sensitive data. Tagging technology provides an innovative means of protecting the security of sensitive data, which helps to maintain the integrity and security of data and models.
[0004] At present, digital tags are a common method to solve data copyright issues, such as using genetic algorithms and particle swarm algorithms to create tags, wavelet-based digital tagging technology, digital tags based on hybrid transform domains, and pseudo-row and pseudo-column tags in the power industry. These methods have some shortcomings: First, there is a lack of attention to the usability of data mining and analysis. Existing digital tag-related methods are difficult to apply to the distribution and sharing of electricity consumption data, especially when dealing with complex analysis scenarios such as clustering or involving multiple attributes; second, existing methods generally assume that data leakage in distribution and sharing is the unauthorized forwarding of the entire data table. However, in actual situations, only part of the data records may be forwarded, which will cause the integrity of the tags inserted in the data to be destroyed, making it difficult to effectively extract tags and trace the data holder. In summary, the robustness and data security of digital tags need to be improved. Summary of the invention
[0005] The present application provides a method for processing data based on attributes and labels, a data tracing method and its device, equipment and medium, so as to insert digital labels for multiple attributes and improve the robustness and data security of digital labels.
[0006] In a first aspect, an embodiment of the present application provides a method for processing data based on attributes and tags, including:
[0007] Determine the weight of each attribute of the source data, and determine the non-important attributes to be inserted into the tag according to the weight of each attribute;
[0008] Splitting the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute;
[0009] Each sub-label is inserted into the decimal part of the numerical value of the corresponding non-important attribute to obtain the processed target data.
[0010] In a second aspect, the embodiment of the present application further provides a data tracing method based on attributes and tags, which is characterized by comprising:
[0011] Extracting corresponding sub-labels according to the decimal part of the value of the non-important attribute of the target data, wherein the non-important attribute is determined according to the weight of each attribute of the target data;
[0012] synthesizing digital labels based on the extracted sub-labels;
[0013] The tag index table is queried according to the digital tag to determine the source data corresponding to the target data.
[0014] In a third aspect, an embodiment of the present application further provides a device for processing data based on attributes and tags, including:
[0015] A determination module, used to determine the weight of each attribute of the source data, and determine the non-important attributes to be inserted into the tag according to the weight of each attribute;
[0016] A splitting module, used for splitting the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute;
[0017] The processing module is used to insert each sub-label into the decimal part of the numerical value of the corresponding non-important attribute to obtain the processed target data.
[0018] In a fourth aspect, the embodiment of the present application further provides a data tracing device based on attributes and tags, including:
[0019] An extraction module, configured to extract a corresponding sub-label according to a decimal part of a numerical value of a non-important attribute of the target data, wherein the non-important attribute is determined according to a weight of each attribute of the target data;
[0020] A synthesis module, used for synthesizing digital labels according to the extracted sub-labels;
[0021] The traceability module is used to query the tag index table according to the digital tag to determine the source data corresponding to the target data.
[0022] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0023] one or more processors;
[0024] A storage device for storing one or more programs;
[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing data based on attributes and labels as described in the first aspect or the method for tracing data based on attributes and labels as described in the second aspect.
[0026] In the sixth aspect, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method for processing data based on attributes and labels as described in the first aspect or the method for tracing data based on attributes and labels as described in the second aspect.
[0027] The embodiment of the present application provides a method for processing data based on attributes and labels, a data tracing method and its device, equipment and medium. The method for processing data based on attributes and labels includes: determining the weight of each attribute of the source data, and determining the unimportant attributes to be inserted into the label according to the weight of each attribute; splitting the digital label into a corresponding number of sub-labels according to the number of unimportant attributes and the weight of each unimportant attribute; inserting each sub-label into the decimal part of the numerical value of the corresponding unimportant attribute to obtain the processed target data. The above technical scheme can realize multi-point insertion for multiple attributes by analyzing the weights of different attributes and inserting digital labels for unimportant attributes, and by splitting the digital label into sub-labels and inserting them into the decimal part of the numerical values of different unimportant attributes, the impact of inserting the digital label on the source data can be reduced, and the integrity of the digital label can be avoided from being destroyed due to partial data forwarding, thereby improving the robustness and data security of the digital label. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0029] Figure 1 A flowchart of a method for processing data based on attributes and tags provided in an embodiment of the present application;
[0030] Figure 2A flowchart of a data tracing method based on attributes and tags provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of a device for processing data based on attributes and tags provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of the structure of a data tracing device based on attributes and tags provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0035] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0036] It should be noted that the concepts of "first", "second", etc. mentioned in the embodiments of the present application are only used to distinguish different devices, modules, units or other objects, and are not used to limit the order or interdependence of the functions performed by these devices, modules, units or other objects.
[0037] In addition, the embodiments in this application and the features in the embodiments may be combined with each other if there is no conflict.
[0038] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0039] It should be noted that in the embodiments of the present application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the relevant content of the solution.
[0040] Figure 1A flowchart of a method for processing data based on attributes and labels provided in an embodiment of the present application, which can be applied to the case of identifying or tracing data. Specifically, the method for processing data based on attributes and labels can be performed by a device for processing data based on attributes and labels, which can be implemented by software and / or hardware and integrated in an electronic device. Electronic devices include but are not limited to computers, smart phones, servers, and other devices with image processing functions.
[0041] like Figure 1 As shown, the method specifically comprises the following steps:
[0042] S110 , determining the weight of each attribute of the source data, and determining the non-important attributes to be inserted into the tag according to the weight of each attribute.
[0043] In this embodiment, the source data can be understood as data to be processed, data that needs to be inserted with a digital tag, data that needs to be identified or sourced, or data that needs to be protected for copyright or ownership, etc. The source data can be power business data, such as power equipment operation data, power system status data and / or user power consumption data, etc., or it can be data for non-power business, such as traffic data and / or sales data, etc. By inserting specific digital tags into the source data, its ownership can be identified, protected or traced. The source data can be pre-processed, and some incomplete data that will affect the actual program operation and invalid data can be removed. For the source data that needs to be processed in the end, it usually has multiple or multiple types of attributes, which have different values (also called characteristic values) on different attributes. For example, one type of attribute is used to indicate whether the user's electricity bill is overdue, including two attributes of overdue and not overdue; for another example, one type of attribute is used to indicate the size of the user's electricity consumption, including three attributes of large, medium and small.
[0044] The weight of each attribute can be determined by a feature selection algorithm. Among multiple attributes, some attributes may be more useful (important), while others may be less useful or useless (unimportant). In this embodiment, an attribute can also be understood as a feature, an important attribute can be called a relevant feature, and an unimportant attribute can be called an irrelevant feature. The feature selection algorithm can be understood as an algorithm for selecting relevant features or irrelevant features from multiple attributes. For example, the ReliefF algorithm measures the importance of each feature by estimating the correlation between features.
[0045] When inserting digital labels, one or more attributes can be inserted. In this embodiment, non-important attributes are selected from the attributes of the source data for inserting digital labels, wherein the non-important attributes may refer to attributes whose weights are lower than the specified threshold value among the attributes, for example, if the weight of an attribute is 0.2, which is lower than the specified threshold value 0.4, then the attribute is a non-important attribute; it may also be an attribute randomly selected from the attributes whose weights are lower than the specified threshold value, for example, if the weights of multiple attributes are lower than the specified threshold value 0.4, then all or part of the attributes in these multiple attributes may be regarded as non-important attributes; it may also be a specified number or set proportion of attributes with the lowest weight among the attributes, for example, the weights of the above five attributes are 0.2, 0.3, 0.1, 0.25, and 0.15, respectively, and two attributes with the lowest weights may be selected as non-important attributes, or the attributes may be sorted according to the attribute weights, and the weights of the attributes may be normalized, and then several attributes with low attribute weights may be taken out.
[0046] The advantage of selecting non-important attributes to insert into digital tags is that, based on the quantification of the contribution of each attribute to data analysis, using attributes with low importance as the target of sub-tag insertion can effectively reduce the adverse impact of the insertion of digital tags on the availability of source data and can effectively avoid data leakage. S120, according to the number of non-important attributes and the weight of each non-important attribute, split the digital tag into a corresponding number of sub-tags.
[0047] In this embodiment, the digital label can be preset, randomly generated, or generated based on a deep autoencoder, etc. There can be one or more non-important attributes. If there is one, the digital label as a whole (regarded as a sub-label) can be inserted into the corresponding position of the non-important attribute; if there are two or more, the digital label can be split into two or more sub-labels according to the weight of each non-important attribute, each non-important attribute corresponds to a sub-label, and each sub-label is inserted into the corresponding position of the corresponding non-important attribute.
[0048] In the case of splitting a digital label into sub-labels, the splitting ratio of the digital label can be determined according to the weight of each non-important attribute. For example, it can be split according to the principle that the higher the weight of the non-important attribute, the shorter the length of the corresponding sub-label. Exemplarily, the weight of non-important attribute 1 is W1, the weight of non-important attribute 2 is W2, W1>W2, and the digital label has five digits, which can be split into sub-label 1 (three digits) and sub-label 2 (2 digits). Sub-label 1 is relatively long, so sub-label 1 can be inserted into the corresponding position of 2 of the non-important attribute, and sub-label 2 can be inserted into the corresponding position of 1 of the non-important attribute. In some embodiments, it can also be split according to the principle that the higher the weight of the non-important attribute, the longer the length of the corresponding sub-label, etc., which is not limited in this embodiment. By splitting the digital label into sub-labels and inserting them into the corresponding positions of each non-important attribute in a dispersed manner, the robustness of the digital label can be improved.
[0049] S130 , insert each sub-tag into the decimal part of the numerical value of the corresponding non-important attribute to obtain processed target data.
[0050] In this embodiment, the numerical value of the non-important attribute can be divided into an integer part and a decimal part, and each sub-tag is inserted into the decimal part of the numerical value of the corresponding non-important attribute, which can improve the robustness and traceability of the digital tag, and can reduce the potential impact of the tag insertion on the data availability. Among them, the specific position of each sub-tag inserted into the decimal part of the numerical value of the corresponding non-important attribute can be determined according to the length of the decimal part, the length of the digital tag, the weight of the non-important attribute and / or the integer part of the non-important attribute. For example, the longer the length of the decimal part, the later the corresponding sub-tag insertion position can be; the longer the length of the digital label, the earlier the corresponding sub-tag insertion position can be; the greater the weight of the non-important attribute, the later the corresponding sub-tag insertion position can be; and / or, the longer the integer part of the non-important attribute, the earlier the corresponding sub-tag insertion position can be, etc., thereby minimizing the impact of the inserted sub-tag on the numerical value of the corresponding non-important attribute, or minimizing the length of the processed target data.
[0051] The embodiment of the present application provides a method for processing data based on attributes and labels, which calculates the weights of the attributes of the source data and screens out the non-important attributes with lower weights, then splits the digital labels into sub-labels according to a certain ratio, and inserts the sub-labels into the decimal part of the numerical value of the corresponding attribute, thereby realizing multi-point insertion for multiple attributes; since the importance of different attributes is taken into consideration, the sensitive data can be traced while protecting the privacy of sensitive data. In addition, by introducing a data mining algorithm to calculate the importance of the attribute, and by calculating the contribution of the attribute to data analysis that can be quantified, the attribute with low importance is used as the target of sub-label insertion, and since the decimal part is inserted, the integer part will not be changed, which effectively reduces the adverse effect of digital label insertion on data availability and effectively avoids the risk of data leakage.
[0052] In one embodiment, the ReliefF algorithm is used to determine the weight of each attribute of the source data. The process of determining the weight of each attribute includes:
[0053] S1110, initializing the weight of each attribute of the source data to 0;
[0054] S1120. In each iteration, for any attribute, the current weight of the attribute is subtracted from the difference of samples of the same type and added to the difference of samples of different types to obtain the weight of the attribute after this iteration, wherein the difference of samples of the same type is used to represent the value of the attribute of any of the source data and the value of samples of the same type as the source data. The numerical difference between the numerical values of the attribute of the nearest neighbor source data, and the different class sample difference is used to represent the attribute value of the source data and the different class of the source data. The numerical difference between the values of the attribute of the nearest neighbor source data, is a positive integer;
[0055] S1130. When the conditions are met, the iteration is stopped to obtain the updated weights of each attribute.
[0056] In this embodiment, the ReliefF algorithm is used to determine the weight of each attribute of the source data, wherein in each iteration, a sample (denoted as ),from Similar sample sets (similar sample sets include multiple similar samples) of The original data of the nearest neighbors (denoted as , ),from Different class sample sets (different class sample sets include multiple Find out from samples of different classes The original data of the nearest neighbors (denoted as , Representation Class The Nearest neighbor samples). Among them, find R in a sample set When there are 1 nearest neighbor raw data, the Euclidean distance can be used as the distance metric, that is, to find the Euclidean distance closest to R in the sample set. The nearest neighbor raw data.
[0057] For attributes , its weight Update as follows:
[0058] ;
[0059] in, is the number of sample selections, is the number of nearest neighbor samples, is a randomly selected sample, Representation sample The category to which it belongs, is another category different from the one to which R belongs, Representation sample and samples In Properties The difference between the values on is calculated as follows:
[0060] ;
[0061] in, Represents the attributes of each piece of raw data The maximum value among the values of Represents the attributes of each piece of raw data The minimum value among the values of Refers to the sample Properties in The numerical value of Refers to the sample The value of attribute A in Continuity refers to the property The value is a continuous range of values. Discrete refers to the attribute An attribute whose values are finite or countable.
[0062] The condition for stopping iteration can be set according to actual needs, such as reaching a specified number of iterations, or the weight of the attribute does not change or the change is less than a threshold after a set number of consecutive iterations (such as 20 consecutive iterations).
[0063] In one embodiment, the method further comprises:
[0064] S120: split the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute. S120 specifically includes:
[0065] S1210: When the number of the non-important attributes is at least two, normalize the weight of each non-important attribute to obtain the proportion of each non-important attribute;
[0066] S1220, multiplying the weight of each non-important attribute by the total length of the digital label to obtain the length of the sub-label corresponding to each non-important attribute;
[0067] S1230 . Split the digital tag into a corresponding number of sub-tags according to the length of the sub-tag corresponding to each non-important attribute.
[0068] Specifically, the digital labels are split based on the principle of proportional distribution. Non-important attributes ( is an integer greater than 1) is normalized to obtain The proportion of non-important attributes (also called normalized weight, denoted as ), is the sequence number or ID of the non-important attribute, , non-important attributes are sorted from small to large or from large to small according to weight or proportion; Multiply it by the total length of the digital label to obtain the length of each sub-label, and split the digital label into N sub-labels according to the length of each sub-label: . For example, if the non-important attributes are sorted from small to large according to weight or proportion, then .
[0069] It should be noted that when inserting sub-tags, each sub-tag can be assigned to each non-important attribute in turn, and there is a one-to-one relationship between the sub-tag and the non-important attribute. In this process, each non-important attribute can be sorted from small to large according to weight or proportion, and each sub-tag can be sorted from long to short according to length; or, each non-important attribute can be sorted from large to small according to weight or proportion, and each sub-tag can be sorted from short to long according to length. Take the non-important attributes being sorted from small to large according to weight or proportion as an example. A preferred method is to sort the N sub-tags according to On this basis, shorter sub-labels can be assigned to non-important attributes with larger weights, and longer sub-labels can be assigned to non-important attributes with smaller weights, thereby further reducing the adverse effects of the insertion of effective digital labels on relatively important attributes of the source data and improving the availability of the final processed data.
[0070] In one embodiment, before inserting each sub-tag into the decimal part of the value of the corresponding non-important attribute, the method further includes:
[0071] S1310, for each non-important attribute, split the value of the non-important attribute into an integer part and a decimal part;
[0072] S1320: Based on the key, the integer part and the serial number of the unimportant attribute, a hash function is used to determine a target position where the corresponding sub-tag is inserted into the decimal part of the numerical value of the unimportant attribute.
[0073] Specifically, the key can be preset or randomly generated. The hash function can convert data of any length into a fixed-length value, which is the hash value or hash value. In this embodiment, the non-important attributes can be split into an integer part and a decimal part, and a random key is selected. The hash function is used to calculate the sub-tag insertion position using the key and the value of the integer part and the sub-tag sequence number. The expression is as follows: ;in, Indicates the insertion position (target position), represents the key, Represents a connector. Indicates the length of the decimal part, is the serial number of the non-important attribute. For example, If it is 5, a subtag is inserted after the 5th decimal place (starting from the 6th place).
[0074] In one embodiment, each sub-tag is inserted into the decimal part of the value of the corresponding non-important attribute to obtain processed target data, including:
[0075] S1330, converting the value of the sub-tag corresponding to the non-important attribute from decimal representation to binary representation;
[0076] S1340. For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, insert the least significant bit of the binary representation of the decimal place into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data.
[0077] For example, the decimal part of the value of the non-important attribute has eight digits. =5, then = The three decimal places after 5 (recorded as ) needs to insert a sub-label. Assume that the sub-label corresponding to the non-important attribute is converted into binary representation as ,for ,based on Insert the least significant bit of the binary representation of ;for ,based on Insert the least significant bit of the binary representation of ;for ,based on Insert the least significant bit of the binary representation of Among them, based on Insert the least significant bit of the binary representation of (i is a positive integer. ), which can be The least significant bit of the binary representation of is replaced by , or according to set up The least significant bit of the binary representation of , etc.
[0078] In one embodiment, inserting the least significant bit of the binary representation of the decimal point into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data includes:
[0079] If the bit corresponding to the decimal place in the binary representation of the corresponding subtag has the value 0, then the least significant bit of the binary representation of the decimal place is set to 0;
[0080] If the bit corresponding to the decimal place in the binary representation of the corresponding subtag has the value 1, the least significant bit of the binary representation of the decimal place is set to 1.
[0081] For example, based on Insert the least significant bit of the binary representation of (i is a positive integer, ),like If is 0, The least significant bit of the binary representation of is set to 0; if If is 1, The least significant bit of the binary representation of is set to 1. On this basis, the sub-tag data can be hidden in the original data using the least significant bit (LSB) algorithm.
[0082] In one embodiment, if after inserting each decimal point into the corresponding bit in the binary representation of the corresponding sub-tag to obtain a binary bit stream, there are still uninserted bits in the binary representation of the corresponding sub-tag, then the uninserted bits are inserted into the binary bit stream to obtain the processed target data. The least significant bits of the binary representation of After getting the binary bit stream, there are still bits that have not been inserted , then we can Inserted after the binary bit stream.
[0083] In one embodiment, the method further comprises:
[0084] S140, generating digital labels based on a deep autoencoder;
[0085] S150: Establish a label index table, where the label index table is used to record the corresponding relationship between the digital label and the holder of the source data.
[0086] Among them, the deep autoencoder is an artificial neural network that can be used for effective encoding in unsupervised learning, with the goal of learning a representation for a set of data. Based on the generated digital labels, a one-to-one correspondence between digital labels and data holders is established, and an index table between the two is established. The index table mode is (digital label, data holder), so as to effectively identify the source data and provide a reliable basis for data tracing.
[0087] The method for processing data based on attributes and labels based on the ReliefF algorithm and sub-labels provided in the embodiment of the present application improves the robustness and traceability of digital labels by splitting digital labels, calculating attribute weights and selecting non-important attributes, and inserting sub-labels at multiple points of non-important attributes, and can effectively handle sensitive data traceability issues. Since attributes with lower importance are selected for label insertion during the label insertion process, the potential impact of label insertion on data availability can be reduced; compared with other label insertion methods, it has stronger robustness, security and data analysis availability.
[0088] Figure 2 A flowchart of a data tracing method based on attributes and labels is provided for an embodiment of the present application. This embodiment can be applied to situations where data is identified or traced. Specifically, the data tracing method based on attributes and labels can be performed by a data tracing device based on attributes and labels, and the data tracing device based on attributes and labels can be implemented by software and / or hardware and integrated in an electronic device. Electronic devices include but are not limited to computers, smart phones, servers and other devices with image processing functions. It should be noted that the technical details not described in detail in this embodiment can be found in any of the above embodiments.
[0089] Specifically, Figure 2 As shown, the method specifically comprises the following steps:
[0090] S210, extracting corresponding sub-labels according to the decimal part of the numerical value of the non-important attribute of the target data;
[0091] S220, synthesizing a digital tag according to the extracted sub-tags;
[0092] S230: query a tag index table according to the digital tag to determine source data corresponding to the target data.
[0093] Specifically, the target data contains a number of sub-tags corresponding to the non-important attributes, and each sub-tag is inserted into the decimal part of the numerical value of the corresponding non-important attribute. When identifying or tracing the data, the corresponding sub-tags can be extracted from the decimal part of the numerical value of each non-important attribute and synthesized into a digital tag. The non-important attributes are determined according to the weight of each attribute of the target data. It should be noted that this embodiment does not exclude the case where there is only one non-important attribute. In this case, there is only one sub-tag, and the extracted sub-tag is the digital tag. The digital tag can be used to query the tag index table, which stores the one-to-one correspondence between the digital tag and the data holder, thereby effectively tracing the source data.
[0094] In one embodiment, extracting corresponding sub-labels according to the decimal part of the value of the non-important attribute of the target data includes:
[0095] S2110, for each non-important attribute of the target data, split the value of the non-important attribute into an integer part and a decimal part;
[0096] S2120, based on the key, the integer part and the serial number of the non-important attribute, using a hash function to determine the target position where the corresponding sub-tag is inserted into the decimal part of the value of the non-important attribute;
[0097] S2130. For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, extract the least significant bit of the binary representation of each decimal place in turn, obtain binary information and convert it into decimal representation to obtain the corresponding sub-label.
[0098] Specifically, in the traceability process, for any non-important attribute, the value of the non-important attribute is split into an integer part and a decimal part. Each decimal place after the target position of the decimal part is obtained by inserting the corresponding sub-tag based on the least significant bit algorithm. Based on this, the least significant bit of the binary of each decimal place can be extracted to obtain binary information, and the binary information is then converted into decimal form to obtain the sub-tag inserted in the attribute value.
[0099] The following example illustrates the data processing process based on attribute weights and digital labels. The overall idea is to use the ReliefF algorithm to calculate the weights of the attributes of the source data, filter out non-important attributes with lower weights (for example, when there is more than one non-important attribute), and then split the digital labels into different sub-labels in proportion. Through relevant calculations, determine the position of each sub-label in the decimal place of the value of the corresponding attribute and insert each sub-label into the decimal place of the value of the corresponding attribute. Finally, extract the sub-labels and synthesize the entire digital label to trace the source of the data. The details are as follows:
[0100] Step 1: Data preprocessing: remove incomplete data that may affect the actual program operation, and then integrate and summarize the processed data to create a data table (source data, also called raw data). Extract the attribute values and corresponding attribute classifications of each raw data. Indicates the total number of attributes of each piece of original data. There are s non-important attributes to be inserted into digital labels (s is a positive integer, s is less than or equal to ). Taking Table 1 as an example, the source data includes 6 pieces of original data, and the numbers (ID) of the original data are 1 to 6. S1, S2 and S3 are the values of the three attributes of the source data. The attribute classification is whether the electricity fee is overdue, is 2, that is, there are two non-important attributes to be inserted into the digital label, namely overdue (0) and not overdue (1). Normalize the data in the table and use the ReliefF algorithm to calculate the weight of the attribute. The specific method is as follows:
[0101] Table 1 Source data of power business
[0102]
[0103] Step 1.1: Initialize weights. Set the weights of all attributes to 0 and the weights of each attribute to an empty set.
[0104] Step 1.2: Iterate for each sample. For each sample extraction, randomly select a sample (denoted as ); and from Found in the same sample set of Nearest neighbors ( , ), find out from each different class sample set Nearest Neighbor , Representation Class The The nearest neighbor samples are selected and the Euclidean distance is used as the distance metric.
[0105] Step 1.3: For each attribute A, update its weight as shown below:
[0106] ;
[0107] in, is the number of sample selections, is the number of nearest attributes, is a randomly selected sample, Representation sample The category to which it belongs, is another category different from the one to which R belongs, Representation sample and samples In Properties The difference between the values on is calculated as follows:
[0108] .
[0109] Step 1.4: Repeat steps 1.2 and 1.3 until a specified number of iterations is reached, such as 20.
[0110] Step 1.5: Calculate the weight of each attribute of each random sample, and then average the weight of each attribute. Taking Table 1 as an example, the weight of attribute S1 is 0.349, the weight of attribute S2 is 0.388, and the weight of attribute S3 is 0.390. The features are sorted according to the final weight values.
[0111] Step 2: Sort the weights of all attributes from small to large, and select the first The attributes with small weights are used as the attributes of the subsequent sub-tags to be inserted (i.e., non-important attributes), forming a non-important attribute set attr. Taking Table 1 as an example, two attributes with lower weight values can be selected as non-important attributes, namely, attribute S1 and attribute S2.
[0112] Step 3: Use the ratio distribution method to split the generated digital labels and assign the labels obtained in step 2 to The weights of the attributes are normalized to obtain The normalized weight of the attribute , ,Will Multiply it by the total length of the digital label to get the length of each sub-label and split the digital label into , and then assign each sub-label to the non-important attribute of the corresponding subscript, that is, the non-important attribute with a larger weight is assigned a shorter sub-label, and the non-important attribute with a smaller weight is assigned a longer sub-label. Taking the data in Table 1 as an example, two non-important attributes are obtained from step 2, with weights of 0.349 and 0.388 respectively. Therefore, the normalized weight of attribute S1 is 0.47, and the normalized weight of attribute S2 is 0.53.
[0113] Step 4: Based on the one-to-one correspondence between the generated digital tags and data holders, an index table is established between the two. The index table mode is (digital tag, data holder). The index table can be understood as the one-to-one correspondence between the machine number and the digital tag where each piece of original data is stored. For any target data that needs to be traced, the index table can be queried based on the digital tag corresponding to the target data to determine the machine corresponding to the digital tag, thereby determining the storage location of the target data and achieving traceability.
[0114] Step 5: Use the hash algorithm to calculate the sub-tag insertion position, and use the least significant bit (LBS) algorithm to insert the sub-tag, as follows:
[0115] Step 5.1: Traverse the non-important attributes of the source data;
[0116] Step 5.2: Split each non-important attribute into an integer part int and a decimal part dec, and select a random key KEY;
[0117] Step 5.3: For each non-important attribute, use the key and the integer value and the sub-tag sequence number to calculate the sub-tag insertion position using a hash function. The expression is as follows: ;in, Indicates the insertion position (target position), represents the key, Represents a connector. Indicates the length of the decimal part, Is the sequence number of the unimportant attribute.
[0118] Step 5.4: Next, extract the target position for each non-important attribute to insert into the decimal part , use the LSB algorithm to hide the sub-tag data in the source data. First, convert the number after the target position into a binary bit stream and regard it as a container. Then convert the value of the sub-tag from decimal to binary and regard it as the inserted information bit (assuming that there are b bits in total). For example, if the value of the sub-tag is 129, the value converted from decimal to binary is 10000001 (b=8). Starting from the target position, access each bit of the container one by one, and insert the bit in the binary representation of the sub-tag into the least significant bit of the corresponding binary. If the information bit is 0, the least significant bit of the container will remain 0; if the information bit is 1, the least significant bit of the container will be set to 1. Repeat this step until all sub-tags are inserted, and get the new value of each non-important attribute.
[0119] As shown in Table 1, there are 5 attributes and 6 source data in the data table, where the first column represents the source data sample ID, and the second column represents the attribute classification of each source data. Assume that the digital label key Since the weight of attribute S1 is 0.349, the weight of attribute S2 is 0.388, and the weight of attribute S3 is 0.390, is 2, that is, the two attributes with the smallest weight are selected as the non-important attributes of the tag to be inserted, that is, S1 and S2. According to the normalized proportion of S1 and S2, the digital labels are divided, and it can be concluded that the sub-label is divided into two sub-labels. , , convert it from decimal to binary, that is , .
[0120] Insert two sub-labels into the decimal places of the unimportant attributes S1 and S2 respectively. Taking the sample as an example, the insertion position of sub-label L1 can be obtained by the following formula:
[0121] ;
[0122] The insertion position of sub-label L2 can be obtained by the following formula:
[0123] ;
[0124] Through the LSB algorithm, the binary form of the sub-label L1 is inserted into the last binary bit of each digit starting from the third decimal place of the attribute S1. If the information bit is 0, the least significant bit of the container will remain 0; if the information bit is 1, the least significant bit of the container will be set to 1, forming a new S1 attribute value of 10.98298869100010.
[0125] Taking S1 as an example, the original value of s1 is 10.982899781. After finding the third digit of the decimal part, it is 899781. According to the least significant bit algorithm, if the information bit is 0, the least significant bit of the container will remain 0; if the information bit is 1, the least significant bit of the container will be set to 1, that is, the corresponding sub-tag 10001100010, the first bit of the sub-tag is 1, and the corresponding decimal place is 8, so the least significant bit of the binary 8 (1000) is set to 1, which becomes 1001, which is converted to decimal 9; the second bit of the sub-tag is 0, and the corresponding decimal place is 9, so the least significant bit of the binary 9 (1001) is set to 0, which becomes 1000, which is converted to decimal 8; the third bit of the sub-tag is 0, and the corresponding decimal place is 9, so the least significant bit of the binary 9 (1001) is set to 0, which becomes 1000, which is converted to decimal. The decimal value is 8; the fourth bit of the subtag is 0, and the corresponding decimal place is 7. Therefore, the least significant bit of the binary value of 7 (0111) is set to 0, which becomes 0111, which is 6 in decimal; the fifth bit of the subtag is 1, and the corresponding decimal place is 8. Therefore, the least significant bit of the binary value of 8 (1000) is set to 1, which becomes 1001, which is 9 in decimal; the sixth bit of the subtag is 1, and the corresponding decimal place is 1. Therefore, the least significant bit of the binary value of 1 (0001) is set to 1, which is still 0001, and the decimal value is still 1; the remaining 00010 in the subtag can be inserted after the decimal result of the sixth bit, so the inserted value 10.98298869100010 is obtained, among which the first three bits of the decimal part are consistent with the source data, and the last 11 bits are obtained after the subtag is inserted.
[0126] Similarly, for each source data S and S2, the above hash algorithm is used to determine the target position for inserting the sub-tag, and the sub-tag is inserted in combination with the least significant bit algorithm, and the processed target data is shown in Table 2.
[0127] Table 2 Target data for inserting sub-tags
[0128]
[0129] Step 6: When tracing the source, first calculate the insertion position of the subtag in the decimal part: ; Then extract the decimal part dec +1 to +b-1 bits, traverse using the LSB algorithm, extract the basic least significant bit of the container, reconstruct the binary information, and finally integrate it into decimal form, that is, get the sub-tag inserted in the attribute value, repeat this step until the sub-tags inserted in all non-important attributes are extracted, and the extracted sub-tags are connected in sequence to form a complete tag. Finally, query according to the information in the tag index table, trace the source through the complete digital tag, and find the data holder.
[0130] If we trace the source based on the data in Table 3, we can calculate the insertion position of the sub-tag of attribute S1 according to the following formula: , for each digit after the third digit of the decimal part, extract the sub-label according to the least significant digit. Specifically, the digit after the third digit of the decimal part of the target data is 98869100010. Extract the least significant digit of the binary representation of each digit in turn, and get the corresponding sub-label 10001100010. Convert the binary to decimal to get Similarly, calculate the insertion position of sub-label L2 of sample attribute S2: , extract the least significant bit according to the LSB algorithm, and extract the least significant bit of the binary representation of each digit after the third digit of the decimal part in turn, and get the corresponding sub-label 110100010001. Convert the binary to decimal to get L2=3345; finally, concatenate the sub-labels to get the final digital label , and complete the traceability by querying the index table based on the digital label.
[0131] The data traceability based on attributes and labels in this embodiment realizes sensitive data traceability by splitting digital labels, calculating attribute weights and selecting non-important attributes, extracting corresponding sub-labels from the decimal part of non-important attributes and synthesizing digital labels. Since attributes with lower importance are selected for label insertion during the label insertion process, the potential impact of label insertion on data availability can be reduced; compared with other label insertion methods, it has stronger robustness, security and data analysis availability.
[0132] Figure 3 A schematic diagram of a device for processing data based on attributes and tags provided in an embodiment of the present application. The device for processing data based on attributes and tags provided in this embodiment includes:
[0133] A determination module 310 is used to determine the weight of each attribute of the source data, and determine the non-important attributes to be inserted into the tag according to the weight of each attribute;
[0134] A splitting module 320, configured to split the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute;
[0135] The processing module 330 is used to insert each sub-tag into the decimal part of the numerical value of the corresponding non-important attribute to obtain processed target data.
[0136] The device can realize multi-point insertion for multiple attributes by analyzing the weights of different attributes and inserting digital tags for unimportant attributes. Moreover, by splitting the digital tags into sub-tags and inserting them into the decimal parts of the numerical values of different unimportant attributes, the impact of inserting digital tags on source data can be reduced, and the integrity of digital tags can be avoided from being destroyed due to partial data forwarding, thereby improving the robustness and data security of digital tags.
[0137] Based on the above embodiment, the determination module 310 includes a weight determination unit, which is used to:
[0138] Initialize the weight of each attribute of the source data to 0;
[0139] In each iteration, for any attribute, the current weight of the attribute is subtracted from the difference of samples of the same type and added to the difference of samples of different types to obtain the weight of the attribute after this iteration, wherein the difference of samples of the same type is used to represent the value of the attribute of any source data and the value of samples of the same type as the source data. The numerical difference between the numerical values of the attribute of the nearest neighbor source data, and the different class sample difference is used to represent the attribute value of the source data and the different class of the source data. The numerical difference between the values of the attribute of the nearest neighbor source data, is a positive integer;
[0140] When the conditions are met, the iteration is stopped to obtain the updated weights of the attributes.
[0141] Based on the above embodiment, the splitting module 320 is used to:
[0142] When the number of the non-important attributes is at least two, normalizing the weights of the non-important attributes to obtain the proportions of the non-important attributes;
[0143] Multiplying the weight of each of the non-important attributes by the total length of the digital label to obtain the length of the sub-label corresponding to each of the non-important attributes;
[0144] The digital tag is split into a corresponding number of sub-tags according to the length of each sub-tag corresponding to the non-important attribute.
[0145] Based on the above embodiment, the device further includes:
[0146] A weight splitting module, used for splitting the value of each non-important attribute into an integer part and a decimal part;
[0147] Before inserting each subtag into the decimal part of the numerical value of the corresponding non-important attribute, a hash function is used to determine the target position of the decimal part of the numerical value of the corresponding subtag based on the key, the integer part and the serial number of the non-important attribute.
[0148] Based on the above embodiment, the processing module 330 is used to:
[0149] Convert the value of the sub-tag corresponding to the non-important attribute from decimal to binary;
[0150] For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, the least significant bit of the binary representation of the decimal place is inserted into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data.
[0151] On the basis of the above embodiment, inserting the least significant bit of the binary representation of the decimal place into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data includes:
[0152] If the value of the bit corresponding to the decimal place in the binary representation of the corresponding subtag is 0, the least significant bit of the binary representation of the decimal place is set to 0;
[0153] If the bit corresponding to the decimal place in the binary representation of the corresponding subtag has a value of 1, setting the least significant bit of the binary representation of the decimal place to 1;
[0154] If after each decimal point is inserted into the corresponding bit in the binary representation of the corresponding subtag to obtain a binary bit stream, there are still uninserted bits in the binary representation of the corresponding subtag, then the uninserted bits are inserted into the binary bit stream to obtain the processed target data.
[0155] Based on the above embodiment, the device further includes:
[0156] A generation module for generating digital labels based on a deep autoencoder;
[0157] The establishment module is used to establish a label index table, wherein the label index table is used to record the corresponding relationship between the digital label and the holder of the source data.
[0158] The device for processing data based on attributes and labels provided in the embodiments of the present application can be used to execute the method for processing data based on attributes and labels provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0159] Figure 4A schematic diagram of the structure of a data tracing device based on attributes and tags provided in an embodiment of the present application. The data tracing device based on attributes and tags provided in this embodiment includes:
[0160] An extraction module 410, configured to extract a corresponding sub-label according to a decimal part of a value of a non-important attribute of the target data, wherein the non-important attribute is determined according to a weight of each attribute of the target data;
[0161] A synthesis module 420, configured to synthesize a digital label according to the extracted sub-labels;
[0162] The source tracing module 430 is used to query the tag index table according to the digital tag to determine the source data corresponding to the target data.
[0163] The device achieves sensitive data traceability by splitting digital tags, calculating attribute weights and selecting non-important attributes, extracting corresponding sub-tags from the decimal part of non-important attributes and synthesizing digital tags. Since less important attributes are selected for label insertion during the label insertion process, the potential impact of label insertion on data availability can be reduced; compared with other label insertion methods, it has stronger robustness, security and data analysis availability.
[0164] Based on the above, the extraction module 420 is used to:
[0165] For each of the non-important attributes, split the value of the non-important attribute into an integer part and a decimal part;
[0166] Based on the key, the integer part and the serial number of the non-important attribute, a hash function is used to determine a target position where the corresponding sub-tag is inserted into the decimal part of the numerical value of the non-important attribute;
[0167] For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, the least significant bit of the binary representation of each decimal place is extracted in turn to obtain binary information and convert it into decimal representation to obtain the corresponding sub-label.
[0168] The attribute and label-based data tracing device provided in the embodiment of the present application can be used to execute the attribute and label-based data tracing method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0169] Figure 5A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 10 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, user equipment, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0170] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0171] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, wireless networks.
[0172] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above.
[0173] In some embodiments, the method of the above embodiment may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform any of the above embodiment methods in any other appropriate manner (e.g., by means of firmware).
[0174] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0175] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device for processing data or data traceability based on attributes and tags, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0176] In the context of the present application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0177] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 10 having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device 10. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0178] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0179] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0180] An embodiment of the present application also provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements a method for processing data based on attributes and labels or a method for tracing data based on attributes and labels as described in any of the above embodiments.
[0181] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0182] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for processing data based on attributes and tags, characterized in that: include: S110, determining the weight of each attribute of the source data, and determining the non-important attributes of the tags to be inserted according to the weight of each attribute; S120, splitting the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute; S130, inserting each sub-tag into the decimal part of the value of the corresponding non-important attribute to obtain processed target data; Before inserting each sub-label into the decimal part of the value of the corresponding non-important attribute to obtain the processed target data, it also includes: S1310: For each of the non-important attributes, split the value of the non-important attribute into an integer part and a decimal part; S1320, based on the key, the integer part and the serial number of the non-important attribute, using a hash function to determine a target position where the corresponding sub-tag is inserted into the decimal part of the numerical value of the non-important attribute; Insert each sub-label into the decimal part of the value of the corresponding non-important attribute to obtain the processed target data, including: S1340, converting the value of the sub-tag corresponding to the non-important attribute from decimal representation to binary representation; S1350. For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, insert the least significant bit of the binary representation of the decimal place into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data.
2. The method according to claim 1, characterized in that Determine the weight of each attribute of the source data, including: S1110, initializing the weight of each attribute of the source data to 0; S1120. In each iteration, for any attribute, the current weight of the attribute is subtracted from the sample difference of the same type and added to the sample difference of different types to obtain the weight of the attribute after this iteration, wherein the sample difference of the same type is used to represent the value of the attribute of any of the source data and the value of the attribute of the same type as the source data. The numerical difference between the numerical values of the attribute of the nearest neighbor source data, and the different class sample difference is used to represent the attribute value of the source data and the different class of the source data. The numerical difference between the values of the attribute of the nearest neighbor source data, is a positive integer; S1130. When the conditions are met, the iteration is stopped to obtain the updated weights of the attributes.
3. The method according to claim 1, characterized in that According to the number of non-important attributes and the weight of each non-important attribute, the digital label is split into a corresponding number of sub-labels, including: S1210: When the number of the non-important attributes is at least two, normalize the weight of each non-important attribute to obtain the proportion of each non-important attribute; S1220, respectively multiplying the proportion of each non-important attribute by the total length of the digital label to obtain the length of the sub-label corresponding to each non-important attribute; S1230: Split the digital tag into a corresponding number of sub-tags according to the length of each sub-tag corresponding to the non-important attribute.
4. The method according to claim 1, characterized in that Inserting the least significant bit of the binary representation of the decimal point into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data includes: If the value of the bit corresponding to the decimal place in the binary representation of the corresponding subtag is 0, the least significant bit of the binary representation of the decimal place is set to 0; If the bit corresponding to the decimal place in the binary representation of the corresponding subtag has a value of 1, setting the least significant bit of the binary representation of the decimal place to 1; If after each decimal point is inserted into the corresponding bit in the binary representation of the corresponding subtag to obtain a binary bit stream, there are still uninserted bits in the binary representation of the corresponding subtag, then the uninserted bits are inserted into the binary bit stream to obtain the processed target data.
5. A data tracing method based on attributes and tags, characterized in that: include: S210, extracting corresponding sub-labels according to the decimal part of the value of the non-important attribute of the target data, wherein the non-important attribute is determined according to the weight of each attribute of the target data; S220, synthesizing a digital tag according to the extracted sub-tags; S230, querying a tag index table according to the digital tag to determine source data corresponding to the target data; The corresponding sub-labels are extracted according to the decimal part of the numerical value of the non-important attribute of the target data, including: S2110, for each non-important attribute of the target data, split the value of the non-important attribute into an integer part and a decimal part; S2120, based on the key, the integer part and the serial number of the non-important attribute, using a hash function to determine the target position where the corresponding sub-tag is inserted into the decimal part of the value of the non-important attribute; S2130. For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, extract the least significant bit of the binary representation of each decimal place in turn, obtain binary information and convert it into decimal representation to obtain the corresponding sub-label.
6. A device for processing data based on attributes and tags, characterized in that: include: A determination module, used to determine the weight of each attribute of the source data, and determine the non-important attributes to be inserted into the tag according to the weight of each attribute; A splitting module, used for splitting the digital label into a corresponding number of sub-labels according to the number of non-important attributes and the weight of each non-important attribute; A processing module, used for inserting each sub-label into the decimal part of the value of the corresponding non-important attribute to obtain processed target data; A weight splitting module, used for splitting the value of each non-important attribute into an integer part and a decimal part; Before inserting each subtag into the decimal part of the value of the corresponding non-important attribute, a hash function is used to determine a target position of the decimal part of the value of the non-important attribute at which the corresponding subtag is to be inserted based on the key, the integer part, and the sequence number of the non-important attribute; The processing module is specifically used for: Convert the value of the sub-tag corresponding to the non-important attribute from decimal to binary; For each decimal place located after the target position in the decimal part of the numerical value of the non-important attribute, the least significant bit of the binary representation of the decimal place is inserted into the corresponding bit in the binary representation of the corresponding sub-tag to obtain the processed target data.
7. A data tracing device based on attributes and tags, characterized in that: include: An extraction module, configured to extract a corresponding sub-label according to a decimal part of a numerical value of a non-important attribute of the target data, wherein the non-important attribute is determined according to a weight of each attribute of the target data; A synthesis module, used for synthesizing digital labels according to the extracted sub-labels; A source tracing module, used to query a tag index table according to the digital tag to determine the source data corresponding to the target data; The extraction module is specifically used for: For each non-significant attribute of the target data, split the value of the non-significant attribute into an integer part and a decimal part; Based on the key, the integer part and the serial number of the non-important attribute, a hash function is used to determine the target position of the decimal part of the value of the non-important attribute into which the corresponding sub-tag is inserted; For each decimal place after the target position in the decimal part of the value of the non-important attribute, the least significant bit of the binary representation of each decimal place is extracted in turn to obtain the binary information and convert it into a decimal representation to obtain the corresponding sub-label.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing data based on attributes and labels as described in any one of claims 1 to 4 or the method for tracing data based on attributes and labels as described in claim 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for processing data based on attributes and labels as described in any one of claims 1 to 4 or the method for tracing data based on attributes and labels as described in claim 5 is implemented.
Citation Information
Patent Citations
Label processing method and device, computer equipment and storage medium
CN116304251A
Identification method and device for sensitive data of power regulation and control, equipment and storage medium
CN117633615A