Data processing method, device, equipment and medium

By generating and uploading K-anonymous data proofs in blockchain nodes, the problem of excessive storage burden on blockchain nodes is solved, and the data volume and storage burden are reduced are reduced.

CN116192516BActive Publication Date: 2025-08-15CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310189629.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2025-08-15
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

Blockchain nodes have excessive storage burden caused by large amounts of data upload.

Method used

By obtaining the data to be uploaded within the preset time period and its provider information, K-anonymous data is generated and spliced, the target data proof is generated, and it is uploaded to the blockchain node, reducing the amount of data and updating the existing data proof.

Benefits of technology

It effectively reduces the data storage burden of blockchain nodes, reduces data storage pressure, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192516B_ABST
    Figure CN116192516B_ABST
Patent Text Reader

Abstract

The present application relates to the field of blockchain, and more particularly to a data processing method, apparatus, device, and medium. The method is used to solve the problem in the prior art that a large amount of data is uploaded to a blockchain node, resulting in a heavy burden on the blockchain node. In an embodiment of the present application, after obtaining each data to be uploaded and the provider information of each data, the K-anonymous data corresponding to the provider information of each data is obtained. If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated. The target data certificate obtained after splicing corresponds to a unique K-anonymous data. Compared with uploading the data certificate and the K-anonymous data corresponding to each data to the blockchain node separately, the data volume is smaller, thereby reducing the amount of uploaded data and alleviating the data storage burden of the nodes in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain, and in particular to a data processing method, apparatus, device, and medium. Background Art

[0002] Blockchain is an anonymous, shared, decentralized distributed system. Nodes in a blockchain can be used to store data, making it tamper-resistant. Each node in the blockchain uploads data to the contract for evidence, meaning it adheres to the contract.

[0003] In actual application scenarios, when sharing data, the original data is hashed and encrypted to generate a data certificate. The data certificate is used as the only on-chain evidence of the data. The identity identification elements are used to generate a data index. Specifically, the K-anonymity privacy protection algorithm is used to generate K-anonymous data. The K-anonymous data and data certificate are uploaded to each node of the blockchain. When performing data queries, there are two stages: data index matching and data detail acquisition. Data index matching is to obtain the K-anonymous data of the data provider information and call the K-anonymous data recorded in the blockchain node; data detail acquisition is to obtain the corresponding data certificate based on the K-anonymous data.

[0004] Related technologies upload data to each blockchain node, specifically, data proof and K-anonymized data containing the data provider's information. However, as the number of blockchain nodes increases and the amount of data stored in each node grows, the amount of data stored in the node surges, creating a significant bottleneck in the database storing the data, placing a heavy burden on the node's data storage. Summary of the Invention

[0005] The embodiments of the present application provide a data processing method, apparatus, device, and medium to solve the problem in the prior art that a large amount of data is uploaded to the nodes of the blockchain, resulting in a heavy burden on the nodes of the blockchain.

[0006] An embodiment of the present application provides a data processing method, the method comprising:

[0007] Obtaining each data item to be uploaded and information about the provider of each data item received within a preset time period;

[0008] For each data, obtain K-anonymous data corresponding to the provider information of the data;

[0009] If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated. The target data certificate and the corresponding K-anonymous data are uploaded to the node of the blockchain.

[0010] Furthermore, the node that uploads the target data proof and the corresponding K-anonymous data to the blockchain includes:

[0011] If no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, the target data proof and the corresponding K-anonymous data are directly uploaded to the node of the blockchain;

[0012] If other data proofs corresponding to the K-anonymous data are stored in the node of the blockchain, the other data proofs corresponding to the K-anonymous data stored in the node of the blockchain are obtained, and the other data proofs and the target data proof are spliced together; and the spliced data proof and the K-anonymous data are uploaded to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proofs corresponding to the K-anonymous data.

[0013] Furthermore, after obtaining the K-anonymous data corresponding to the provider information of each data, and before concatenating each data having the same K-anonymous data, the method further includes:

[0014] For each data, a data proof of the data is generated, and the data is updated using the data proof; for each updated data, a subsequent step of splicing each data with the same K-anonymous data is performed.

[0015] Furthermore, the data proof for generating the data includes:

[0016] The data is processed using a hash operation to generate a first hash value, and the first hash value is used as data proof of the data.

[0017] Furthermore, the step of concatenating the same K-anonymous data includes:

[0018] According to the order of time when each data with the same K-anonymous data is received, each data with the same K-anonymous data is spliced in sequence.

[0019] Furthermore, the target data proof corresponding to the generated spliced data includes:

[0020] The concatenated data is processed using a hash operation to generate a second hash value, which is used as the target data proof.

[0021] Furthermore, the K-anonymous data corresponding to the provider information of the data obtained includes:

[0022] Get each sub-information of the preset type in the provider information;

[0023] Each sub-information is processed using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0024] The present application also provides a data processing device, comprising:

[0025] An acquisition module, configured to acquire each data item to be uploaded and the provider information of each data item received within a preset time period; and for each data item, acquire the K-anonymous data corresponding to the provider information of the data item;

[0026] A processing module is configured to concatenate each data with the same K-anonymous data if there is data with the same K-anonymous data, generate a target data certificate corresponding to the concatenated data, and upload the target data certificate and the corresponding K-anonymous data to a node of the blockchain.

[0027] Furthermore, the processing module is specifically configured to directly upload the target data proof and the corresponding K-anonymous data to the node of the blockchain if no other data proof is stored corresponding to the K-anonymous data in the node of the blockchain; if other data proof is stored corresponding to the K-anonymous data in the node of the blockchain, obtain the other data proof stored corresponding to the K-anonymous data in the node of the blockchain, and splice the other data proof and the target data proof; and upload the spliced data proof and the K-anonymous data to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proof stored corresponding to the K-anonymous data.

[0028] Furthermore, the processing module is also used to generate a data proof for each data, and use the data proof to update the data; for each updated data, perform the subsequent step of splicing each data with the same K-anonymous data.

[0029] Furthermore, the processing module is specifically configured to process the data using a hash operation to generate a first hash value, and use the first hash value as data proof of the data.

[0030] Furthermore, the processing module is specifically configured to sequentially splice each data with the same K-anonymous data according to the order of time at which each data with the same K-anonymous data is received.

[0031] Furthermore, the processing module is specifically configured to process the concatenated data using a hash operation to generate a second hash value, and use the second hash value as proof of the target data.

[0032] Furthermore, the acquisition module is specifically configured to acquire each sub-information of a preset type in the provider information; and process each sub-information using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0033] An embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is configured to implement the steps of any of the above-mentioned data processing methods when executing a computer program stored in the memory.

[0034] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the steps of any of the above-mentioned data processing methods when executed by a processor.

[0035] An embodiment of the present application further provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the steps of any of the above-mentioned data processing methods.

[0036] In an embodiment of the present application, each data item to be uploaded and the provider information of each data item received within a preset time period are obtained. For each data item, the K-anonymous data corresponding to the provider information of the data item is obtained. If there are data items with the same K-anonymous data, each data item with the same K-anonymous data is concatenated, and a target data certificate corresponding to the concatenated data item is generated. The target data certificate and the corresponding K-anonymous data are uploaded to a node of the blockchain. In an embodiment of the present application, after obtaining each data item to be uploaded and the provider information of each data item, the K-anonymous data corresponding to the provider information of each data item is obtained. If there are data items with the same K-anonymous data, each data item with the same K-anonymous data is concatenated, and a target data certificate corresponding to the concatenated data item is generated. The target data certificate obtained after concatenation corresponds to a unique K-anonymous data. Compared with uploading the data certificate and the K-anonymous data corresponding to each data item to the blockchain node separately, the data volume is smaller, thereby reducing the amount of uploaded data and alleviating the data storage burden of the nodes in the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1A schematic diagram of a data processing process provided in an embodiment of the present application;

[0039] Figure 2 A detailed schematic diagram of a data processing process provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present application, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present application without creative effort are intended to fall within the scope of protection of the present application.

[0043] In order to reduce the data storage burden of blockchain nodes, embodiments of the present application provide a data processing method, apparatus, device, and medium.

