Nothing Special   »   [go: up one dir, main page]

CN113949575B - Block chain frame design data storage method based on edge node calculation - Google Patents

Block chain frame design data storage method based on edge node calculation Download PDF

Info

Publication number
CN113949575B
CN113949575B CN202111213257.1A CN202111213257A CN113949575B CN 113949575 B CN113949575 B CN 113949575B CN 202111213257 A CN202111213257 A CN 202111213257A CN 113949575 B CN113949575 B CN 113949575B
Authority
CN
China
Prior art keywords
data
chain
edge
block
information
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
CN202111213257.1A
Other languages
Chinese (zh)
Other versions
CN113949575A (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.)
CETC 20 Research Institute
Original Assignee
CETC 20 Research Institute
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 CETC 20 Research Institute filed Critical CETC 20 Research Institute
Priority to CN202111213257.1A priority Critical patent/CN113949575B/en
Publication of CN113949575A publication Critical patent/CN113949575A/en
Application granted granted Critical
Publication of CN113949575B publication Critical patent/CN113949575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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]
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0872Generation of secret information including derivation or calculation of cryptographic keys or passwords using geo-location information, e.g. location data, time, relative position or proximity to other entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/08Randomization, e.g. dummy operations or using noise
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/121Timestamp
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a block chain frame design data storage method based on edge node calculation, which comprises the steps of firstly, reading each sensor data through a sensing module and storing the sensor data into edge equipment; then verifying the identity of the node by using an intelligent contract, and carrying out asymmetric encryption on data in the edge equipment after the identity verification is passed, so as to continuously create a block chain sub-chain of related data information; and finally, after the execution of the intelligent contract on the sub-chain is finished, the whole sub-chain is in information communication with the existing data storage main chain, so that the whole sub-chain is inserted into the main chain, and the distributed encryption storage of the data is realized. The method and the system enable the data management of the Internet of things to be more convenient, the number of direct interaction times with the main chain to be fewer, delay to be lower, reduce energy consumption of the block chain main chain when converting data and constructing modules, and reduce the waste of computing resources of the Internet of things layer.

Description

