Data processing method and device, equipment, medium and product

By pre-determining pre-encryption parameters and distributed storage on IoT devices, combined with a lightweight blockchain consensus mechanism, the problems of high computational overhead and data bloat in IoT devices are solved, achieving low-power, high-efficiency encryption and decryption and fine-grained access control.

CN121508933APending Publication Date: 2026-02-10CRRC TANGSHAN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511608373.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

The encryption algorithms and system architecture designs of existing IoT terminal devices are not lightweight enough, resulting in high computational overhead and making it difficult to meet the data security processing and transmission needs of resource-constrained IoT devices.

Method used

By having an authorized institution determine the pre-encryption parameters during the initialization phase, the data owner can call these parameters for attribute-based encryption when online. This, combined with distributed storage and a lightweight blockchain consensus mechanism, enables fast scalar computation and low-cost storage.

Benefits of technology

It significantly reduces the computational overhead of IoT devices, enables efficient encryption and decryption under low power conditions, avoids blockchain data bloat, and maintains fine-grained access control capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508933A_ABST
    Figure CN121508933A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, equipment, a medium and a product, and relates to the technical field of data processing. The method comprises the following steps: determining a pre-encryption parameter for attribute-based encryption processing based on a system public parameter through an authorization mechanism; when the data owner is in the online state, sending the pre-encryption parameter to the data owner; a data owner only needs to call the pre-encryption parameter when the access strategy corresponding to the shared data is subjected to attribute-based encryption processing, the scalar operation can be rapidly completed, the defect that in the prior art, multiple times of scalar operation needs to be completed in real time, and consequently the calculation overhead is large is overcome, and the user experience is improved. According to the method, while the fine-grained access control capability is maintained, the computing overhead of the Internet of Things equipment end is reduced, and efficient encryption and decryption under the condition of low power consumption are realized; by storing the policy ciphertext and the address hash value on the block chain and storing the ciphertext on the distributed storage system, low-cost distributed storage is realized, and block chain data expansion is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data processing method, apparatus, device, medium and product. Background Technology

[0002] The rapid development of IoT technology has generated massive amounts of data, and the secure storage and controlled sharing of this data are crucial for realizing applications such as smart cities and the Industrial Internet. However, IoT terminal devices generally have limited resources, such as weak computing power, small storage space, and limited battery power, which poses a serious challenge to their data security processing and transmission capabilities.

[0003] When facing the need for secure storage and sharing of resource-constrained devices in the Internet of Things (IoT) environment, existing technologies mainly study the application of the combination of blockchain and encryption technology in the field of data sharing. The execution process is as follows: the original IoT data is encrypted using encryption algorithms; the encrypted data is stored in a distributed file system or cloud platform, while metadata such as the hash digest, access control policy or data integrity tag of the data is anchored on the blockchain; finally, the automated verification and authorization management of access permissions is realized through smart contracts.

[0004] However, the encryption algorithms and system architecture designs of the above schemes are not lightweight enough. For example, the core computational complexity of the proxy re-encryption technology widely used in access control is high, resulting in a large computational overhead. Even if some improved schemes use elliptic curve algorithms to reduce some of the burden, these computations still constitute an unbearable performance bottleneck for IoT terminals with extremely limited CPU processing power, memory space and battery capacity. Summary of the Invention

[0005] This application provides a data processing method, apparatus, device, medium, and product to address the shortcomings of existing technologies, such as accidental touches, lack of response, and low touch accuracy.

[0006] In a first aspect, this application provides a data processing method applied to a data owner, the method comprising:

[0007] In response to shared data sent by IoT devices, determine the access policy corresponding to the shared data;

[0008] Based on the pre-encryption parameters, the access policy is subjected to attribute-based encryption to obtain the corresponding policy ciphertext, wherein the pre-encryption parameters are determined by the authorizing authority when the data owner is offline;

[0009] The shared data is encrypted to obtain corresponding ciphertext, and the ciphertext is uploaded to the distributed storage system.

[0010] The system receives the address hash value fed back by the distributed storage system and uploads the policy ciphertext and the address hash value to the authorized institution, so that the authorized institution uploads the policy ciphertext and the address hash value to the blockchain.

[0011] In one possible implementation, the access policy is a matrix structure, where there is a mapping relationship between the rows of the access policy and the attributes in the system attribute set. The step of performing attribute-based encryption processing on the access policy based on pre-encryption parameters to obtain the corresponding policy ciphertext includes:

[0012] Randomly generate master key parameters, and determine ciphertext components based on the master key parameters and the pre-encryption parameters;

[0013] Based on the master key parameters, the mapping relationship between rows and attributes in the access policy, the pre-encryption parameters, and the ciphertext components, the corresponding policy ciphertext set is determined.

[0014] In one possible implementation, encrypting the shared data to obtain corresponding ciphertext and uploading the ciphertext to a distributed storage system includes:

[0015] Generate a symmetric key corresponding to the ciphertext component, and use the symmetric key to encrypt the shared data to obtain the ciphertext;

[0016] Calculate the hash value corresponding to the shared data;

[0017] The ciphertext and the hash value are uploaded to the distributed storage system.

[0018] Secondly, this application provides a data processing method applied to an authorized agency, the method comprising:

[0019] During the initialization phase, in response to security parameters, system common parameters are generated, and pre-encrypted parameters corresponding to the common parameters are generated.

[0020] When the data owner is online, the pre-encryption parameters are sent to the data owner so that the data owner can perform attribute-based encryption on the access policy corresponding to the shared data based on the pre-encryption parameters to obtain the corresponding policy ciphertext.

[0021] Receive the policy ciphertext and address hash value sent by the data owner, wherein the address hash value is used to indicate the storage address of the shared data in the distributed storage system;

[0022] The policy ciphertext and the address hash value are uploaded to the blockchain.

[0023] In one possible implementation, uploading the policy ciphertext and the address hash value to the blockchain includes:

[0024] The smart contract is invoked to broadcast the policy ciphertext and the address hash value;

[0025] After the smart contract consensus is reached, the corresponding blockchain record address is determined;

[0026] The blockchain employs a lightweight consensus mechanism to process the smart contract. The blockchain includes committee nodes and non-committee nodes. The committee nodes are used to reach consensus on the smart contract, and the non-committee nodes are used to verify the smart contract.

[0027] In one possible implementation, the method further includes:

[0028] Obtain a data sharing request sent by a data accessor, the data sharing request including: the blockchain record address;

[0029] Based on the blockchain record address, the policy ciphertext and the address hash value are obtained from the blockchain and sent to the data accessor. This allows the data accessor to generate a symmetric key corresponding to the ciphertext component based on the policy ciphertext and the pre-encryption parameters. Based on the address hash value, the accessor obtains the corresponding ciphertext and hash value from the distributed storage system and decrypts the ciphertext using the symmetric key to obtain the shared data. The hash value is used to verify the integrity of the shared data.

[0030] Thirdly, this application provides a data processing apparatus for use with a data owner, the apparatus comprising:

[0031] The determination module is used to determine the access policy corresponding to the shared data in response to the shared data sent by the IoT device;

[0032] The processing module is used to perform attribute-based encryption processing on the access policy based on pre-encryption parameters to obtain the corresponding policy ciphertext, wherein the pre-encryption parameters are determined by the authorizing authority when the data owner is offline; and to encrypt the shared data to obtain the corresponding ciphertext.

[0033] The transceiver module is used to upload the ciphertext to the distributed storage system; and to receive the address hash value fed back by the distributed storage system, and upload the policy ciphertext and the address hash value to the authorizing institution, so that the authorizing institution uploads the policy ciphertext and the address hash value to the blockchain.

[0034] In one possible implementation, the access policy is a matrix structure, and there is a mapping relationship between the rows of the access policy and the attributes in the system attribute set. The determining module is specifically used to randomly generate master key parameters, and determine ciphertext components based on the master key parameters and the pre-encryption parameters; and determine the corresponding policy ciphertext set based on the master key parameters, the mapping relationship between the rows and attributes in the access policy, the pre-encryption parameters, and the ciphertext components.

[0035] In one possible implementation, the processing module is specifically used to generate a symmetric key corresponding to the ciphertext component, and to encrypt the shared data using the symmetric key to obtain the ciphertext; and to calculate the hash value corresponding to the shared data.

[0036] The transceiver module is specifically used to upload the ciphertext and the hash value to the distributed storage system.

[0037] Fourthly, this application provides a data processing apparatus for use by an authorized agency, the apparatus comprising:

[0038] The processing module is used to generate system common parameters in response to security parameters during the initialization phase, and to generate pre-encrypted parameters corresponding to the common parameters;

[0039] The transceiver module is used to send the pre-encrypted parameters to the data owner when the data owner is online, so that the data owner can perform attribute-based encryption processing on the access policy corresponding to the shared data based on the pre-encrypted parameters to obtain the corresponding policy ciphertext.

[0040] The transceiver module is further configured to receive the policy ciphertext and address hash value sent by the data owner, the address hash value being used to indicate the storage address of the shared data in the distributed storage system; and to upload the policy ciphertext and address hash value to the blockchain.

[0041] In one possible implementation, the apparatus further includes: a determining module;

[0042] The transceiver module is specifically used to invoke the smart contract to broadcast the policy ciphertext and the address hash value;

[0043] The determining module is used to determine the corresponding blockchain record address after the smart contract consensus is passed;

[0044] The blockchain employs a lightweight consensus mechanism to process the smart contract. The blockchain includes committee nodes and non-committee nodes. The committee nodes are used to reach consensus on the smart contract, and the non-committee nodes are used to verify the smart contract.