[0044] The data processing method includes: obtaining each data to be uploaded and the provider information of each data received within a preset time period; obtaining, for each data, K-anonymous data corresponding to the provider information of the data; if there is data with the same K-anonymous data, splicing each data with the same K-anonymous data, generating a target data certificate corresponding to the spliced data; uploading the target data certificate and the corresponding K-anonymous data to a node of a blockchain, thereby reducing the data uploaded to the node of the blockchain and alleviating the data storage burden of the node of the blockchain.

[0045] Example 1:

[0046] Figure 1 A data processing process diagram provided in an embodiment of the present application includes the following steps:

[0047] S101: Acquire each data item to be uploaded and the provider information of each data item received within a preset time period.

[0048] The data processing method provided in the embodiments of the present application is applied to an electronic device, which can be any node in a blockchain.

[0049] In order to upload data to the node of the blockchain, the data to be uploaded can be received, and the provider information of the data to be uploaded can be received, wherein the provider information refers to the relevant information of the organization providing the data, for example, it can include the name of the organization, the number of the organization, etc. In the embodiment of the present application, it can be that the staff of the organization operates the device or preset device used by themselves. The device or preset device used by the staff obtains the data to be uploaded and the provider information of the data by identifying the operation of the staff, and sends the obtained data to be uploaded and the provider information of the data. Specifically, it can be that the staff selects the storage location of the data to be uploaded on the preset page of the device or preset device used by themselves, and clicks the preset button. The device or preset device used by the staff can obtain the data to be uploaded in the storage location, and the device or preset device used by the staff can also obtain the information of the logged-in organization. The information of the organization is the provider information. The device or preset device used by the staff sends the obtained data to be uploaded and the provider information of the data, and the electronic device can receive the data to be uploaded and the provider information of the data.

[0050] In order to reduce the data storage burden of the nodes in the blockchain, each data to be uploaded and the provider information of each data received within the preset time period can be obtained. That is to say, after receiving the data, the data proof and other information of the data are not directly uploaded to the node of the blockchain. Instead, each data to be uploaded and the provider information of each data received within the preset time period are processed, and the processing results are uploaded to the node of the blockchain. The preset time period is each corresponding time period obtained by dividing according to the preset period. Each time period is sequentially used as a preset time period, and each data to be uploaded received within the preset time period is processed according to the data processing method provided in the embodiment of the present application.

[0051] S102: For each piece of data, obtain K-anonymous data corresponding to the provider information of the data.

[0052] After obtaining each piece of data to be uploaded and the provider information of each piece of data, K-anonymous data corresponding to the provider information of each piece of data to be uploaded can be obtained. K-anonymous data is also called an identification factor summary. Specifically, how to obtain K-anonymous data corresponding to the provider information is a prior art and will not be further described here.

[0053] S103: If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated, and the target data certificate and the corresponding K-anonymous data are uploaded to the node of the blockchain.

[0054] To reduce the data storage burden on blockchain nodes, after obtaining K-anonymous data for the provider information of each data item to be uploaded, each data item with the same K-anonymous data can be grouped together. A determination is then made as to whether a group contains at least two data items. If a group contains at least two data items, it is determined that data items with the same K-anonymous data exist. The data items within the obtained groups with the same K-anonymous data are then concatenated. Specifically, each data item with the same K-anonymous data can be randomly concatenated to generate the concatenated data. After generating the concatenated data, a data certificate corresponding to the concatenated data can be generated, referred to as the target data certificate. The specific method for generating a data certificate corresponding to a data item is well known in the art and will not be further described here. The target data certificate and the corresponding K-anonymous data can then be uploaded to the blockchain node.

[0055] It should be noted that no matter how long the data length of a certain data is, the data length of the generated data proof is the same. Therefore, the target data proof corresponding to the data after splicing each data with the same K-anonymous data is shorter in data length and smaller in data volume than the data proof of each data with the same K-anonymous data. Splicing each data with the same K-anonymous data and uploading the target data proof corresponding to the spliced data and the corresponding K-anonymous data to the node of the blockchain can reduce the data length uploaded to the node of the blockchain, which is equivalent to reducing the data volume of the contract. Compared with uploading the corresponding K-anonymous data for each data with the same K-anonymous data, in the embodiment of the present application, only K-anonymous data is uploaded once, so the pressure on the database of the node of the blockchain can be further reduced, thereby alleviating the data storage burden of the node of the blockchain.