Block chain frame design data storage method based on edge node calculation
Technical Field
The invention relates to the technical field of blockchains, in particular to a blockchain framework design of distributed node computing, and aims to provide a storage method of relevant detection data in storage protection of museum cultural relics.
Background
Encryption protection of various sensing data in the complex internet of things is one of the key technologies in edge computing. At present, the domestic protection of the sensing data is mainly stored in a centralized way through local encryption. As the number of relics increases, this approach will result in local storage being over-stressed, damaging or losing data. The block chain technology is utilized to encrypt and decentralize the sensing data, so that the data storage efficiency can be greatly improved, the data loss and the tampering are prevented, and the data management level of the museum cultural relic resource is improved. Dorri et al (Dorri A,Kanhere SS,Jurdak R,Gauravaram P."Blockchain for IoT security and privacy:the case study of a smart home".2017IEEE International Conference on Pervasive Computing and Communications Workshops,Kona,HI,USA,March 13-17,2017:618-623.) propose a method for encrypted storage of sensed data through a blockchain, but the method is too computationally intensive and storage demanding for deployment equipment, and is difficult to apply on a large scale. Moinet et al (Bendiab K,Kolokotronis N,Shiaeles S,Boucherkha S."WiP:a novel blockchain-based trust model for cloud identity management."2018IEEE 16th International Conference on Dependable,Autonomic and Secure Computing,Athens,Greece,Aug.12-15,2018.) propose an identification authentication method based on a blockchain technique to ensure traceability of operations of data each time, but the technique is not applicable to a distributed edge computing network. Therefore, most of the existing blockchain frames have the problems of complex structure, overlarge calculation amount and storage requirement, serious time delay and energy consumption and the like, are difficult to be deployed on equipment with limited resources, and the common distributed storage architecture (Bremer J,Lehnhoff S."Decentralized coalition formation in agent-based combinatorial heuristics".14th International Conference on Practical Applications of Agents and Multi-Agent Systems,Seville,Spain,Jun.1-3,2016) is difficult to solve the problem of safe storage of the existing distributed node data, and the blockchain frames which accord with the characteristics of a sensing network are required to be provided aiming at the relevant characteristics of edge node calculation. In the blockchain+edge computing technology white paper 2020, a plurality of practical scenes using edge nodes and blockchain applications are proposed, and collection of various data is realized by using convenience of information collection of the nodes. Xu Fangmin et al (Xu Fangmin, zhao Chenglin, yang Fan, li. Industrial data detection blockchain network architecture and detection method based on edge computation [ P ],201811283738.8, chinese patent, 2018 ]) utilize edge nodes to collect data while also utilizing computing power of edge devices to encrypt the data, so that the risk of information leakage is reduced when information is uploaded to the cloud. However, the two methods do not fully utilize the computing power of the edge node, so that frequent data interaction exists between the edge node and the cloud main chain, and the whole system has excessive communication and higher delay. In addition, the existing blockchain model realizes the update authentication of information through timing information broadcasting, and the method can lead the direct communication of each storage node to be too close, and the communication network is overloaded.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a blockchain framework design based on edge node computing, which realizes the deployment of a blockchain framework model on a common edge computing platform and deploys the blockchain framework model in distributed edge equipment so as to reduce the direct information communication and communication load of each edge node and the computing amount of each storage node.
The technical scheme adopted by the invention for solving the technical problems comprises the following steps:
step S1: collecting measurement data of various sensors on the same cultural relics, and transmitting the data to various edge devices through a wireless communication module;
step S2: carrying out identity authentication on each edge node by utilizing an intelligent contract, if the authentication is not passed, the data acquired from the node cannot be stored, and the data are regarded as illegal data, and the storage process is finished; otherwise, go to step S3;
Step S3: encrypting the related sensor data stored in the edge equipment;
Step S4: constructing a block sub-chain on the edge device;
Step S5: judging whether the intelligent contract is completely effective, if not, continuing to transfer to S1 to read the sensing data for encryption storage; the process goes to the next step if the process is completely effective;
step S6: the subchains are completely inserted into the existing block main chain of the cloud, so that data storage in the main chain is realized;
step S7: after the main chain data is stored, the sub-chains in the edge equipment are destroyed, and the storage space is released;
Step S8: and the main chain broadcasts information, synchronizes the information of each distributed node, realizes the distributed storage of data, and completes the construction and storage process of the whole blockchain.
The various sensors include, but are not limited to, temperature sensors, humidity sensors, and infrared sensors.
The encryption operation in the step S3 is as follows:
step S31: the input information length M bit is summed up to 512, with the result that M, if M is not equal to 448, then one 1 and n 0s are padded after the input information, so that the result of summing up the padded input information length pair 512 is equal to 448, where, The information length after filling is 512N+448bit;
step S32: after the filled input information, 64 bits are added for recording the length M of the information before filling;
step S33: generating four standard magic numbers;
Step S34: four rounds of round-robin operation are performed to generate a 128-bit hash value as the final encrypted value.
The four criteria of step S33 are a= (01234567) 16,b=(89ABCDEF)16,c=(FEDCBA98)16,d=(76543210)16.
The loop operation in step S34 is as follows:
Step S341: grouping the input information processed in the step S32, wherein each 512 bits are subdivided into 16 subgroups, and each subgroup is 32 bits;
Step S342: four linear encryption functions are set as follows:
(1)F(X,Y,Z)=(X&Y)|((~X)&Z)
(2)G(X,Y,Z)=(X&Z)|(Y&(~Z))
(3)H(X,Y,Z)=X^Y^Z
(4)I(X,Y,Z)=Y^(X|(~Z))
Step S343: the four linear encryption functions in step S342 are used for each packet to perform the operation, and the specific encryption operation procedure is as follows:
FF (a, b, c, d, mj, s, ti) represents a=b+ ((a+f (b, c, d) +mj+ti) < < < s)
GG (a, b, c, d, mj, s, ti) represents a=b+ ((a+G (b, c, d) +Mj+ti) < < s)
HH (a, b, c, d, mj, s, ti) represents a=b+ ((a+h (b, c, d) +mj+ti) < < < s)
II (a, b, c, d, mj, s, ti) represents a=b+ ((a+I (b, c, d) +Mj+ti) < < < s)
Mj and ti are constants used in the cyclic calculation process, the constants used in each cycle are different, s is a left shift amount, and the s used in each cycle are different;
The calculation result is transferred to S342 iteration, four rounds of iteration are carried out altogether, and the linear encryption functions are used alternately in four rounds of loops;
step S344: the result of the S343 iteration is four 32-bit packets, which are concatenated to generate a 128-bit hash value as the final encrypted value.
The step S4 is to construct a block subchain as follows:
step S41: storing the block address of the last block node in the block sub-chain, so that the previous block address points to the new block address, and inserting new block information is realized;
step S42: storing a read-write time stamp;
step S43: generating a random value using the timestamp as a seed;
step S44: the block sub-chain data block is constructed at the edge device using the encrypted value and the results of steps S41, S42, S43 described above.
The beneficial effects of the invention are as follows:
1) The present invention proposes a hybrid blockchain architecture that allows decentralized data management by building blocksubchains at edge devices. Therefore, the architecture has a computation distribution under the edge computation paradigm, thereby making it possible to optimize the connection between the internet of things and the blockchain. The hybrid architecture optimizes the current end-to-end architecture, so that the data management of the Internet of things is more convenient, the number of direct interactions with the main chain is fewer, and the delay is lower.
2) According to the invention, the edge computing layer is designed in front of the blockchain, and the edge nodes have certain computing capability, so that the process of extracting, converting and arranging the data in the prior period is transferred from the cloud block main chain to the edge computing layer, thereby greatly reducing the energy consumption of the blockchain main chain when converting the data and constructing the module and reducing the computing resource waste of the Internet of things layer.
3) According to the invention, by using the parallel computation of the distributed edge equipment, the application program, the data and the computing capacity are pushed away from the blockchain, so that the communication between the WSN node (i.e. the sensor) and the cloud block main chain is reduced, the wireless data communication traffic between the edge node and the blockchain is reduced, and the traffic pressure of the whole wireless communication network is relieved. By fully utilizing the calculation power of the edge nodes, sub-chains are constructed at the nodes, the calculation amount is dispersed into each edge device from the cloud main chain, the pressure of the whole system in the cloud centralized calculation is eliminated, and the stability and the safety of the system are improved. The adoption of the distributed structure greatly improves the expandability of the whole system, and does not form excessive calculation burden on the cloud.
Drawings
FIG. 1 is a flow chart of the technical scheme of the invention;
FIG. 2 is a schematic diagram of a sub-chain structure of a blockchain framework of the present invention;
FIG. 3 is an overall frame diagram of the blockchain frame design of the present invention based on edge computation.
Detailed Description
The invention will be further illustrated with reference to the following figures and examples, which include but are not limited to the following examples.
The invention provides a blockchain frame design based on edge node calculation, which is used for safely storing daily detection data of cultural relics acquired by different sensors. The method comprises the steps of firstly, reading each sensor data through a sensing module and storing the sensor data into the edge equipment. And verifying the identity of the node by using the intelligent contract, and carrying out asymmetric encryption on the data in the edge equipment after the identity verification is passed, so as to continuously create a blockchain sub-chain of related data information. And finally, after the execution of the intelligent contract on the sub-chain is finished, the whole sub-chain is in information communication with the existing data storage main chain, so that the whole sub-chain is inserted into the main chain, and the distributed encryption storage of the data is realized.
As shown in fig. 1, the technical scheme of the blockchain framework design based on edge computing of the invention comprises the following steps:
step S1: and collecting measurement data of various sensors such as a temperature sensor, a humidity sensor, an infrared sensor and the like on the same cultural relics, and transmitting the data to various edge devices through a wireless communication module.
Step S2: carrying out identity authentication on each edge node by utilizing an intelligent contract, if the authentication is not passed, the data acquired from the node cannot be stored, and the data are regarded as illegal data, and the storage process is finished; otherwise, go to step S3.
Step S3: and encrypting the related sensor data stored in the edge equipment. The specific encryption operation steps are as follows:
Step S31: filling. The input information length M (bit) pair 512 is subjected to remainder, the result is M, if M is not equal to 448, 1 and n 0 are filled after the input information, so that the result of the remainder of the filled input information length pair 512 is equal to 448, wherein the value of n is
Assume that the information length after padding is 512n+448 (bits).
Step S32: the information length is recorded. The length of the input information is 512 n+448+64=512 (n+1) bits, and the length of the input information is then increased by 64 bits to record the length of the information before padding M.
Step S33: four standard magic numbers are generated, wherein the standard magic numbers (physical sequence) are a= (01234567) 16,b=(89ABCDEF)16,c=(FEDCBA98)16,d=(76543210)16 and are used for mixed use in packet iterative calculation, and the four magic numbers can be customized according to actual use in the actual encryption process.
Step S34: four-round loop operation is performed, in which the number of loops is the number of packets (n+1). The specific cyclic operation steps are as follows:
Step S341: the input information processed in step S32 is grouped, and every 512 bits are subdivided into 16 subgroups of 32 bits (4 bytes) each.
Step S342: four linear encryption functions are set as follows:
(1)F(X,Y,Z)=(X&Y)|((~X)&Z)
(2)G(X,Y,Z)=(X&Z)|(Y&(~Z))
(3)H(X,Y,Z)=X^Y^Z
(4)I(X,Y,Z)=Y^(X|(~Z))
wherein, & represents AND operation, | represents OR operation, & represents NOT operation, ≡represents XOR operation.
Step S343: the four linear encryption functions in step S342 are used for each packet to perform the operation, and the specific encryption operation procedure is as follows:
FF (a, b, c, d, mj, s, ti) represents a=b+ ((a+f (b, c, d) +mj+ti) < < < s)
GG (a, b, c, d, mj, s, ti) represents a=b+ ((a+G (b, c, d) +Mj+ti) < < s)
HH (a, b, c, d, mj, s, ti) represents a=b+ ((a+h (b, c, d) +mj+ti) < < < s)
II (a, b, c, d, mj, s, ti) represents a=b+ ((a+I (b, c, d) +Mj+ti) < < < s)
Wherein Mj and ti are constants used in the cyclic calculation process, the constants used in each cycle are different, s is the left shift amount, and the s used in each cycle are different.
The calculation result is transferred to S342 iteration, four iteration rounds are carried out, and the linear encryption functions are alternately used in four rounds of loops.
Step S344: the result of the S343 iteration is four 32-bit packets, which are concatenated to generate a 128-bit hash value as the final encrypted value.
Step S4: a block sub-chain is built on the edge device, wherein the block sub-chain structure is shown in fig. 2.
Step S41: the block address of the last block node in the block sub-chain is stored, so that the previous block address points to the new block address, and the insertion of new block information is realized.
Step S42: the time stamp of the read-write is stored.
Step S43: a random number is generated using the timestamp as a seed.
Step S44: the result of steps S344, S41, S42, S43 described above is used on the edge device to construct a blocksub-chain data block.
Step S5: and judging whether the intelligent contract is completely effective, if the intelligent contract is not completely effective, continuing to transfer to S1 to read the sensing data for encryption storage. And the full effect is taken to the next step.
Step S6: the subchains are completely inserted into the existing block main chain of the cloud, so that data storage in the main chain is realized.
Step S7: after the main chain data is stored, sub chains in the edge equipment are destroyed, and the storage space is released, so that the subsequent storage calculation pressure is relieved.
Step S8: the main chain broadcasts information to synchronize the information of each distributed node, so as to realize the distributed storage of data.
Step S9: and finishing the construction and storage process of the whole block chain.
Fig. 3 is an example of a blockchain architecture application based on edge computation in cultural relic detection provided by the present invention. The method comprises the following steps:
step S1: the sensor is used for collecting detection data of various types in the cultural relics storage process, the data collected by each node are transmitted to the edge computing equipment through the wireless communication network, and the edge computing layer is used for carrying out next computation.
Specifically, the related data collected by the invention are temperature information and humidity information of different parts of the cultural relics, but the data which can be collected and applied comprise but are not limited to the two data, and the edge computing equipment can adopt raspberry pie and simultaneously comprises but is not limited to the application of the edge computing equipment.
Step S2: carrying out identity authentication on each edge node through the intelligent contract, and if the authentication is not passed, considering the data as illegal data; otherwise, the collected relevant temperature and humidity information is the relevant cultural relic information which needs to be stored.
Step S3: and encrypting the temperature and humidity data stored in the edge equipment. The specific encryption operation steps are as follows:
Step S31: the length of the temperature and humidity information is filled separately. Taking temperature information length filling as an example, the temperature information length (bit) pair 512 is used for summing up, if the sum result is not equal to 448, 1 and n 0 are filled into the input information, so that the sum result of the filled input information length pair 512 is equal to 448, and the temperature information length reaches 512n+448 (bit) required by subsequent calculation.
Step S32: the pre-padding information length is stored with 64 bits. The 64 bits of data are added to the information filled in step S31, and the data length is 512 (n+1) bits at this time.
Step S33: the standard magic numbers are set for loading, where the standard magic numbers (physical order) are a1= (01234567) 16,B1=(89ABCDEF)16,C1=(FEDCBA98)16,D1=(76543210)16.
Step S34: grouping the data processed in the step S32, wherein the grouping number is (N+1) groups, and performing four-round loop iterative operation on the grouped data by using four magic numbers in the step S33, wherein the method comprises the following specific steps of:
Step S341: the (n+1) group data is continued to be grouped, i.e., divided into 16 subgroups every 512 bits, with 4 bytes per subgroup, so that there is a total of 16 (n+1) group data. The 16 groups of data were randomly arranged and grouped, each group having 4 groups of data, and a total of four groups. The four packets are then separately encrypted.
Step S342: the 4 linear encryption functions are set as follows:
(1)(X&Y)|((~X)&Z)
(2)(X&Z)|(Y&(~Z))
(3)X^Y^Z
(4)Y^(X|(~Z))
wherein, & represents AND operation, | represents OR operation, & represents NOT operation, ≡represents XOR operation.
Step S343: four-round iterative encryption is performed on the four packets obtained in step S341 by using four sets of encryption functions, respectively.
Step S344: and (3) merging the result obtained by encryption in the step (S343), and merging with the result in the step (S343) to obtain a 128-bit hash value serving as a ciphertext value of information encryption.
Step S4: the block sub-chain is constructed on the edge device, and the block sub-chain structure is shown in fig. 2.
Step S41: and storing the memory block address of the previous node after the block encryption and storage so that the previous block address points to the new block address, and realizing the insertion of new block information.
Step S42: a specific time stamp is stored in the block construction operation.
Step S43: a random number is generated using the timestamp as a seed.
Step S44: and constructing an encryption tree by using the data obtained by encrypting the read temperature and humidity information in the step S3.
Step S5: it is determined whether the smart contract operations are all completed to detect whether the smart contract is fully validated. If the data is not completely validated, the data is not stored and encrypted, and the sensor data is continuously read for encryption and storage, and the process goes to the step S2 to continue the processes of data reading, encryption and storage. If the smart contract is valid, step S6 is continued.
Step S6: and transmitting the constructed subchains to a blockchain layer shown in fig. 3 in the raspberry group, and completely inserting the subchains into a main chain to realize data storage in the main chain.
Step S7: after the main chain data is stored, the raspberry group returns a message, and the sub-chain of the sub-chain related detection data is destroyed to release the storage space and reduce the calculation pressure of the subsequent storage.
Step S8: the main chain broadcasts information in the block chain layer to synchronize node information of other block chain layers, so as to realize distributed encryption storage.
Step S9: and (5) storing and encrypting the related data acquired in the cultural relic detection process.

