Smart building data sharing method, system and device based on block chain and medium

By adopting a blockchain-based data sharing method in smart buildings, the collected data is encrypted and uploaded to the blockchain network, the security risks and privacy leakage problems of centralized data storage are solved, and efficient and secure data sharing and privacy protection are achieved.

CN119538306APending Publication Date: 2025-02-28山东浪潮智慧建筑科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411552696.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Centralized data storage methods in smart buildings are easily targeted, and involve a large number of user privacy, which poses the risk of privacy leakage.

Method used

The data sharing method based on blockchain is adopted to divide the collected data into several encryption levels, and the encryption algorithm is randomly selected according to the encryption level for encryption processing, and uploaded to the blockchain network. Ensure data security and privacy protection through the decentralized, distributed storage and tamper-proof features of blockchain.

Benefits of technology

Enhanced data security, prevent privacy leakage and data tampering, ensure the integrity and authenticity of data, and achieve transparency and traceability of data sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538306A_ABST
    Figure CN119538306A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain-based smart building data sharing method, system and device, and a medium, mainly relates to the technical field of building data sharing, and is used for solving the problems that a centralized data storage mode is easy to become an attack target, and a smart building relates to privacy and has privacy leakage. Comprising the following steps: acquiring collection data of Internet of Things equipment in a smart building; carrying out encryption processing on the collected data to obtain encrypted private data; uploading the encrypted privacy data and a decryption algorithm name of the encryption algorithm in a preset encryption level database to a block chain network; when any block chain node receives a data access request, determining a corresponding open user permission based on the carried user information; and calling a preset encryption level database retrieval interface, inputting a decryption algorithm name, entering a decryption algorithm operation interface, importing the encrypted privacy data, and obtaining the decrypted acquisition data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart building data sharing, and in particular to a blockchain-based smart building data sharing method, system, device and medium. Background Art

[0002] With the rapid development of the Internet of Things, big data and artificial intelligence technologies around the world, smart buildings have gradually become a core component of modern urban development. Smart buildings use sensors, Internet of Things devices, monitoring systems and other technologies to monitor and collect various data inside and outside the building in real time, so as to achieve intelligent management and control of internal resources of the building.

[0003] However, the types of data generated in smart buildings are numerous and huge, and involve a large amount of user privacy and sensitive information, such as resident behavior data, equipment operation status data, building environment data, etc. With the increase in data volume and the complexity of data types, data security and privacy protection face severe challenges. Traditional smart building data sharing systems usually rely on centralized servers or data centers for data management and processing. This approach exists: 1. Centralized data storage methods are easy targets for attacks, and data may be tampered with, leaked, or accessed by unauthorized users. 2. Centralized systems are susceptible to single node failures. Once a server or data center has a problem, the entire system may be paralyzed. 3. Data in smart buildings involves multiple participants (such as owners, property companies, equipment providers, etc.), which can easily lead to privacy leaks. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present application provides a blockchain-based smart building data sharing method, system, device and medium to solve the problem that centralized data storage methods are easily targeted by attacks, and smart buildings involve privacy and there is a problem of privacy leakage.

[0005] In a first aspect, the present application provides a blockchain-based smart building data sharing method, the method comprising: Acquire the collected data of IoT devices in smart buildings; wherein the collected data is divided into several encryption levels; when obtaining the collected data, based on the encryption level of the collected data, randomly select any encryption algorithm from the corresponding preset encryption level database, encrypt the collected data, and obtain encrypted privacy data; upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network; when any blockchain node receives a data access request, determine the corresponding open user permissions based on the carried user information; wherein user permissions include: read permissions for encrypted privacy data, and the data access request includes user information and the name of encrypted privacy data; when the current user permissions include read permissions for encrypted privacy data involved in the data access request, display the decryption algorithm name and the name of the preset encryption level database; call the preset encryption level database retrieval interface, enter the decryption algorithm name, enter the decryption algorithm running interface, import the encrypted privacy data, and obtain the decrypted collected data.

