A traceability method and system for trusted storage of aircraft engine maintenance data

By adopting the dual storage method of blockchain and IPFS in aircraft engine maintenance data storage and optimizing the consensus algorithm, the problem of data being easy to be lost and easily tampered with is solved, efficient and reliable storage and access of data is achieved, and the maintenance data is ensured. Authenticity and reliability.

CN118332617BActive Publication Date: 2024-08-23CIVIL AVIATION UNIV OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410749666.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-08-23
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Aircraft engine maintenance data is easy to lose and tamper with, and traditional storage methods lack reliability, resulting in potential problems during the maintenance process that may lead to economic and property losses during use.

Method used

It adopts the dual storage method of blockchain technology and IPFS interstellar file system, and optimizes it based on the RAFT consensus algorithm. It introduces the concept of leader node cluster and node credit value to form the RCC-RAFT consensus algorithm to ensure the non-tamperability and non-tamperability of data. reliability.

Benefits of technology

It improves the storage efficiency and access speed of aircraft engine maintenance data, prevents data loss and tampering, ensures the authenticity and reliability of data, and avoids liability dilemmas caused by data problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332617B
    Figure CN118332617B
Patent Text Reader

Abstract

The present invention belongs to the technical field of data security and trusted storage, and discloses a traceability method and system for trusted storage of aircraft engine maintenance data. The system includes an application layer that provides an API interface and a system interface display to the outside; a service layer that implements the business logic and functions of the system; a contract layer that includes smart contracts, Docker, and an algorithm mechanism; a network layer that uses a Hyperledger Fabric distributed ledger technology platform and an RCC‑RAFT (Random Cluster Credit‑RAFT) consensus algorithm; and a data layer that includes blocks, timestamps, Merkle trees, and an IPFS interplanetary file system. The RCC‑RAFT consensus algorithm in the present invention is improved on the basis of the RAFT consensus algorithm, and the concept of leader node clusters and node credit values ​​is introduced to improve the system's operating efficiency. The system uses blockchain technology to solve the problems of centralized storage, easy loss, and easy tampering of existing aircraft engine maintenance data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of secure and reliable data storage, and in particular, relates to a traceability method and system for reliable storage of aircraft engine maintenance data. Background Art

[0002] The vast majority of aircraft engine maintenance data is stored in the maintenance workshop archives in the form of paper materials, and some maintenance data is stored in the maintenance workshop's local central database. The following problems also exist in the storage of maintenance data: ① Paper maintenance data materials are easy to lose and tamper with, and are not easy to preserve for a long time; ② Data stored in the local central database may be deleted or tampered with for profit reasons, resulting in the loss of availability and authenticity of the maintenance data. If there is a problem during the engine maintenance process and it is not discovered at the time, and a malfunction occurs during the use of the engine after the maintenance, causing economic and property losses, it will be difficult to hold accountable due to improper storage of maintenance data.

[0003] Blockchain technology has many advantages over traditional storage methods. First, blockchain technology is decentralized, there is no central server, and data security is better guaranteed through a distributed approach. Second, blockchain technology cannot be tampered with. Due to the application of digital signatures and hash encryption technology, the data stored in the blockchain is difficult to tamper with once uploaded. The consensus mechanism is the foundation and core of blockchain technology. The RAFT consensus algorithm commonly used in the current alliance chain still has the problem of split voting caused by the increase in the number of cluster nodes, which affects the efficiency of the system operation. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a traceability method and system for trusted storage of aircraft engine maintenance data. The purpose of the present invention is to ensure the authenticity and reliability of aircraft engine maintenance data storage and improve the RAFT consensus algorithm to solve its split vote problem.

[0005] The technical solution is as follows: a traceability method for trusted storage of aircraft engine maintenance data, which is optimized on the basis of the RAFT consensus algorithm to obtain the RCC-RAFT consensus algorithm, wherein all nodes in the aircraft engine maintenance data trusted storage system constitute an RCC-RAFT node cluster, and the concepts of leader node cluster and node credit value are introduced, and the original single leader node is changed into a leader node cluster, and each node is scored for credit value, and nodes entering the leader node cluster are elected by credit value; specifically, the following steps are included:

[0006] S1, initialize the credit value of each node in the RCC-RAFT node cluster and select the leader node cluster;

[0007] S2, the client submits a request, the first leader node processes the request and generates a log entry;

[0008] S3, the follower node performs a log consistency check and then replicates the log after the check is correct;

[0009] S4, after the first leader node receives successful replication replies from more than half of the follower nodes, it broadcasts the block to the blockchain network nodes;