Claims (4)

1. A blockchain framework design data storage method based on edge node computation, comprising the steps of:
step S1: collecting measurement data of various sensors on the same cultural relics, and transmitting the data to various edge devices through a wireless communication module;
step S2: carrying out identity authentication on each edge device by utilizing an intelligent contract, if the authentication is not passed, the data acquired from the node cannot be stored, and the data are regarded as illegal data, and the storage process is finished; otherwise, go to step S3;
Step S3: encrypting the related sensor data stored in the edge equipment;
The encryption operation in the step S3 is as follows:
step S31: the input information length M bit is summed up to 512, with the result that M, if M is not equal to 448, then one 1 and n 0s are padded after the input information, so that the result of summing up the padded input information length pair 512 is equal to 448, where, The information length after filling is 512N+448bit;
step S32: after the filled input information, 64 bits are added for recording the length M of the information before filling;
step S33: generating four standard magic numbers;
step S34: performing four-round cyclic operation to generate a 128-bit hash value as a final encrypted value;
Step S4: constructing a block sub-chain on the edge device;
The step S4 is to construct a block subchain as follows:
Step S41: storing the block address of the last edge device in the block sub-chain, so that the previous block address points to the new block address, and inserting new block information is realized;
step S42: storing a read-write time stamp;
step S43: generating a random value using the timestamp as a seed;
Step S44: constructing a block sub-chain data block on the edge device by using the encrypted value and the results of the steps S41, S42 and S43;
Step S5: judging whether the intelligent contract is completely effective, if not, continuing to transfer to the step S1 to read the sensing data for encryption storage; the process goes to the next step if the process is completely effective;
step S6: the subchains are completely inserted into the existing block main chain of the cloud, so that data storage in the main chain is realized;
step S7: after the main chain data is stored, the sub-chains in the edge equipment are destroyed, and the storage space is released;
Step S8: and the main chain broadcasts information, synchronizes information of each edge device, realizes distributed storage of data, and completes the construction and storage process of the whole block chain.
2. The blockchain framework design data storage method based on edge node computing of claim 1, wherein the various types of sensors include, but are not limited to, temperature sensors, humidity sensors and infrared sensors.
3. The blockchain framework design data storage method based on edge node computing of claim 1, wherein the four standard magic numbers of step S33 employ a= (01234567) 16,b=(89ABCDEF)16,c=(FEDCBA98)16,d=(76543210)16.
4. The blockchain framework design data storage method based on edge node computation of claim 3, wherein the loop operation step of step S34 is as follows:
Step S341: grouping the input information processed in the step S32, wherein each 512 bits are subdivided into 16 subgroups, and each subgroup is 32 bits;
Step S342: four linear encryption functions are set as follows:
(1)F(X,Y,Z)=(X&Y)|((~X)&Z)
(2)G(X,Y,Z)=(X&Z)|(Y&(~Z))
(3)H(X,Y,Z)=X^Y^Z
(4)I(X,Y,Z)=Y^(X|(~Z))
Step S343: the four linear encryption functions in step S342 are used for each packet to perform the operation, and the specific encryption operation procedure is as follows:
FF (a, b, c, d, mj, s, ti) represents a=b+ ((a+f (b, c, d) +mj+ti) < < < s)
GG (a, b, c, d, mj, s, ti) represents a=b+ ((a+G (b, c, d) +Mj+ti) < < s)
HH (a, b, c, d, mj, s, ti) represents a=b+ ((a+h (b, c, d) +mj+ti) < < < s)
II (a, b, c, d, mj, s, ti) represents a=b+ ((a+I (b, c, d) +Mj+ti) < < < s)
Mj and ti are constants used in the cyclic calculation process, the constants used in each cycle are different, s is a left shift amount, and the s used in each cycle are different;
Turning the calculation result to step S342 for iteration, and iterating four times altogether, wherein the linear encryption functions are alternately used in four-wheel loops;
step S344: the result of the iteration of step S343 is four 32-bit packets, which are concatenated to generate a 128-bit hash value as the final encrypted value.
CN202111213257.1A 2021-10-19 2021-10-19 Block chain frame design data storage method based on edge node calculation Active CN113949575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111213257.1A CN113949575B (en) 2021-10-19 2021-10-19 Block chain frame design data storage method based on edge node calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111213257.1A CN113949575B (en) 2021-10-19 2021-10-19 Block chain frame design data storage method based on edge node calculation