[0045] In one possible implementation, the transceiver module is further configured to acquire a data sharing request sent by a data accessor, the data sharing request including: the blockchain record address; and based on the blockchain record address, to acquire the policy ciphertext and the address hash value from the blockchain, and send the policy ciphertext and the address hash value to the data accessor, so that the data accessor generates a symmetric key corresponding to the ciphertext component based on the policy ciphertext and the pre-encryption parameters, acquires the corresponding ciphertext and hash value from the distributed storage system based on the address hash value, and decrypts the ciphertext based on the symmetric key to obtain the shared data, wherein the hash value is used to perform integrity verification on the shared data.

[0046] Fifthly, this application provides an Internet of Things (IoT) device, including: a processor, and a memory communicatively connected to the processor;

[0047] The memory stores computer-executed instructions;

[0048] The processor executes computer execution instructions stored in the memory to implement the method described in the first aspect and / or various possible implementations of the first aspect.

[0049] Sixthly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0050] The memory stores computer-executed instructions;

[0051] The processor executes computer execution instructions stored in the memory to implement the method described in the second aspect and / or various possible implementations of the second aspect.

[0052] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the first aspect and / or various possible implementations of the first aspect, or the second aspect and / or various possible implementations of the second aspect.

[0053] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect and / or various possible implementations of the first aspect, or the second aspect and / or various possible implementations of the second aspect.

[0054] The data processing method, apparatus, device, medium, and product provided in this application determine the pre-encryption parameters for attribute-based encryption processing based on system public parameters during the initialization phase through an authorized agency. When the data owner is online, the pre-encryption parameters are sent to the data owner. When uploading data, the data owner only needs to call the pre-encryption parameters when performing attribute-based encryption processing on the access policy corresponding to the shared data to quickly complete scalar operations. This avoids the shortcomings of existing technologies that require multiple real-time scalar operations, resulting in significant computational overhead. This method significantly reduces the computational overhead of IoT devices while maintaining fine-grained access control capabilities, achieving efficient encryption and decryption under low-power conditions. At the same time, this method achieves low-cost distributed storage by storing the policy ciphertext and address hash value on the blockchain and storing the ciphertext on a distributed storage system, thus avoiding blockchain data bloat. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0056] Figure 1 An interactive illustration of a data processing method provided in this application embodiment. Figure 1 ;

[0057] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0058] Figure 3 An interactive illustration of a data processing method provided in this application embodiment. Figure 2 ;

[0059] Figure 4 A schematic diagram of the structure of a data processing device provided in this application embodiment. Figure 1 ;

[0060] Figure 5 A schematic diagram of the structure of a data processing device provided in this application embodiment. Figure 2 ;

[0061] Figure 6 This is a schematic diagram of the structure of an Internet of Things (IoT) device provided in an embodiment of this application;

[0062] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0063] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0065] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, without limiting their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0066] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0067] The Internet of Things (IoT) is a digital ecosystem based on physical devices. It uses embedded sensors, RFID, and wireless communication technologies to collect real-time data from the physical world, and leverages the internet to achieve ubiquitous connectivity and intelligent interaction between things and between people and things. Its core architecture includes sensors at the perception layer, smart terminals, communication protocols at the network layer, and cloud computing, edge computing, and big data analytics at the platform layer.

[0068] Blockchain is a public ledger technology maintained by multiple parties, possessing characteristics such as decentralization, traceability, and immutability. The biggest difference with blockchain lies in its fully distributed data structure, which is replicated in a decentralized manner for all members of its network. With a robust consensus mechanism, blockchain ensures the security, integrity, and immutability of data within its ecosystem. This structure consists of blocks that directly store transactions between two parties, requiring no third party. Combining these advantages of blockchain, the Ethereum platform emerged, a technology with its own cryptocurrency, where scripts are stored and executed automatically.

[0069] Authorized Authority (TA) is a trusted and authoritative body in a blockchain network responsible for entity registration, identity authentication, and system initialization.

[0070] The InterPlanetary File System (IPFS) is a decentralized file distribution protocol designed to reshape the traditional data storage and access model of the internet. Its core concept is to replace traditional location addressing with content addressing, eliminating dependence on centralized servers. In IPFS, each file or data block generates a unique cryptographic hash value based on its content; this hash value serves as both the file's "fingerprint" and its global address. Regardless of where the file is stored, users can accurately locate and retrieve the data within the global network of nodes simply by using the hash value. This mechanism achieves data deduplication, meaning that files with identical content only need to be stored once, and the existence of multiple copies automatically ensures file permanence and high availability through the distributed network.