[0056] Since, in the embodiment of the present application, after obtaining each data to be uploaded and the provider information of each data, the K-anonymous data corresponding to the provider information of each data is obtained, if there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced, and a target data certificate corresponding to the spliced data is generated. In this way, the target data certificate obtained after splicing corresponds to a unique K-anonymous data. Compared with uploading the data certificate and K-anonymous data to the node of the blockchain for each data separately, the data amount is smaller, thereby reducing the amount of uploaded data and alleviating the data storage burden of the nodes in the blockchain.

[0057] Example 2:

[0058] In order to reduce the data storage burden of the nodes of the blockchain, based on the above embodiment, in the embodiment of the present application, the node that uploads the target data proof and the corresponding K-anonymous data to the blockchain includes:

[0059] If no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, the target data proof and the corresponding K-anonymous data are directly uploaded to the node of the blockchain;

[0060] If other data proofs corresponding to the K-anonymous data are stored in the node of the blockchain, the other data proofs corresponding to the K-anonymous data stored in the node of the blockchain are obtained, and the other data proofs and the target data proof are spliced together; and the spliced data proof and the K-anonymous data are uploaded to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proofs corresponding to the K-anonymous data.

[0061] In actual application scenarios, the nodes of the blockchain may already have K-anonymous data and corresponding other data proofs stored. At this time, in order to further reduce the data storage burden of the blockchain nodes, the other data proofs corresponding to the K-anonymous data stored in the blockchain nodes and the target data proofs can be spliced together, thereby avoiding repeated storage of the same K-anonymous data and further reducing the data storage burden of the blockchain nodes.

[0062] In order to further reduce the data storage burden of blockchain nodes, after generating the target data proof corresponding to the spliced data, it can be determined whether other data proofs corresponding to the K-anonymous data are stored in the blockchain node. If no other data proofs corresponding to the K-anonymous data are stored in the blockchain node, there is no need to splice the target data proof with other data proofs. The target data proof and the corresponding K-anonymous data can be directly uploaded to the blockchain node.

[0063] To further reduce the data storage burden on blockchain nodes, if other data proofs corresponding to the K-anonymous data are stored in the blockchain node, the other data proofs stored in the blockchain node for the K-anonymous data can be obtained. This is equivalent to calling the original data proof upload method to obtain the corresponding other data proofs. After obtaining the other data proofs, the other data proofs can be concatenated with the target data proof. Specifically, the target data proof can be concatenated with the other data proof to obtain a concatenated data proof. After obtaining the concatenated data proof, the concatenated data proof and the K-anonymous data can be uploaded to the blockchain node. After receiving the concatenated data proof and the K-anonymous data, the blockchain node can use the concatenated data proof to update the other data proofs stored corresponding to the K-anonymous data.

[0064] After receiving the sent K-anonymous data and data proof, which can be either the target data proof or the spliced data proof, a specific blockchain node can first determine whether the received K-anonymous data is stored in its own database. If the received K-anonymous data is not stored, the received K-anonymous data and the corresponding data proof are saved. If the received K-anonymous data is stored, the received data proof is used to update the data proof corresponding to the K-anonymous data.

[0065] In the blockchain field, it is possible to ensure that data on the chain cannot be tampered with by devices other than the blockchain nodes. However, each piece of data is stored separately, which results in a heavy data storage burden on the blockchain nodes. In the embodiment of the present application, other data proofs and target data corresponding to K-anonymous data are spliced and uploaded to the blockchain nodes, which can further reduce the data storage burden of the blockchain nodes, that is, reduce the amount of contract data. At the same time, it reduces the pressure of contract data maintenance, allowing more focus on the contract function itself.

[0066] Example 3:

[0067] In order to accurately upload each data to be uploaded, based on the above embodiments, in the embodiment of the present application, after obtaining the K-anonymous data corresponding to the provider information of each data, and before splicing each data with the same K-anonymous data, the method further includes:

[0068] For each data, a data proof of the data is generated, and the data is updated using the data proof; for each updated data, a subsequent step of splicing each data with the same K-anonymous data is performed.