Publications (2)

Publication Number Publication Date
CN113949575A CN113949575A (en) 2022-01-18
CN113949575B true CN113949575B (en) 2024-10-18

Family

ID=79331689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111213257.1A Active CN113949575B (en) 2021-10-19 2021-10-19 Block chain frame design data storage method based on edge node calculation

Country Status (1)

Country Link
CN (1) CN113949575B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378658B (en) * 2022-07-27 2023-04-18 咚咚数字科技有限公司 Park communication data transmission method based on Internet of things cloud edge collaboration
CN118784697B (en) * 2024-09-12 2025-01-21 山东博物馆 An Internet of Things management method and platform for museum collections

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302405A (en) * 2018-10-31 2019-02-01 北京邮电大学 Blockchain network architecture and detection method for industrial data detection based on edge computing
CN112380578A (en) * 2020-11-20 2021-02-19 天翼电子商务有限公司 Edge computing framework based on block chain and trusted execution environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079159B (en) * 2021-04-01 2022-06-10 北京邮电大学 Edge computing network system based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302405A (en) * 2018-10-31 2019-02-01 北京邮电大学 Blockchain network architecture and detection method for industrial data detection based on edge computing
CN112380578A (en) * 2020-11-20 2021-02-19 天翼电子商务有限公司 Edge computing framework based on block chain and trusted execution environment