[0071] Attribute-based encryption (ABE) is a public-key cryptography technique that enables fine-grained access control based on attributes. The core of ABE is binding user identity information or data access permissions to specific attributes, dynamically controlling decryption capabilities through encryption policies. Compared to traditional encryption methods, ABE does not rely on a pre-defined list of visitors; instead, it associates ciphertext or user keys with a set of attributes. When user attributes satisfy the access policy corresponding to the ciphertext, the corresponding data can be decrypted. ABE is mainly divided into two types: key-policy attribute-based encryption (KP-ABE) and ciphertext-policy attribute-based encryption (CP-ABE). The former embeds the access policy into the user key, determining decryption permissions based on ciphertext attributes; the latter appends the policy to the ciphertext, with the user key carrying a set of attributes, achieving access control through matching attributes with the policy.

[0072] The rapid development of IoT technology has generated massive amounts of data, and the secure storage and controlled sharing of this data are crucial for realizing applications such as smart cities and the Industrial Internet. However, IoT terminal devices generally have limited resources, such as weak computing power, small storage space, and limited battery power, which poses a serious challenge to their data security processing and transmission capabilities.

[0073] When facing the need for secure storage and sharing of resource-constrained devices in the Internet of Things (IoT) environment, existing technologies mainly study the application of the combination of blockchain and encryption technology in the field of data sharing. The execution process is as follows: the original IoT data is encrypted using encryption algorithms; the encrypted data is stored in a distributed file system or cloud platform, while metadata such as the hash digest, access control policy or data integrity tag of the data is anchored on the blockchain; finally, the automated verification and authorization management of access permissions is realized through smart contracts.

[0074] However, the encryption algorithms and system architecture designs of the above schemes are not lightweight enough. For example, the core computational complexity of the proxy re-encryption technology widely used in access control is high, resulting in a large computational overhead. Even if some improved schemes use elliptic curve algorithms to reduce some of the burden, these computations still constitute an unbearable performance bottleneck for IoT terminals with extremely limited CPU processing power, memory space and battery capacity.

[0075] To address the aforementioned issues, this application provides a data processing method. This method, through an authorized agency, pre-determines pre-encryption parameters for attribute-based encryption processing when the data owner is offline. When the data owner is online, the data owner only needs to call these pre-encryption parameters when performing attribute-based encryption processing on the access policy corresponding to the shared data to quickly complete scalar operations. This avoids the drawback of existing technologies that require multiple real-time scalar operations, resulting in significant computational overhead. This method significantly reduces the computational overhead on IoT devices while maintaining fine-grained access control capabilities, achieving efficient encryption and decryption under low-power conditions. Furthermore, by storing the policy ciphertext and address hash value on the blockchain and storing the ciphertext on a distributed storage system, this method achieves low-cost distributed storage, preventing blockchain data bloat.

[0076] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0077] Figure 1 This is an interactive schematic diagram illustrating a data processing method provided in an embodiment of this application. For example... Figure 1 As shown in the embodiments of this application, the data processing method includes:

[0078] S101. During the initialization phase, the authorized agency responds to the security parameters, generates system common parameters, and generates pre-encrypted parameters corresponding to the common parameters.

[0079] Among them, security parameters determine the strength of the data sharing system against attacks, and are usually represented by a bit length λ (e.g., λ=128 or 256).

[0080] This security parameter can be randomly generated by the system or determined by relevant personnel. Security parameters can affect the magnitude of key elements in cryptographic algorithms (such as the order of an elliptic curve or the modulus of a prime field).

[0081] System public parameters are root data that all system users (data owners and data accessors) need to know and are unconditionally trusted. These system public parameters may include, for example, curve parameters E, generators G, the system public key PK_system, the set of attribute public keys, and specific hash functions. This application does not impose any restrictions on this.

[0082] Pre-encryption parameters can be, for example, a series of intermediate results pre-computed using public parameters, used to accelerate elliptic curve operations during the encryption process. Pre-encryption parameters can also be, for example, a pre-computation table, where the primary target of the pre-computation can be, for example, the generator G in the system's public parameters, and the public keys of each attribute.

[0083] For example, taking the pre-encrypted parameters as a pre-computation table, its construction process will be explained as follows:

[0084] First, the licensing authority selects a window width w (e.g., w=4 or w=8), which can be determined based on efficiency and storage space.

[0085] For a generator G, calculate all its small multiples from 1*G to (2^w-1)*G to obtain the pre-computation table PTable_G. For each attribute public key PK_attr, also calculate all its small multiples from 1*PK_attr to (2^w-1)*PK_attr to obtain the corresponding pre-computation table PTable_attr.

[0086] These pre-computation tables are then integrated to obtain the corresponding "pre-encrypted parameter" package. These tables themselves are public and do not contain any secret information.

[0087] S102. When the data owner is online, the authorizing authority sends pre-encrypted parameters to the data owner.

[0088] The data owner can be, for example, an IoT device or other devices connected to an IoT device.