[0010] S5, update the credit score table of each node in the RCC-RAFT node cluster.

[0011] In step S2, the client submits a request, and the first leader node processes the request and generates a log entry, including: the election of the leader node cluster is based on the node credit mechanism, and there is always only one leader node cluster in the entire RCC-RAFT node cluster. The first leader node in the leader node cluster is used to communicate with the client and periodically send heartbeat signals to all nodes to maintain the leadership of the first leader node;

[0012] If the follower node does not receive the heartbeat signal from the first leader node within the specified time, it will send a request to replace the leader to the second leader node in the leader node cluster through the RPC protocol; if the second leader node in the leader node cluster receives request to replace the leader from more than one-third of the follower nodes, it will increase the current term by one, send leader replacement information and regularly send heartbeat signals to all nodes, and replace the original first leader node to become the new first leader node; if the follower node does not receive the first leader node replacement information and the second leader node heartbeat signal within the specified time, it will send a request to replace the leader to the third leader node in the leader node cluster through the RPC protocol; if the third leader node in the leader node cluster receives request to replace the leader from more than one-third of the follower nodes, it will increase the current term by one, send leader replacement information and regularly send heartbeat signals to all nodes, and the third leader node in the leader node cluster will replace the original first leader node to become the new first leader node.

[0013] Further, when the first leader node is replaced by the second leader node or the third leader node, the replaced leader node converts its identity from a leader node to a follower node and is removed from the leader node cluster;

[0014] When the number of nodes in the leader node cluster is less than three, a new leader node will be selected to supplement the leader node cluster. By comparing the credit values ​​of each node, they will be sorted in descending order of credit value. The node with the highest credit value enters the leader node cluster and becomes the third leader node.

[0015] In step S3, during the log replication phase, a log consistency check is performed each time the log is replicated. When a follower node crashes or fails to provide services, the follower node log will be inconsistent with the first leader node log. The first leader node finds the last consistent point with each follower node log and starts to synchronize the logs. The follower node deletes different logs and saves the new log synchronized by the first leader node.

[0016] Whenever a new first leader node appears, the new first leader node compares logs with the previous first leader node. If any inconsistency occurs, the new first leader node synchronizes the logs of the previous first leader node and cannot delete or overwrite the logs that have been successfully processed and stored by the previous first leader node.

[0017] In step S4, when the blockchain network is initially started, all nodes in the RCC-RAFT node cluster are followers; each node generates a random value for comparison, and the top three nodes ranked from large to small are the first leader node, the second leader node, and the third leader node, and these three leader nodes constitute the leader node cluster.

[0018] In step S5, the credit score table of each node in the RCC-RAFT node cluster is updated, including:

[0019] The initial credit value of all nodes in the cluster is 5;

[0020] If the node is the first leader node, the credit value increases by 3; if it is the second leader node, the credit value increases by 2; if it is the third leader node, the credit value increases by 1; if the client's request information is successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node increases by 1; if the client's request information is not successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node decreases by 1; if the node is removed from the leader node cluster, the credit value is halved;

[0021] If the node is a follower node, if the node successfully receives the client request information sent by the first leader node and replies to the first leader node, the credit value increases by 1. If the node crashes or fails to operate normally, the credit value decreases by 1.

[0022] After each network-wide consensus is executed, all nodes in the cluster update their credit score tables. If a node's credit value is 0, the node is prohibited from participating in the consensus process under the current term of the first leader node.

[0023] Furthermore, the method further comprises:

[0024] The maintenance data is saved using the dual storage method of blockchain and IPFS interplanetary file system. After the original maintenance data is uploaded to the IPFS interplanetary file system, the returned address HASH is encrypted using the AES encryption algorithm and stored in the Fabric blockchain for permanent preservation;

[0025] Maintenance data evidence management is used to ensure the immutability and auditability of maintenance data, including maintenance data storage and query.

[0026] Furthermore, when storing maintenance data, user authority verification is first performed, and then the maintenance data is stored in the IPFS interstellar file system and the file address HASH is returned to the back end of the aircraft engine maintenance data trusted storage system. The file address HASH is encrypted by AES and then the smart contract is executed. Before broadcasting the encrypted data to the blockchain network, consensus is reached through the RCC-RAFT consensus algorithm to generate valid blocks, and finally the valid blocks are broadcast to other nodes;

[0027] When querying maintenance data, first verify the identity authority. After authentication, call the relevant smart contract to obtain the encrypted data address. After decryption, query the corresponding data from the IPFS interstellar file system and return it to the querying user.