[0069] In actual application scenarios, there may be a need to query data. If each data with the same K-anonymous data is directly spliced together, the data length of each data may be different. Therefore, when querying the data, the spliced data cannot be effectively distinguished. In an embodiment of the present application, before splicing each data with the same K-anonymous data together, a data proof for each data can be generated to ensure that the data length of each data proof is the same, thereby facilitating subsequent data acquisition when needed.

[0070] Specifically, in an embodiment of the present application, after obtaining the K-anonymous data corresponding to the provider information of each data to be uploaded, a data proof of the data can be generated for each data. Specifically, how to generate a data proof of a certain data is a prior art and will not be repeated here. After generating the data proof of the data, the data proof of the data can be used to update the data. In this way, each updated data can be obtained. After obtaining each updated data, the subsequent step of splicing each data with the same K-anonymous data can be executed for each updated data.

[0071] In order to accurately obtain data proof of the data, based on the above embodiments, in the embodiment of the present application, the data proof of the data generated includes:

[0072] The data is processed using a hash operation to generate a first hash value, and the first hash value is used as data proof of the data.

[0073] In order to accurately obtain data proof of data, a hash operation can be used to process each data to be uploaded to obtain a corresponding generated hash value. For easy distinction, the hash value can be called a first hash value, and the first hash value can be used as data proof of the data. Specifically, how to use a hash operation to process a certain data is an existing technology and will not be repeated here.

[0074] Example 4:

[0075] In order to accurately splice each data, based on the above embodiments, in the embodiment of the present application, the splicing of each data with the same K-anonymous data includes:

[0076] According to the order of time when each data with the same K-anonymous data is received, each data with the same K-anonymous data is spliced in sequence.

[0077] To accurately concatenate each data item, after obtaining each data item with the same K-anonymous data, each data item can be sorted according to the order in which each data item with the same K-anonymous data was received. Based on the sorting result, each data item with the same K-anonymous data can be concatenated sequentially to form a single string. Specifically, after receiving the data to be uploaded, the correspondence between the data item and the time of receipt can be saved. When concatenating each data item to be uploaded, the time corresponding to each data item can be obtained, and each data item can be sorted according to the order in which each time item was obtained.

[0078] For example, the sorting result after sorting each data is: proof1, proof2...proofn, then the concatenated data is proof1+proof2+...+proofn.

[0079] In order to accurately obtain the target data proof, based on the above embodiments, in the embodiment of the present application, the target data proof corresponding to the spliced data is generated including:

[0080] The concatenated data is processed using a hash operation to generate a second hash value, which is used as the target data proof.

[0081] In order to accurately obtain the target data proof, after obtaining the spliced data, a hash operation can be used to process the spliced data to obtain the corresponding hash value. For easy distinction, the hash value can be called a second hash value, and the second hash value can be used as the target data proof. Specifically, how to use a hash operation to process a certain data is an existing technology and will not be repeated here.

[0082] Example 5:

[0083] In order to accurately obtain K-anonymous data, based on the above embodiments, in the embodiment of the present application, the K-anonymous data corresponding to the provider information of the data obtained includes:

[0084] Get each sub-information of the preset type in the provider information;

[0085] Each sub-information is processed using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0086] In actual application scenarios, the provider information of the received data may contain some useless information. In order to accurately obtain the K-anonymous data corresponding to the data, the useless information in the provider information can be filtered out first, and the corresponding K-anonymous data can be obtained based on the information retained after filtering, thereby ensuring that the obtained K-anonymous data is more accurate.

[0087] To accurately obtain K-anonymous data, the preset types of sub-information in the retained provider information are locally stored. Each sub-information of the preset types in the provider information of the data can be first obtained. There may be more than one preset type. In this case, for each preset type, the sub-information of the preset type in the provider information of the data can be obtained, thereby obtaining the sub-information corresponding to each preset type. Specifically, the device or preset device used by the staff member can obtain the information of the logged-in organization. This organization information is the provider information, which includes multiple sub-information. When the staff member fills in the logged-in organization information on the device or preset device used by the staff member, they will fill in the corresponding sub-information in the corresponding entry position for each type of information. Therefore, each sub-information and the corresponding type can be obtained, and then each sub-information of the preset type in the provider information can be obtained. After obtaining each sub-information, each sub-information can be processed using a K-anonymity privacy protection algorithm, and the processing result can be determined as the K-anonymity data corresponding to the data, thereby obtaining the K-anonymity data corresponding to the data. Specifically, how to process each sub-information using the K-anonymity privacy protection algorithm is a prior art and will not be further described here. Among them, the K-anonymity privacy protection algorithm is a standard for measuring the security of data publishing. It requires that the published data has at least K records that are indistinguishable in identifiers. Therefore, the number of retained sub-information is at least K, and K can be any positive integer greater than 1.

[0088] Figure 2 A detailed schematic diagram of a data processing process provided in an embodiment of the present application, the process includes the following steps:

[0089] S201: Acquire each data item to be uploaded and information about the provider of each data item received within a preset time period.

[0090] S202: For each data, obtain the K-anonymous data corresponding to the provider information of the data, and obtain the data proof corresponding to the data.

[0091] S203: splicing the data proofs of each data with the same K-anonymous data in sequence according to the order of time when each data with the same K-anonymous data was received.

[0092] S204: Generate target data proof of the spliced data.

[0093] S205: Determine whether other data proof corresponding to the K-anonymous data is stored in the node of the blockchain. If so, execute S206; if not, execute S207.

[0094] S206: Obtain other data proofs stored corresponding to the K-anonymous data in the node of the blockchain, and execute S208.

[0095] S207: Upload the target data proof and the corresponding K-anonymous data to the node of the blockchain.

[0096] S208: The obtained other data proofs and the target data proof are spliced together, and the spliced data proofs and the corresponding K-anonymous data are uploaded to the node of the blockchain.

[0097] Example 6:

[0098] Figure 3 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application, the device comprising:

[0099] The acquisition module 301 is used to acquire each data to be uploaded and the provider information of each data received within a preset time period; for each data, acquire the K-anonymous data corresponding to the provider information of the data;

[0100] Processing module 302 is configured to concatenate each piece of data with the same K-anonymous data if there is data with the same K-anonymous data, generate a target data certificate corresponding to the concatenated data, and upload the target data certificate and the corresponding K-anonymous data to a node of the blockchain.

[0101] In one possible implementation, the processing module 302 is specifically configured to, if no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, directly upload the target data proof and the corresponding K-anonymous data to the node of the blockchain; if other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, obtain the other data proof corresponding to the K-anonymous data stored in the node of the blockchain, and splice the other data proof and the target data proof; and upload the spliced data proof and the K-anonymous data to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proof stored corresponding to the K-anonymous data.

[0102] In a possible implementation, the processing module 302 is further configured to generate a data certificate for each data, and use the data certificate to update the data; and for each updated data, perform a subsequent step of splicing each data with the same K-anonymous data.

[0103] In a possible implementation, the processing module 302 is specifically configured to process the data using a hash operation to generate a first hash value, and use the first hash value as data proof of the data.

[0104] In a possible implementation, the processing module 302 is specifically configured to sequentially concatenate each data item with the same K-anonymous data according to the order of time at which each data item with the same K-anonymous data is received.

[0105] In a possible implementation, the processing module 302 is specifically configured to process the concatenated data using a hash operation to generate a second hash value, and use the second hash value as target data proof.

[0106] In a possible implementation, the acquisition module 301 is specifically configured to acquire each sub-information of a preset type in the provider information; and process each sub-information using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0107] Example 7:

[0108] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Based on the above embodiments, the embodiment of the present application further provides an electronic device, such as Figure 4 As shown, it includes: a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;

[0109] The memory 403 stores a computer program. When the program is executed by the processor 401, the processor 401 performs the following steps:

[0110] Obtaining each data item to be uploaded and information about the provider of each data item received within a preset time period;

[0111] For each data, obtain K-anonymous data corresponding to the provider information of the data;

[0112] If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated. The target data certificate and the corresponding K-anonymous data are uploaded to the node of the blockchain.

[0113] Furthermore, the processor 401 is specifically configured to directly upload the target data proof and the corresponding K-anonymous data to the node of the blockchain if no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain;

