CN114793237B - Smart city data sharing method, device and medium based on block chain technology - Google Patents

Smart city data sharing method, device and medium based on block chain technology Download PDF

Info

Publication number
CN114793237B
CN114793237B CN202210246695.6A CN202210246695A CN114793237B CN 114793237 B CN114793237 B CN 114793237B CN 202210246695 A CN202210246695 A CN 202210246695A CN 114793237 B CN114793237 B CN 114793237B
Authority
CN
China
Prior art keywords
data
smart city
sharing
encryption
proxy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210246695.6A
Other languages
Chinese (zh)
Other versions
CN114793237A (en
Inventor
许伟
杜玮
刘岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renmin University of China
Original Assignee
Renmin University of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renmin University of China filed Critical Renmin University of China
Priority to CN202210246695.6A priority Critical patent/CN114793237B/en
Publication of CN114793237A publication Critical patent/CN114793237A/en
Application granted granted Critical
Publication of CN114793237B publication Critical patent/CN114793237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A30/00Adapting or protecting infrastructure or their operation
    • Y02A30/60Planning or developing urban green infrastructure

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a smart city data sharing method, equipment and medium based on a blockchain technology, wherein the method comprises the following steps: setting a block chain network to realize distributed storage of the smart city data index; setting an encryption algorithm and an agent re-encryption rule to realize safe sharing of smart city data; and designing a data sharing platform system based on the Fabric chain code, and realizing a smart city data sharing flow through a block chain technology and a proxy re-encryption technology. The intelligent city data sharing method based on the block chain technology greatly improves the intelligent city data sharing efficiency.

Description

Smart city data sharing method, device and medium based on block chain technology
Technical Field
The invention relates to a method, equipment and medium for sharing intelligent city data based on a block chain technology, and relates to the technical field of block chain data sharing.
Background
Data security, data privacy and data integrity have been important topics in the smart city data sharing process. With the development of data management technology and blockchain application technology, data sharing presents more demands and challenges for data security, and how to realize traceable sharing of required data while ensuring data security privacy becomes a research hotspot.
The traditional centralized smart city data sharing scheme generally has a series of problems of data lack of credibility, unknown data flow direction, unclear data rights, difficult responsibility following of data leakage and the like, and the problems become the biggest obstacle for designing a smart city data sharing system.
In terms of smart city data sharing, the prior art proposes many cloud-based solutions, but the reliability of third party cloud-based services is doubtful and data privacy disclosure problems are frequent.
Disclosure of Invention
In view of the above problems, the present invention aims to provide a method, apparatus and medium for sharing smart city data based on a blockchain technology, which can ensure security and privacy of data generated during the construction of smart cities.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for sharing smart city data based on a blockchain technique, including:
setting a block chain network to realize distributed storage of the smart city data index;
setting an encryption algorithm and an agent re-encryption rule to realize safe sharing of smart city data;
and designing a data sharing platform system based on the Fabric chain code, and realizing a smart city data sharing flow through a block chain technology and a proxy re-encryption technology.
Further, setting up a blockchain network to implement distributed storage of smart city data indexes includes:
after each unit of the smart city stores the data in the corresponding database, the smart city data sharing platform reads the corresponding data and generates a data index in the block corresponding to the block chain network, the data index is stored in each unit block of the smart city corresponding to each unit, and when the data sharing request operation is carried out, the data is read to the smart city data sharing platform and then sent to the data requester.
Further, setting an encryption algorithm and a proxy re-encryption rule to realize secure sharing of smart city data includes:
the data owner encrypts the data by using the symmetric key, and when the data requester requests to acquire the data, the data owner re-encrypts the corresponding data index through the proxy re-encryption server and sends the re-encrypted data index to the data request.
Further, the proxy re-encryption rule is:
encrypting the required data index reference public key by the data owner to obtain a ciphertext;
the encrypted ciphertext of the data owner is sent to a proxy re-encryption server, and the data owner calculates and generates a secret key for the proxy re-encryption server;
the encrypted ciphertext of the data owner is converted into a re-encrypted ciphertext which can be decrypted by the private key of the data requester by using the new generation key;
the proxy re-encryption server sends the re-encryption ciphertext to the data requester;
the block chain data sharing platform sends smart city data, and the data requester decrypts the required data index and matches the data sent by the block chain data sharing platform.
Further, the data sharing platform based on the Fabric chain code comprises a data owner, a data requester and a proxy re-encryption third party server;
the data owner is the original owner of the data and is used for uploading the smart city data to the corresponding enterprise and public institution database and uploading the data index value of the smart city data;
the data requester is used for acquiring the required data;
the proxy re-encryption third party server is responsible for securely converting the ciphertext, allowing the user to convert the encrypted ciphertext into another ciphertext form.
Further, the data sharing platform system based on the Fabric chain code comprises a front end module, a back end module and a block chain module;
the front-end module is used for providing uploading data, searching and sharing data downloading by the data correlation party through the block chain module;
the back-end module is used for providing proxy re-encryption operation and storing data;
and the block chain module is used for carrying out distributed storage and supporting data sharing operation of the data indexes of each unit block of the smart city.
Further, in the smart city data sharing chain, hash values of data are stored in a blockchain, each block is composed of one or more data index hash values, and information in the block includes:
(1) Merkle tree root: root of Merkle tree consisting of hash value of all data indexes in each unit block of smart city;
(2) Timestamp: creating time of each unit block of the smart city;
(3) Block hashing: hash code calculated based on the hash of the last chunk, merkle root and timestamp.
Further, the data security sharing flow comprises two processes of data uploading and data sharing.
In a second aspect, the present invention also provides an electronic device comprising computer program instructions, wherein the program instructions, when executed by a processor, are configured to implement the blockchain technology-based smart city data sharing method.
In a third aspect, the present invention also provides a computer readable storage medium having stored thereon computer program instructions, wherein the program instructions when executed by a processor are for implementing a blockchain technology based smart city data sharing method.
The invention adopts the technical proposal and has the following characteristics:
1. the invention introduces the blockchain technology into the smart city data sharing field, has good power assisting effect, is used for flexibly managing data generated in the smart city construction process, and provides a smart city data sharing scheme which takes high efficiency, safety and privacy protection as data sharing construction targets.
2. The smart city data sharing method is called a smart city data sharing chain, the privacy and the safety of data are protected by using the proxy re-encryption technology, and the data sharing of a data requester and a data provider on the chain is realized.
In conclusion, the method and the device can be widely applied to smart city data sharing.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Like parts are designated with like reference numerals throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of a smart city data sharing hierarchy according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a smart city data sharing process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a general technical route according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
For ease of description, spatially relative terms, such as "inner," "outer," "lower," "upper," and the like, may be used herein to describe one element or feature's relationship to another element or feature as illustrated in the figures. Such spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures.
Blockchain technology is an emerging technology that abstracts from the bit coin floor. The data structure of the distributed public account book maintained by the nodes of the whole network is similar to a linked list in the C language, and each node on the chain stores the latest transaction record and the hash value of the last block, so that the hash value can be changed greatly by any change to the data. This feature has the consequence that the entire chain cannot be forked unless the node has an computational power exceeding 51% of the full network, which avoids the common "double-flower problem" and also ensures that the block cannot be altered. The blockchain is stored in all the participating nodes, so that the problem of single point failure is avoided, and the malicious node can be prevented from tampering data. The blockchain is a decentralised network, and an authoritative third party is not required to supervise and control the blockchain, and corresponding functions are completed through a distributed protocol and an intelligent contract technology. Blockchains are classified into 3 types according to the degree of openness: public chains, private chains, and federation chains. Public chains are disclosed to all people, and according to a certain algorithm, each person can become one node and participate in calculation and reading and writing. Private chains are highly centralized blockchains, typically only one organization, and only nodes trusted by the organization can participate in blockchain reading and writing of ledgers. The federation chain is interposed between the two and is typically made up of several organizations, each of which manages some nodes that maintain the functions of the blockchain. Because the schema provided by the federated chain is capable of satisfying many application scenarios for data sharing, it is selected as the underlying blockchain schema for many items.
In the distributed system, the consensus protocol is divided into two major classes, namely a crashed fault-tolerant protocol (crash fault tolerant, abbreviated as CFT) and a Bayesian fault-tolerant protocol (Byzantine fault tolerant, abbreviated as BFT) according to the fault-tolerant capability of the system to a fault component. The CFT protocol ensures that the system can reach consensus under the condition of component downtime, and is suitable for centralized distributed data clusters, such as Google distributed lock service Chubby, paxo protocols and the like. BFT protocol was proposed by Leslie Lamport in 1982, ensuring that the distributed system can still reach agreement under the interference of the fault components. The block chain consensus protocol belongs to a Bayesian fault tolerance protocol, and ensures that honest nodes in a block chain network can reach consensus under the interference of malicious nodes. The blockchain consensus protocol is a BFT protocol because of the open nature of the blockchain network, which needs to be resistant to malicious node interference.
Fabric is a alliance chain project which is developed by different organizations, is a mature one in an open source project super ledger and is developed towards enterprise-level blockchain. The network is mainly composed of 3 nodes: an endorsement node, a confirmation node and a sorting node, and a pluggable authentication center (Certificate Authority, CA) node. The endorsement node is responsible for endorsing the transaction and performing read-write operation on the data according to the existing rules. After receiving the proposal of the transaction, the endorsement node firstly verifies the signature in the proposal and checks whether the initiator of the proposal has authority; then according to the own state database, performing simulated transaction, and generating a Read Set (Read Set) and a Write Set (Write Set) representing a Read-Write operation Set of the Fabric state database; finally, the execution result is endorsed and returned to the sponsor of the transaction. The confirmation node is responsible for checking the transaction sent by the endorsement node and verifying the data result. The ordering node is responsible for ordering received transactions, packaging the received transactions into blocks, and returning the results to the nodes corresponding to the transactions. The CA node is a core node under PKI system in Fabric and is mainly responsible for the registration of users, the issuance and revocation of certificates and the like. The attractive function in Fabric is that it supports multiple chains (channels), each supporting links to different organizations, running independent chain codes (Chaincode). This makes it possible to run several independent chains on one blockchain, as well as to isolate transactions of different chains on the same node.
The invention provides a smart city data sharing method, equipment and medium based on a blockchain technology, wherein the method comprises the following steps: setting a block chain network to realize distributed storage of the smart city data index; setting an encryption algorithm and an agent re-encryption rule to realize safe sharing of smart city data; and designing a data sharing platform system based on the Fabric chain code, and realizing a smart city data sharing flow through a block chain technology and a proxy re-encryption technology. The intelligent city data sharing method based on the block chain technology greatly improves the intelligent city data sharing efficiency.
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Embodiment one: as shown in fig. 1 to 3, the smart city data sharing method based on the blockchain technique provided in this embodiment includes:
s1, setting a block chain network to realize distributed storage of the intelligent city data index.
Specifically, as shown in fig. 3, after each unit of the smart city stores the data in the corresponding database, the smart city data sharing platform reads the corresponding data and generates a data index in the block corresponding to the blockchain network, the data index is stored in each unit block of the smart city corresponding to each unit, and when the data sharing request operation is performed, the data is read to the smart city data sharing platform and then sent to the data requester.
S2, setting an encryption algorithm and an agent re-encryption rule to realize safe sharing of the smart city data, so that the safety and privacy of the data are guaranteed.
Specifically, the data owner encrypts the data by using the symmetric key, and when the data requester requests to acquire the data, the data owner re-encrypts the corresponding data index through the proxy re-encryption third party server and sends the re-encrypted data index to the data requester. For example, when the data owner Alice wants to share data with Bob, the data owner Alice sends the encrypted data index to the proxy re-encryption third party server, the proxy re-encryption third party server generates a re-encryption ciphertext according to the decryption key of Alice and the encryption key of Bob, then the proxy re-encryption third party server sends the ciphertext to the data requester, the data requester decrypts the obtained ciphertext and then obtains the corresponding data index value, at this time, the smart city blockchain data sharing platform sends the data corresponding to the data index value to the data requester, and the data requester matches the data index with the data, thereby confirming whether the data is the required data. Therefore, the purpose of smart city data sharing is achieved, and the private key of Alice is not revealed in the whole process. The embodiment realizes the safe sharing of data by the proxy re-encryption technology, and has better safety compared with the traditional scheme.
S3, designing a data sharing platform system based on a alliance chain (Fabric), and realizing a smart city data sharing process by a blockchain technology and a proxy re-encryption technology, wherein the data sharing process mainly comprises two processes of data uploading and data sharing.
Specifically, the present embodiment designs a data sharing platform system based on a federated chain (Fabric), and the main roles of the system are data owners, data requesters, and proxy re-encryption third party servers. The data owner is the original owner of the data and is used for uploading the smart city data to the corresponding enterprise database and uploading the data index value of the smart city data to the block chain data sharing platform; the data requester obtains the required data through a smart city blockchain data sharing platform; the proxy re-encryption third party server is responsible for securely converting the ciphertext, allowing the user to convert the encrypted ciphertext into another ciphertext form.
The intelligent city data owner uploads the shared data ciphertext to the corresponding database, the corresponding data primitive is read by the block chain data sharing platform, the data index is generated, and then the data index is stored in each unit block of the intelligent city corresponding to the block chain network, and meanwhile the data index is returned to the data owner.
When the smart city data requester acquires the required data, the data index value is acquired through the ciphertext re-encrypted by the decryption agent, and then the data index value is matched with the data sent by the smart city data sharing platform, so that the required data can be acquired successfully.
The design principle of the smart city data sharing method based on the blockchain technology of the present embodiment is described in detail in terms of data security privacy protection, data distributed storage, and the like.
1. Distributed storage
The present embodiment introduces a distributed storage design concept. IPFS is a distributed distribution protocol of point-to-point, and a content-based addressing mode is used for replacing a traditional domain name-based addressing mode, so that the IPFS is a permanent, decentralised method for storing and sharing files. The embodiment uses an IPFS distributed file system with decentralization to store the smart city encryption data index. Specifically, each unit of the smart city has its own database, the smart city data in the database is stored independently, each unit of the smart city forms a corresponding unit block in the blockchain network, for example, the government affair data is stored in the government affair database, but each party has a corresponding block node in the smart city data sharing chain to store the index value of the actual data of its own database. Only when the data request shares the operation, the blockchain platform will extract the corresponding data according to the data index and send the data to the data requester.
2. Proxy re-encryption
As shown in fig. 1, the proxy re-encryption technique is an encryption method capable of securely converting ciphertext, allowing a user to convert the encrypted ciphertext into another ciphertext form. Therefore, the user can decrypt the encrypted ciphertext after conversion by using the private key of the user, and corresponding information cannot be disclosed in a plaintext form in the whole conversion process, so that the privacy of data sharing is ensured. Government, bank, hospital, university, enterprise, other organizations in the smart city blockchain data sharing network are both data owners and data requesters, can perform data access requests and can also perform data uploading operation, and the corresponding data classification layer comprises government affair data, financial data, hospital data, university data, enterprise data and other data.
As shown in fig. 2, the proxy re-encryption flow is specifically designed as follows:
the first step: encrypting the required data index reference public key by the data owner to obtain a ciphertext;
and a second step of: the encrypted ciphertext of the data owner is sent to a proxy re-encryption server, and the data owner calculates and generates a secret key for the proxy re-encryption server;
and a third step of: the encrypted ciphertext of the data owner is converted into a re-encrypted ciphertext which can be decrypted by the private key of the data requester by using the new generation key;
fourth step: the proxy re-encryption server sends the re-encryption ciphertext to the data requester;
fifth step: the block chain data sharing platform sends smart city data, and the data requester decrypts the required data index and matches the data sent by the block chain data sharing platform.
3. A smart city data sharing platform system designed based on a federated chain (Fabric).
The embodiment introduces a block chain and designs a smart city data sharing platform system based on Fabric chain codes. The main roles of the system are data owners and data requesters, which are subdivided into governments, banks, hospitals, universities, enterprises, and other organizations, each being both a data owner and a data requester.
As shown in fig. 3, the smart city data sharing platform system functions include data uploading and data obtaining, and the system architecture is mainly divided into 3 modules: front end module, back end module and blockchain module.
The front-end module is used for providing uploading data and sharing data by the data correlation party through the block chain module and mainly providing the functions of uploading data, searching and downloading the sharing data for the data correlation party. The page display mainly uses HTML5, CSS and JavaScript, the front end frame is Vue, the front end UI frame is LayUI, and interaction is carried out with the proxy re-encryption third-party server module through the RESTful interface style API.
The back-end module is used for providing proxy re-encryption operation and data storage, using Spring Boot for frame construction and using a Redis cache database;
and the block chain module is used for carrying out a core flow of distributed storage and supporting data sharing operation of the data indexes of each unit block of the smart city, and the block chain network fully stores the data indexes corresponding to the data in each unit database of the smart city. And when the front-end module makes a corresponding instruction, the blockchain network reads corresponding data from the database and sends the corresponding data to the data requester.
In a smart city data sharing chain, hash values of data are stored in a blockchain, each block consisting of one or more data index hash values, the information in the block including:
(1) Merkle tree root: root of Merkle tree consisting of hash value of all data indexes in each unit block of smart city;
(2) Timestamp: creating time of each unit block of the smart city;
(3) Block hashing: hash code calculated based on the hash of the last chunk, merkle root and timestamp.
4. Efficient blockchain technology-based smart city data sharing research
For a given smart city data stream of n data blocks, the data index in each unit block, that is, the related data stream, is verified first when data sharing is performed, and the time for verifying the data stream before data transmission is also a major part of the time spent in the total flow of data sharing. Assume that the corresponding block corruption event for each unit of the smart city in the blockchain network is an independent co-distributed random variable with probability p. The cost of downloading and verifying the integrity of the block is b. If there is no block corruption, the total validation cost is b. On the other hand, if the first n-1 blocks are correct, but the last block is corrupted, the validation cost is 2b. Furthermore, if the first n-2 data blocks are correct, but the second data block is corrupted, the validation cost is 3b, regardless of whether the last block is correct or not. By the above generalization, the expected time cost of validating a data stream of length n, denoted by C (n), can be calculated.
Figure BDA0003545013820000091
Assuming that C '(n) is the cost of data verification in the conventional smart city data sharing scheme, the data cost of verifying one database is b, and the data verification cost of n units is C' (n) =n·b. The performance difference of the conventional and blockchain-based smart city data sharing scheme is then denoted by D and can be calculated as follows.
D=C’(n)-C(n)
≤n·b-(1-p) n b-p·n·b
≤b(1-p)[n-(1-p) n-1 ]
It can be easily found that, when the blockchain technology-based smart city data sharing chain is applied, for a given block damage probability p, as the length of n increases, the efficiency of smart city data sharing can be improved by verifying the cost of the data stream during the data sharing process.
Embodiment two: the present embodiment provides an electronic device corresponding to the blockchain technology-based smart city data sharing method provided in the first embodiment, where the electronic device may be an electronic device for a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, etc., to execute the method of the first embodiment.
As shown in fig. 4, the electronic device includes a processor, a memory, a communication interface, and a bus, where the processor, the memory, and the communication interface are connected by the bus to complete communication with each other. The bus may be an industry standard architecture (ISA, industry Standard Architecture) bus, a peripheral component interconnect (PCI, peripheral Component) bus, or an extended industry standard architecture (EISA, extended Industry Standard Component) bus, among others. The memory stores a computer program that can be run on the processor, and when the processor runs the computer program, the smart city data sharing method based on the blockchain technology provided in the first embodiment is executed. Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present application and is not limiting of the computing devices to which the present application may be applied, and that a particular computing device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In some implementations, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an optical disk, or other various media capable of storing program codes.
In other implementations, the processor may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or other general-purpose processor, which is not limited herein.
Embodiment III: the blockchain-based smart city data sharing method of the present embodiment may be implemented as a computer program product, which may include a computer readable storage medium having computer readable program instructions loaded thereon for performing the blockchain-based smart city data sharing method of the present embodiment.
The computer readable storage medium may be a tangible device that retains and stores instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the preceding.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In the description of the present specification, reference to the terms "one embodiment," "some implementations," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A smart city data sharing method based on a blockchain technology is characterized by comprising the following steps:
setting up a blockchain network to realize distributed storage of smart city data indexes, comprising:
after each unit of the smart city stores the data in the corresponding database, the smart city data sharing platform system reads the corresponding data and generates a data index in the block corresponding to the block chain network, the data index is stored in each unit block of the smart city corresponding to each unit, and when the data sharing request operation is carried out, the data is read by the database and then is read to the smart city data sharing platform and then is sent to the data requester;
setting an encryption algorithm and a proxy re-encryption rule to realize safe sharing of smart city data comprises the following steps:
the data owner encrypts and stores the data in the database by using the symmetric key, and when the data requester requests to acquire the data, the data owner re-encrypts the corresponding data index through the proxy re-encryption server and sends the re-encrypted data index to the data requester;
designing a data sharing platform system based on Fabric chain codes, and realizing a smart city data sharing flow through a blockchain technology and a proxy re-encryption technology, wherein the rules of proxy re-encryption are as follows:
encrypting the required data index reference public key by the data owner to obtain a ciphertext;
the encrypted ciphertext of the data owner is sent to a proxy re-encryption server, and the data owner calculates and generates a secret key for the proxy re-encryption server;
the encrypted ciphertext of the data owner is converted into a re-encrypted ciphertext which can be decrypted by the private key of the data requester by using the new generation key;
the proxy re-encryption server sends the re-encryption ciphertext to the data requester;
the block chain data sharing platform sends smart city data, and the data requester decrypts the required data index and matches the data sent by the block chain data sharing platform.
2. The blockchain technology-based smart city data sharing method of claim 1, wherein the Fabric chain code-based data sharing platform system comprises a data owner, a data requester, and a proxy re-encryption third party server;
the data owner is the original holder of the data for uploading the smart city data to the corresponding enterprise database;
the data requester is used for acquiring the required data;
the proxy re-encryption third party server is responsible for securely converting the ciphertext, allowing the user to convert the encrypted ciphertext into another ciphertext form.
3. The method for sharing intelligent city data based on the blockchain technique according to claim 1, wherein the data sharing platform system based on the Fabric chain code comprises a front-end module, a back-end module and a blockchain module;
the front-end module is used for providing uploading data, searching and sharing data downloading by the data correlation party through the block chain module;
the back-end module is used for providing proxy re-encryption operation and storing data;
and the block chain module is used for carrying out distributed storage and supporting data sharing operation of the data indexes of each unit block of the smart city.
4. A method for smart city data sharing based on blockchain technology as in claim 3 wherein in the smart city data sharing chain, hash values of the data are stored in the blockchain, each block consisting of one or more data index hash values, the information in the block comprising:
(1) Merkle tree root: root of Merkle tree consisting of hash value of all data indexes in each unit block of smart city;
(2) Timestamp: creating time of each unit block of the smart city;
(3) Block hashing: hash code calculated based on the hash of the last chunk, merkle root and timestamp.
5. The method for sharing intelligent city data based on block chain technology according to claim 1, wherein the data security sharing flow comprises two processes of data uploading and data sharing.
6. An electronic device comprising computer program instructions, wherein the program instructions when executed by a processor are for implementing the blockchain technology-based smart city data sharing method of any of claims 1-5.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, wherein the program instructions, when executed by a processor, are for implementing the blockchain technology based smart city data sharing method according to any of claims 1-5.
CN202210246695.6A 2022-03-14 2022-03-14 Smart city data sharing method, device and medium based on block chain technology Active CN114793237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210246695.6A CN114793237B (en) 2022-03-14 2022-03-14 Smart city data sharing method, device and medium based on block chain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210246695.6A CN114793237B (en) 2022-03-14 2022-03-14 Smart city data sharing method, device and medium based on block chain technology

Publications (2)

Publication Number Publication Date
CN114793237A CN114793237A (en) 2022-07-26
CN114793237B true CN114793237B (en) 2023-06-20

Family

ID=82459476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210246695.6A Active CN114793237B (en) 2022-03-14 2022-03-14 Smart city data sharing method, device and medium based on block chain technology

Country Status (1)

Country Link
CN (1) CN114793237B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266687A (en) * 2019-06-21 2019-09-20 杭州云象网络技术有限公司 A kind of Internet of Things TSM Security Agent data sharing modularity using block chain technology
CN111159750A (en) * 2020-04-07 2020-05-15 南京邮电大学 Automobile maintenance data storage method based on alliance chain
CN113704357A (en) * 2021-09-01 2021-11-26 雷长宝 Smart city data sharing method and system based on block chain
CN114036240A (en) * 2021-11-25 2022-02-11 北京师范大学 Multi-service provider private data sharing system and method based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266687A (en) * 2019-06-21 2019-09-20 杭州云象网络技术有限公司 A kind of Internet of Things TSM Security Agent data sharing modularity using block chain technology
CN111159750A (en) * 2020-04-07 2020-05-15 南京邮电大学 Automobile maintenance data storage method based on alliance chain
WO2021203797A1 (en) * 2020-04-07 2021-10-14 南京邮电大学 Alliance chain-based method for storing vehicle maintenance and servicing data
CN113704357A (en) * 2021-09-01 2021-11-26 雷长宝 Smart city data sharing method and system based on block chain
CN114036240A (en) * 2021-11-25 2022-02-11 北京师范大学 Multi-service provider private data sharing system and method based on block chain

Also Published As

Publication number Publication date
CN114793237A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CA3058013C (en) Managing sensitive data elements in a blockchain network
US20200374126A1 (en) Method for storing an object on a plurality of storage nodes
JP7510928B2 (en) Computer-implemented system and method for enabling access to data stored on a blockchain
US11860822B2 (en) Immutable ledger with efficient and secure data destruction, system and method
Wang et al. A blockchain-based framework for data sharing with fine-grained access control in decentralized storage systems
US20210385200A1 (en) Blockchain-based service data encryption methods and apparatuses
US10778445B1 (en) Processing data elements stored in blockchain networks
CN103609059A (en) Systems and methods for secure data sharing
CN113302610B (en) Trusted platform based on blockchain
Zhao et al. Design and implementation of the digital education transaction subject two-factor identity authentication system based on blockchain
Liu et al. A data preservation method based on blockchain and multidimensional hash for digital forensics
Kumar et al. Centralized and Decentralized data backup approaches
CN113302612B (en) Computer implementation method, system and device for cross-chain and cross-network data transmission
Mishra et al. Enabling efficient deduplication and secure decentralized public auditing for cloud storage: A redactable blockchain approach
CN113597608A (en) Trusted platform based on block chain
CN114793237B (en) Smart city data sharing method, device and medium based on block chain technology
CN113491090B (en) Trusted platform based on blockchain
Lin et al. A Privacy‐Preserving Intelligent Medical Diagnosis System Based on Oblivious Keyword Search
Fiore Providing trust to multi-cloud storage platforms through the blockchain
Luo et al. When Secure Data Sharing Meets Blockchain: Overview, Challenges and Future Prospects
Zhang et al. Secure deduplication
Alm Nilsson et al. Using Blockchain Techniques to Create an Opinion-Based Whitelisting Procedure
Chen et al. BCS: Blockchain-based Ciphertext Storage Scheme Supporting Data Hierarchical Management.
Basile et al. Providing trust to multi-cloud storage platforms through the blockchain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant