Message transmission method and device based on distributed system, equipment, storage medium and product
By performing identity verification and reputation score on blockchain nodes, and real-time detection and adjustment of message transmission paths, the problem of poor message transmission and reception in distributed systems is solved, the system reliability and monitoring refinement is improved, and efficient Failure recovery and chain reorganization.
Patent Information
- Application Number
- CN202411044793.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In highly dynamic and large-scale distributed environments, traditional messaging systems have difficulties in monitoring and fault diagnosis, resulting in poor messaging and receiving effects.
By performing identity verification and reputation scores on blockchain nodes, data integrity verification and routing decisions based on reputation scores, real-time detection of node and network status, failure recovery and chain reorganization are carried out to ensure the reliability and efficiency of message transmission.
It improves the reliability and monitoring refinement of the system, reduces manual intervention, responds to failures quickly, reduces system downtime, and ensures the security and sustainability of message transmission.
Smart Images

Figure CN118972357A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed computing technology, and in particular to a message transmission method, apparatus, device, storage medium and product based on a distributed system. Background Art
[0002] In a distributed system, message sending and receiving is one of the core functions, involving multiple components and services working together to ensure the effective flow of information within the system. Existing technical solutions mainly rely on mature message middleware and communication protocols, such as Apache Kafka, RabbitMQ, ActiveMQ, etc. These systems provide the following key functions: Message queue: supports asynchronous message transmission and reduces the coupling between various parts of the system. Publish / subscribe mode: allows decoupling between message producers and consumers, increasing the flexibility of the system. Load balancing: through message routing strategies, achieves uniform distribution of messages and optimizes resource usage. Persistent storage: ensures that messages are not lost due to system failures and improves system reliability.
[0003] However, traditional messaging has monitoring and fault diagnosis issues when dealing with highly dynamic and large-scale distributed environments, resulting in poor messaging performance. Summary of the invention
[0004] The main purpose of this application is to provide a message transmission method, device, equipment, storage medium and product based on a distributed system, aiming to solve the technical problem of poor message sending and receiving effects.
[0005] To achieve the above objectives, the present application proposes a message transmission method based on a distributed system, and the message transmission method based on a distributed system includes:
[0006] Before message transmission, the blockchain node is authenticated and its reputation score is recorded. When the identity authentication is passed, the reputation score of each blockchain node is obtained.
[0007] Performing data integrity verification on the message to be transmitted based on the reputation score;
[0008] When the data integrity verification is passed, a routing decision is made based on the reputation score to obtain a target message transmission path;
[0009] Transmitting a message through the target message transmission path, and adjusting the target message transmission path according to a transmission state;
[0010] During the message transmission process, the blockchain node status or network status is detected, and when it is detected that the blockchain node status fails or the network status is unstable, fault recovery and chain reorganization are performed to complete the message transmission.
[0011] In one embodiment, when the data integrity verification is passed, the step of making a routing decision based on the reputation score to obtain the target message transmission path includes:
[0012] When the data integrity verification passes and the routing request initiated by the sending node is detected, the target node of the message is obtained;
[0013] Obtaining the message transmission priority of each blockchain node according to the reputation score of the blockchain node;
[0014] Get the current network status;
[0015] A target message transmission path is generated according to the current network state, the message transmission priority and the target node.
[0016] In one embodiment, the step of transmitting a message through the target message transmission path and adjusting the target message transmission path according to the transmission state includes:
[0017] Transmitting a message through the target message transmission path and detecting an abnormal pattern through an abnormal pattern recognition model;
[0018] When an abnormal pattern is detected, abnormal reminder information is generated to the corresponding node, and the abnormal pattern is analyzed;
[0019] When it is analyzed that the abnormal mode is a message routing abnormality, the target message transmission path is adjusted to obtain an adjusted message transmission path;
[0020] Message transmission is performed by adjusting the message transmission path.
[0021] In one embodiment, during the message transmission process, detecting the blockchain node status or network status, and when detecting that the blockchain node status fails or the network status is unstable, performing fault recovery and chain reorganization to complete the message transmission step includes:
[0022] During the message transmission process, detecting the blockchain node status or network status;
[0023] When a failure in the blockchain node state or an unstable network state is detected, the update message transmission path is calculated based on the state of the preset node and the network load information;
[0024] Sending the update message transmission path to the corresponding sending node and receiving node, so that the sending node and the receiving node transmit messages through the update message transmission path to achieve fault recovery;
[0025] Start the backup node and replace the failed blockchain node with the backup node to reorganize the chain and complete the message transmission.
[0026] In one embodiment, the steps of performing identity authentication and reputation score recording on the blockchain node before message transmission, and obtaining the reputation score of each blockchain node when the identity authentication passes, include:
[0027] Before transmitting messages, obtain the node information submitted by each blockchain node;
[0028] Generate a key pair for each blockchain node;
[0029] The public key in the key pair and the node information are packaged and submitted to the blockchain for identity authentication;
[0030] Establish a reputation scoring mechanism, establish the corresponding relationship between data transmission priority, node selection priority and reputation score, and update the reputation score record based on the node's historical transactions and behaviors;
[0031] When identity authentication is passed, the reputation score of the blockchain node is obtained based on the updated reputation score record.
[0032] In one embodiment, the step of verifying the data integrity of the message to be transmitted based on the reputation score includes:
[0033] Detect whether there is a data integrity certificate for the message to be transmitted on the blockchain, where the data integrity certificate is generated by a sending node encrypting the data to obtain encrypted data and performing hash processing on the encrypted data to obtain a first hash value;
[0034] When the data integrity proof is detected on the blockchain, obtaining encrypted data of the message to be transmitted;
[0035] Performing hash processing on the encrypted data to obtain a second hash value;
[0036] Comparing the second hash value with the first hash value recorded on the blockchain;
[0037] When the first Hash value is consistent with the second Hash value, calculating a data integrity index according to the second Hash value and the reputation score;
[0038] Data integrity verification is performed based on the data integrity index.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a message transmission device based on a distributed system, and the message transmission device based on a distributed system includes:
[0040] The identity authentication module is used to authenticate the identity of the blockchain node and record the reputation score before message transmission, and obtain the reputation score of each blockchain node when the identity authentication is passed;
[0041] A data integrity verification module, used for performing data integrity verification on the message to be transmitted based on the reputation score;
[0042] A message routing module, used to make a routing decision based on the reputation score to obtain a target message transmission path when the data integrity verification passes;
[0043] A monitoring and processing module, used for transmitting a message through the target message transmission path and adjusting the target message transmission path according to a transmission status;
[0044] The fault recovery and chain reorganization module is used to detect the blockchain node status or network status during the message transmission process, and when it is detected that the blockchain node status fails or the network status is unstable, perform fault recovery and chain reorganization to complete the message transmission.
[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a message transmission device based on a distributed system, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the message transmission method based on a distributed system as described above.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the message transmission method based on the distributed system as described above are implemented.
[0047] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the message transmission method based on the distributed system as described above.
[0048] One or more technical solutions proposed in the present application are as follows: before message transmission, identity authentication and reputation score record are performed on blockchain nodes, and when identity authentication is passed, the reputation score of each blockchain node is obtained; the identity authentication and dynamic reputation score mechanism implemented on the blockchain ensures the transparent record of the identity confirmation and behavior score of each node when joining the network, and the data integrity of the message to be transmitted is verified based on the reputation score; the on-chain data integrity verification is used in combination with the node reputation score to enhance the security and tamper-proof capability during data transmission; when the data integrity verification is passed, a routing decision is made based on the reputation score to obtain a target message transmission path; the message is transmitted through the target message transmission path, and the target message transmission path is adjusted according to the transmission status; the message routing is dynamically adjusted according to real-time data and node status, network changes and node failures are responded to in a timely manner, and communication efficiency is optimized; during the message transmission process, the blockchain node status or network status is detected, and when the blockchain node status failure or network status instability is detected, fault recovery and chain reorganization are performed to complete the message transmission. By automatically processing data verification, routing decisions and exception management, the need for manual intervention is reduced, operational efficiency is improved and errors are reduced. Adaptive fault recovery and chain reorganization strategies can quickly respond to faults, automatically reorganize the network, maintain service continuity, and reduce system downtime. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] Figure 1 A flow chart of the first embodiment of the message transmission method based on a distributed system provided by the present application;
[0052] Figure 2 A flow chart of the second embodiment of the message transmission method based on a distributed system provided by the present application;
[0053] Figure 3 A flow chart of the third embodiment of the message transmission method based on a distributed system provided in the present application;
[0054] Figure 4 A flowchart of a fourth embodiment of the message transmission method based on a distributed system of the present application is provided;
[0055] Figure 5 A flowchart of a fifth embodiment of the message transmission method based on a distributed system of the present application is provided;
[0056] Figure 6 A flowchart of a sixth embodiment of the message transmission method based on a distributed system of the present application is provided;
[0057] Figure 7 This is a schematic diagram of the module structure of a message transmission device based on a distributed system according to an embodiment of the present application;
[0058] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the message transmission method based on a distributed system in an embodiment of the present application.
[0059] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0060] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0061] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0062] The main solution of the embodiment of the present application is: before message transmission, the blockchain node is authenticated and the reputation score is recorded, and when the identity authentication is passed, the reputation score of each blockchain node is obtained; the data integrity of the message to be transmitted is verified based on the reputation score; when the data integrity verification is passed, a routing decision is made based on the reputation score to obtain a target message transmission path; the message is transmitted through the target message transmission path, and the target message transmission path is adjusted according to the transmission status; during the message transmission process, the blockchain node status or network status is detected, and when it is detected that the blockchain node status fails or the network status is unstable, fault recovery and chain reorganization are performed to complete the message transmission.
[0063] Existing technologies have some limitations when dealing with highly dynamic and large-scale distributed environments: Scalability issues: Although many message middlewares support horizontal expansion, the scalability and reliability of the system are still limited under extreme loads or node failures; Data consistency issues: In a distributed environment, maintaining data consistency and order is a challenge, especially in the case of network partitions or latency changes. Difficulties in monitoring and fault diagnosis: Existing system monitoring tools often cannot provide enough information to quickly and accurately locate problems, especially in microservice architectures.
[0064] This application provides a solution that can improve the reliability of the system, the detailed monitoring and the overall performance by introducing a new message sending and receiving and monitoring method.
[0065] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a distributed system, etc. The following takes a distributed system as an example to illustrate this embodiment and the following embodiments.
[0066] Based on this, the embodiment of the present application provides a message transmission method based on a distributed system, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the message transmission method based on a distributed system of the present application.
[0067] In this embodiment, the message transmission method based on the distributed system includes steps S10 to S50:
[0068] Step S10: Before message transmission, the blockchain node is authenticated and the reputation score is recorded, and when the identity authentication is passed, the reputation score of each blockchain node is obtained.
[0069] It should be noted that before the message is transmitted, the blockchain node can be authenticated through the authentication module, which can be set through the Blockchain Identity and NodeTrust System (BINTS). Each blockchain node not only registers its own network address and processing capacity at the initial startup in the system, but also needs to be authenticated and recorded with a reputation score through the blockchain. Before sending and receiving messages, the blockchain node can be set. The reputation score record may include the reputation score record of each blockchain node, and the reputation score of each blockchain node represents the interactive behavior record and positive and negative behavior of each blockchain node.
[0070] The reputation score (TS) is designed to quantify the quality of a node's behavior in a blockchain network. This score reflects the node's historical positive and negative interactions, helping other nodes make choices based on reliable reputation information when making data exchanges or cooperation decisions. Nodes with high reputation scores are more likely to receive more network resources and priority, while nodes with low reputation scores may be restricted or monitored.
[0071] In the specific implementation, the verification of identity authentication and reputation score can be integrated, so that before the message is transmitted, the identity authentication and reputation score are performed through the identity authentication module, thereby providing transparency and auditability. All reputation data and identity authentication records are open and transparent, and stored on the blockchain. Any participant can review these records, ensuring the fairness and transparency of the system.
[0072] Step S20: performing data integrity verification on the message to be transmitted based on the reputation score.
[0073] It can be understood that the attributes of each blockchain node can be determined based on the reputation score, so that the data integrity of the message to be transmitted can be verified based on the attributes of the blockchain node. The data integrity verification can be achieved through the data integrity verification module in the distributed system using the On-Chain Data Integrity Verification Protocol (OCDIVP).
[0074] Before a message is transmitted (sent / received), the sending node must record an encrypted data integrity certificate on the blockchain. The receiving node verifies this certificate through the blockchain and calculates the data integrity index to ensure that the data has not been tampered with during transmission; after verifying the integrity of the message, the receiving node must confirm the success of the message sending and receiving transaction on the blockchain and record its processing performance data, which will be used to update the node's reputation score and optimize system performance.
[0075] Step S30: When the data integrity verification passes, a routing decision is made based on the reputation score to obtain a target message transmission path.
[0076] In the specific implementation, if the data integrity verification fails, the subsequent message transmission will not be carried out. When the data integrity verification passes, the message routing decision can be made according to the reputation score, that is, the optimal message transmission path is calculated, and the target message transmission path is the optimal message transmission path. The routing decision relies on the contract logic to ensure transparency and immutability.
[0077] Routing decisions can be made through the message routing module (Smart Contract-Driven Message Routing, SC-DMR), which is specifically controlled by smart contracts. Graph theory algorithms and the reputation scores of blockchain nodes can be used to dynamically generate the optimal message transmission path.
[0078] Step S40: Transmitting a message through the target message transmission path, and adjusting the target message transmission path according to the transmission status.
[0079] It should be noted that after determining the optimal message transmission path, the encrypted data integrity proof can be combined to transmit the message through the optimal message transmission path. During this process, there may be abnormal situations. Therefore, the target message transmission path can be dynamically adjusted according to the transmission status to ensure the optimal transmission path.
[0080] The adjustment of the target message transmission path can be achieved through the monitoring processing module. The monitoring processing module can monitor all message transmission activities and smart contract execution on the blockchain in real time. Specifically, the monitoring engine can be deployed on the monitoring processing module: develop and deploy a monitoring engine that is integrated into the blockchain system and can capture and record all network activities and smart contract execution in real time, and configure monitoring parameters: set the parameters of the monitoring engine, such as the monitoring frequency, monitored network nodes, specific smart contract events, etc.
[0081] Step S50: During the message transmission process, the blockchain node status or network status is detected, and when it is detected that the blockchain node status fails or the network status is unstable, fault recovery and chain reorganization are performed to complete the message transmission.
[0082] In the specific implementation, fault recovery and chain reorganization can be achieved through the fault recovery and chain reorganization module, which is deployed with the Adaptive Fault Recovery and Chain Reorganization Strategy (AFR-CRS). When a node failure or network instability is detected, the system automatically recalculates the message routing through smart contracts and executes the chain reorganization strategy. This strategy includes starting a backup node or using other high-reputation nodes to temporarily assume the function of the faulty node. The fault recovery process is completely transparent and recorded on the blockchain to maintain the integrity and traceability of the entire system.
[0083] The present embodiment provides a message transmission method based on a distributed system. Before message transmission, the blockchain node is authenticated and the reputation score is recorded, and when the identity authentication is passed, the reputation score of each blockchain node is obtained; the identity authentication and dynamic reputation scoring mechanism implemented on the blockchain ensures the transparent record of the identity confirmation and behavior score of each node when joining the network, and the data integrity of the message to be transmitted is verified based on the reputation score; the on-chain data integrity verification is used in combination with the node reputation score to enhance the security and tamper-proof capability during data transmission; when the data integrity verification is passed, a routing decision is made based on the reputation score to obtain a target message transmission path; the message is transmitted through the target message transmission path, and the target message transmission path is adjusted according to the transmission status; the message routing is dynamically adjusted according to the real-time data and node status, the network change and node failure are responded to in time, and the communication efficiency is optimized; during the message transmission process, the blockchain node status or network status is detected, and when the blockchain node status failure or the network status is detected to be unstable, fault recovery and chain reorganization are performed to complete the message transmission. By automatically processing data verification, routing decisions and exception management, the need for manual intervention is reduced, operational efficiency is improved and errors are reduced. Adaptive fault recovery and chain reorganization strategies can quickly respond to faults, automatically reorganize the network, maintain service continuity, and reduce system downtime.
[0084] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S30 includes steps S301 to S304:
[0085] Step S301: when the data integrity verification passes and a routing request initiated by a sending node is detected, the target node of the message is obtained.
[0086] It should be noted that before generating the target message transmission path, the deployment and configuration of the visible smart contract requires the deployment of a dedicated smart contract on the blockchain to control the routing decision of the message. Contract deployment: Develop a smart contract containing graph theory algorithms and node reputation system logic and deploy it on the blockchain network. Configuration parameters: Set the parameters in the contract, such as the threshold of the reputation score, the message priority standard, etc. These parameters can be adjusted according to system requirements. And use the graph theory algorithm inside the smart contract to determine the optimal message transmission path. Construct a network graph: The system regards all nodes and their connections as vertices and edges of the graph. The properties of each node and connecting edge (such as bandwidth, latency, reputation score, etc.) are recorded in the graph. Among them, the weight of the edge is determined based on the latency, bandwidth of the edge, and the reputation score of the node passing through. A higher reputation score can reduce the weight, so that the path tends to pass through nodes with high reputation. In addition, the smart contract regularly obtains the latest node information and reputation scores from the blockchain to ensure that the information of the graph is up to date. Path search algorithm: You can use algorithms such as Dijkstra or A* to dynamically calculate the shortest or optimal path from the sending node to the receiving node.
[0087] When the data integrity verification passes, it can be detected whether the message needs to be transmitted. When the message needs to be transmitted, the sending node initiates a routing request to the smart contract, including the target node, priority and other relevant metadata of the message. Therefore, when the routing request initiated by the sending node is detected, the target node of the message, that is, the recipient of the message, can be obtained.
[0088] Step S302: Obtain the message transmission priority of each blockchain node according to the reputation score of the blockchain node.
[0089] In the specific implementation, there is a corresponding relationship between the reputation score and the message transmission priority. Therefore, the message transmission priority of each blockchain node can be determined according to the reputation score of each blockchain node. The higher the reputation score of the blockchain node, the higher the corresponding message transmission priority.
[0090] Step S303: Obtain the current network status.
[0091] In a specific implementation, the current network status can be determined through a network status detection tool, and different message transmission paths can be selected under different network statuses.
[0092] Step S304: Generate a target message transmission path according to the current network status, the message transmission priority and the target node.
[0093] It should be understood that the smart contract can use graph theory algorithms to calculate the optimal message transmission path based on the current network status, message transmission priority, and the location of the target node. Specifically, the path search algorithm is used to generate the target message transmission path. After the target message transmission path is calculated, the optimal message transmission path can be given to the sending node. The path information includes the sequence of nodes passed and detailed information of each connection. Since the entire routing decision process is controlled by the smart contract and recorded on the blockchain, the logic and results of all routing decisions are completely transparent, and any participant can verify this information. Once the routing decision is made by the smart contract and recorded on the blockchain, it cannot be tampered with or deleted, ensuring the security and reliability of the system, thereby ensuring transparency and immutability.
[0094] As network conditions and node performance change, smart contracts can update their routing decision logic based on real-time data, such as continuously collecting feedback on routing effectiveness, such as actual transmission time, failure rate, etc. Based on the collected data, smart contracts can adjust their internal parameters or algorithms to optimize future routing decisions.
[0095] In this embodiment, when the data integrity verification passes and the routing request initiated by the sending node is detected, the target node of the message is obtained; the message transmission priority of each blockchain node is obtained according to the reputation score of the blockchain node; the current network state is obtained; and the target message transmission path is generated according to the current network state, the message transmission priority and the target node. By setting up a smart contract-driven message routing mechanism, not only the optimization of the message transmission path is ensured, but also the transparency and immutability of the blockchain enhance the trust and efficiency of the entire system. This implementation method fully demonstrates the powerful potential of blockchain technology and smart contracts in improving the efficiency and security of network communications.
[0096] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S40 includes steps S401 to S404:
[0097] Step S401: Message transmission is performed through the target message transmission path, and abnormal pattern detection is performed through an abnormal pattern recognition model.
[0098] It should be noted that after the target message transmission path is determined, the message can be transmitted through the target message transmission path, and during the transmission process, the abnormal pattern detection is performed through the abnormal pattern recognition model. The abnormal pattern recognition model is located in the blockchain monitoring and exception handling engine.
[0099] The abnormal pattern recognition model is a pre-deployed machine learning model that identifies abnormal patterns by analyzing the collected data. The abnormal pattern recognition model can be trained based on historical data and can identify anomalies such as delay anomalies, data integrity issues, and frequent retransmission requests.
[0100] Step S402: when an abnormal pattern is detected, abnormal reminder information is generated to a corresponding node, and the abnormal pattern is analyzed.
[0101] In a specific implementation, when an abnormal pattern is detected, abnormal reminder information can be generated and a notification can be immediately sent to the system administrator or the corresponding node.
[0102] By analyzing the abnormal pattern, it is possible to determine what caused the abnormal situation and thus optimize the abnormal pattern.
[0103] Step S403: When it is analyzed that the abnormal mode is a message routing abnormality, the target message transmission path is adjusted to obtain an adjusted message transmission path.
[0104] It should be noted that if the abnormal pattern is related to message routing, that is, the message routing is abnormal, such as congestion or node failure, the smart contract can be instructed to automatically adjust the message transmission path and select an optimal alternative path, that is, adjust the message transmission path.
[0105] Step S404: transmitting the message by adjusting the message transmission path.
[0106] In the specific implementation, the message transmission path can be adjusted to ensure the correct transmission of the message. If the abnormal mode is caused by data integrity problems, the retransmission mechanism is automatically triggered to retransmit the message.
[0107] After the transmission, the system can collect the effect and performance data of processing and responding to anomalies, which can be used to evaluate and improve the monitoring engine and anomaly pattern recognition model. Based on the latest monitoring data and feedback, the anomaly pattern recognition model can be regularly updated to improve its prediction accuracy and efficiency. All records of monitoring activities and exception handling will be saved on the blockchain, which not only ensures the transparency of operations, but also enhances the auditability of the system.
[0108] This embodiment transmits messages through the target message transmission path, and detects abnormal patterns through an abnormal pattern recognition model; when an abnormal pattern is detected, an abnormal reminder message is generated to the corresponding node, and the abnormal pattern is analyzed; when the abnormal pattern is analyzed to be a message routing abnormality, the target message transmission path is adjusted to obtain an adjusted message transmission path; and messages are transmitted through the adjusted message transmission path. The blockchain monitoring and exception handling engine can not only effectively monitor and handle abnormal situations, but also improve the stability and responsiveness of the entire system through the real-time analysis and automatic adjustment mechanism of the abnormal pattern recognition model. This implementation method utilizes the transparency and immutability of blockchain technology to ensure the security and efficiency of network activities.
[0109] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 4 , step S50 includes steps S501 to S504:
[0110] Step S501: During the message transmission process, the blockchain node status or network status is detected.
[0111] It should be noted that a real-time monitoring system can be deployed in advance to continuously detect the network status and node operation. By embedding fault detection logic in the smart contract, when the monitoring system finds that a node has a problem or the network is unstable, the smart contract is automatically triggered. Therefore, the blockchain node status or network status can be continuously detected during the message transmission process.
[0112] Step S502: When it is detected that the blockchain node state fails or the network state is unstable, the update message transmission path is calculated based on the state of the preset node and the network load information.
[0113] When a node in the blockchain is detected to have a fault or the network is unstable, the smart contract can be triggered to recalculate the message routing, that is, to achieve fault recovery. The preset node is other available nodes, and the optimal message transmission path can be recalculated based on the status of other available nodes and network load information.
[0114] Step S503: sending the updated message transmission path to the corresponding sending node and receiving node, so that the sending node and the receiving node perform message transmission through the updated message transmission path to achieve fault recovery.
[0115] In a specific implementation, the updated message transmission path is automatically sent to the relevant sending nodes and receiving nodes, so that the message can be transmitted through the sending nodes and the receiving nodes according to the updated message transmission path, ensuring that the message can be smoothly transmitted by bypassing the faulty node.
[0116] Step S504: Start the backup node and replace the faulty blockchain node with the backup node to reorganize the chain and complete the message transmission.
[0117] While updating the message transmission path, a chain reorganization strategy will also be executed to maintain the continuity and integrity of the network. Specifically, the pre-configured backup node can be automatically started to take over the responsibilities of the failed node to ensure uninterrupted network services. If there is no available backup node, one or more nodes with high reputation scores will be selected to temporarily assume the functions of the failed node.
[0118] At the same time, detailed information about each fault handling and chain reorganization, including triggering conditions, measures taken, and final results, will be transparently recorded on the blockchain. The data recorded on the blockchain not only provides transparency of operations, but also allows the history and effects of fault handling to be tracked and audited at any time. The system will continue to collect data on the effects of fault recovery and chain reorganization, and optimize fault handling strategies and smart contract logic based on these data. The system will analyze the implementation effects of fault recovery and chain reorganization, such as time delay, success rate, and system stability. Based on performance feedback results, smart contracts will regularly update their fault handling and chain reorganization strategies to improve future response efficiency and accuracy.
[0119] In the process of message transmission, this embodiment detects the blockchain node status or network status; when the blockchain node status failure or network status instability is detected, the update message transmission path is calculated according to the status of the preset node and the network load information; the update message transmission path is sent to the corresponding sending node and receiving node, and the sending node and the receiving node transmit messages through the update message transmission path to achieve fault recovery; the backup node is started, and the backup node replaces the faulty blockchain node to reorganize the chain and complete the message transmission. The adaptive fault recovery and chain reorganization strategy not only ensures the robustness of the system in the face of node failure or network instability, but also greatly improves the reliability of the entire system and the user's trust through the automated processing of smart contracts and the transparent recording of blockchain. This implementation method fully utilizes the advantages of blockchain technology, realizes efficient and secure network operation and maintenance, and enhances the system's adaptability to dynamic changes in the network and fault recovery capabilities.
[0120] Based on the first embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 5 , step S10 includes steps S101 to S105:
[0121] Step S101: Before transmitting a message, obtain the node information submitted by each blockchain node;
[0122] It should be noted that before sending and receiving messages, the blockchain node can be set, including node registration and identity authentication as well as node reputation score settings. Therefore, each blockchain node can be registered in the initial startup phase, and each node submits its network address and processing capacity and other node information, so the node information submitted by each blockchain node can be obtained. Node information includes the node's network address and processing capacity.
[0123] Step S102: Generate a key pair for each blockchain node.
[0124] It can be understood that a pair of public and private keys can be generated for each blockchain node to form a key pair for subsequent identity authentication and encrypted communication.
[0125] Step S103: Package the public key in the key pair and the node information and submit them to the blockchain for identity verification.
[0126] In the specific implementation, the public key and basic node information are packaged together and submitted to the blockchain. The legitimacy of the node is verified through a smart contract and recorded on the chain to ensure that the information cannot be tampered with.
[0127] Step S104: Establish a reputation scoring mechanism, establish a corresponding relationship between data transmission priority, node selection priority and reputation scoring, and update the reputation scoring record according to the node's historical transactions and behaviors.
[0128] It should be noted that a dynamic reputation scoring mechanism can be established, including interactive behavior records: all node interactions, including data requests, response success rates, participation, etc., are automatically recorded on the blockchain through smart contracts. Definition of positive and negative behaviors: clarify what behaviors count as positive interactions (such as successful completion of data requests, timely responses, etc.) and what behaviors count as negative interactions (such as request rejection, timeouts, etc.). Reputation score update: The reputation score (TrustScore, TS) is dynamically recorded and updated on the blockchain based on the node's historical transactions and behaviors. Specifically, the node's reputation score is regularly updated according to the following formula:
[0129] TS_i=
[0130] lambda·text{Positive Interactions}_i-mu·text{NegativeInteractions}_i (Formula 1)
[0131] lambda and mu are the positive and negative impact coefficients of the reputation score. The positive impact coefficient indicates the contribution of positive behavior to the total reputation score. The larger the value, the heavier the weight of positive behavior. The negative impact coefficient indicates the degree of deduction of negative behavior from the total reputation score. The larger the value, the greater the impact of negative behavior. These coefficients can be adjusted according to the actual needs of the system. text{Positive Interactions}_i and text{Negative Interactions}_i represent the number of positive and negative interactions of node i, respectively.
[0132] Reputation scores are used to influence various decisions in the system, such as data transmission priority: nodes with high reputation scores enjoy priority in data transmission. Node selection strategy: when collaboration or resource sharing is required, nodes with high reputation are preferred to participate. Therefore, the corresponding relationship between data transmission priority, node selection priority and reputation score can be established through reputation score.
[0133] Step S105: When identity authentication is passed, the reputation score of the blockchain node is obtained according to the updated reputation score record.
[0134] It should be noted that any node must authenticate its identity through its public key before exchanging (sending and receiving) data. The verification process is controlled by smart contracts to ensure that all interactions are authorized, and subsequent message transmission can only be carried out after identity verification. Nodes can query the reputation scores of other nodes and decide whether to interact with them or adjust the interaction strategy based on the reputation scores. All reputation data and identity verification records are open and transparent, and stored on the blockchain. Any participant can review these records, ensuring the fairness and transparency of the system.
[0135] Before transmitting messages, this embodiment obtains node information submitted by each blockchain node; generates a key pair for each blockchain node; packages the public key in the key pair and the node information and submits them to the blockchain for identity authentication; establishes a reputation scoring mechanism, establishes a corresponding relationship between data transmission priority, node selection priority and reputation score, and updates the reputation score record according to the node's historical transactions and behaviors; when identity authentication is passed, obtains the reputation score of the blockchain node according to the updated reputation score record. By setting up a blockchain identity and node reputation system, message sending and receiving can be carried out on the blockchain to achieve distributed sending and receiving and monitoring. Through such detailed and structured implementation steps, not only the reliability of the nodes and the security of the interaction are ensured, but also the overall performance and trust of the entire blockchain network are enhanced through a transparent and auditable reputation system. This implementation method uses the core advantages of blockchain, namely immutability and decentralization, to build a robust distributed network identity and reputation management framework.
[0136] Based on the first embodiment of the present application, in the sixth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 6 , step S20 includes steps S201 to S206:
[0137] Step S201: Detect whether there is a data integrity certificate for the message to be transmitted on the blockchain, where the data integrity certificate is generated by a sending node encrypting the data to obtain encrypted data and performing hash processing on the encrypted data to obtain a first hash value.
[0138] It should be noted that before the sending node is ready to transmit a message, it is necessary to ensure the integrity of the message data. This can be done by detecting whether there is a data integrity certificate for the message to be transmitted on the blockchain. The data integrity certificate can be obtained by encrypting and hashing the data in advance. Specifically, the sending node uses encryption technology to encrypt the data (existing encryption technology can be used) to ensure the security of the data during transmission. After obtaining the encrypted data, the encrypted data is hashed to generate a unique data fingerprint (first hash value). This first hash value reflects the complete state of the data, and any slight change to the data will result in a significant change in the hash value. The first hash value of the data is combined with other necessary information (such as timestamp, node identification, etc.) to form a data integrity certificate. This certificate is then recorded on the blockchain by the sending node to ensure that it cannot be tampered with and can be verified. When the receiving node receives the data, it can obtain the data integrity certificate recorded by the sending node from the blockchain.
[0139] If there is no data integrity proof, the data integrity verification fails.
[0140] Step S202: When it is detected that the data integrity certificate exists on the blockchain, the encrypted data of the message to be transmitted is obtained.
[0141] In a specific implementation, if a data integrity certificate is detected on the blockchain, further verification can be performed to obtain the encrypted data of the message to be transmitted.
[0142] Step S203: performing hash processing on the encrypted data to obtain a second hash value.
[0143] The receiving node performs hash processing on the received encrypted data again to generate a new hash value, namely, a second hash value.
[0144] Step S204: Compare the second hash value with the first hash value recorded on the blockchain.
[0145] The second hash value can be compared with the first hash value recorded on the blockchain to determine whether the two match.
[0146] If the second hash value does not match the first hash value, the data integrity verification fails, that is, the data is incomplete.
[0147] Step S205: When the first Hash value is consistent with the second Hash value, a data integrity index is calculated according to the second Hash value and the reputation score.
[0148] In the specific implementation, if the two are consistent, it proves that the data has not been tampered with during the transmission process, and the data integrity index can be further calculated as shown in the following formula 2:
[0149] DII=nu·ext{hash}(data)+xi·TS_r (Formula 2)
[0150] nu and xi are weight coefficients, text{hash}(data) is the second hash value of the data, and TS_r is the reputation score of the receiving node. nu (hash value weight coefficient) determines the influence of the data hash value in the integrity verification. A higher nu value means that the security and integrity of the data itself are highly valued. xi (reputation score weight coefficient) determines the proportion of the sending node's reputation score in the data integrity index. A higher xi value emphasizes the credibility of data from a high-reputation node.
[0151] Step S206: Perform data integrity verification according to the data integrity index.
[0152] In a specific implementation, the integrity and credibility of the data can be determined based on the calculated data integrity index, thereby completing the data integrity verification.
[0153] A data integrity index is calculated by combining the encrypted hash value of the data and the reputation score of the receiving node. This index is used to evaluate the integrity and credibility of the received data, ensuring that the data has not been tampered with during transmission and is sent by a reputable node. This mechanism improves the security and reliability of data transmission. Once the data is verified to be correct, the receiving node confirms the success of the message sending and receiving transaction on the blockchain, and the receiving node records its processing performance data (such as processing time, success rate, etc.) on the blockchain. This data will be used to update the node's reputation score and optimize system performance.
[0154] This embodiment detects whether there is a data integrity certificate for the message to be transmitted on the blockchain, wherein the data integrity certificate is generated by the first hash value obtained by encrypting the data by the sending node and performing hash processing on the encrypted data; when the data integrity certificate is detected on the blockchain, the encrypted data of the message to be transmitted is obtained; the encrypted data is hashed to obtain a second hash value; the second hash value is compared with the first hash value recorded on the blockchain; when the first hash value is consistent with the second hash value, the data integrity index is calculated according to the second hash value and the reputation score; and the data integrity is verified according to the data integrity index. By setting up an on-chain data integrity verification protocol in the blockchain identity and node reputation system, not only the security and integrity of the data are guaranteed, but also the trust and efficiency of the entire system are enhanced by utilizing the tamper-proof and transparent characteristics of the blockchain. This implementation method fully demonstrates the powerful potential of blockchain technology in ensuring the security and integrity of data transmission.
[0155] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the message transmission method of the present application based on a distributed system. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0156] This application also provides a message transmission device based on a distributed system, please refer to Figure 7 , the message transmission device based on the distributed system includes:
[0157] The identity authentication module 10 is used to authenticate the blockchain node and record the reputation score before message transmission, and obtain the reputation score of each blockchain node when the identity authentication is passed.
[0158] The data integrity verification module 20 is used to verify the data integrity of the message to be transmitted based on the reputation score.
[0159] The message routing module 30 is used to make a routing decision based on the reputation score to obtain a target message transmission path when the data integrity verification passes.
[0160] The monitoring processing module 40 is used to transmit a message through the target message transmission path and adjust the target message transmission path according to the transmission status.
[0161] The fault recovery and chain reorganization module 50 is used to detect the blockchain node status or network status during the message transmission process, and when it is detected that the blockchain node status fails or the network status is unstable, perform fault recovery and chain reorganization to complete the message transmission.
[0162] The message transmission device based on a distributed system provided by the present application adopts the message transmission method based on a distributed system in the above-mentioned embodiment, which can solve the technical problem of poor message sending and receiving effect. Compared with the prior art, the beneficial effects of the message transmission device based on a distributed system provided by the present application are the same as the beneficial effects of the message transmission method based on a distributed system provided by the above-mentioned embodiment, and other technical features in the message transmission device based on a distributed system are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0163] In one embodiment, the message routing module 30 is also used to obtain the target node of the message when the data integrity verification is passed and the routing request initiated by the sending node is detected; obtain the message transmission priority of each blockchain node according to the reputation score of the blockchain node; obtain the current network status; and generate a target message transmission path according to the current network status, the message transmission priority and the target node.
[0164] In one embodiment, the monitoring and processing module 40 is also used to transmit messages through the target message transmission path, and to detect abnormal patterns through an abnormal pattern recognition model; when an abnormal pattern is detected, abnormal reminder information is generated to a corresponding node, and the abnormal pattern is analyzed; when the abnormal pattern is analyzed to be a message routing abnormality, the target message transmission path is adjusted to obtain an adjusted message transmission path; and message transmission is performed through the adjusted message transmission path.
[0165] In one embodiment, the fault recovery and chain reorganization module 50 is also used to detect the blockchain node status or network status during the message transmission process; when it is detected that the blockchain node status fails or the network status is unstable, the update message transmission path is calculated according to the status of the preset node and the network load information; the updated message transmission path is sent to the corresponding sending node and the receiving node, and the sending node and the receiving node transmit messages through the updated message transmission path to achieve fault recovery; the backup node is started, and the backup node replaces the faulty blockchain node to perform chain reorganization and complete the message transmission.
[0166] In one embodiment, the identity authentication module 10 is also used to obtain node information submitted by each blockchain node before message transmission; generate a key pair for each blockchain node; package the public key in the key pair and the node information and submit them to the blockchain for identity authentication; establish a reputation scoring mechanism, establish a corresponding relationship between data transmission priority, node selection priority and reputation score, and update the reputation score record according to the node's historical transactions and behaviors; when the identity authentication is passed, obtain the reputation score of the blockchain node according to the updated reputation score record.
[0167] In one embodiment, the data integrity verification module 20 is also used to detect whether there is a data integrity certificate for the message to be transmitted on the blockchain, where the data integrity certificate is generated by a sending node encrypting the data to obtain encrypted data and hashing the encrypted data to obtain a first hash value; when it is detected that the data integrity certificate exists on the blockchain, the encrypted data of the message to be transmitted is obtained; the encrypted data is hashed to obtain a second hash value; the second hash value is compared with the first hash value recorded on the blockchain; when the first hash value is consistent with the second hash value, a data integrity index is calculated based on the second hash value and the reputation score; and data integrity verification is performed based on the data integrity index.
[0168] The present application provides a message transmission device based on a distributed system, and the message transmission device based on a distributed system includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the message transmission method based on the distributed system in the above-mentioned embodiment one.
[0169] Reference below Figure 8 , which shows a schematic diagram of the structure of a message transmission device based on a distributed system suitable for implementing the embodiment of the present application. The message transmission device based on a distributed system in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The distributed system-based message transmission device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0170] like Figure 8As shown, the message transmission device based on the distributed system may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the message transmission device based on the distributed system are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the message transmission device based on the distributed system to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a message transmission device based on the distributed system with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0171] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0172] The message transmission device based on a distributed system provided by the present application adopts the message transmission method based on a distributed system in the above-mentioned embodiment, which can solve the technical problem of poor message sending and receiving effect. Compared with the prior art, the beneficial effects of the message transmission device based on a distributed system provided by the present application are the same as the beneficial effects of the message transmission method based on a distributed system provided by the above-mentioned embodiment, and the other technical features in the message transmission device based on a distributed system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0173] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0174] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0175] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the message transmission method based on a distributed system in the above-mentioned embodiment.
[0176] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0177] The computer-readable storage medium may be included in a message transmission device based on a distributed system; or may exist independently without being assembled into a message transmission device based on a distributed system.
[0178] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a message transmission device based on a distributed system, the message transmission device based on the distributed system: before message transmission, authenticate the identity and record the reputation score of the blockchain node, and when the identity authentication passes, obtain the reputation score of each blockchain node; verify the data integrity of the message to be transmitted based on the reputation score; when the data integrity verification passes, make a routing decision based on the reputation score to obtain a target message transmission path; transmit the message through the target message transmission path, and adjust the target message transmission path according to the transmission status; during the message transmission process, detect the blockchain node status or network status, and when it is detected that the blockchain node status fails or the network status is unstable, perform fault recovery and chain reorganization to complete the message transmission.
[0179] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0180] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0181] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0182] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned message transmission method based on a distributed system, and can solve the technical problem of poor message sending and receiving effects. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the message transmission method based on a distributed system provided by the above-mentioned embodiment, and will not be repeated here.
[0183] The present application also provides a computer program product, including a computer program, which implements the steps of the message transmission method based on a distributed system when executed by a processor.
[0184] The computer program product provided by the present application can solve the technical problem of poor message sending and receiving effects. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the message transmission method based on the distributed system provided by the above embodiment, which will not be repeated here.
[0185] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A message transmission method based on a distributed system, It is characterized in that The message transmission method based on the distributed system includes: Before message transmission, the blockchain node is authenticated and its reputation score is recorded. When the identity authentication is passed, the reputation score of each blockchain node is obtained. Performing data integrity verification on the message to be transmitted based on the reputation score; When the data integrity verification is passed, a routing decision is made based on the reputation score to obtain a target message transmission path; Transmitting a message through the target message transmission path, and adjusting the target message transmission path according to a transmission state; During the message transmission process, the blockchain node status or network status is detected, and when it is detected that the blockchain node status fails or the network status is unstable, fault recovery and chain reorganization are performed to complete the message transmission.
2. The method according to claim 1, It is characterized in that When the data integrity verification is passed, the step of making a routing decision based on the reputation score to obtain the target message transmission path includes: When the data integrity verification passes and the routing request initiated by the sending node is detected, the target node of the message is obtained; Obtaining the message transmission priority of each blockchain node according to the reputation score of the blockchain node; Get the current network status; A target message transmission path is generated according to the current network state, the message transmission priority and the target node.
3. The method according to claim 1, It is characterized in that The step of transmitting a message through the target message transmission path and adjusting the target message transmission path according to the transmission state includes: Transmitting a message through the target message transmission path and detecting an abnormal pattern through an abnormal pattern recognition model; When an abnormal pattern is detected, abnormal reminder information is generated to the corresponding node, and the abnormal pattern is analyzed; When it is analyzed that the abnormal mode is a message routing abnormality, the target message transmission path is adjusted to obtain an adjusted message transmission path; Message transmission is performed by adjusting the message transmission path.
4. The method according to claim 1, It is characterized in that The step of detecting the blockchain node status or network status during the message transmission process, and performing fault recovery and chain reorganization when detecting that the blockchain node status fails or the network status is unstable, so as to complete the message transmission includes: During the message transmission process, detecting the blockchain node status or network status; When a failure in the blockchain node state or an unstable network state is detected, the update message transmission path is calculated based on the state of the preset node and the network load information; Sending the update message transmission path to the corresponding sending node and receiving node, so that the sending node and the receiving node transmit messages through the update message transmission path to achieve fault recovery; Start the backup node and replace the failed blockchain node with the backup node to reorganize the chain and complete the message transmission.
5. The method according to claim 1, It is characterized in that The steps of performing identity authentication and reputation score recording on the blockchain node before message transmission, and obtaining the reputation score of each blockchain node when the identity authentication is passed include: Before transmitting messages, obtain the node information submitted by each blockchain node; Generate a key pair for each blockchain node; The public key in the key pair and the node information are packaged and submitted to the blockchain for identity authentication; Establish a reputation scoring mechanism, establish the corresponding relationship between data transmission priority, node selection priority and reputation score, and update the reputation score record based on the node's historical transactions and behaviors; When identity authentication is passed, the reputation score of the blockchain node is obtained based on the updated reputation score record.
6. The method according to any one of claims 1 to 5, It is characterized in that The step of verifying the data integrity of the message to be transmitted based on the reputation score comprises: Detect whether there is a data integrity certificate for the message to be transmitted on the blockchain, where the data integrity certificate is generated by a sending node encrypting the data to obtain encrypted data and performing hash processing on the encrypted data to obtain a first hash value; When the data integrity proof is detected on the blockchain, obtaining encrypted data of the message to be transmitted; Performing hash processing on the encrypted data to obtain a second hash value; Comparing the second hash value with the first hash value recorded on the blockchain; When the first Hash value is consistent with the second Hash value, calculating a data integrity index according to the second Hash value and the reputation score; Data integrity verification is performed based on the data integrity index.
7. A message transmission device based on a distributed system, It is characterized in that The device comprises: The identity authentication module is used to authenticate the identity of the blockchain node and record the reputation score before message transmission, and obtain the reputation score of each blockchain node when the identity authentication is passed; A data integrity verification module, used for performing data integrity verification on the message to be transmitted based on the reputation score; A message routing module, used to make a routing decision based on the reputation score to obtain a target message transmission path when the data integrity verification passes; A monitoring and processing module, used for transmitting a message through the target message transmission path and adjusting the target message transmission path according to a transmission status; The fault recovery and chain reorganization module is used to detect the blockchain node status or network status during the message transmission process, and when it is detected that the blockchain node status fails or the network status is unstable, perform fault recovery and chain reorganization to complete the message transmission.
8. A message transmission device based on a distributed system, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the message transmission method based on a distributed system according to any one of claims 1 to 6.
9. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the message transmission method based on a distributed system as described in any one of claims 1 to 6 are implemented.
10. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the message transmission method based on a distributed system are implemented as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Creditworthiness control method and system for anonymous communication system
CN102333096A
Intelligent monitoring system and method for distributed network based on block chain
CN106453377A
Information transmission method and information transmission device
CN108632824A
Message distribution method and device, storage medium and electronic device
CN111404897A
Cross-network dynamic service flow verification method and system, storage medium and computing device
CN112487465A
Cited By
Block chain security verification protection method, block chain node, medium and product
CN119341847A
A blockchain security verification protection method, blockchain node, medium and product
CN119341847B
Internet data processing method, system, equipment and medium
CN119788433A
Block chain node fault recovery method and block chain system
CN119865421A
Cloud disk data transmission link optimization method and device, equipment, storage medium and program product
CN121309457A