[0028] Another object of the present invention is to provide a traceability system for trusted storage of aircraft engine maintenance data, the system implementing the traceability method for trusted storage of aircraft engine maintenance data, the system comprising:

[0029] The application layer provides API interfaces and system interface displays to the outside world, uses visual interfaces to provide information interaction services, and provides identity registration and login, aircraft engine maintenance information entry, and maintenance information query functions for maintenance team members, maintenance team leaders, and maintenance safety supervisors;

[0030] The service layer is used to access resources in the Fabric network through the Fabric-Java-SDK to interact with the blockchain network, and to interact with the IPFS interplanetary file system through the Java-IPFS-API;

[0031] The contract layer includes smart contracts, Docker, and algorithm mechanisms. When a Fabric network node submits a request to upload or query aircraft engine maintenance data, if the request meets the pre-set conditions in the smart contract, the smart contract installed and deployed in Docker will automatically execute the maintenance data upload or query operation;

[0032] The network layer uses the Hyperledger Fabric distributed ledger technology platform, and issues identity certificates to maintenance team members, maintenance team leaders, and maintenance safety supervisors who join the blockchain network through a certificate authority, restricts the permissions of different users, and uses the RCC-RAFT consensus algorithm to keep all nodes storing maintenance data consistent;

[0033] The data layer includes blocks, timestamps, Merkle trees and the IPFS interstellar file system. After the original maintenance data is uploaded to the IPFS interstellar file system, the returned address HASH is encrypted using the AES encryption algorithm and stored in the block for permanent preservation.

[0034] Furthermore, in the data layer, maintenance data is saved using a dual storage method of blockchain and IPFS interplanetary file system. After the original maintenance data is uploaded to the IPFS interplanetary file system, the returned address HASH is encrypted using the AES encryption algorithm and stored in the Fabric blockchain for permanent preservation; the blockchain network nodes of the aircraft engine maintenance data trusted storage system are composed of maintenance personnel nodes, maintenance team leader nodes and maintenance safety supervisor nodes.

[0035] In combination with all the above-mentioned technical solutions, the beneficial effects of the present invention are as follows: the RCC-RAFT consensus algorithm in the present invention is improved on the basis of the RAFT consensus algorithm, and the concept of leader node cluster and the concept of node credit value are introduced to improve the system operation efficiency. The system uses blockchain technology to solve the problems of centralized storage, easy loss and easy tampering of existing aircraft engine maintenance data.

[0036] The aircraft engine maintenance data trusted storage system provided by the present invention mainly includes five levels, namely: application layer, which is used to provide API interface and system interface display to the outside; service layer, which is used to implement the business logic and functions of the system; contract layer, including smart contracts, Docker, algorithm mechanism and chain code installation and instantiation; network layer, which adopts Hyperledger Fabric distributed ledger technology platform and RCC-RAFT consensus algorithm; data layer, including blocks, timestamps, Merkle trees and IPFS interplanetary file system. The present invention utilizes the distributed and tamper-proof characteristics of blockchain technology to solve the problems of centralized storage, easy loss and easy tampering of existing aircraft engine maintenance data, and the system adopts a dual storage method of blockchain and IPFS interplanetary file system for aircraft engine maintenance data, which improves the storage efficiency and access speed of data.

[0037] The RCC-RAFT consensus algorithm provided by the present invention is optimized on the basis of the RAFT consensus algorithm, and introduces the concepts of leader node cluster and node credit value. The original leader node is changed to a leader node cluster to prevent the phenomenon of split voting from affecting the efficiency of system operation; each node is scored for credit value, and nodes with high credit value are more likely to enter the leader node cluster, thereby improving the security and reliability of the blockchain network. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;

[0039] Figure 1 is a schematic diagram of a trusted storage system for aircraft engine maintenance data provided by an embodiment of the present invention;

[0040] Figure 2 is a schematic diagram of an RCC-RAFT node cluster provided by an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of a maintenance data storage model provided by an embodiment of the present invention;

[0042] Figure 4 is a maintenance data storage flow chart provided by an embodiment of the present invention;

[0043] Figure 5 is a maintenance data query flow chart provided by an embodiment of the present invention;

[0044] In the figure: 1. Application layer; 2. Service layer; 3. Contract layer; 4. Network layer; 5. Data layer. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0046] The traceability method and system for trusted storage of aircraft engine maintenance data provided by the embodiment of the present invention take aircraft engine maintenance data as the storage object, build an aircraft engine maintenance data trusted storage system based on blockchain technology and propose an RCC-RAFT (Random Cluster Credit-RAFT) consensus algorithm. The present invention can solve the problems of centralization and easy tampering of current aircraft engine maintenance data storage, distribute and structure the aircraft engine maintenance data, facilitate the review of historical maintenance data, and timely discover problems neglected in the maintenance process during regular inspections of maintenance data, thereby preventing engine failures during operation; converting paper storage to electronic storage to save storage space; preventing historical data from being tampered with, ensuring the integrity of maintenance data, and avoiding the situation where problems after engine maintenance cannot be held accountable, causing economic losses to the maintenance company.

[0047] Embodiment 1, the embodiment of the present invention provides a traceability method for trusted storage of aircraft engine maintenance data, which is optimized on the basis of the RAFT consensus algorithm to obtain the RCC-RAFT (Random Cluster Credit-RAFT) consensus algorithm, in which all nodes in the aircraft engine maintenance data trusted storage system constitute an RCC-RAFT node cluster, introduce the concepts of leader node cluster and node credit value, change the original single leader node into a leader node cluster, and score each node for credit value, and elect the node to enter the leader node cluster according to the credit value; specifically, the following steps are included:

[0048] S1, initialize the credit value of each node in the RCC-RAFT node cluster and select the leader node cluster;

[0049] S2, the client submits a request, the first leader node processes the request and generates a log entry;

[0050] S3, the follower node performs a log consistency check and then replicates the log after the check is correct;

[0051] S4, after the first leader node receives successful replication replies from more than half of the follower nodes, it broadcasts the block to the blockchain network nodes;

[0052] S5, update the credit score table of each node in the RCC-RAFT node cluster.

[0053] Embodiment 2, as Figure 1 As shown, the aircraft engine maintenance data trusted storage system provided by the embodiment of the present invention includes:

[0054] Application layer 1 provides API interfaces and system interface displays to the outside world. It uses a visual interface to provide information interaction services, and provides identity registration and login, aircraft engine maintenance information entry, and maintenance information query functions for maintenance team members, maintenance team leaders, and maintenance safety supervisors;

[0055] Service layer 2 is used to implement system business logic and functions. It uses Fabric-Java-SDK to access resources in the Fabric network to interact with the blockchain network, and uses Java-IPFS-API to interact with the IPFS interplanetary file system.

[0056] Contract layer 3 mainly includes smart contracts, Docker and algorithm mechanisms. When a Fabric network node submits a request to upload or query aircraft engine maintenance data, if the request meets the pre-set conditions in the smart contract, the smart contract installed and deployed in Docker will automatically execute the upload or query operation of the maintenance data.

[0057] Network layer 4 uses the Hyperledger Fabric distributed ledger technology platform to issue identity certificates to maintenance team members, maintenance team leaders, and maintenance safety supervisors who join the blockchain network through a certificate authority to limit the permissions of different users. Through the P2P network and broadcast mechanism and the RCC-RAFT consensus algorithm, all nodes store maintenance data in a consistent manner.

[0058] Data layer 5 includes blocks, timestamps, Merkle trees and IPFS interstellar file system. After the original maintenance data is uploaded to the IPFS interstellar file system, the returned address HASH is encrypted using the AES encryption algorithm and stored in the block for permanent preservation.

[0059] For example, when the maintenance data is uploaded to the blockchain network for storage, the RCC-RAFT consensus algorithm is needed to make the data stored in each node consistent. The RCC-RAFT consensus algorithm mainly includes a leader node cluster election module and a log replication module.

[0060] Specifically, the overall consensus process of the RCC-RAFT consensus algorithm includes the following steps:

[0061] Step 1: Initialize the credit value of each node in the RCC-RAFT node cluster and select the leader node cluster;

[0062] Step 2: The client submits a request, and the first leader node processes the request and generates a log entry;

[0063] Step 3: The follower node first performs a log consistency check, and then replicates the log after the check is correct;

[0064] Step 4: After the first leader node receives successful replication replies from more than half of the follower nodes, it broadcasts the block to the blockchain network nodes;

[0065] Step 5: Update the credit score table of each node in the RCC-RAFT node cluster.

[0066] In step 1, when the blockchain network is initially started, all nodes in the RCC-RAFT node cluster are follower nodes. Each node generates a random value and compares it with each other. The top three nodes in descending order are the first leader node, the second leader node, and the third leader node. These three leader nodes form the leader node cluster. Figure 2 shown.