[0089] Authorized organizations can proactively send the pre-encrypted parameter to the data owner, or they can send the pre-encrypted parameter back to the data owner after receiving a request from the data owner.

[0090] This step allows data owners (such as IoT devices) to directly use the pre-encrypted parameters for fast table lookup operations during subsequent encryption processing, avoiding expensive real-time scalar multiplication and greatly reducing computational latency and energy consumption.

[0091] S103, Data owner collects shared data.

[0092] S104. The data owner determines the access policy corresponding to the shared data.

[0093] The access policy may include, for example, a department such as R&D, a level such as senior engineer, or a project such as blockchain. In this step, the data format of the access policy needs to be converted into a mathematical structure that can be processed by cryptographic operations. For example, the access policy may be converted into a matrix structure (a matrix M and a mapping function σ), where the rows of the matrix correspond to the attributes within the system attribute set.

[0094] In the matrix structure (M,σ), M is an l×n matrix, and σ(i) maps the i-th row of the matrix to an attribute in the system attribute set. For example: σ(1)="Department: R&D Department", σ(2)="Level: Senior Engineer", σ(3)="Project: Blockchain".

[0095] S105. Based on the pre-encryption parameters, perform attribute-based encryption on the access policy to obtain the corresponding policy ciphertext.

[0096] After obtaining the corresponding access policy, the policy ciphertext of the access policy can be determined based on the pre-encryption parameters in the above steps, so as to avoid performing expensive scalar multiplication in real time and reduce computational latency and energy consumption.

[0097] S106. Encrypt the shared data to obtain the corresponding ciphertext.

[0098] The encryption process can employ symmetric or asymmetric encryption, and this application does not impose any restrictions on the encryption method.

[0099] S107. The data owner uploads the encrypted data to the distributed storage system.

[0100] Distributed storage systems can include, for example, IPFS, distributed file systems, object storage systems, and other systems.

[0101] This step stores the encrypted data in a distributed storage system, achieving low-cost distributed storage of shared data.

[0102] S108. The distributed storage system sends the corresponding address hash value to the data owner.

[0103] In this system, after receiving the ciphertext, the distributed storage system performs a hash operation on the entire ciphertext to generate a unique address hash value.

[0104] This address hash value is the unique permanent address of the ciphertext in IPFS. As long as the ciphertext content remains unchanged, its address hash value will not change.

[0105] S109. The data owner uploads the policy ciphertext and address hash to the authorized agency.

[0106] S110, Authorized institutions upload policy ciphertext and address hash values ​​to the blockchain.

[0107] Once the authorized agency obtains the policy ciphertext and the address hash, it can package the two together and then upload the data packet to the blockchain by calling a smart contract.

[0108] This step stores the policy ciphertext and address hash value in the blockchain, which not only ensures the transparency and traceability of data access control, but also solves the problem of blockchain data bloat and improves the security of ciphertext storage because the policy ciphertext and address hash value occupy a small amount of data.

[0109] In one possible implementation, the blockchain can be, for example, a blockchain employing a lightweight consensus mechanism, which achieves consensus on smart contracts through this mechanism. For example, the blockchain may include committee nodes and non-committee nodes.

[0110] In this system, committee nodes are used to reach consensus on the smart contract, while non-committee nodes are used to verify it. The number of committee nodes and non-committee nodes can be, for example, multiple.

[0111] In this step, the authorized institution can invoke the smart contract to broadcast the policy ciphertext and address hash value; non-committee nodes will verify the smart contract. After the verification result indicates that the verification passed, the committee nodes will reach a consensus on the smart contract.

[0112] After the smart contract consensus is reached, the authorized institution determines the blockchain record address corresponding to the policy ciphertext and address hash value. This blockchain record address is the storage address of the policy ciphertext and address hash value on the blockchain.

[0113] This step replaces the traditional proof-of-work model with a "consensus by committee nodes + verification by non-committee nodes" model. This not only ensures the immutability and traceability of data transactions, but also significantly reduces the computing and energy costs of nodes, enabling resource-constrained IoT devices to stably participate in blockchain consensus.

[0114] The data processing method provided in this application involves an authorized agency determining pre-encryption parameters for attribute-based encryption processing based on system public parameters during the initialization phase. When the data owner is online, these pre-encryption parameters are sent to the data owner. When uploading data, the data owner only needs to call these pre-encryption parameters when performing attribute-based encryption on the access policy corresponding to the shared data to quickly complete scalar operations. This avoids the drawback of existing technologies that require multiple real-time scalar operations, resulting in significant computational overhead. This method significantly reduces the computational overhead of IoT devices while maintaining fine-grained access control capabilities, achieving efficient encryption and decryption under low-power conditions. Furthermore, by storing the policy ciphertext and address hash value on the blockchain and storing the ciphertext on a distributed storage system, this method achieves low-cost distributed storage, preventing blockchain data bloat.