[0114] If other data proofs corresponding to the K-anonymous data are stored in the node of the blockchain, the other data proofs corresponding to the K-anonymous data stored in the node of the blockchain are obtained, and the other data proofs and the target data proof are spliced together; and the spliced data proof and the K-anonymous data are uploaded to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proofs corresponding to the K-anonymous data.

[0115] Furthermore, the processor 401 is further configured to generate a data certificate for each data, and use the data certificate to update the data; and for each updated data, perform a subsequent step of splicing each data with the same K-anonymous data.

[0116] Furthermore, the processor 401 is specifically configured to process the data using a hash operation to generate a first hash value, and use the first hash value as data proof of the data.

[0117] Furthermore, the processor 401 is specifically configured to sequentially splice each data with the same K-anonymous data according to the order of time at which each data with the same K-anonymous data is received.

[0118] Furthermore, the processor 401 is specifically configured to process the concatenated data using a hash operation to generate a second hash value, and use the second hash value as proof of the target data.

[0119] Furthermore, the processor 401 is specifically configured to obtain each sub-information of a preset type in the provider information;

[0120] Each sub-information is processed using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0121] The communication bus mentioned in the server above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0122] The communication interface is used for communication between the above electronic device and other devices.

[0123] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. Alternatively, the memory may be at least one storage device located away from the processor.

[0124] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0125] Example 8:

[0126] Based on the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device. When the program is executed on the electronic device, the electronic device implements the following steps:

[0127] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps:

[0128] Obtaining each data item to be uploaded and information about the provider of each data item received within a preset time period;

[0129] For each data, obtain K-anonymous data corresponding to the provider information of the data;

[0130] If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated. The target data certificate and the corresponding K-anonymous data are uploaded to the node of the blockchain.

[0131] In one possible implementation, the node uploading the target data proof and the corresponding K-anonymous data to the blockchain includes:

[0132] If no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, the target data proof and the corresponding K-anonymous data are directly uploaded to the node of the blockchain;

[0133] If other data proofs corresponding to the K-anonymous data are stored in the node of the blockchain, the other data proofs corresponding to the K-anonymous data stored in the node of the blockchain are obtained, and the other data proofs and the target data proof are spliced together; and the spliced data proof and the K-anonymous data are uploaded to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proofs corresponding to the K-anonymous data.

[0134] In a possible implementation, after obtaining the K-anonymous data corresponding to the provider information of each data, and before concatenating each data having the same K-anonymous data, the method further includes:

[0135] For each data, a data proof of the data is generated, and the data is updated using the data proof; for each updated data, a subsequent step of splicing each data with the same K-anonymous data is performed.

[0136] In one possible implementation, the data proof for generating the data includes:

[0137] The data is processed using a hash operation to generate a first hash value, and the first hash value is used as data proof of the data.

[0138] In a possible implementation, the step of concatenating the same K-anonymous data includes:

[0139] According to the order of time when each data with the same K-anonymous data is received, each data with the same K-anonymous data is spliced in sequence.

[0140] In one possible implementation, generating a target data certificate corresponding to the spliced data includes:

[0141] The concatenated data is processed using a hash operation to generate a second hash value, which is used as the target data proof.

[0142] In a possible implementation, obtaining the K-anonymous data corresponding to the provider information of the data includes:

[0143] Get each sub-information of the preset type in the provider information;

[0144] Each sub-information is processed using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

[0145] Example 9:

[0146] An embodiment of the present application further provides a computer program product, which, when executed by a computer, implements the data processing method described in any of the above method embodiments applied to an electronic device.

[0147] The above embodiments may be implemented in whole or in part through software, hardware, firmware, or any combination thereof, and may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions that, when loaded and executed on a computer, fully or partially generate the processes or functions described in the embodiments of the present application.

[0148] Since, in the embodiment of the present application, after obtaining each data to be uploaded and the provider information of each data, the K-anonymous data corresponding to the provider information of each data is obtained, if there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced, and a target data certificate corresponding to the spliced data is generated. In this way, the target data certificate obtained after splicing corresponds to a unique K-anonymous data. Compared with uploading the data certificate and K-anonymous data to the node of the blockchain for each data separately, the data amount is smaller, thereby reducing the amount of uploaded data and alleviating the data storage burden of the nodes in the blockchain.

[0149] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. 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.

[0151] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0153] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: The method comprises: Obtaining each data item to be uploaded and information about the provider of each data item received within a preset time period; For each data, obtain K-anonymous data corresponding to the provider information of the data; If there is data with the same K-anonymous data, each data with the same K-anonymous data is spliced together, and a target data certificate corresponding to the spliced data is generated. The target data certificate and the corresponding K-anonymous data are uploaded to the node of the blockchain.

2. The method according to claim 1, characterized in that The node that uploads the target data proof and the corresponding K-anonymous data to the blockchain includes: If no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, the target data proof and the corresponding K-anonymous data are directly uploaded to the node of the blockchain; If other data proofs corresponding to the K-anonymous data are stored in the node of the blockchain, the other data proofs corresponding to the K-anonymous data stored in the node of the blockchain are obtained, and the other data proofs and the target data proof are spliced together; and the spliced data proof and the K-anonymous data are uploaded to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proofs corresponding to the K-anonymous data.

3. The method according to claim 1, characterized in that After obtaining the K-anonymous data corresponding to the provider information of each data, and before concatenating each data having the same K-anonymous data, the method further includes: For each data, a data proof of the data is generated, and the data is updated using the data proof; for each updated data, a subsequent step of splicing each data with the same K-anonymous data is performed.

4. The method according to claim 3, characterized in that The data proof for generating the data includes: The data is processed using a hash operation to generate a first hash value, and the first hash value is used as data proof of the data.

5. The method according to claim 1, wherein The step of concatenating the same K-anonymous data includes: According to the order of time when each data with the same K-anonymous data is received, each data with the same K-anonymous data is spliced in sequence.

6. The method according to claim 1, characterized in that The target data proof corresponding to the generated spliced data includes: The concatenated data is processed using a hash operation to generate a second hash value, which is used as the target data proof.

7. The method according to claim 1, characterized in that The K-anonymous data corresponding to the provider information of the data includes: Get each sub-information of the preset type in the provider information; Each sub-information is processed using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

8. A data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire each data item to be uploaded and the provider information of each data item received within a preset time period; and for each data item, acquire the K-anonymous data corresponding to the provider information of the data item; A processing module is configured to concatenate each data with the same K-anonymous data if there is data with the same K-anonymous data, generate a target data certificate corresponding to the concatenated data, and upload the target data certificate and the corresponding K-anonymous data to a node of the blockchain.

9. The device according to claim 8, characterized in that The processing module is specifically configured to, if no other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, directly upload the target data proof and the corresponding K-anonymous data to the node of the blockchain; if other data proof corresponding to the K-anonymous data is stored in the node of the blockchain, obtain the other data proof corresponding to the K-anonymous data stored in the node of the blockchain, and splice the other data proof and the target data proof; and upload the spliced data proof and the K-anonymous data to the node of the blockchain, so that the node of the blockchain uses the spliced data proof to update the other data proof stored corresponding to the K-anonymous data.

10. The device according to claim 8, characterized in that The processing module is further configured to generate a data certificate for each data, and use the data certificate to update the data; and for each updated data, perform a subsequent step of splicing each data with the same K-anonymous data.

11. The device according to claim 10, characterized in that The processing module is specifically configured to process the data using a hash operation to generate a first hash value, and use the first hash value as data proof of the data.

12. The device according to claim 8, characterized in that The processing module is specifically configured to sequentially splice each data with the same K-anonymous data according to the order of time at which each data with the same K-anonymous data is received.

13. The device according to claim 8, characterized in that The processing module is specifically configured to process the spliced data using a hash operation to generate a second hash value, and use the second hash value as proof of target data.

14. The device according to claim 8, characterized in that The acquisition module is specifically used to obtain each sub-information of a preset type in the provider information; and process each sub-information using a K-anonymity privacy protection algorithm to obtain K-anonymity data corresponding to the data.

15. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is configured to implement the steps of the data processing method according to any one of claims 1 to 7 when executing a computer program stored in the memory.

16. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the data processing method according to any one of claims 1 to 7.

17. A computer program product, characterized in that The computer program product comprises: computer program code, which, when executed on a computer, enables the computer to execute the steps of the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Generalization-based location privacy protection method

    CN108111968A

  • Data storage and verification method and device

    CN110287724A