[0006] The smart building data sharing method provided by the embodiment of the present application divides the collected data into several encryption levels, and randomly selects the encryption algorithm for encryption processing according to the encryption level, so that the encryption method corresponding to the collected data uploaded each time may be different, thereby increasing the security of the data. Since smart buildings involve a large amount of personal privacy information, such as residents' living habits, location information, etc. This application prevents the risk of privacy leakage by encrypting sensitive data and storing the encrypted data and the name of the decryption algorithm on the blockchain network instead of directly storing plaintext data. Blockchain technology itself has the characteristics of decentralization, distributed storage and tamper-proof. Storing encrypted data and decryption algorithm information on the blockchain network can ensure the integrity and authenticity of the data and prevent the data from being maliciously tampered with or deleted. It solves the problem that centralized data storage methods are easily targeted by attacks, and smart buildings involve privacy and privacy leakage. In addition, this application determines the corresponding user permissions based on user information, including the read permission of encrypted privacy data. It ensures that only authorized users can access sensitive data, further enhancing the security of the system. In addition, since all data and operation records are stored on the blockchain network, data sharing becomes easier and more transparent. At the same time, the traceability feature of blockchain also allows any operation on data to be recorded and tracked, which helps to discover and resolve potential security issues.

[0007] In one implementation of the present application, the Internet of Things device includes at least an environment detection sensor, a device operation monitor, and a user behavior recorder.

[0008] In one implementation of the present application, before randomly selecting any encryption algorithm from a corresponding preset encryption level database based on the encryption level of the collected data, the method further includes: Configure the encryption level of each IoT device; Establish a preset encryption level database corresponding to each encryption level, and add several encryption algorithms to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same; obtain the running interface address of the decryption algorithm corresponding to each encryption algorithm, and store the running interface address and the decryption algorithm name in the corresponding preset encryption level database; build a search interface for each preset encryption level database, and give the search interface the function of jumping to the running interface address of the decryption algorithm according to the decryption algorithm name.

[0009] The smart building data sharing method provided in the embodiment of the present application establishes a preset encryption level database with multiple encryption levels, and each encryption level corresponds to a set of different encryption algorithms. When the IoT device collects data, an encryption level is assigned to it. An encryption algorithm is randomly selected from the corresponding encryption level to encrypt the collected data. The encryption process can adopt symmetric encryption, asymmetric encryption or hybrid encryption to ensure the security of the data. The encrypted data (i.e., encrypted privacy data) and the decryption algorithm number of the encryption algorithm in the preset encryption level database are stored on the chain for subsequent data access and decryption. In addition, the encrypted privacy data is not decrypted during the entire storage process until the decryption algorithm operation interface address is jumped to the interface address. The currently required data is decrypted through the decryption algorithm operation interface, and all other data is invisible, which minimizes the risk of data leakage.

[0010] In one implementation of the present application, when acquiring the collected data, based on the encryption level of the collected data, any encryption algorithm is randomly selected from the corresponding preset encryption level database, specifically including: When obtaining the collected data, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; Based on the encryption level of the collected data, a corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

[0011] In one implementation of the present application, when any blockchain node receives a data access request, it determines the corresponding open user permissions based on the carried user information, specifically including: When any blockchain node receives a data access request, it reads the encrypted private data involved in the data access request; Determine the content of the triggered smart contract based on the encryption level of the encrypted privacy data; Obtain the user information carried in the data access request and determine the user permissions corresponding to the user information in the triggered smart contract content.

[0012] In the second aspect, the present application provides a blockchain-based smart building data sharing system, the system comprising: A data collection module is used to obtain the collected data of IoT devices in smart buildings; wherein the collected data is divided into several encryption levels; A data encryption module is used to randomly select any encryption algorithm from a corresponding preset encryption level database based on the encryption level of the collected data when obtaining the collected data, encrypt the collected data, and obtain encrypted privacy data; A blockchain network module, used to upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network; A user detection module is used to determine the corresponding open user rights based on the carried user information when any blockchain node receives a data access request; wherein the user rights include: the permission to read encrypted private data, and the data access request includes the user information and the name of the encrypted private data; The data decryption module is used to display the decryption algorithm name and the preset encryption level database name when the current user authority includes the read authority of the encrypted privacy data involved in the data access request; call the preset encryption level database retrieval interface, enter the decryption algorithm name, enter the decryption algorithm operation interface, import the encrypted privacy data, and obtain the decrypted collected data.

[0013] In one implementation of the present application, the system further includes a configuration module. Used to configure the encryption level of each IoT device; The system also includes building modules, Used to establish a preset encryption level database corresponding to each encryption level, and add several encryption algorithms to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same; obtain the running interface address of the decryption algorithm corresponding to each encryption algorithm, and store the running interface address and the decryption algorithm name in the corresponding preset encryption level database; build a retrieval interface for each preset encryption level database, and give the retrieval interface the function of jumping to the decryption algorithm running interface address according to the decryption algorithm name.

[0014] In one implementation of the present application, the data encryption module includes an encryption unit, When obtaining collected data, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; Based on the encryption level of the collected data, a corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

[0015] In a third aspect, the present application provides a blockchain-based smart building data sharing device, the device comprising: processor; and a memory having executable codes stored thereon, which, when executed, causes the processor to execute a blockchain-based smart building data sharing method as any one of the above items.

[0016] In a fourth aspect, the present application provides a non-volatile computer storage medium on which computer instructions are stored. When the computer instructions are executed, they implement a blockchain-based smart building data sharing method as described above.

[0017] Those skilled in the art can understand that the present application has at least the following beneficial effects: The present application proposes a blockchain-based smart building data sharing method, system, device and medium. By dividing the collected data into several encryption levels and randomly selecting an encryption algorithm for encryption processing according to the encryption level, the encryption method corresponding to each uploaded collected data may be different, thereby increasing the security of the data. Since smart buildings involve a large amount of personal privacy information, such as residents' living habits, location information, etc., the present application prevents the risk of privacy leakage by encrypting sensitive data and storing the encrypted data and the name of the decryption algorithm on the blockchain network instead of directly storing plaintext data. The decentralized, distributed storage and tamper-proof characteristics of blockchain technology are utilized. Storing encrypted data and decryption algorithm information on the blockchain network can ensure the integrity and authenticity of the data and prevent the data from being maliciously tampered with or deleted. It solves the problem that centralized data storage methods are easily targeted by attacks, and smart buildings involve privacy and privacy leakage. In addition, the present application determines the corresponding user permissions based on user information, including the read permission of encrypted privacy data. It ensures that only authorized users can access sensitive data, further enhancing the security of the system. In addition, since all data and operation records are stored on the blockchain network, data sharing becomes easier and more transparent. At the same time, the traceability feature of blockchain also allows any operation on data to be recorded and tracked, which helps to discover and resolve potential security issues. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Some embodiments of the present disclosure are described below with reference to the accompanying drawings, in which: Figure 1 This is a flow chart of a blockchain-based smart building data sharing method provided in an embodiment of the present application.

[0019] Figure 2 This is a schematic diagram of the internal structure of a blockchain-based smart building data sharing system provided in an embodiment of the present application.

[0020] Figure 3 This is a schematic diagram of the internal structure of a blockchain-based smart building data sharing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] It should be understood by those skilled in the art that the embodiments described below are only preferred embodiments of the present disclosure, and do not mean that the present disclosure can only be implemented through the preferred embodiments. The preferred embodiments are only used to explain the technical principles of the present disclosure, and are not used to limit the protection scope of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present disclosure.

[0022] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0023] The main purpose of this application is to solve the security risks, data tampering, privacy leakage and other problems existing in the existing smart building data sharing system. By introducing blockchain technology, it aims to establish an efficient and secure smart building data sharing platform to ensure safe and reliable data exchange in a multi-party smart building environment.

[0024] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0025] The embodiment provides a method for sharing smart building data based on blockchain, such as Figure 1 As shown, the method provided in the embodiment of the present application mainly includes the following steps: Step 110: Acquire the collected data of the IoT devices in the smart building.

[0026] Among them, the collected data is divided into several encryption levels.

[0027] In some embodiments, the IoT device includes at least an environment detection sensor, a device operation monitor, and a user behavior recorder.

[0028] Step 120: When the collected data is obtained, based on the encryption level of the collected data, any encryption algorithm is randomly selected from the corresponding preset encryption level database to encrypt the collected data to obtain encrypted private data.

[0029] It should be noted that the encryption level of the collected data is related to the preset encryption level of the corresponding IoT device. In order to ensure that user privacy data will not be leaked, this application can modify the encryption level of each IoT device. Several encryption algorithms are preset in the preset encryption level database, and the encryption algorithms corresponding to each preset encryption level database are not the same.

[0030] In some embodiments, the encryption level of each IoT device is completed through configuration. The configuration subject is the encryption processing server.

[0031] In some embodiments, a preset encryption level database corresponding to each encryption level may be established, and a number of encryption algorithms may be added to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same.

[0032] In addition, in order to avoid data omissions due to the multi-node nature of the blockchain itself after the data is stored in the blockchain, this application does not decrypt the data after the data is stored, but instead builds a retrieval interface and jumps to the specified decryption algorithm running interface address through the retrieval interface.

[0033] In some embodiments, a search interface is built, and the specific method of jumping to the specified decryption algorithm running interface address through the search interface is as follows: obtaining the running interface interface address of the decryption algorithm corresponding to each encryption algorithm, and storing the running interface interface address and the decryption algorithm name in the corresponding preset encryption level database; building a search interface for each preset encryption level database, and giving the search interface the function of jumping to the decryption algorithm running interface interface address according to the decryption algorithm name.

[0034] This step can be specifically as follows: When the collected data is obtained, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; based on the encryption level of the collected data, the corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

[0035] Step 130: Upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network.

[0036] In addition, it should be noted that the blockchain network adopts one or more of the following consensus mechanisms: proof of work (PoW), proof of stake (PoS) or Byzantine Fault Tolerance (PBFT) to ensure the security of the network and the consistency of the distributed ledger. In addition, the blockchain network involved in this application includes several blockchain nodes, which can upload data or obtain data when the preset upload requirements are met.

[0037] Step 140: When any blockchain node receives a data access request, it determines the corresponding open user permissions based on the carried user information.

[0038] It should be noted that user permissions include: permission to read encrypted private data.

[0039] In some embodiments, when any blockchain node receives a data access request, it determines the corresponding open user permissions based on the carried user information, specifically including: When any blockchain node receives a data access request, it reads the encrypted privacy data involved in the data access request; determines the triggered smart contract content based on the encryption level of the encrypted privacy data; obtains the user information carried in the data access request, and determines the user permissions corresponding to the user information in the triggered smart contract content.

[0040] It should be noted that the correspondence between user information and user permissions is preset in the smart contract content.

[0041] Step 150: When the current user authority includes the read authority for the encrypted privacy data involved in the data access request, the decryption algorithm name and the preset encryption level database name are displayed; the preset encryption level database retrieval interface is called, the decryption algorithm name is input, the decryption algorithm operation interface is entered, the encrypted privacy data is imported, and the decrypted collected data is obtained.

[0042] Based on the foregoing description, it can be seen that the present embodiment ensures the confidentiality of the data by dividing the collected data into several encryption levels and randomly selecting an encryption algorithm for encryption processing according to the encryption level. Even if the data is intercepted during transmission or storage, it is difficult for an attacker to crack the data content due to the use of different and random encryption technologies. In addition, the present application allows the encryption level of the IoT device to be modified, and the encryption level of the collected data is determined according to the preset encryption level of the device, and the encryption strength can be adjusted according to actual needs. The present application uploads the encrypted privacy data and the name of the decryption algorithm to the blockchain network, and uses the consensus mechanism of the blockchain (such as proof of work, proof of equity or Byzantine fault tolerance protocol) to ensure the security of the data and the consistency of the distributed ledger. This helps prevent the data from being tampered with or deleted, and enhances the integrity and reliability of the data. The present application determines the corresponding open user rights based on the carried user information, including the read rights of the encrypted privacy data. This ensures that only authorized users can access sensitive data. In addition, the correspondence between user information and user rights is preset through the smart contract content, which realizes automated rights management and auditing, and improves the efficiency and accuracy of the system. The present application builds a search interface, jumps to the specified decryption algorithm operation interface interface address through the search interface, and simplifies the process of data sharing and retrieval. Users do not need to care about the specific location of data storage and the details of the decryption algorithm. They can easily access the required data through the retrieval interface. In addition, since the data is stored on the blockchain network, multiple blockchain nodes save copies of the data, which improves the availability and redundancy of the data. Even if a node fails or data is lost, other nodes can still provide data services.

[0043] In addition, this application Figure 2 A blockchain-based smart building data sharing system is provided in the embodiment of the present application. Figure 2 As shown, the system provided in the embodiment of the present application mainly includes: The data collection module 210 is used to obtain the collected data of the IoT devices in the smart building; wherein the collected data is divided into several encryption levels.

[0044] The data encryption module 220 is used to randomly select any encryption algorithm from the corresponding preset encryption level database based on the encryption level of the collected data when obtaining the collected data, encrypt the collected data, and obtain encrypted privacy data.

[0045] The data encryption module 220 includes an encryption unit, When obtaining collected data, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; Based on the encryption level of the collected data, a corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

[0046] The blockchain network module 230 is used to upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network.

[0047] The user detection module 240 is used to determine the corresponding open user permissions based on the carried user information when any blockchain node receives a data access request; wherein the user permissions include: the permission to read encrypted private data, and the data access request includes the user information and the name of the encrypted private data.

[0048] The data decryption module 250 is used to display the decryption algorithm name and the preset encryption level database name when the current user authority includes the read authority of the encrypted privacy data involved in the data access request; call the preset encryption level database retrieval interface, enter the decryption algorithm name, enter the decryption algorithm operation interface, import the encrypted privacy data, and obtain the decrypted collected data.

[0049] The system also includes a configuration module for configuring the encryption level of each IoT device.

[0050] The system also includes a construction module for establishing a preset encryption level database corresponding to each encryption level, and adding a number of encryption algorithms to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same; obtaining the running interface address of the decryption algorithm corresponding to each encryption algorithm, and storing the running interface address and the decryption algorithm name in the corresponding preset encryption level database; building a retrieval interface for each preset encryption level database, and giving the retrieval interface the function of jumping to the decryption algorithm running interface address according to the decryption algorithm name.

[0051] The above is a method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a blockchain-based smart building data sharing device. Figure 3 As shown, the device includes: a processor; and a memory on which executable code is stored. When the executable code is executed, the processor executes a blockchain-based smart building data sharing method as described in the above embodiment.

[0052] Specifically, the server side obtains the collected data of the Internet of Things devices in the smart building; wherein, the collected data is divided into several encryption levels; when obtaining the collected data, based on the encryption level of the collected data, any encryption algorithm is randomly selected from the corresponding preset encryption level database, and the collected data is encrypted to obtain encrypted privacy data; the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database are uploaded to the blockchain network; when any blockchain node receives a data access request, the corresponding open user permissions are determined based on the carried user information; wherein the user permissions include: read permissions for encrypted privacy data, and the data access request includes user information and the name of encrypted privacy data; when the current user permissions include read permissions for encrypted privacy data involved in the data access request, the decryption algorithm name and the name of the preset encryption level database are displayed; the preset encryption level database retrieval interface is called, the decryption algorithm name is input, the decryption algorithm operation interface is entered, the encrypted privacy data is imported, and the decrypted collected data is obtained.

[0053] In addition, an embodiment of the present application also provides a non-volatile computer storage medium on which executable instructions are stored. When the executable instructions are executed, a blockchain-based smart building data sharing method as described above is implemented.

[0054] So far, the technical solutions of the present disclosure have been described in combination with the above multiple embodiments, but it is easy for those skilled in the art to understand that the protection scope of the present disclosure is not limited to these specific embodiments. Without departing from the technical principles of the present disclosure, those skilled in the art can split and combine the technical solutions in the above-mentioned various embodiments, and can also make equivalent changes or replacements to the relevant technical features. Any changes, equivalent replacements, improvements, etc. made within the technical concept and / or technical principle of the present disclosure will fall within the protection scope of the present disclosure.

Claims

1. A blockchain-based smart building data sharing method, characterized in that: The method comprises: Obtaining collected data from IoT devices in smart buildings; where the collected data is divided into several encryption levels; When obtaining the collected data, based on the encryption level of the collected data, randomly select any encryption algorithm from the corresponding preset encryption level database, encrypt the collected data, and obtain encrypted privacy data; Upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network; When any blockchain node receives a data access request, it determines the corresponding open user permissions based on the carried user information; wherein the user permissions include: the permission to read encrypted private data, and the data access request includes the user information and the name of the encrypted private data; When the current user permissions include the read permission for the encrypted privacy data involved in the data access request, the decryption algorithm name and the preset encryption level database name are displayed; the preset encryption level database retrieval interface is called, the decryption algorithm name is entered, the decryption algorithm operation interface is entered, the encrypted privacy data is imported, and the decrypted collected data is obtained.

2. The blockchain-based smart building data sharing method according to claim 1 is characterized in that: IoT devices include at least environmental detection sensors, equipment operation monitors, and user behavior recorders.

3. The blockchain-based smart building data sharing method according to claim 1 is characterized in that: Before randomly selecting any encryption algorithm from a corresponding preset encryption level database based on the encryption level of the collected data, the method further includes: Configure the encryption level of each IoT device; Establish a preset encryption level database corresponding to each encryption level, and add several encryption algorithms to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same; obtain the running interface address of the decryption algorithm corresponding to each encryption algorithm, and store the running interface address and the decryption algorithm name in the corresponding preset encryption level database; build a search interface for each preset encryption level database, and give the search interface the function of jumping to the running interface address of the decryption algorithm according to the decryption algorithm name.

4. The blockchain-based smart building data sharing method according to claim 1 is characterized in that: When obtaining the collected data, based on the encryption level of the collected data, randomly select any encryption algorithm from the corresponding preset encryption level database, specifically including: When obtaining the collected data, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; Based on the encryption level of the collected data, a corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

5. The blockchain-based smart building data sharing method according to claim 1 is characterized in that: When any blockchain node receives a data access request, it determines the corresponding open user permissions based on the carried user information, including: When any blockchain node receives a data access request, it reads the encrypted private data involved in the data access request; Determine the content of the triggered smart contract based on the encryption level of the encrypted privacy data; Obtain the user information carried in the data access request and determine the user permissions corresponding to the user information in the triggered smart contract content.

6. A blockchain-based smart building data sharing system, characterized in that: The system comprises: A data collection module is used to obtain the collected data of IoT devices in smart buildings; wherein the collected data is divided into several encryption levels; A data encryption module is used to randomly select any encryption algorithm from a corresponding preset encryption level database based on the encryption level of the collected data when obtaining the collected data, encrypt the collected data, and obtain encrypted privacy data; A blockchain network module, used to upload the encrypted privacy data and the decryption algorithm name of the encryption algorithm in the preset encryption level database to the blockchain network; A user detection module is used to determine the corresponding open user rights based on the carried user information when any blockchain node receives a data access request; wherein the user rights include: the permission to read encrypted private data, and the data access request includes the user information and the name of the encrypted private data; The data decryption module is used to display the decryption algorithm name and the preset encryption level database name when the current user authority includes the read authority of the encrypted privacy data involved in the data access request; call the preset encryption level database retrieval interface, enter the decryption algorithm name, enter the decryption algorithm operation interface, import the encrypted privacy data, and obtain the decrypted collected data.

7. The blockchain-based smart building data sharing system according to claim 6 is characterized in that: The system also includes a configuration module, Used to configure the encryption level of each IoT device; The system also includes a building module, Used to establish a preset encryption level database corresponding to each encryption level, and add several encryption algorithms to each preset encryption level database; wherein the encryption algorithms in each preset encryption level database are not the same; obtain the running interface address of the decryption algorithm corresponding to each encryption algorithm, and store the running interface address and the decryption algorithm name in the corresponding preset encryption level database; build a retrieval interface for each preset encryption level database, and give the retrieval interface the function of jumping to the decryption algorithm running interface address according to the decryption algorithm name.

8. The blockchain-based smart building data sharing system according to claim 6 is characterized in that: The data encryption module includes an encryption unit, When obtaining collected data, the encryption level of the collected data is determined according to the preset encryption level of the IoT device corresponding to the collected data; Based on the encryption level of the collected data, a corresponding preset encryption level database is determined, and then any encryption algorithm is randomly selected from the corresponding preset encryption level database.

9. A blockchain-based smart building data sharing device, characterized in that: The device comprises: processor; and a memory having executable codes stored thereon, which, when the executable codes are executed, enable the processor to execute a blockchain-based smart building data sharing method as described in any one of claims 1 to 5.

10. A non-volatile computer storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed, they implement a blockchain-based smart building data sharing method as described in any one of claims 1-5.