Also Published As

Publication number Publication date
CN113949575A (en) 2022-01-18

Similar Documents

Publication Publication Date Title
CN113949575B (en) Block chain frame design data storage method based on edge node calculation
CN107171812A (en) It is a kind of based on block chain without key signature infrastructure construction method
CN106982203A (en) The ATM network system and its information processing method of robust based on block chain technology
Kwon et al. Secure and efficient broadcast authentication in wireless sensor networks
AbuHmed et al. Software-based remote code attestation in wireless sensor network
US20120011566A1 (en) System and method for sensor network authentication based on xor chain
Seys et al. Power consumption evaluation of efficient digital signature schemes for low power devices
CN102063587A (en) Cloud storage data storage and retrieval method, device and system
He et al. A Weighted Threshold Secret Sharing Scheme for Remote Sensing Images Based on Chinese Remainder Theorem.
Yu et al. Constrained function-based message authentication for sensor networks
CN111200604A (en) Privacy protection method and system based on data aggregation
CN117614707A (en) Block chain transaction method, system, electronic equipment and medium based on intelligent contract
CN104717644A (en) Two-tiered wireless sensor network range query method capable of verifying privacy protection
CN113591103A (en) Identity authentication method and system between intelligent terminals of power internet of things
Das An efficient random key distribution scheme for large‐scale distributed sensor networks
Juma et al. Watermarking sensor data for protecting the integrity
Zhou et al. An efficient authentication scheme based on deployment knowledge against mobile sink replication attack in UWSNs
Jemai et al. Study of key pre-distribution schemes in wireless sensor networks: case of BROSK (use of WSNet)
Kůr et al. Two improvements of random key predistribution for wireless sensor networks
Kur et al. Two Improvements of Random Key Predistribution for Wireless Sensor Networks.
Dener et al. TeenySec: a new data link layer security protocol for WSNs
Chanal et al. Secured data integrity scheme for Internet of things
Wang et al. IoT data security authentication and key negotiation scheme based on edge computing and blockchain
Nguyen et al. a novel watermarking scheme to against fake node identification attacks in WSNs
Sun et al. Internet of thing wireless sensor entity authentication scheme based on merkle

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