[0067] In step 2, the client submits a request, and the first leader node processes the request and generates a log entry. The election of the leader node cluster is based on the node credit mechanism. There is always only one leader node cluster in the entire RCC-RAFT node cluster. The first leader node in the leader node cluster is used to communicate with the client and regularly sends heartbeat signals to all nodes to maintain the leadership of the first leader node. If the follower node does not receive the heartbeat signal of the first leader node within the specified time, it will send a request to replace the leader to the second leader node in the leader node cluster through the RPC protocol. If the second leader node in the leader node cluster receives more than one-third of the follower nodes' request to replace the leader information, it will increase the current term by one, and send leader replacement information and regular heartbeat signals to all nodes. The second leader node in the leader node cluster replaces the original first leader node and becomes the new first leader node. If the follower node does not receive the first leader node replacement information and the second leader node heartbeat signal within the specified time, it will send a request to replace the leader to the third leader node in the leader node cluster through the RPC protocol. If the third leader node in the leader node cluster receives leader change information from more than one-third of the follower nodes, the current term will be increased by one, and leader change information and heartbeat signals will be sent to all nodes regularly. The third leader node in the leader node cluster will replace the original first leader node and become the new first leader node.

[0068] When the first leader node is replaced by the second leader node or the third leader node, the replaced leader node will change its identity from leader node to follower node and be removed from the leader node cluster. When the number of nodes in the leader node cluster is less than three, a new leader node will be selected to supplement the leader node cluster. By comparing the credit values ​​of each node, they will be sorted in descending order of credit value. The node with the highest credit value will enter the leader node cluster and become the third leader node.

[0069] In step 3, during the log replication phase, a log consistency check is performed each time the log is replicated. When a follower node crashes or fails to provide services, the follower node log will be inconsistent with the first leader node log. The first leader node will find the last consistent point with each follower node log and start synchronizing the logs. The follower nodes will delete different logs and save the new logs synchronized by the first leader node.

[0070] Whenever a new first leader node appears, the new first leader node compares logs with the previous first leader node. If any inconsistency occurs, the new first leader node synchronizes the logs of the previous first leader node and cannot delete or overwrite the logs that have been successfully processed and stored by the previous first leader node.

[0071] In step 5, each node in the cluster updates the credit score table including:

[0072] All nodes in the RCC-RAFT node cluster jointly maintain a node credit score table, which records the credit value change process and current credit value of each node in the cluster. The node credit value change criteria are as follows:

[0073] The initial credit value of all nodes in the cluster is 5;

[0074] If the node is the first leader node, the credit value increases by 3; if it is the second leader node, the credit value increases by 2; if it is the third leader node, the credit value increases by 1; if the client's request information is successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node increases by 1; if the client's request information is not successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node decreases by 1; if the node is removed from the leader node cluster, the credit value is halved;

[0075] If the node is a follower node, if the node successfully receives the client request information sent by the first leader node and replies to the first leader node, the credit value increases by 1. If the node crashes or fails to operate normally, the credit value decreases by 1.

[0076] After each network-wide consensus is executed, all nodes in the cluster update their credit score tables. If a node's credit value is 0, the node is prohibited from participating in the consensus process under the current term of the first leader node.

[0077] Example 3, as another preferred embodiment of the present invention, in the traceability system for trusted storage of aircraft engine maintenance data provided by the embodiment of the present invention, the maintenance data is stored using a dual storage method of blockchain and IPFS interplanetary file system, such as Figure 3 As shown in the figure, after the original maintenance data is uploaded to the IPFS interstellar file system, the returned address HASH is encrypted using the AES encryption algorithm and stored in the Fabric blockchain for permanent preservation.

[0078] Maintenance data evidence management is used to ensure the immutability and auditability of maintenance data, including maintenance data storage and query.

[0079] When the maintenance team member or maintenance team leader uploads the maintenance data, the user authority verification is first performed, and then the maintenance data is stored in the IPFS interstellar file system and the file address HASH is returned to the aircraft engine maintenance data trusted storage system backend. The file address HASH is encrypted by AES and then the smart contract is executed. Before broadcasting the encrypted data to the blockchain network, a consensus is reached through the RCC-RAFT consensus algorithm to generate a valid block, and finally the valid block is broadcast to other nodes. The maintenance data storage process is as follows: Figure 4 shown.

[0080] When a maintenance team member, maintenance team leader, or maintenance safety supervisor queries maintenance data, they first verify their identity and authority. After authentication, they call the relevant smart contract to obtain the encrypted data address. After decryption, they query the corresponding maintenance data from the IPFS interstellar file system and return it to the querying user. The maintenance data query process is as follows: Figure 5 shown.

[0081] The present invention provides an RCC-RAFT consensus algorithm, which specifically includes the following steps:

[0082] Step 1: Initialize the credit value of each node in the RCC-RAFT node cluster and select the leader node cluster;

[0083] The initial credit value of all nodes in the cluster is 5. When the blockchain network is initially started, all nodes in the RCC-RAFT node cluster are followers. Each node generates a random value and compares it with each other. The top three nodes in descending order are the first leader node, the second leader node, and the third leader node. These three leader nodes form a leader node cluster.

[0084] Step 2: The client submits a request, and the first leader node processes the request and generates a log entry;

[0085] The client sends the transaction request directly to the first leader node, which sends the transaction request as a new entry in the log to all follower nodes.

[0086] The election of the leader node cluster is based on the node credit mechanism. There is always only one leader node cluster in the entire RCC-RAFT node cluster. The first leader node in the leader node cluster is used to communicate with the client and regularly send heartbeat signals to all nodes to maintain the leadership of the first leader node. If the follower node does not receive the heartbeat signal of the first leader node within the specified time, it will send a request to replace the leader to the second leader node in the leader node cluster through the RPC protocol. If the second leader node in the leader node cluster receives a request to replace the leader from more than one-third of the follower nodes, it will increase the current term by one, send leader replacement information and regularly send heartbeat signals to all nodes, and the second leader node in the leader node cluster will replace the original first leader node as the new first leader node. If the follower node does not receive the replacement information of the first leader node and the heartbeat signal of the second leader node within the specified time, it will send a request to replace the leader to the third leader node in the leader node cluster through the RPC protocol. If the third leader node in the leader node cluster receives leader change information from more than one-third of the follower nodes, the current term will be increased by one, and leader change information and heartbeat signals will be sent to all nodes regularly. The third leader node in the leader node cluster will replace the original first leader node and become the new first leader node.

[0087] When the first leader node is replaced by the second leader node or the third leader node, the replaced leader node will change its identity from a leader node to a follower node and will be removed from the leader node cluster; when the number of nodes in the leader node cluster is less than three, a new leader node will be selected to supplement the leader node cluster. By comparing the credit values ​​of each node, they will be sorted in descending order of credit value, and the node with the highest credit value will enter the leader node cluster and become the third leader node.

[0088] Step 3: The follower node performs a log consistency check and then replicates the log if it is correct.

[0089] After receiving the new log entry, the follower node performs a consistency check. If the check is correct, it is added to the local log and a message is sent back to the first leader node.

[0090] During the log replication phase, a log consistency check is performed each time the log is replicated. When a follower node crashes or fails to provide services, the follower node log will be inconsistent with the first leader node log. The first leader node will find the last consistent point with each follower node log and start synchronizing the logs. The follower nodes will delete different logs and save the new logs synchronized by the first leader node.

[0091] Whenever a new first leader node appears, the new first leader node will compare logs with the previous first leader node. If any inconsistency occurs, the new first leader node will synchronize the logs of the previous first leader node and cannot delete or overwrite the logs that have been successfully processed and stored by the previous first leader node.

[0092] Step 4: After the first leader node receives successful replication replies from more than half of the follower nodes, it broadcasts the block to the blockchain network nodes;

[0093] After receiving reply messages from more than half of the follower nodes, the first leader node processes the transaction request corresponding to the entry and adds the entry to the blockchain. The entries added to the blockchain cannot be deleted or modified.

[0094] Step 5: Update the credit score table of each node in the RCC-RAFT node cluster;

[0095] All nodes in the RCC-RAFT node cluster jointly maintain a node credit score table, which records the credit value change process and current credit value of each node in the cluster. The node credit value change criteria are as follows:

[0096] The initial credit value of all nodes in the cluster is 5;

[0097] If the node is the first leader node, the credit value increases by 3; if it is the second leader node, the credit value increases by 2; if it is the third leader node, the credit value increases by 1; if the client's request information is successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node increases by 1; if the client's request information is not successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node decreases by 1; if the node is removed from the leader node cluster, the credit value is halved;

[0098] If the node is a follower node, if the node successfully receives the client request information sent by the first leader node and replies to the first leader node, the credit value increases by 1. If the node crashes or fails to operate normally, the credit value decreases by 1.

[0099] After each network-wide consensus is executed, all nodes in the cluster update their credit score tables. If a node's credit value is 0, the node is prohibited from participating in the consensus process under the current term of the first leader node.

[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0101] Since the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention, their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0102] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment.

[0103] An embodiment of the present invention further provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.

[0104] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0105] An embodiment of the present invention further provides an information data processing terminal, which, when executed on an electronic device, provides a user input interface to implement the steps in the above method embodiments. The information data processing terminal is not limited to mobile phones, computers, and switches.

[0106] An embodiment of the present invention further provides a server, which is used to provide a user input interface to implement the steps in the above method embodiments when executed on an electronic device.

[0107] An embodiment of the present invention provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0109] To further illustrate the effects of the embodiments of the present invention, the following experiment was conducted.

[0110] There is only one leader node in the RAFT consensus algorithm. If the leader node fails to work properly, the system will wait for the election of a new leader node before it can work properly. In addition, it is possible that a malicious node will canvass for votes to become the leader node. The RCC-RAFT consensus algorithm introduces the concepts of leader node cluster and node credit value. When the first leader node in the leader node cluster fails to work properly, there is no need to wait for the election time. The second leader node in the leader node cluster can replace the first leader node to maintain the normal operation of the system. By scoring the credit value of each node after each consensus, the node with the highest credit value is selected to enter the leader node cluster, which can avoid malicious nodes in the leader node cluster and disrupt the normal operation of the system. Since the RCC-RAFT consensus algorithm does not need to wait for the leader node election time during operation, it can improve the system throughput, reduce the consensus delay, and improve the system operation efficiency compared with the RAFT consensus algorithm.

[0111] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A traceability method for trusted storage of aircraft engine maintenance data. It is characterized in that This method optimizes the RAFT consensus algorithm to obtain the RCC-RAFT consensus algorithm. All nodes in the aircraft engine maintenance data trusted storage system constitute the RCC-RAFT node cluster. The concepts of leader node cluster and node credit value are introduced. The original single leader node is changed into a leader node cluster, and each node is scored for credit value. The nodes entering the leader node cluster are elected based on the credit value. The specific steps include: S1, initialize the credit value of each node in the RCC-RAFT node cluster and select the leader node cluster; S2, the client submits a request to the first leader node, the first leader node processes the request and generates a new log entry, and sends the new log entry to all follower nodes; S3, after receiving the new log entry, the follower node performs a log consistency check, replicates the log if it is correct, and replies to the first leader node; S4, when the first leader node receives the reply message that more than half of the follower nodes have successfully copied the block, it broadcasts the block to the blockchain network nodes; S5, update the credit score table of each node in the RCC-RAFT node cluster; In step S1, when the blockchain network is initially started, all nodes in the RCC-RAFT node cluster are followers; each node generates a random value and compares it with each other, and the values ​​are sorted from large to small. The top three nodes are the first leader node, the second leader node, and the third leader node, and these three leader nodes constitute the leader node cluster; In step S2, the client submits a request to the first leader node, and the first leader node processes the request and generates a new log entry, including: the election of the leader node cluster is based on the node credit mechanism, and there is always only one leader node cluster in the entire RCC-RAFT node cluster. The first leader node in the leader node cluster is used to communicate with the client and periodically send heartbeat signals to all nodes to maintain the leadership of the first leader node; If the follower node does not receive the heartbeat signal from the first leader node within the specified time, it will send a request to replace the leader to the second leader node in the leader node cluster through the RPC protocol; if the second leader node in the leader node cluster receives a request to replace the leader from more than one-third of the follower nodes, it will increase the current term by one, send leader replacement information to all nodes and send heartbeat signals regularly, and the second leader node in the leader node cluster will replace the original first leader node to become the new first leader node; if the follower node does not receive the leader replacement information and the heartbeat signal sent by the second leader node within the specified time, it will send a request to replace the leader to the third leader node in the leader node cluster through the RPC protocol; if the third leader node in the leader node cluster receives a request to replace the leader from more than one-third of the follower nodes, it will increase the current term by one, send leader replacement information to all nodes and send heartbeat signals regularly, and the third leader node in the leader node cluster will replace the original first leader node to become the new first leader node; When the first leader node is replaced by the second leader node or the third leader node, the replaced leader node will convert its identity from a leader node to a follower node and be removed from the leader node cluster; When the number of nodes in the leader node cluster is less than three, a new leader node will be selected to supplement the leader node cluster. By comparing the credit values ​​of each node, the nodes are sorted in descending order of credit value. The node with the highest credit value enters the leader node cluster and becomes the third leader node. In step S3, during the log replication phase, a log consistency check is performed each time the log is replicated. When a follower node crashes or fails to provide services, the follower node log will be inconsistent with the first leader node log. The first leader node finds the last consistent point with each follower node log and starts to synchronize the logs. The follower node deletes the logs that are different from the first leader node and saves the new logs synchronized by the first leader node. Whenever a new first leader node appears, the new first leader node compares logs with the previous first leader node. If there is any inconsistency, the new first leader node synchronizes the logs of the previous first leader node and cannot delete or overwrite the logs that have been successfully processed and stored by the previous first leader node. The method also includes: the maintenance data is saved by using a dual storage method of blockchain and IPFS interplanetary file system; after the original maintenance data is uploaded to the IPFS interplanetary file system, the returned file address HASH is encrypted by an AES encryption algorithm and stored in the Fabric blockchain for permanent preservation; the blockchain network nodes of the aircraft engine maintenance data trusted storage system are composed of maintenance personnel nodes, maintenance team leader nodes and maintenance safety supervisor nodes.

