An edge device network and method of use thereof, device
By introducing blockchain technology and consensus mechanisms into edge device networks, two-way verification and tamper detection of data are achieved, solving the problem of data authenticity and availability of edge devices under communication constraints, and ensuring the integrity and security of data before and after transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2021-12-24
- Publication Date
- 2026-07-24
AI Technical Summary
In situations where communication is restricted, once the security chip of an edge device is cracked, the authenticity and availability of the data cannot be guaranteed, and there is a risk of spoofing and tampering.
By employing blockchain technology, edge devices and edge servers serve as consensus nodes in the blockchain network. Utilizing hash operations and consensus mechanisms, an authentication chain and an information chain are established. Combined with asymmetric encryption and dynamic parameters, this enables two-way data verification and tamper detection.
In environments with limited communication, it enables rapid location of faulty or illegal equipment, ensures the immutability of data and authentication and authorization of transmission, establishes a trustworthy system, and ensures the authenticity and availability of data.
Smart Images

Figure CN116346378B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to an edge device network and its usage method and equipment. Background Technology
[0002] In edge scenarios with limited communication, this refers to situations where the external network signal is poor, resulting in low communication efficiency between edge devices and database servers, or where the scenario restricts device access to the external network, making it impossible to transmit, process, and use data in a timely manner. Under these communication constraints, edge devices mostly adopt offline mode. Offline mode means that in edge scenarios, neither the edge devices nor the local server connect to the public network, performing offline data collection and processing services. Data is then transmitted back through the interface after the work is completed.
[0003] The shortcoming of existing technology is that once the security chip of the edge device itself is cracked, the authenticity and availability of the data in the edge device cannot be guaranteed. Summary of the Invention
[0004] This invention provides an edge device network and its usage method and device, which solves the problem that the authenticity and availability of data in the edge device cannot be guaranteed after the security chip of the edge device itself is cracked.
[0005] This invention provides the following technical solutions:
[0006] An edge device network includes: an edge server and a plurality of edge devices, wherein:
[0007] Edge devices and edge servers serve as consensus nodes in the blockchain network. Edge servers and various edge devices are connected to form the blockchain network through short-range wireless communication in a P2P and fully interconnected network manner.
[0008] Edge devices are used to perform hash calculations on source data after acquiring it, and then send the source data to the edge server. The hash value they generate is verified within the blockchain network and then broadcast, so that the accounting nodes can generate certified blocks.
[0009] An edge server is used to perform hash calculations on source data sent by edge devices after receiving the source data, broadcast the hash value obtained from the calculation, and generate information blocks from the source data after verification by the edge devices within the blockchain network.
[0010] The edge server is also used to compare the hash value of the authentication chain with the hash value sent by the edge device, and write the comparison result into the information blockchain;
[0011] The edge server is also used to generate information blocks on the information chain when the number of nodes that have determined that the source data has not been tampered with by comparing hash values with the edge devices according to the consensus mechanism reaches a preset number of consensus nodes.
[0012] In practice, the edge server uses a mesh communication network topology to communicate with edge devices.
[0013] A method of using the aforementioned edge device network includes:
[0014] After acquiring source data, the edge device performs a hash operation and sends the source data to the edge server. The hash value it generates is then verified within the blockchain network and broadcast, and the accounting nodes generate a certified block.
[0015] After receiving source data sent by the edge device, the edge server performs a hash operation on the source data, broadcasts the hash value obtained from the operation, and after verification by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0016] The edge server compares the hash value of the authentication chain with the hash value sent by the edge device and writes the comparison result into the information blockchain;
[0017] When the edge server and edge device determine through hash value comparison using a consensus mechanism that the source data has not been tampered with, and the number of nodes reaches the preset consensus node number, the edge server generates an information block on the information chain from the source data.
[0018] In practice, the accounting node is located in the edge devices. After sorting the edge devices according to the amount of data collected by the edge devices and / or the operating status of the edge devices, the edge device with the highest sequence is selected as the accounting node for the next consensus.
[0019] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0020] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0021] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0022] During implementation, it further includes:
[0023] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0024] During implementation, it further includes:
[0025] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0026] In implementation, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0027] Each edge device has its own public and private keys, introducing dynamic parameters;
[0028] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0029] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0030] During implementation, it was confirmed that the source data had not been tampered with, including:
[0031] The edge server generates a consensus request based on the set block time and performs hash calculation on the source data received within that time to obtain a hash value;
[0032] The edge server broadcasts the hash value to all edge devices;
[0033] Each edge device verifies the hash value of the source data from the edge server, and draws a conclusion on whether its own data has been tampered with based on whether the fields it collects are consistent with the fields corresponding to the source data sent by the edge server.
[0034] The conclusions drawn by the edge device are sent to all other edge devices along with its own identifier and signature.
[0035] During implementation, it further includes:
[0036] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0037] An edge device, comprising:
[0038] The processor is used to read programs from memory and execute the following procedures:
[0039] After obtaining the source data, a hash operation is performed, and the source data is sent to the edge server. The hash value generated by itself is verified within the blockchain network and then broadcast, so that the accounting node can generate a certified block.
[0040] The source data is compared with the hash value using a consensus mechanism with the edge server to determine whether the source data has been tampered with;
[0041] A transceiver is used to receive and send data under the control of a processor.
[0042] In practice, the accounting node is located in the edge devices. After sorting the edge devices according to the amount of data collected by the edge devices and / or the operating status of the edge devices, the edge device with the highest sequence is selected as the accounting node for the next consensus.
[0043] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0044] During implementation, it further includes:
[0045] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0046] In implementation, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0047] Each edge device has its own public and private keys, introducing dynamic parameters;
[0048] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0049] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0050] An edge device, comprising:
[0051] The device hash processing module is used to perform hash calculations after obtaining source data, send the source data to the edge server, and broadcast the hash value it generates after verification within the blockchain network, so that the accounting node can generate a certified block.
[0052] The device consensus module is used to compare the hash values with the edge server according to the consensus mechanism to determine whether the source data has been tampered with.
[0053] In practice, the accounting node is located in the edge devices. After sorting the edge devices according to the amount of data collected by the edge devices and / or the operating status of the edge devices, the edge device with the highest sequence is selected as the accounting node for the next consensus.
[0054] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0055] During implementation, it further includes:
[0056] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0057] In implementation, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0058] Each edge device has its own public and private keys, introducing dynamic parameters;
[0059] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0060] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0061] An edge server includes:
[0062] The processor is used to read programs from memory and execute the following procedures:
[0063] After receiving source data sent by the edge device, the source data is hashed, and the hash value obtained is broadcast. After being verified by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0064] The hash value of the authentication chain is compared with the hash value sent by the edge device, and the comparison result is written into the information blockchain.
[0065] When the number of nodes that have determined that the source data has not been tampered with through hash value comparison by the edge server and edge device according to the consensus mechanism reaches the preset number of consensus nodes, the edge server will generate an information block on the information chain from the source data.
[0066] A transceiver is used to receive and send data under the control of a processor.
[0067] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0068] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0069] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0070] During implementation, it further includes:
[0071] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0072] During implementation, it further includes:
[0073] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0074] An edge server includes:
[0075] The server hash processing module is used to perform hash operations on the source data sent by the edge device after receiving it, broadcast the hash value obtained by the operation, and after verification by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0076] The server information module is used to compare the hash value of the authentication chain with the hash value sent by the edge device, and write the comparison result into the information blockchain.
[0077] The server consensus module is used to generate information blocks on the information chain from the source data when the number of nodes that have determined that the source data has not been tampered with by comparing hash values according to the consensus mechanism between the edge server and the edge device reaches a preset number of consensus nodes.
[0078] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0079] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0080] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0081] During implementation, it further includes:
[0082] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0083] During implementation, it further includes:
[0084] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0085] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method of using an edge device network.
[0086] The beneficial effects of this invention are as follows:
[0087] The technical solution provided in this invention, by employing blockchain technology and a dual-information blockchain consisting of hash value verification, authentication chain, and information chain, offers at least one of the following advantages compared to offline modes and existing edge device security measures in edge scenarios with limited communication:
[0088] 1. Edge devices, edge servers, and data sources all have specific IDs, and interaction records and verification conclusions are also stored on the blockchain. Furthermore, it is possible to quickly locate faulty or illegal edge devices or discover faulty or irregular operations on edge servers.
[0089] 2. Blockchain protects historical data from being tampered with, ensuring data traceability;
[0090] 3. The authentication protocol guarantees authentication during transmission, making it impossible to spoof edge devices. Simultaneously, the edge server and edge devices mutually verify each other based on the source data hash value to ensure trust between devices and establish a trusted system.
[0091] 4. Unless the number of edge devices exceeding the consensus algorithm is all disguised or destroyed, the authenticity of the data can still be guaranteed. Attached Figure Description
[0092] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0093] Figure 1 This is a schematic diagram of the edge device network structure in an embodiment of the present invention;
[0094] Figure 2 This is a schematic diagram illustrating the implementation process of the edge device network usage method in an embodiment of the present invention;
[0095] Figure 3 This is a schematic diagram of the edge device network logical architecture in an embodiment of the present invention;
[0096] Figure 4 This is a schematic diagram of the overall consensus implementation process in an embodiment of the present invention;
[0097] Figure 5 This is a schematic diagram of the interactive authentication implementation process in an embodiment of the present invention;
[0098] Figure 6 This is a schematic diagram illustrating the implementation process of information chain verification and accounting right allocation in an embodiment of the present invention;
[0099] Figure 7 This is a schematic diagram illustrating the implementation process of the information chain consensus process in an embodiment of the present invention;
[0100] Figure 8 This is a schematic diagram of the Bitcoin block structure in an embodiment of the present invention;
[0101] Figure 9 This is a schematic diagram of the authentication chain block structure in an embodiment of the present invention;
[0102] Figure 10 This is a schematic diagram of the information chain block structure in an embodiment of the present invention;
[0103] Figure 11 This is a schematic diagram of the architecture in the RFID warehouse management scenario of this invention.
[0104] Figure 12 This is a schematic diagram of the edge device structure in an embodiment of the present invention;
[0105] Figure 13 This is a schematic diagram of the edge server structure in an embodiment of the present invention. Detailed Implementation
[0106] The inventor noticed the following during the invention process:
[0107] In offline mode, existing edge devices mainly protect data authenticity through chip-based security functions: 1. Performing self-verification calculations on the data to be transmitted to ensure data integrity; 2. Access control based on static keys; 3. Data encryption based on static keys.
[0108] In this mode, although the edge device itself has encryption authentication with a security chip and data integrity protection algorithm, if its factory parameters are known or the device is cracked, the data in the edge device is easily tampered with if it fails to upload data in a timely manner during operation. Furthermore, there may be cases where unauthorized edge devices disguise themselves as normal edge devices to deceive the server and data source, as well as edge device malfunctions or even damage.
[0109] This solution proposes incorporating blockchain technology and authentication between edge devices and edge servers. A verification protocol is used to locate faulty or spoofed edge devices, ensuring the authenticity of data before and after it is uploaded to the blockchain. Furthermore, since existing consensus algorithms are not suitable for offline edge scenarios, the blockchain consensus algorithm has been improved. This addresses the problem of illegal operations such as spoofing, damage, and tampering with edge devices in edge scenarios with limited communication, thereby ensuring the authenticity and availability of data on edge devices.
[0110] The specific embodiments of the present invention will now be described with reference to the accompanying drawings.
[0111] In this explanation, the implementation will be described separately from the perspectives of edge devices and edge servers. Examples of their combined implementation will also be provided to better understand the implementation of the solutions presented in this embodiment. This explanation does not imply that the two must be implemented together or separately. In fact, when implemented separately, they each solve their own problems, while combining them yields better technical results.
[0112] Figure 1 This is a schematic diagram of an edge device network structure, as shown in the figure. It can include: an edge server and several edge devices, wherein:
[0113] Edge devices and edge servers serve as consensus nodes in the blockchain network. Edge servers and various edge devices are connected to form the blockchain network through short-range wireless communication in a P2P and fully interconnected network manner.
[0114] Edge devices are used to perform hash calculations on source data after acquiring it, and then send the source data to the edge server. The hash value they generate is verified within the blockchain network and then broadcast, so that the accounting nodes can generate certified blocks.
[0115] An edge server is used to perform hash calculations on source data sent by edge devices after receiving the source data, broadcast the hash value obtained from the calculation, and generate information blocks from the source data after verification by the edge devices within the blockchain network.
[0116] The edge server is also used to compare the hash value of the authentication chain with the hash value sent by the edge device, and write the comparison result into the information blockchain;
[0117] The edge server is also used to generate information blocks on the information chain when the number of nodes that have determined that the source data has not been tampered with by comparing hash values with the edge devices according to the consensus mechanism reaches a preset number of consensus nodes.
[0118] In practice, the edge server uses a mesh communication network topology to communicate with edge devices.
[0119] Specifically, the edge server uses a mesh communication network topology to communicate with the edge devices. The edge server acts as the master node to broadcast consensus requests and package blocks, while the edge devices act as consensus nodes to verify and draw conclusions about the authenticity of the data in the edge server.
[0120] Figure 2 The flowchart illustrating the usage of edge device networks is shown in the figure and may include:
[0121] Step 201: After obtaining the source data, the edge device performs a hash operation and sends the source data to the edge server. After the hash value it generates is verified within the blockchain network, it is broadcast, and the accounting node generates a certified block.
[0122] Step 202: After receiving the source data sent by the edge device, the edge server performs a hash operation on the source data, broadcasts the hash value obtained from the operation, and after verification by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0123] Step 203: The edge server compares the hash value of the authentication chain with the hash value sent by the edge device, and writes the comparison result into the information blockchain;
[0124] Step 204: When the edge server and edge devices determine the number of nodes whose source data has not been tampered with by comparing hash values according to the consensus mechanism, the edge server generates information blocks on the information chain from the source data.
[0125] Let's start by explaining it from the perspective of logical architecture.
[0126] The system architecture designed in this solution establishes a P2P (peer-to-peer) network between various edge devices and sets up one edge server at the edge. Under conditions of limited external network communication, and through blockchain-based verification, the authenticity of data from the edge devices is ensured before and after transmission to the central server. This solution establishes two blockchains: the "Authentication Chain" and the "Information Chain," with their blocks named CB and IB, respectively.
[0127] Figure 3 The diagram illustrates the logical architecture of an edge device network. As shown, the solution employs a five-layer logical architecture to represent the data authenticity verification architecture for blockchain-based edge scenarios. The bottom data layer consists of the source data and the hash calculations performed on the source data by edge devices and edge servers. The source data is sent to the edge devices, where the edge devices and edge servers perform hash calculations to verify whether the source data has been maliciously tampered with or lost due to device failure before being written into the block. The hash value inherent in the block structure is used to verify the integrity and availability of historical data, while also maintaining the continuity of the chain structure. The network layer represents the network structure of edge devices and edge servers as blockchain nodes, using both P2P and fully interconnected network (i.e., mesh network) methods, respectively, for different consensus scenarios.
[0128] Consensus layer:
[0129] In the authentication chain, the proposed scheme employs a consensus mechanism that allocates accounting rights based on the status of edge devices. Edge devices act as accounting nodes. They are ranked according to the amount of data collected and their operational status, with the edge device at the highest position selected as the accounting node for the next consensus. Each edge device uploads the hash value of its source data to the chain. If a currently ranked edge device has not yet performed its accounting task, the next edge device in the ranking will produce a block. The actions of these unperformed edge devices are recorded and displayed through the application layer for monitoring and maintenance. In other words, in implementation, the accounting node is selected from the edge devices by ranking them according to their data collection volume and / or operational status, with the highest-ranking edge device chosen as the accounting node for the next consensus.
[0130] In the information chain, the proposed solution employs an improved version of the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm tailored to this scenario. Borrowing from PBFT's tolerance for "traitors" (less than one-third of the consensus nodes), edge servers are designated as fixed master nodes responsible for packaging information chain blocks. The solution also incorporates master node verification. If the current master node fails to produce blocks or is verified as malicious, due to the limited number of edge servers (only one available), the master node is not replaced; only the recording rights are transferred. In other words, the consensus mechanism implemented is based on the Practical Byzantine Fault Tolerance consensus algorithm.
[0131] In the control layer, the authentication protocol, based on conventional communication protocols and blockchain encryption protocols, facilitates interactions between edge devices and with edge servers. Implementation can incorporate dynamic parameters and two-way authentication based on source data hash values. Hash verification targets the source data itself; after both the edge device and the edge server perform hash calculations on the source data, a consensus algorithm is used to verify the data's authenticity. In other words, implementation can further include:
[0132] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0133] The application layer is used in edge scenarios for managing edge devices, locating faults, and verifying data authenticity. Edge servers can provide certain application services and can also send verified data to the central server.
[0134] The consensus algorithm and its implementation process are explained below.
[0135] In situations where communication is limited, source data is transmitted between edge devices and between edge devices and edge servers via short-range wireless communication methods such as Bluetooth and Wi-Fi. The method described in the solution uses blockchain technology to verify and store the data to ensure the secure operation of the system. The system designed in the solution adopts a structure that generates two blockchains, named "Authentication Chain" and "Information Chain" respectively. The consensus nodes of the blockchain network are N edge devices (R(r1, r2, ..., rN) and one edge server.
[0136] Figure 4 This is a schematic diagram of the overall consensus implementation process. The specific details of the consensus process are as follows: Assume there are n edge devices in the scenario: r m ∈R={r1, r2, ..., r m ,,...r n}, 1 edge server. Assume the number of ledger nodes in the authentication chain at the current time period is r. m The parameters of each node are represented as: the source data d generated by each edge device within the block generation time interval. m ∈D={d1, d2, ..., d m, , ...d n The source data sent to the edge server is e. m ∈E={e1, e2, ..., e m ,,...e n}, their respective state parameters s m ∈S={s1,s2,...,s m ,,...s n Each edge device is identified by its ID. m ∈ID={id1, id2, ..., id m ,,...id n The identifier ID is bound to the data sent by the edge device to facilitate data management and the location of faulty and malicious edge devices. As shown in the figure, it may include:
[0137] Step 1: Hash calculation. The edge device obtains the source data, performs a hash calculation, and sends the data to the edge server. The edge server then performs a hash calculation on the data.
[0138] Edge device Rk performs a hash operation (e.g., SHA_256) on the collected source data every time interval T (block duration) to obtain the hash value of the source data for the edge device, h(k) = SHA_256(d k The data is sent to the edge server. The edge server receives the data and uses a hash algorithm to hash E = {e1, e2, ..., e}. m ,,...e n The operation yields g(k)∈G=SHA_256(E).
[0139] Step 2: Generate the authentication chain. The edge device broadcasts the hash value, and the ledger node generates the authentication block.
[0140] Each edge device broadcasts its generated hash value after it has been verified within the blockchain network.
[0141] 1. Interactive authentication:
[0142] In practice, it may further include:
[0143] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0144] In practice, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0145] Each edge device has its own public and private keys, introducing dynamic parameters;
[0146] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0147] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0148] Existing blockchain systems mostly use asymmetric encryption and hash verification for authentication. Given the characteristics of the scenario described in this solution, edge devices are more vulnerable to intrusion and hacking. Therefore, this solution proposes to add dynamic parameters to the on-chain nodes during the verification process to enhance the security of data during on-chain node interactions.
[0149] Figure 5 The diagram illustrates the interactive authentication process. The authentication method combines asymmetric encryption with dynamic parameters; failure to authenticate prevents communication. Each edge device possesses its own public and private keys, and a dynamic parameter X is introduced. i,j (r j and r i (Dynamic parameters), the two communicating parties first verify X i,j Check for consistency, then add the dynamic parameter X to the transmitted data. i,j The hash value is then encrypted using the other party's public key. Upon receiving it, the other party decrypts it using their private key to obtain the interactive data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it reaches a certain value, the count is reset. Both parties jointly update and maintain the value of this parameter.
[0150] 2. Allocation of accounting rights (consensus algorithm).
[0151] From a scenario perspective, different edge devices operate at different times. If an edge device is already under high load, making it participate in block packaging or other activities will overload it and impact the efficiency of the entire system. To ensure the working status of each edge device, the least idle edge device will assume the accounting rights for the current time period. The specific design is as follows:
[0152] After the previous block is generated, the edge device calculates its own state value. The amount of data P collected by the edge device rm, combined with various related attribute data A(a1, a2...) (such as battery level, chip temperature, and the current output power of the edge device), is weighted by coefficients α and β(β1, β2,...) to obtain a state parameter Sm for the edge device, Sm = P*α + A*β. The edge device with the smallest S value becomes the ledger node for the next block. S is broadcast to the P2P network as part of the transmitted data, i.e., the data sent is {P(Y), S, idi}. All nodes in the network will receive the state values of other edge devices. Therefore, the edge device should store dynamic parameter tables and state value tables for all other edge devices. The data is broadcast in the above way, and the rm packages all hash values of the current block generation time interval into a block for broadcast, completing the block generation. In this scheme, the chain formed by this block is called the "authentication chain", where the hash value is used for data authenticity verification.
[0153] Step 3: Generate the information chain. The edge server broadcasts the calculated hash value, and the consensus is verified by the edge devices. After the consensus is verified, the edge server generates the information block.
[0154] The edge server communicates with edge devices using a mesh communication network topology. The edge server acts as the master node to broadcast consensus requests and package blocks, while the edge devices act as consensus nodes to verify and draw conclusions about the authenticity of the data in the edge server.
[0155] 1. Data validation.
[0156] During implementation, it was confirmed that the source data had not been tampered with, including:
[0157] The edge server generates a consensus request based on the set block time and performs hash calculation on the source data received within that time to obtain a hash value;
[0158] The edge server broadcasts the hash value to all edge devices;
[0159] Each edge device verifies the hash value of the source data from the edge server, and draws a conclusion on whether its own data has been tampered with based on whether the fields it collects are consistent with the fields of the source data sent by the edge server.
[0160] The conclusions drawn by the edge device are sent to all other edge devices along with its own identifier and signature.
[0161] Figure 6The diagram illustrates the implementation process of information chain verification and accounting right allocation. As shown, the edge server generates a consensus request based on the set block time and hashes the received source data within that time period to obtain G(g(1), g(2), ... g(n)), which is then sent to all edge devices. Each edge device verifies the hash value of the source data from the edge server, checking whether its own collected data matches the corresponding fields of the data sent by the edge server, i.e., whether h(k) equals g(k), thus concluding whether its own data has been tampered with. The edge device attaches its own identifier ID signature to the conclusion and sends it to all other edge devices. This interaction also causes the dynamic parameter value of the interactive authentication in the generated authentication chain to increase by 1.
[0162] 2. Allocation of accounting rights (consensus algorithm).
[0163] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0164] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0165] In practice, it may further include:
[0166] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0167] Figure 7The diagram illustrates the consensus process of the information chain. Edge servers act as nodes with accounting rights. When an edge device or edge server receives "untampered" conclusions from (2*n+1) / 3 or more edge devices, consensus is reached. The edge server then packages the data to generate blocks for the information chain. If no node receives more than (2*n+1) / 3 consensus conclusions within a specified time, it proves that more than 1 / 3 of the edge devices believe the hash value calculated by the edge server for the data does not match, meaning the data has been tampered with. In this case, the edge server's accounting node qualification is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers (through maintenance, updates, etc.) and performs the next authentication. Therefore, when more than 2 / 3 of the edge devices in the system are working normally, the authenticity of the edge server's verification results can be guaranteed, proving the edge server's normal working status, thus ensuring the authenticity of the edge server's verification process for the edge devices. In addition, for data on the information chain, edge devices do not store data or compress and delete data, only retaining data such as hash values for verification, on the one hand to prevent excessive storage pressure, and on the other hand to prevent data leakage.
[0168] Step 4: Verify the edge device. The information chain completes block production. The edge server compares the hash value of the authentication chain with the data received in Step 1 and writes the comparison result into the information chain.
[0169] In practice, it may further include:
[0170] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0171] Specifically, the edge server compares the hash value in the "authentication chain" block with the data on the "information chain." If a discrepancy is found, the ID of the edge device is located and recorded in the next block of the "information chain." In this scheme, on-chain data permissions for ordinary nodes are set, thus preventing external nodes from becoming representative nodes or reading data from the chain.
[0172] The implementation of the specific block structure is explained below.
[0173] Figure 8 The diagram shows the Bitcoin block structure. Compared to the Bitcoin block structure, in the block header, the parameters related to maintaining the continuity and uniqueness of the chain structure in this scheme are consistent with the parameters related to the conventional block structure. The block body, that is, the data structure carried by the block, is improved based on the requirements of this scheme.
[0174] Figure 9 This is a schematic diagram of the authentication chain block structure. The authentication chain block structure is as follows: Figure 9 As shown, based on the consensus algorithm designed in this scheme, the difficulty value and random number are removed from the block header, reducing the overall energy consumption and storage pressure of the system. The transaction data in the block body is improved by adding the status parameters and data hash value of each edge device, along with its own identifier ID, and also includes conventional data such as digital signatures contained in the data structure of blockchain transactions.
[0175] Figure 10 This is a schematic diagram of the information chain block structure, as shown below. Figure 10 The block header structure is consistent with the authentication chain block. The verification results in the block body are packaged into the block by the edge server. This conclusion will serve as the basis for application layer decision-making to locate negative or malicious edge devices and detect whether the edge server is maintaining the blockchain system normally.
[0176] Step 5: Complete this consensus and proceed to the next consensus.
[0177] The following example illustrates this.
[0178] The main role of RFID (Radio Frequency Identification) in warehouse management is to automatically collect data on the arrival, storage, transfer, and release of goods, including the name, specifications, type, and model of the goods, and to automatically analyze the data. Based on the data integration, solutions for improving warehouse management efficiency can be found through technical means.
[0179] Figure 11 The diagram illustrates the architecture of an RFID warehouse management scenario. As described in this solution, in this example, the reader is the edge device, the tag is the data source, and the automatically collected data is the source data. In situations where communication is limited, RFID readers often operate in offline mode. In this mode, although the reader itself has a secure chip for encryption and authentication, if its factory parameters are known or the device is cracked, data may not be uploaded in a timely manner during operation. This makes the data in the reader easily tampered with, and there are also instances where unauthorized readers impersonate legitimate readers to deceive the server and tags, as well as reader malfunctions or even damage.
[0180] A P2P network is established between the various readers, and an edge server is set up at the terminal. When external network communication is restricted, the authenticity of reader data before and after transmission to the central server is ensured through communication between the edge server and the readers within the internal network, and through blockchain-based verification. According to this solution, two blockchains are also established in this embodiment: an "authentication chain" and an "information chain," as follows... Figure 11As shown.
[0181] When the reader checks warehouse materials and records inbound and outbound transactions, it communicates with the tags manually or automatically to obtain tag data. Through hash calculation of the tag data and broadcasting based on the authentication method described in this scheme, the hash value is written into the CB (Cost-Based Container) and simultaneously sent to the edge server. The edge server writes the tag data into the IB (Input-Based Container). The edge server compares the received data with the hash value generated by the reader to verify the data's authenticity. The edge server also returns the hash value after hash calculation to the reader, which then verifies the data authenticity against the edge server's hash value. The consensus mechanism of the authentication chain and information chain described in this scheme is used between the reader and the edge server to achieve bidirectional data authenticity verification, ensuring the authenticity of data in the reader in offline mode. Furthermore, keeping 2 / 3 of the readers intact from damage or hacking guarantees the authenticity of the tag data after it is read by the reader.
[0182] Based on the same inventive concept, this invention also provides an edge device, an edge server, and a computer-readable storage medium. Since the principles by which these devices solve problems are similar to the usage methods of edge device networks, the implementation of these devices can refer to the implementation of the method, and repeated details will not be repeated.
[0183] When implementing the technical solutions provided in the embodiments of the present invention, they can be implemented in the following manner.
[0184] Figure 12 This is a schematic diagram of an edge device structure, as shown in the figure. The device includes:
[0185] Processor 1200 is used to read the program from memory 1220 and execute the following procedures:
[0186] After obtaining the source data, a hash operation is performed, and the source data is sent to the edge server. The hash value generated by itself is verified within the blockchain network and then broadcast, so that the accounting node can generate a certified block.
[0187] The source data is compared with the hash value using a consensus mechanism with the edge server to determine whether the source data has been tampered with;
[0188] Transceiver 1210 is used to receive and send data under the control of processor 1200.
[0189] In practice, the accounting node is located in the edge devices. After sorting the edge devices according to the amount of data collected by the edge devices and / or the operating status of the edge devices, the edge device with the highest sequence is selected as the accounting node for the next consensus.
[0190] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0191] During implementation, it further includes:
[0192] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0193] During implementation, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0194] Each edge device has its own public and private keys, introducing dynamic parameters;
[0195] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0196] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0197] Among them, Figure 12 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1200) and memory (memory 1220). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface. Transceiver 1210 may be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. Processor 1200 is responsible for managing the bus architecture and general processing, and memory 1220 may store data used by processor 1200 during operation.
[0198] This invention also provides an edge device, comprising:
[0199] The device hash processing module is used to perform hash calculations after obtaining source data, send the source data to the edge server, and broadcast the hash value it generates after verification within the blockchain network, so that the accounting node can generate a certified block.
[0200] The device consensus module is used to compare the hash values with the edge server according to the consensus mechanism to determine whether the source data has been tampered with.
[0201] In practice, the accounting node is located among edge devices. After sorting the edge devices according to the amount of data collected by the edge devices and / or the operating status of the edge devices, the edge device with the highest sequence is selected as the accounting node for the next consensus.
[0202] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0203] During implementation, it further includes:
[0204] Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
[0205] During implementation, a combination of asymmetric encryption and dynamic parameters is used for verification, including:
[0206] Each edge device has its own public and private keys, introducing dynamic parameters;
[0207] After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it.
[0208] After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
[0209] For ease of description, the various parts of the device described above are divided into modules or units according to their functions. Of course, in implementing this invention, the functions of each module or unit can be implemented in one or more software or hardware components.
[0210] Figure 13 This is a schematic diagram of an edge server architecture. As shown in the figure, the server includes:
[0211] Processor 1300 is used to read the program from memory 1320 and execute the following procedures:
[0212] After receiving source data sent by the edge device, the source data is hashed, and the hash value obtained is broadcast. After being verified by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0213] The hash value of the authentication chain is compared with the hash value sent by the edge device, and the comparison result is written into the information blockchain.
[0214] When the number of nodes that have determined that the source data has not been tampered with through hash value comparison by the edge server and edge device according to the consensus mechanism reaches the preset number of consensus nodes, the edge server will generate an information block on the information chain from the source data.
[0215] Transceiver 1310 is used to receive and send data under the control of processor 1300.
[0216] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0217] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0218] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0219] During implementation, it further includes:
[0220] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0221] During implementation, it further includes:
[0222] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0223] Among them, Figure 13 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1300) and memory (memory 1320). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1310 may be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. The processor 1300 is responsible for managing the bus architecture and general processing, and the memory 1320 may store data used by the processor 1300 during operation.
[0224] This invention also provides an edge server, comprising:
[0225] The server hash processing module is used to perform hash operations on the source data sent by the edge device after receiving it, broadcast the hash value obtained by the operation, and after verification by the edge device within the blockchain network, the edge server generates an information block from the source data.
[0226] The server information module is used to compare the hash value of the authentication chain with the hash value sent by the edge device, and write the comparison result into the information blockchain.
[0227] The server consensus module is used to generate information blocks on the information chain from the source data when the number of nodes that have determined that the source data has not been tampered with by comparing hash values according to the consensus mechanism between the edge server and the edge device reaches a preset number of consensus nodes.
[0228] In practice, the consensus mechanism is a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm.
[0229] In implementation, when using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including:
[0230] With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
[0231] During implementation, it further includes:
[0232] If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
[0233] During implementation, it further includes:
[0234] The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
[0235] For ease of description, the various parts of the device described above are divided into modules or units according to their functions. Of course, in implementing this invention, the functions of each module or unit can be implemented in one or more software or hardware components.
[0236] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method of using an edge device network.
[0237] For specific implementation details, please refer to the implementation of the usage method for edge device networks.
[0238] In summary, the technical solution provided by the embodiments of the present invention achieves data verification and identity authentication between edge devices and edge servers through a dual-chain structure, and verifies the authenticity of the source data uploaded to the chain.
[0239] An authentication chain consensus algorithm that allocates accounting rights based on the status of edge devices, and a corresponding on-chain node interaction authentication method that incorporates dynamic parameter verification;
[0240] The information chain consensus algorithm, which is based on the practical Byzantine fault-tolerant algorithm, is improved for this scenario: Under normal circumstances, if the consensus result is successful, the edge server is the only node with the right to record transactions; each edge device verifies the hash value of the source data from the edge server as the basis for consensus; the mechanism for allocating the right to record transactions after verification failure is different from the PBFT algorithm and has been improved according to the characteristics of the record-keeping node.
[0241] To address the aforementioned consensus, the existing block structure is improved, and a corresponding block structure is designed to meet the verification and consensus requirements of the system described in this solution.
[0242] In edge scenarios where communication is limited, this solution offers at least one of the following advantages compared to offline mode and existing edge device security measures:
[0243] 1. Edge devices, edge servers, and data sources all have specific IDs, and interaction records and verification results are also stored on the blockchain, which can quickly locate faulty or illegal edge devices or discover edge server malfunctions or violations.
[0244] 2. Blockchain protects historical data from being tampered with, ensuring data traceability;
[0245] 3. The authentication protocol incorporating dynamic parameters ensures authentication and authorization during transmission, preventing the spoofing of edge devices. Simultaneously, mutual verification between the edge server and edge devices based on the source data hash value ensures trust between devices, establishing a trusted system.
[0246] 4. Unless more than 1 / 3 of the edge devices are spoofed or destroyed, the authenticity of the data can still be guaranteed.
[0247] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0248] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0249] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0250] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0251] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An edge device network, characterized in that, include: Edge servers, and several edge devices, including: Edge devices and edge servers serve as consensus nodes in the blockchain network. Edge servers and various edge devices are connected to form the blockchain network through short-range wireless communication in a P2P and fully interconnected network manner. Edge devices are used to perform hash calculations on source data after acquiring it, and send the source data to the edge server. The hash value they generate is verified within the blockchain network and then broadcast, and the ledger nodes generate authentication blocks; wherein, the authentication blocks form an authentication chain. An edge server is used to perform hash calculations on source data sent by edge devices after receiving the source data, broadcast the hash value obtained from the calculation, and generate information blocks from the source data after verification by the edge devices within the blockchain network. The edge server is also used to upload the information block generated from the source data to the information chain when the number of nodes that have determined that the source data has not been tampered with by comparing the hash values of the edge server and the edge device according to the consensus mechanism reaches a preset number of consensus nodes. The edge server is also used to verify edge devices and complete block production in the information chain; the edge server is also used to compare the hash value of the authentication chain with the hash value sent by the edge device and write the comparison result into the information blockchain. The ledger node is a set of edge devices that are sorted according to the amount of data collected by the edge devices and / or the operating status of the edge devices, and the most idle edge device is selected as the ledger node for the next consensus. The consensus mechanism is a consensus algorithm based on the practical Byzantine fault-tolerant consensus algorithm.
2. The network as described in claim 1, characterized in that, Edge servers use a mesh communication network topology to communicate with edge devices.
3. A method of using an edge device network as described in claim 1, characterized in that, include: After acquiring source data, the edge device performs a hash operation and sends the source data to the edge server. The hash value it generates is verified within the blockchain network and then broadcast, whereby the ledger nodes generate authentication blocks; wherein, the authentication blocks form an authentication chain. After receiving source data sent by the edge device, the edge server performs a hash operation on the source data, broadcasts the hash value obtained from the operation, and after verification by the edge device within the blockchain network, the edge server generates an information block from the source data. When the number of nodes that have determined that the source data has not been tampered with reaches a preset consensus node number through hash value comparison between the edge server and the edge device according to the consensus mechanism, the edge server will upload the information block generated from the source data to the information chain. The edge server is also used to verify edge devices and complete block production in the information chain; the edge server is also used to compare the hash value of the authentication chain with the hash value sent by the edge device and write the comparison result into the information blockchain.
4. The method as described in claim 3, characterized in that, When using a consensus algorithm based on a practical Byzantine fault-tolerant consensus algorithm, the edge server generates an information chain on the information block from the source data, including: With edge servers as nodes that have the right to record transactions, when an edge device or edge server receives an unaltered conclusion from (2*n+1) / 3 or more edge devices, a consensus is reached, and the edge server packages the data to generate a block of the information chain, where n is the number of edge devices.
5. The method as described in claim 3, characterized in that, Further includes: If no node receives a consensus conclusion of (2*n+1) / 3 or more within the specified time, it is determined that the data has been tampered with. The qualification of the edge server's accounting node is revoked, and the current authentication chain accounting node takes over. The conclusion is written into the data block, but the data is not uploaded to the chain. The edge devices temporarily store their collected data until the edge server recovers and performs the next authentication. Here, n is the number of edge devices.
6. The method as described in claim 3, characterized in that, Further includes: Each edge device uses a combination of asymmetric encryption and dynamic parameters for verification. After successful verification, the edge devices communicate with each other.
7. The method as described in claim 6, characterized in that, Verification is performed using a combination of asymmetric encryption and dynamic parameters, including: Each edge device has its own public and private keys, introducing dynamic parameters; After both edge devices verify that the dynamic parameters are consistent, they add the hash value of the dynamic parameters to the transmitted data, encrypt it with the other party's public key, and then send it. After receiving the data, the private key is used to decrypt and retrieve the transmitted data. In the P2P network of edge devices, the value of this dynamic parameter increases by 1 every time two edge devices interact. When it increases to a predetermined value, the count is reset.
8. The method as described in claim 3, characterized in that, To ensure the source data has not been tampered with, including: The edge server generates a consensus request based on the set block time and performs hash calculation on the source data received within that time to obtain a hash value; The edge server broadcasts the hash value to all edge devices; Each edge device verifies the hash value of the source data from the edge server, and draws a conclusion on whether its own data has been tampered with based on whether the fields it collects are consistent with the fields corresponding to the source data sent by the edge server. The conclusions drawn by the edge device are sent to all other edge devices along with its own identifier and signature.
9. The method as described in any one of claims 3 to 8, characterized in that, Further includes: The edge server compares the hash value in the authentication chain block with the data on the information chain. If a different field is found, the ID of the edge device is located and recorded in the next block of the information chain.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 3 to 9.