[0115] Figure 2 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. The execution entity in this embodiment may be, for example, […]. Figure 1 The data owner is shown in the embodiment. The access strategy in this embodiment can be, for example, a matrix structure, and there is a mapping relationship between the rows of the access strategy and the attributes in the system attribute set. This application embodiment is... Figure 1 Based on the embodiments, the data upload process for shared data is described in detail. For example... Figure 2 As shown, the data transmission method provided in this application embodiment includes:

[0116] S201. Randomly generate master key parameters, and determine ciphertext components based on master key parameters and pre-encryption parameters.

[0117] The data owner randomly selects a master key parameter s. The master key parameter s can be, for example, a randomly selected number, which is the master secret for the entire encryption process. It is usually within a large integer field and can be used later to derive the symmetric key for encrypting data.

[0118] The ciphertext component C0 can be, for example, the public base point of an elliptic curve. It can be calculated, for example, by the following formula: Ciphertext component C0 = Master key parameter S * Generator G.

[0119] In this step, the master key parameter s can be decomposed, and pre-computed multipliers (such as aG, bG, ...) can be repeatedly searched from the pre-encrypted parameters. Then, these results are combined through efficient dot addition operations to obtain the ciphertext component C0 very quickly.

[0120] S202. Based on the master key parameters, the mapping relationship between rows and attributes within the access policy, the pre-encryption parameters, and the ciphertext components, determine the corresponding policy ciphertext set.

[0121] The purpose of this step is to "hide" the master key parameter S within a series of policy ciphertexts bound to attributes, based on the access policy matrix (M, σ). Only users who meet the policy requirements can successfully recover the master key parameter S from the policy ciphertexts.

[0122] In this step, two vectors, v1 and v2, can be randomly selected first. The selection of vectors v1 and v2 is related to the dimension of matrix M and is used to mathematically distribute the master key parameter S across each row of the matrix.

[0123] Then, pre-computation tables are used to accelerate scalar operations. For operations on *G, pre-encrypted parameters are used directly to simplify the calculation. For operations on *PK_σ(i), if pre-encrypted parameters are also generated for these attribute public keys beforehand, the calculation can also be completed quickly.

[0124] Ultimately, this will result in a set of policy ciphertexts corresponding to each line of the access policy, such as (C 1i C 2i ,...).

[0125] S203. Generate the symmetric key corresponding to the ciphertext component, and use the symmetric key to encrypt the shared data to obtain the ciphertext.

[0126] S204. Calculate the hash value corresponding to the shared data.

[0127] S205. Upload the ciphertext and hash value to the distributed storage system.

[0128] The purpose of calculating the hash value is to perform integrity verification.

[0129] Understandably, if a data accessor obtains the ciphertext, they can calculate the corresponding hash value based on the shared data, and then compare the calculated hash value with the stored hash value to see if they match.

[0130] If both conditions are met, the shared data integrity verification is considered successful.

[0131] The data processing method provided in this application determines ciphertext components based on master key parameters and pre-encryption parameters. It then determines a corresponding policy ciphertext set based on the master key parameters, the mapping relationship between rows and attributes within the access policy, the pre-encryption parameters, and the ciphertext components. A symmetric key corresponding to the ciphertext components is generated, and the shared data is encrypted using this symmetric key to obtain ciphertext. The hash value corresponding to the shared data is calculated, and the ciphertext and hash value are uploaded to a distributed storage system. This method only requires calling the pre-encryption parameters when performing attribute-based encryption on the access policy corresponding to the shared data to quickly complete scalar operations, avoiding the drawback of existing technologies that require multiple real-time scalar operations, resulting in significant computational overhead. This method significantly reduces the computational overhead on IoT devices while maintaining fine-grained access control capabilities, achieving efficient encryption and decryption under low-power conditions. Furthermore, by storing the ciphertext on a distributed storage system, this method achieves low-cost distributed storage.

[0132] Figure 3 An interactive illustration of a data processing method provided in this application embodiment. Figure 2 The embodiments in this application are intended to supplement the explanation of the interaction process in a data download scenario. For example... Figure 3 As shown in the embodiments of this application, the data processing method includes:

[0133] S301. The data accessor sends a data sharing request to the authorized agency.

[0134] The data sharing request includes a blockchain record address, which is used to request the download of the data corresponding to that blockchain record address.

[0135] S302. The authorizing agency obtains the policy ciphertext and address hash value from the blockchain based on the blockchain record address included in the data processing request.

[0136] In one possible implementation, before obtaining the policy ciphertext and address hash from the blockchain, the authorizing authority can also generate attribute keys based on the data accessor's attribute set.

[0137] The authorizing authority can then use the data accessor's public key to encrypt the attribute key, allowing the data accessor to decrypt it using the corresponding private key, thereby obtaining the attribute key.