2. The method for tracing the trusted storage of aircraft engine maintenance data according to claim 1, It is characterized in that In step S5, the credit score table of each node in the RCC-RAFT node cluster is updated, including: The initial credit value of all nodes in the cluster is 5; If the node is the first leader node, the credit value increases by 3; if it is the second leader node, the credit value increases by 2; if it is the third leader node, the credit value increases by 1; if the client's request information is successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node increases by 1; if the client's request information is not successfully sent to the follower node and a reply is received to complete the log update, the credit value of the first leader node decreases by 1; if the node is removed from the leader node cluster, the credit value is halved; If the node is a follower node, if the node successfully receives the client request information sent by the first leader node and replies to the first leader node, the credit value increases by 1. If the node crashes or fails to operate normally, the credit value decreases by 1. After each network-wide consensus is executed, all nodes in the cluster update their credit score tables. If a node's credit value is 0, the node is prohibited from participating in the consensus process under the current term of the first leader node.

3. The traceability method for trusted storage of aircraft engine maintenance data according to claim 2, It is characterized in that When storing maintenance data, user authority verification is first performed, and then the maintenance data is stored in the IPFS interstellar file system and the file address HASH is returned to the back end of the aircraft engine maintenance data trusted storage system. The file address HASH is encrypted using the AES encryption algorithm and then the smart contract is executed. Before broadcasting the encrypted data to the blockchain network, consensus is reached through the RCC-RAFT consensus algorithm to generate valid blocks, and finally the valid blocks are broadcast to other nodes. When querying maintenance data, first verify the identity authority. After the authentication is passed, call the relevant smart contract to obtain the encrypted file address. After decryption, query the corresponding data from the IPFS interstellar file system and return it to the querying user.

4. A trusted storage system for aircraft engine maintenance data, It is characterized in that The system implements the traceability method for trusted storage of aircraft engine maintenance data as claimed in any one of claims 1 to 3, and the system comprises: Application layer (1) provides API interface and system interface display to the outside world, uses visual interface to provide information interaction service, and provides identity registration and login, aircraft engine maintenance data entry and maintenance data query functions for maintenance team members, maintenance team leaders and maintenance safety supervisors; The service layer (2) is used to access resources in the Fabric network through the Fabric-Java-SDK to interact with the blockchain network, and to interact with the IPFS interplanetary file system through the Java-IPFS-API. Contract layer (3), including smart contracts, Docker and algorithm mechanisms. When a Fabric network node submits a request to upload or query aircraft engine maintenance data, if the request meets the conditions pre-set in the smart contract, the smart contract installed and deployed in Docker will automatically execute the maintenance data upload or query operation; The network layer (4) uses the Hyperledger Fabric distributed ledger technology platform to issue identity certificates to maintenance team members, maintenance team leaders, and maintenance safety supervisors who join the blockchain network through a certificate authority, restrict the permissions of different users, and use the RCC-RAFT consensus algorithm to ensure that all nodes store the same maintenance data. The data layer (5) includes blocks, timestamps, Merkle trees, and the IPFS interplanetary file system. After the original maintenance data is uploaded to the IPFS interplanetary file system, the returned file address HASH is encrypted using the AES encryption algorithm and stored in the block for permanent preservation.

Citation Information

Patent Citations

  • Block chain system for energy transaction based on V-raft consensus algorithm

    CN114745135A

  • Consensus method based on Raft improvement and related equipment

    CN115801553A

  • Consensus method and system for rapid election based on alternative leader

    CN116743538A

  • Consensus algorithm introducing second leader and reputation model and improvement method and application thereof

    CN117714464A

  • Method and apparatus for implementing data consistency, server, and terminal

    US20210320977A1