[0138] S303. The authorized agency sends the policy ciphertext and address hash to the data accessor.

[0139] Understandably, if the authorizing body generates the attribute key, it can send the encrypted attribute key to the data accessor.

[0140] S304. The data accessor generates a symmetric key corresponding to the ciphertext component based on the policy ciphertext and pre-encryption parameters.

[0141] In this process, the data accessor can decrypt the attribute key using the private key to obtain a partial decryption key, and then calculate the intermediate ciphertext based on this partial decryption key, the policy ciphertext, and the pre-encryption parameters.

[0142] Then, using the private key, intermediate ciphertext, and pre-encryption parameters, the ciphertext component C0 is calculated, and finally, the corresponding symmetric key is generated through the ciphertext component C0.

[0143] S305. The data accessor retrieves the ciphertext and hash value from the distributed storage system based on the address hash value.

[0144] S306. The data accessor decrypts the ciphertext using the symmetric key to obtain the shared data.

[0145] S307. Data accessors perform integrity checks on shared data based on hash values.

[0146] Figure 4 A schematic diagram of the structure of a data processing device provided in this application embodiment. Figure 1 The execution entity in this embodiment can be, for example, a... Figures 1 to 3 The data owner or data accessor shown in any embodiment. Figure 4 As shown, the data processing apparatus 400 provided in this embodiment includes:

[0147] The determination module 401 is used to determine the access policy corresponding to the shared data in response to the shared data sent by the IoT device;

[0148] The processing module 402 is used to perform attribute-based encryption processing on the access policy based on the pre-encryption parameters to obtain the corresponding policy ciphertext, wherein the pre-encryption parameters are determined by the authorizing authority when the data owner is offline; and to encrypt the shared data to obtain the corresponding ciphertext.

[0149] The transceiver module 403 is used to upload ciphertext to the distributed storage system; and to receive the address hash value fed back by the distributed storage system, and upload the policy ciphertext and the address hash value to the authorized institution, so that the authorized institution can upload the policy ciphertext and the address hash value to the blockchain.

[0150] In one possible implementation, the access policy is a matrix structure, and there is a mapping relationship between the rows of the access policy and the attributes in the system attribute set. The determining module 401 is specifically used to randomly generate master key parameters, and determine ciphertext components based on the master key parameters and pre-encryption parameters; and determine the corresponding policy ciphertext set based on the master key parameters, the mapping relationship between the rows and attributes in the access policy, the pre-encryption parameters, and the ciphertext components.

[0151] In one possible implementation, the processing module 402 is specifically used to generate the symmetric key corresponding to the ciphertext component, and use the symmetric key to encrypt the shared data to obtain ciphertext; and to calculate the hash value corresponding to the shared data.

[0152] The transceiver module 403 is specifically used to upload ciphertext and hash values ​​to the distributed storage system.

[0153] The data processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0154] Figure 5 A schematic diagram of the structure of a data processing device provided in this application embodiment. Figure 2 The execution entity in this embodiment can be, for example, a... Figures 1 to 3 The licensing authority shown in any embodiment. For example... Figure 5 As shown, the data processing apparatus 500 provided in this application embodiment includes:

[0155] Processing module 501 is used to generate system common parameters in response to security parameters during the initialization phase, and to generate pre-encrypted parameters corresponding to the common parameters;

[0156] The transceiver module 502 is used to send pre-encrypted parameters to the data owner when the data owner is online, so that the data owner can perform attribute-based encryption processing on the access policy corresponding to the shared data based on the pre-encrypted parameters to obtain the corresponding policy ciphertext.

[0157] The transceiver module 502 is also used to receive policy ciphertext and address hash value sent by the data owner, the address hash value being used to indicate the storage address of the shared data in the distributed storage system; and to upload the policy ciphertext and address hash value to the blockchain.

[0158] In one possible implementation, the device further includes: a determining module 503;

[0159] The transceiver module 502 is specifically used to call the smart contract and broadcast the policy ciphertext and address hash value;

[0160] The determination module 503 is used to determine the corresponding blockchain record address after the smart contract consensus is passed;

[0161] The blockchain employs a lightweight consensus mechanism to process smart contracts. The blockchain includes committee nodes and non-committee nodes. Committee nodes are used to reach consensus on smart contracts, while non-committee nodes are used to verify smart contracts.

[0162] In one possible implementation, the transceiver module 502 is further configured to acquire a data sharing request sent by a data accessor, the data sharing request including: a blockchain record address; and based on the blockchain record address, to acquire the policy ciphertext and address hash value from the blockchain, and send the policy ciphertext and address hash value to the data accessor, so that the data accessor generates a symmetric key corresponding to the ciphertext component based on the policy ciphertext and pre-encryption parameters, acquires the corresponding ciphertext and hash value from the distributed storage system based on the address hash value, and decrypts the ciphertext based on the symmetric key to obtain the shared data, wherein the hash value is used to verify the integrity of the shared data.

[0163] The data processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0164] Figure 6 This is a schematic diagram of the structure of an Internet of Things (IoT) device provided in an embodiment of this application. Figure 6 As shown, the IoT device 600 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 600 also includes a communication interface 603. The processor 601, memory 602, and communication interface 603 are connected via a bus 604.

[0165] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0166] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0167] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0168] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0170] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 700 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 700 further includes a communication interface 703. The processor 701, memory 702, and communication interface 703 are connected via a bus 704.

[0171] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.

[0172] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0173] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0174] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0175] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0176] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0177] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0178] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0179] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0180] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0181] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0182] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0183] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0184] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0185] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0186] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0187] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0188] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0189] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0190] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0191] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0192] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0193] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that, Applied to data owners, the method includes: In response to shared data sent by IoT devices, determine the access policy corresponding to the shared data; Based on the pre-encryption parameters, the access policy is subjected to attribute-based encryption to obtain the corresponding policy ciphertext, wherein the pre-encryption parameters are determined by the authorizing authority when the data owner is offline; The shared data is encrypted to obtain corresponding ciphertext, and the ciphertext is uploaded to the distributed storage system. The system receives the address hash value fed back by the distributed storage system and uploads the policy ciphertext and the address hash value to the authorized institution, so that the authorized institution uploads the policy ciphertext and the address hash value to the blockchain.

2. The method according to claim 1, characterized in that, The access policy is a matrix structure, and there is a mapping relationship between the rows of the access policy and the attributes in the system attribute set. Based on the pre-encryption parameters, the access policy is subjected to attribute-based encryption processing to obtain the corresponding policy ciphertext, including: Randomly generate master key parameters, and determine ciphertext components based on the master key parameters and the pre-encryption parameters; Based on the master key parameters, the mapping relationship between rows and attributes in the access policy, the pre-encryption parameters, and the ciphertext components, the corresponding policy ciphertext set is determined.

3. The method according to claim 2, characterized in that, The step of encrypting the shared data to obtain corresponding ciphertext and uploading the ciphertext to the distributed storage system includes: Generate a symmetric key corresponding to the ciphertext component, and use the symmetric key to encrypt the shared data to obtain the ciphertext; Calculate the hash value corresponding to the shared data; The ciphertext and the hash value are uploaded to the distributed storage system.

4. A data processing method, characterized in that, Applied to an authorizing agency, the method includes: During the initialization phase, in response to security parameters, system common parameters are generated, and pre-encrypted parameters corresponding to the common parameters are generated. When the data owner is online, the pre-encryption parameters are sent to the data owner so that the data owner can perform attribute-based encryption on the access policy corresponding to the shared data based on the pre-encryption parameters to obtain the corresponding policy ciphertext. Receive the policy ciphertext and address hash value sent by the data owner, wherein the address hash value is used to indicate the storage address of the shared data in the distributed storage system; The policy ciphertext and the address hash value are uploaded to the blockchain.

5. The method according to claim 4, characterized in that, Uploading the policy ciphertext and the address hash value to the blockchain includes: The smart contract is invoked to broadcast the policy ciphertext and the address hash value; After the smart contract consensus is reached, the corresponding blockchain record address is determined; The blockchain employs a lightweight consensus mechanism to process the smart contract. The blockchain includes committee nodes and non-committee nodes. The committee nodes are used to reach consensus on the smart contract, and the non-committee nodes are used to verify the smart contract.

6. The method according to claim 5, characterized in that, The method further includes: Obtain a data sharing request sent by a data accessor, the data sharing request including: the blockchain record address; Based on the blockchain record address, the policy ciphertext and the address hash value are obtained from the blockchain and sent to the data accessor. This allows the data accessor to generate a symmetric key corresponding to the ciphertext component based on the policy ciphertext and the pre-encryption parameters. Based on the address hash value, the accessor obtains the corresponding ciphertext and hash value from the distributed storage system and decrypts the ciphertext using the symmetric key to obtain the shared data. The hash value is used to verify the integrity of the shared data.

7. A data processing apparatus, characterized in that, For use by data owners, the device includes: The determination module is used to determine the access policy corresponding to the shared data in response to the shared data sent by the IoT device; The processing module is used to perform attribute-based encryption processing on the access policy based on pre-encryption parameters to obtain the corresponding policy ciphertext, wherein the pre-encryption parameters are determined by the authorizing authority when the data owner is offline; and to encrypt the shared data to obtain the corresponding ciphertext. The transceiver module is used to upload the ciphertext to the distributed storage system; and to receive the address hash value fed back by the distributed storage system, and upload the policy ciphertext and the address hash value to the authorizing institution, so that the authorizing institution uploads the policy ciphertext and the address hash value to the blockchain.

8. An Internet of Things (IoT) device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 3.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.