Communication protocol dynamic adaptation method and device

By building the Markov decision-making process model and Byzantine fault-tolerant consensus optimization model, dynamically adjusting the configuration parameters and communication protocols of terminal devices, the adaptive adjustment needs in the Internet of Things environment are solved, the robustness and security of the system are improved, and the Byzantine response is met. malfunction and malicious node interference.

CN118945195AActive Publication Date: 2024-11-12WUHAN HEXIAN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411173350.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-12
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The existing automatic adaptation method of communication protocols cannot meet the adaptive adjustment requirements in the Internet of Things environment, resulting in a reduced signal-to-noise ratio of the system and is unable to effectively deal with Byzantine failures and malicious node interference.

Method used

By building Markov decision-making process model and Byzantine fault-tolerant consensus optimization model, dynamically evaluate the network environment status and node behavior, adjust the configuration parameters and communication protocols of terminal devices, and introduce hierarchical design of master nodes, replication nodes and intelligent consensus nodes to achieve Dynamic adaptability and fault tolerance.

Benefits of technology

Improve the adaptability and robustness of the Byzantine Dynamic Adaptive Consensus Protocol framework, optimize the energy consumption and performance of terminal devices, ensure the timeliness, stability and security of communication, and effectively deal with malicious nodes in the Internet of Things environment. and faulty nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945195A_ABST
    Figure CN118945195A_ABST
Patent Text Reader

Abstract

The invention provides a communication protocol dynamic adaptation method and device, and relates to the technical field of communication, and the method comprises the steps: obtaining proxy information data in a terminal device, the proxy information data comprising a plurality of intelligent consensus nodes, a network environment state, and execution action information of each intelligent consensus node; constructing a Markov decision process model based on the proxy information data, wherein the Markov decision process model comprises a state space formed by integrating a network environment state and a plurality of intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function; constructing a Byzantine fault-tolerant consensus optimization model based on the double-breach depth Q network model, the state space, the action space and the reward function; and according to the Byzantine fault-tolerant consensus optimization models in different stages, constructing a Byzantine dynamic adaptive consensus protocol framework so as to dynamically adjust configuration parameters of the terminal equipment according to the environment change of the Internet of Things, and carrying out dynamic adaptation on a communication protocol currently adopted by the terminal equipment. According to the method, the self-adaptive capability of the Byzantine dynamic self-adaptive consensus protocol framework can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication protocol dynamic adaptation method and device. Background Art

[0002] In modern communication systems, communication protocols are the basis for achieving interoperability between devices. With the development of the Internet of Things and 5G technology, a variety of communication protocols have emerged to meet the needs of different scenarios. At present, common communication protocols include TCP / IP, HTTP, MQTT, CoAP, etc. In order to cope with diverse communication needs, the industry has adopted a variety of technical solutions. Multi-protocol stack integration technology allows devices to support multiple protocols, improving the adaptability of devices. As an intermediate device, the protocol conversion gateway can convert between different protocols to achieve interconnection and interoperability of heterogeneous networks.

[0003] A Chinese patent with announcement number CN113162986B discloses a method and system for automatic adaptation of parallel access protocols for multiple types of Internet of Things. The method includes: when receiving an access request from a terminal device, obtaining identification data of the terminal device; and configuring access parameters for the terminal device based on the identification data. However, the above scheme can only judge the stability of the terminals that have been connected and alternately access to achieve protocol replacement or directly configure the newly connected terminal devices with adjustable bandwidth, which requires the neural network model to be trained and converged with a large amount of data in advance, and the automatic protocol adaptation method cannot meet the adaptive adjustment of the communication protocol. Therefore, it is very necessary to provide a method and device for dynamic adaptation of communication protocols to reduce the system signal-to-noise ratio and improve the adaptive ability of the Byzantine dynamic adaptive consensus protocol framework. Summary of the invention

[0004] In view of this, the present invention proposes a communication protocol dynamic adaptation method and device. By constructing a Markov decision process model and a Byzantine fault-tolerant consensus optimization model, the network environment status and the behavior of each node can be dynamically evaluated, thereby improving the adaptive ability of the consensus protocol framework.

[0005] The present invention provides a communication protocol dynamic adaptation method, the method comprising:

[0006] Obtaining proxy information data in the terminal device, wherein the proxy information data includes multiple smart consensus nodes, network environment status, and execution action information of each smart consensus node;

[0007] Constructing a Markov decision process model based on the agent information data, wherein the Markov decision process model includes a state space formed by integrating the network environment state and a plurality of the intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function;

[0008] Based on the dual dueling deep Q network model, the state space, the action space and the reward function, a Byzantine fault-tolerant consensus optimization model is constructed;

[0009] According to the Byzantine fault-tolerant consensus optimization models at different stages, a Byzantine dynamic adaptive consensus protocol framework is constructed to dynamically adjust the configuration parameters of the terminal device according to changes in the Internet of Things environment and dynamically adapt the communication protocol currently used by the terminal device.

[0010] On the basis of the above technical solution, preferably, the expressions of the state space and the action space are respectively:

[0011] S t =[B m ,T m ,L I ,G] t

[0012] in

[0013] Among them, S t represents the state space of the Byzantine fault-tolerant consensus optimization model in the tth epoch, B m Indicates the maximum block size, T m Indicates the maximum value of the block interval, L I represents the candidate node list of the intelligent consensus node, G represents the Byzantine fault tolerance rate, A represents the action space of the Byzantine fault tolerance consensus optimization model, C represents the consensus committee matrix, ICN k Represents the kth smart consensus node in the Byzantine fault-tolerant consensus optimization model.

[0014] On the basis of the above technical solution, preferably, the reward function includes:

[0015]

[0016] Among them, R t (S t , A) represents the reward function, x i Indicates the location coordinates of the i-th smart consensus node, x j Represents the location coordinates of the jth smart consensus node, represents the coordinate mean of all smart consensus nodes, β represents the dispersion index of smart consensus nodes, T tr Indicates the verification time and transmission time of a single block in the consensus process, T vt Indicates the verification time of a single block in the consensus process, T mrepresents the maximum value of the block interval time, μ represents the preset ratio parameter of the block verification time to the block interval time, N represents the total number of candidate nodes, P represents the probability of the candidate nodes having Byzantine faults, and n represents the number of smart consensus nodes finally selected in the Byzantine fault-tolerant consensus optimization model.

[0017] More preferably, the block transmission time and verification time of a single block in the consensus process are expressed as:

[0018]

[0019] Where Y represents the total number of blocks in the Byzantine fault-tolerant consensus optimization model, p represents the pth smart consensus node in the Byzantine fault-tolerant consensus optimization model, γ represents the CPU cycle used to verify the digital signature, η represents the CPU cycle used to generate and verify the message verification code, CR cp Indicates the computing resources owned by the master node, CR ci represents the computing resources owned by the replica node, PT represents the maximum tolerable delay of the Byzantine fault-tolerant consensus optimization model, and R cp,ci represents the data transmission rate between the smart consensus node cp and the smart consensus node ci, R cj,ci represents the data transmission rate between smart consensus node cj and smart consensus node ci, R ci,cj Indicates the data transmission rate between smart consensus node ci and smart consensus node cj.

[0020] More preferably, the Byzantine fault-tolerant consensus optimization model includes a centralized training layer and a decentralized decision layer connected in sequence, the centralized training layer includes a master node, and the decentralized decision layer includes multiple replica nodes and multiple intelligent consensus nodes, wherein:

[0021] The master node is used to obtain a Byzantine fault-tolerant consensus optimization model according to the dual-duel deep Q network training, and send the Byzantine fault-tolerant consensus optimization model to the replica node;

[0022] The replica node is used to determine whether the received Byzantine fault-tolerant consensus optimization model structures are the same, and send the Byzantine fault-tolerant consensus optimization model with the same structure to the smart consensus node;

[0023] The intelligent consensus node is used to generate a corresponding optimization plan according to the received Byzantine fault-tolerant consensus optimization model, and dynamically adjust the parameters of the Byzantine fault-tolerant consensus optimization model according to the optimization welfare function to output the same optimization plan as the other intelligent consensus nodes.

[0024] More preferably, the expression of the optimized welfare function is:

[0025]

[0026] Where W represents the optimized welfare function, ω1 represents the weight coefficient corresponding to the smart consensus node score, represents the scoring function of the smart consensus node at the t+1th epoch, F ij represents the score assigned by the i-th smart consensus node to the smart consensus node at the j-th position coordinate at the t+1-th epoch, ω2 represents the weight coefficient corresponding to the block size scoring function, represents the scoring function of the block size at the t+1th epoch, ω3 represents the weight coefficient corresponding to the scoring function of the block interval time, Represents the scoring function assigned to the block interval by the i-th smart consensus node.

[0027] More preferably, the method further comprises:

[0028] Obtaining the utility function output by each intelligent consensus node in the Byzantine fault-tolerant consensus optimization model;

[0029] Determine whether the utility function in each smart consensus node meets the Nash equilibrium condition;

[0030] If the utility function in each intelligent consensus node meets the Nash equilibrium condition, the current Byzantine fault-tolerant consensus optimization model is output to generate the corresponding optimization plan.

[0031] More preferably, the method further comprises:

[0032] Obtaining the utility function output by each intelligent consensus node in the Byzantine fault-tolerant consensus optimization model;

[0033] Determine whether the utility function in each smart consensus node meets the Nash equilibrium condition;

[0034] If the utility function in each intelligent consensus node meets the Nash equilibrium condition, the current Byzantine fault-tolerant consensus optimization model is output to generate the corresponding optimization plan.

[0035] In a second aspect of the present application, a communication protocol dynamic adaptation device based on the Internet of Things is provided, wherein the communication protocol dynamic adaptation device comprises a data acquisition module, a model building module and a protocol matching module connected in sequence, wherein:

[0036] The data acquisition module is used to obtain proxy information data in the terminal device, wherein the proxy information data includes multiple intelligent consensus nodes, network environment status, and execution action information of each intelligent consensus node;

[0037] The model building module is used to build a Markov decision process model based on the proxy information data, the Markov decision process model includes a state space formed by integrating the network environment state and a plurality of the intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function, and a Byzantine fault-tolerant consensus optimization model is built based on the dual-duel deep Q network model, the state space, the action space, and the reward function;

[0038] The protocol matching module is used to construct a Byzantine dynamic adaptive consensus protocol framework according to the Byzantine fault-tolerant consensus optimization model at different stages, so as to dynamically adjust the configuration parameters of the terminal device according to changes in the Internet of Things environment and dynamically adapt the communication protocol currently used by the terminal device.

[0039] In a third aspect of the present application, an electronic device is provided, comprising a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory.

[0040] Compared with the prior art, the communication protocol dynamic adaptation method and device provided by the present invention have the following advantages:

[0041] Beneficial effects:

[0042] (1) By constructing a Markov decision process model and a Byzantine fault-tolerant consensus optimization model, the network environment status and the behavior of each node can be dynamically evaluated, and the configuration parameters and communication protocols of the terminal can be adjusted according to the changes, thereby improving the adaptive ability of the Byzantine dynamic adaptive consensus protocol framework. At the same time, the Byzantine fault-tolerant consensus optimization model is used to eliminate and optimize malicious nodes or faulty nodes in the IoT environment, thereby improving the robustness and security of the system, and dynamically adjusting the communication protocol parameters according to the resource status of the terminal and environmental changes, optimizing the energy consumption and performance of the terminal device, thereby improving the overall efficiency of the Byzantine dynamic adaptive consensus protocol framework to ensure the timeliness, stability and security of communication between terminals;

[0043] (2) By introducing the hierarchical design of master nodes, replica nodes and intelligent consensus nodes into the Byzantine fault-tolerant consensus optimization model, Byzantine faults and interference from malicious nodes can be effectively dealt with, thereby improving the fault tolerance of the Byzantine fault-tolerant consensus optimization model. At the same time, the intelligent consensus node can dynamically adjust parameters according to the received optimization model to adapt to different changes in the IoT environment, thereby enhancing the adaptability of the model. In addition, multiple intelligent consensus nodes run the Byzantine fault-tolerant consensus optimization model in parallel, and generate a unified optimization plan through mutual verification and consensus, thus realizing distributed collaborative optimization. In addition, the Byzantine fault-tolerant consensus optimization model can easily increase or decrease the number of intelligent consensus nodes to adapt to the application needs of IoT of different scales and meet the needs of dynamic evolution of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A stereogram of a communication protocol dynamic adaptation method provided by the present invention;

[0046] Figure 2 A schematic diagram of the structure of the communication protocol dynamic adaptation device provided by the present invention;

[0047] Figure 3 This is a schematic structural diagram of an electronic device provided by the present invention.

[0048] Explanation of the accompanying drawings: 1. Communication protocol dynamic adaptation device; 11. Data acquisition module; 12. Model building module; 13. Protocol matching module; 2. Electronic device; 21. Processor; 22. Communication bus; 23. User interface; 24. Network interface; 25. Memory. DETAILED DESCRIPTION

[0049] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] The following is combined with Figure 1-3 This application is described in further detail.

[0051] refer to Figure 1The present application provides a communication protocol dynamic adaptation method, and the above method steps include S1-S4.

[0052] Step S1, obtaining proxy information data in the terminal device, wherein the proxy information data includes multiple intelligent consensus nodes, network environment status, and execution action information of each intelligent consensus node.

[0053] In this step, the blockchain network can collect relevant information about the intelligent consensus nodes (ICNs) participating in the practical Byzantine fault tolerance mechanism (PBFT). The relevant information usually includes node ID, geographic location, computing resources, and network bandwidth. These relevant information can be obtained through the records regularly reported by the intelligent consensus nodes. The network environment status can be obtained by monitoring and collecting key environmental indicators that affect the performance of PBFT consensus, such as network topology, node mobility, communication delay, and node failure rate. These key environmental indicators can be obtained through IoT monitoring devices and network detection tools. The execution action information of each intelligent consensus node can be obtained by recording the specific actions taken by each intelligent consensus node during the PBFT consensus process, such as the proposed block size, block interval, and node election. This specific behavior information can be extracted from the historical records and consensus logs of the blockchain.

[0054] IoT monitoring devices and network detection tools can use sensor devices, network detection tools, edge computing devices and central management platforms, among which:

[0055] Sensing devices can use temperature sensors, humidity sensors, light sensors, and sound sensors to monitor environmental physical indicators, or use position sensors, acceleration sensors, etc. to monitor the location and movement status of nodes, or use power consumption sensors, voltage sensors, etc. to monitor the computing resource status of nodes; network detection tools can use the monitoring functions of network devices such as routers and switches to obtain indicators such as network topology, bandwidth utilization, and latency, or use the network sniffing tool Wireshark to analyze network traffic and obtain communication status between nodes, or use network diagnostic tools ping or traceroute to test connectivity and latency between nodes; edge computing devices can use gateway devices and edge servers to collect and summarize terminal device status information, or pre-process and analyze raw data through edge computing to provide richer environmental status information; the central management platform can use the Internet of Things platform or cloud management system to centrally manage and monitor the entire Internet of Things system, or obtain global network environment status data through the API interface.

[0056] Step S2, constructing a Markov decision process model based on the agent information data, the Markov decision process model includes a state space formed by integrating the network environment state and multiple intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function.

[0057] In this step, the network environment status information (such as network topology, node location, resource utilization, etc.) and the intelligent consensus node information (such as node ID, geographic location, computing resources, etc.) are integrated into a comprehensive state description. The above state description constitutes the state space S of the Markov decision process model. t The network environment status information and the execution action information of the intelligent consensus node (such as block size, block interval, node election, etc.) are integrated into an optional action set, which constitutes the action space A of the Markov decision process model. According to the performance goals of the PBFT consensus protocol, such as throughput, latency, security, etc., the corresponding reward function R is designed.

[0058] In this embodiment, the expressions of the state space and the action space are respectively:

[0059] S t =[B m ,T m ,L I ,G] t

[0060] in

[0061] Among them, S t represents the state space of the Byzantine fault-tolerant consensus optimization model at the tth epoch, B m Indicates the maximum block size, T m Indicates the maximum value of the block interval time, L I Represents the candidate node list of the smart consensus node, and |L I |=N, G represents the Byzantine fault tolerance rate, A represents the action space of the Byzantine fault tolerance consensus optimization model, C represents the consensus committee matrix, ICN k Represents the kth smart consensus node in the Byzantine fault-tolerant consensus optimization model.

[0062] In this embodiment, the reward function includes:

[0063]

[0064] Among them, R t (S t , A) represents the reward function, x i Indicates the location coordinates of the i-th smart consensus node, xj Represents the location coordinates of the jth smart consensus node, represents the coordinate mean of all smart consensus nodes, β represents the dispersion index of smart consensus nodes, T tr Indicates the verification time and transmission time of a single block in the consensus process, T vt Indicates the verification time of a single block in the consensus process, T m represents the maximum value of the block interval time, μ represents the preset ratio parameter of the block verification time to the block interval time, N represents the total number of candidate nodes, P represents the probability of the candidate node having a Byzantine fault, and n represents the number of smart consensus nodes finally selected in the Byzantine fault-tolerant consensus optimization model.

[0065] In order to quantify the degree of dispersion of smart consensus nodes, the Gini coefficient can be used to evaluate smart consensus nodes. The Gini coefficient is a widely used inequality measure in social sciences and economics, and is usually used to assess the degree of inequality in income or resource distribution. Its value range is between [0, 1], and the closer the value is to 0, the more equal the distribution is. Assuming that the smart consensus nodes are randomly distributed in a two-dimensional area, the reward function can be expressed as:

[0066] In this embodiment, the expressions for the block transmission time and verification time of a single block in the consensus process are:

[0067]

[0068]

[0069] Where Y represents the total number of blocks in the Byzantine fault-tolerant consensus optimization model, p represents the pth smart consensus node in the Byzantine fault-tolerant consensus optimization model, γ represents the CPU cycle used to verify the digital signature, η represents the CPU cycle used to generate and verify the message verification code, CR cp Indicates the computing resources owned by the master node, CR ci represents the computing resources owned by the replica node, PT represents the maximum tolerable delay of the Byzantine fault-tolerant consensus optimization model, and R cp,ci represents the data transmission rate between the smart consensus node cp and the smart consensus node ci, R cj,ci represents the data transmission rate between smart consensus node cj and smart consensus node ci, R ci,cj Indicates the data transmission rate between smart consensus node ci and smart consensus node cj.

[0070] Here, t1 represents the data block transmission time in the pre-preparation phase of the Byzantine fault-tolerant consensus optimization model, t2 represents the data block transmission time in the preparation phase of the Byzantine fault-tolerant consensus optimization model, and t3 represents the data block transmission time in the submission phase of the Byzantine fault-tolerant consensus optimization model.

[0071] Step S3, constructing a Byzantine fault-tolerant consensus optimization model based on the dual-duel deep Q network model, state space, action space and reward function.

[0072] In this step, an action value function is constructed to represent the expected cumulative reward obtained by taking action a in state s. The action value function is used to guide the intelligent consensus node to select the optimal Byzantine fault-tolerant consensus optimization model parameter configuration. Since the dual-duel deep Q network model generally includes two networks (evaluation network and target network), the evaluation network is responsible for generating action value predictions, and the target network is responsible for generating action value targets. By alternately updating the two networks, the convergence and stability of the action value function are improved.

[0073] In this embodiment, the Byzantine fault-tolerant consensus optimization model includes a centralized training layer and a decentralized decision layer connected in sequence, the centralized training layer includes a master node, and the decentralized decision layer includes multiple replica nodes and multiple intelligent consensus nodes, wherein:

[0074] The master node is used to obtain the Byzantine fault-tolerant consensus optimization model based on the dual-duel deep Q network training, and send the Byzantine fault-tolerant consensus optimization model to the replica node;

[0075] The replication node is used to determine whether the received Byzantine fault-tolerant consensus optimization model structures are the same, and send the Byzantine fault-tolerant consensus optimization models with the same structure to the smart consensus node;

[0076] The smart consensus node is used to generate a corresponding optimization plan based on the received Byzantine fault-tolerant consensus optimization model, and dynamically adjust the parameters of the Byzantine fault-tolerant consensus optimization model according to the optimization welfare function to output the same optimization plan as the other smart consensus nodes.

[0077] By introducing the hierarchical design of master nodes, replica nodes and intelligent consensus nodes in the Byzantine fault-tolerant consensus optimization model, the Byzantine faults and interference of malicious nodes can be effectively dealt with, and the fault tolerance of the Byzantine fault-tolerant consensus optimization model can be improved. At the same time, the intelligent consensus nodes can dynamically adjust parameters according to the received optimization model to adapt to different changes in the IoT environment, thereby enhancing the adaptability of the model. In addition, multiple intelligent consensus nodes run the Byzantine fault-tolerant consensus optimization model in parallel, and generate a unified optimization plan through mutual verification and consensus, thus realizing distributed collaborative optimization. In addition, the Byzantine fault-tolerant consensus optimization model can easily increase or decrease the number of intelligent consensus nodes, adapt to the application needs of IoT of different scales, and meet the needs of dynamic evolution of the system.

[0078] The expression of the optimal welfare function is:

[0079]

[0080] Among them, W represents the optimized welfare function, ω1 represents the weight coefficient corresponding to the smart consensus node score, represents the scoring function of the smart consensus node at the t+1th epoch, F ij represents the score assigned by the i-th smart consensus node to the smart consensus node at the j-th position coordinate at the t+1-th epoch, ω2 represents the weight coefficient corresponding to the block size scoring function, represents the scoring function of the block size at the t+1th epoch, ω3 represents the weight coefficient corresponding to the scoring function of the block interval time, It represents the scoring function assigned to the block interval by the i-th smart consensus node, and ω1+ω2+ω3=1.

[0081] In one example, after constructing the state space, action space, and reward function, the master node of the Byzantine fault-tolerant consensus optimization model trains the objective function of the Byzantine fault-tolerant consensus optimization model, namely, the action value function Q, by simulating the dynamic changes of the IoT environment. m (s t , a t ).

[0082] The action value function can be expressed as:

[0083]

[0084] a m = argmaxQ m (s t+1 ,a t )

[0085] Where μ represents the future reward discount factor, R t+1 Indicates that in the current state st Take action a t After that, the reward obtained in the next epoch t+1 is s t+1 Indicates that in the current state s t Take action a t After that, the Byzantine fault-tolerant consensus optimization model moves to the next state, where argmax() represents the function that finds the maximum parameter of the function.

[0086] This step also includes steps S31 to S33.

[0087] Step S31, obtaining the utility function output by each intelligent consensus node in the Byzantine fault-tolerant consensus optimization model.

[0088] Step S32, determine whether the utility function in each intelligent consensus node meets the Nash equilibrium condition.

[0089] In this step, the utility function is expressed as:

[0090]

[0091] in, represents the utility function of the i-th smart consensus node, Represents the optimization suggestion submitted by the i-th smart consensus node, represents the set of optimization suggestions submitted by all smart consensus nodes except the i-th smart consensus node, R base represents the basic reward parameter, R c () represents the consistency reward function, α represents the weight coefficient corresponding to the consistency reward function, W represents the optimized welfare function, R s () represents the consensus reward function, θ represents the weight coefficient corresponding to the consensus reward function, A t+1 represents the set of optimization suggestions submitted by all smart consensus nodes, P d () represents the bias function, and λ represents the weight coefficient corresponding to the bias function.

[0092] Step S33: If the utility function in each intelligent consensus node meets the Nash equilibrium condition, the current Byzantine fault-tolerant consensus optimization model is output to generate a corresponding optimization plan.

[0093] In this step, considering the utility function To ensure that the PBFT optimization decision game is in a Nash equilibrium state, each smart consensus node must satisfy the following inequality:

[0094]

[0095] Assume that the global optimal solution is a * =1. Therefore Ui (1, a -i ) and U i (0, a -i ) can be expressed as:

[0096]

[0097] To ensure that Ui(1, a -i )>Ui(1,a -i ), the following inequality must be satisfied:

[0098] α×R c (1,W)>λ×P q (0)-θ×(R s (1,A t+1 )-R s (0,A t+1 ))

[0099] In one example, when the change in the network environment state triggers the condition of dynamic adaptation, the i-th smart consensus node of the current epoch uses the blockchain global state information as the input parameter of the Byzantine fault-tolerant consensus optimization model to generate the corresponding optimization suggestion function

[0100] The optimization suggestion function can be expressed as:

[0101]

[0102] Among them, t represents the current era, POM No-Sto represents the Byzantine fault-tolerant consensus optimization model under the non-random strategy, c represents the set of nodes participating in the Byzantine fault-tolerant consensus, b m Indicates the data capacity of each block in the Byzantine fault-tolerant consensus optimization model, t m represents the time interval for generating new blocks in the Byzantine fault-tolerant consensus optimization model, l i represents the intelligent consensus node in the Byzantine fault tolerance consensus optimization model, g represents any one in the Byzantine fault tolerance rate set, and the above model is based on the current state S t The non-randomness of this selection can reduce uncertainty by providing consistent and predictable outputs, thus facilitating the uniformity of optimal decision making.

[0103] The i-th smart consensus node calculates and obtains the optimization suggestion function After that, the corresponding commitment value must be calculated and submitted in advance to prevent other smart consensus nodes from prematurely recognizing the optimization proposal. Specifically, the i-th smart consensus node generates a random number ri and Connect to get the function

[0104] Then, the i-th smart consensus node uses the secure hash function to calculate the encrypted commitment and obtains:

[0105]

[0106] Among them, h s Indicates that the i-th intelligent consensus node is generating an optimization solution The current state S used t ,h m Represents POM in the Byzantine Fault Tolerant consensus optimization model No-Sto After completing the encrypted commitment, the i-th smart consensus node will commit the value i Submit to the blockchain smart contract. Once the smart contract receives the proposed commitment from more than 2 / 3 of the smart consensus nodes, it will require all participating smart consensus nodes to make their commitment public. Specifically, this process includes each smart consensus node transmitting Commit to the blockchain network. i If the two commitment values ​​output by any two smart consensus nodes are equal, the optimization proposal of the i-th smart consensus node is considered valid. This hash value-based commitment scheme ensures that malicious smart consensus nodes cannot preemptively identify the optimization proposals of other smart consensus nodes, thereby reducing the risk of manipulation.

[0107] The Byzantine Fault Tolerant Consensus Optimization Model is in the centralized training phase. The parameters of the Byzantine Fault Tolerant Consensus Optimization Model are trained on the master node, and then the model is verified in a simulated blockchain IoT environment. After the training is completed, the master node shares the optimized model with all smart consensus nodes through blockchain transactions. Specifically, the master node publishes the hash address of the Byzantine Fault Tolerant Consensus Optimization Model on the chain, allowing other smart consensus nodes to use the hash address to download the corresponding model from a distributed storage system (such as IPFS). This ensures that all honest smart consensus nodes have the same Byzantine Fault Tolerant Consensus Optimization Model, so that when the blockchain-IoT environment changes dynamically, relatively consistent PBFT optimization proposals can be generated.

[0108] Step S4, based on the Byzantine fault-tolerant consensus optimization model at different stages, a Byzantine dynamic adaptive consensus protocol framework is constructed to dynamically adjust the configuration parameters of the terminal device according to changes in the IoT environment, and dynamically adapt the communication protocol currently used by the terminal device.

[0109] In this step, the Byzantine dynamic adaptive consensus protocol framework includes a Byzantine fault-tolerant consensus optimization model in the initialization phase, normal operation phase, dynamic adaptive phase, and iterative optimization phase, where:

[0110] During the initialization phase, the PBFT master node uses the Byzantine fault-tolerant consensus optimization model trained in step S3 to evaluate the current IoT environment and generate the parameter configuration of the initial Byzantine fault-tolerant consensus optimization model. The master node distributes the parameters of the optimization model to other replica nodes through blockchain transactions to ensure that all honest smart consensus nodes have the same Byzantine fault-tolerant consensus optimization model.

[0111] During the normal operation phase, all candidate nodes among the intelligent consensus nodes that wish to join the next round of consensus committee matrix regularly submit declaration information containing information such as location and resource status to the blockchain network. The above information is recorded in the global information of the blockchain, which helps to alleviate the incomplete information problem faced by the Byzantine fault-tolerant consensus optimization model in the Internet of Things environment.

[0112] In the dynamic adaptive stage, when the parameter configuration of the current Byzantine fault-tolerant consensus optimization model cannot adapt to the changes in the IoT environment, the dynamic adaptive process is triggered. This stage is divided into two sub-stages: Optimality seeking stage: The intelligent consensus node of the current round inputs the environmental state and uses the Byzantine fault-tolerant consensus optimization model to generate an optimization plan, including the configuration of consensus committee members, block size, and block interval. Optimization decision consensus stage: Through the PBFT optimization decision consensus mechanism based on Borda counting, it is ensured that a consistent optimization decision can be reached even in an incomplete information environment.

[0113] During the iterative optimization phase, the master node of the Byzantine Fault Tolerant Consensus Optimization Model iteratively trains the Byzantine Fault Tolerant Consensus Optimization Model based on the latest data and feedback, and synchronizes the updated model to other replica nodes. The accuracy and reliability of the Byzantine Fault Tolerant Consensus Optimization Model are continuously optimized to enable it to better adapt to changes in the IoT environment.

[0114] In one example, the Byzantine dynamic adaptive consensus protocol framework constructs the PBFT consensus committee as a multi-agent system through Markov game, that is, the Byzantine dynamic adaptive consensus protocol framework can be expressed as a parameter matrix (n, S, A1, A2, ..., A n ,T,ξ,R1,R2,...,R n ), where n represents the number of smart consensus nodes, S represents the network environment status, including block size, block interval time, consensus committee, candidate nodes of smart consensus nodes, and node failure rate information, A1, A2, ..., A n represents the execution action of the smart consensus node, T represents the state transition function, ξ represents the future reward discount factor, R1, R2, ..., R nRepresents the reward obtained by the smart consensus node after executing an action. Among them, the state transfer function T can be established according to the dynamic change characteristics of the IoT environment to describe the probability distribution of the current state s transferring to the next state s' after taking action a. The state transfer function can be modeled through historical data or derived based on a physical model.

[0115] By constructing a Markov decision process model and a Byzantine fault-tolerant consensus optimization model, it is possible to dynamically evaluate the network environment status and the behavior of each node, and adjust the terminal configuration parameters and communication protocols according to the changes, thereby improving the adaptability of the Byzantine dynamic adaptive consensus protocol framework. At the same time, the Byzantine fault-tolerant consensus optimization model is used to eliminate and optimize malicious nodes or faulty nodes in the Internet of Things environment, thereby improving the robustness and security of the system, and dynamically adjusting the communication protocol parameters according to the resource status of the terminal and environmental changes, thereby optimizing the energy consumption and performance of the terminal device, thereby improving the overall efficiency of the Byzantine dynamic adaptive consensus protocol framework to ensure the timeliness, stability and security of communication between terminals.

[0116] Based on the above method, the present application embodiment discloses a communication protocol dynamic adaptation device, referring to Figure 2 The communication protocol dynamic adaptation device 1 includes a data acquisition module 11, a model building module 12 and a protocol matching module 13 connected in sequence, wherein:

[0117] The data acquisition module 11 is used to obtain the proxy information data in the terminal device, wherein the proxy information data includes multiple intelligent consensus nodes, network environment status and execution action information of each intelligent consensus node;

[0118] The model building module 12 is used to build a Markov decision process model based on the agent information data. The Markov decision process model includes a state space formed by integrating the network environment state and multiple intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function. Based on the dual duel deep Q network model, the state space, the action space and the reward function, a Byzantine fault-tolerant consensus optimization model is built;

[0119] The protocol matching module 13 is used to construct a Byzantine dynamic adaptive consensus protocol framework according to the Byzantine fault-tolerant consensus optimization model at different stages, so as to dynamically adjust the configuration parameters of the terminal device according to the changes in the Internet of Things environment, and dynamically adapt the communication protocol currently used by the terminal device.

[0120] In an example, the expressions for state space and action space are:

[0121] S t =[B m ,T m ,L I,G] t

[0122] in

[0123] Among them, S t represents the state space of the Byzantine fault-tolerant consensus optimization model at the tth epoch, B m Indicates the maximum block size, T m Indicates the maximum value of the block interval time, L I represents the candidate node list of the intelligent consensus node, G represents the Byzantine fault tolerance rate, A represents the action space of the Byzantine fault tolerance consensus optimization model, C represents the consensus committee matrix, ICN k Represents the kth smart consensus node in the Byzantine fault-tolerant consensus optimization model.

[0124] In one example, the reward function includes:

[0125]

[0126] Among them, R t (S t , A) represents the reward function, x i Indicates the location coordinates of the i-th smart consensus node, x j Represents the location coordinates of the jth smart consensus node, represents the coordinate mean of all smart consensus nodes, β represents the dispersion index of smart consensus nodes, T tr Indicates the verification time and transmission time of a single block in the consensus process, T vt Indicates the verification time of a single block in the consensus process, T m represents the maximum value of the block interval time, μ represents the preset ratio parameter of the block verification time to the block interval time, N represents the total number of candidate nodes, P represents the probability of the candidate node having a Byzantine fault, and n represents the number of smart consensus nodes finally selected in the Byzantine fault-tolerant consensus optimization model.

[0127] In one example, the expressions for the block transmission time and verification time of a single block in the consensus process are:

[0128]

[0129] Where Y represents the total number of blocks in the Byzantine fault-tolerant consensus optimization model, p represents the pth smart consensus node in the Byzantine fault-tolerant consensus optimization model, γ represents the CPU cycle used to verify the digital signature, η represents the CPU cycle used to generate and verify the message verification code, CR cp Indicates the computing resources owned by the master node, CR cirepresents the computing resources owned by the replica node, PT represents the maximum tolerable delay of the Byzantine fault-tolerant consensus optimization model, and R cp,ci represents the data transmission rate between the smart consensus node cp and the smart consensus node ci, R cj,ci represents the data transmission rate between smart consensus node cj and smart consensus node ci, R ci , cj represents the data transmission rate between the smart consensus node ci and the smart consensus node cj.

[0130] In one example, a Byzantine fault-tolerant consensus optimization model includes a centralized training layer and a decentralized decision layer connected in sequence, wherein the centralized training layer includes a master node, and the decentralized decision layer includes multiple replica nodes and multiple intelligent consensus nodes, wherein:

[0131] The master node is used to obtain the Byzantine fault-tolerant consensus optimization model based on the dual-duel deep Q network training, and send the Byzantine fault-tolerant consensus optimization model to the replica node;

[0132] The replication node is used to determine whether the received Byzantine fault-tolerant consensus optimization model structures are the same, and send the Byzantine fault-tolerant consensus optimization models with the same structure to the smart consensus node;

[0133] The smart consensus node is used to generate a corresponding optimization plan based on the received Byzantine fault-tolerant consensus optimization model, and dynamically adjust the parameters of the Byzantine fault-tolerant consensus optimization model according to the optimization welfare function to output the same optimization plan as the other smart consensus nodes.

[0134] In one example, the expression for the optimal welfare function is:

[0135]

[0136] Among them, W represents the optimized welfare function, ω1 represents the weight coefficient corresponding to the smart consensus node score, represents the scoring function of the smart consensus node at the t+1th epoch, F ij represents the score assigned by the i-th smart consensus node to the smart consensus node at the j-th position coordinate at the t+1-th epoch, ω2 represents the weight coefficient corresponding to the block size scoring function, represents the scoring function of the block size at the t+1th epoch, ω3 represents the weight coefficient corresponding to the scoring function of the block interval time, Represents the scoring function assigned to the block interval by the i-th smart consensus node.

[0137] In one example, the model building module 12 is used to obtain the utility function output by each intelligent consensus node in the Byzantine fault-tolerant consensus optimization model; determine whether the utility function in each intelligent consensus node satisfies the Nash equilibrium condition; if the utility function in each intelligent consensus node satisfies the Nash equilibrium condition, then output the current Byzantine fault-tolerant consensus optimization model to generate a corresponding optimization plan.

[0138] In one example, the utility function is expressed as:

[0139]

[0140] in, represents the utility function of the i-th smart consensus node, Represents the optimization suggestions submitted by the i-th smart consensus node. represents the set of optimization suggestions submitted by all smart consensus nodes except the i-th smart consensus node, R base represents the basic reward parameter, R c () represents the consistency reward function, α represents the weight coefficient corresponding to the consistency reward function, W represents the optimized welfare function, R s () represents the consensus reward function, θ represents the weight coefficient corresponding to the consensus reward function, A t+1 represents the set of optimization suggestions submitted by all smart consensus nodes, P d () represents the bias function, and λ represents the weight coefficient corresponding to the bias function.

[0141] See also Figure 3 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 2 may include: at least one processor 21 , at least one network interface 24 , a user interface 23 , a memory 25 , and at least one communication bus 22 .

[0142] The communication bus 22 is used to realize the connection and communication between these components.

[0143] The user interface 23 may include a display screen (Display) and a camera (Camera), and the optional user interface 23 may also include a standard wired interface and a wireless interface.

[0144] The network interface 24 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0145] Among them, the processor 21 may include one or more processing cores. The processor 21 uses various interfaces and lines to connect various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 25, and calling data stored in the memory 25. Optionally, the processor 21 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field ~ Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 21 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 21, and it can be implemented separately through a chip.

[0146] Among them, the memory 25 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 25 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The memory 25 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 25 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 25 may also be optionally at least one storage device located away from the aforementioned processor 21. As Figure 3 As shown, the memory 25 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program based on the dynamic adaptation method of the communication protocol of the Internet of Things.

[0147] exist Figure 3In the electronic device 2 shown, the user interface 23 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 21 can be used to call the application program stored in the memory 25 for the dynamic adaptation method of the communication protocol based on the Internet of Things. When executed by one or more processors, the electronic device executes one or more methods in the above-mentioned embodiments.

[0148] A computer-readable storage medium stores instructions. When executed by one or more processors, the computer executes one or more methods in the above embodiments.

[0149] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

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

[0151] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0154] 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 memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A communication protocol dynamic adaptation method, characterized in that: The method comprises: Obtaining proxy information data in the terminal device, wherein the proxy information data includes multiple smart consensus nodes, network environment status, and execution action information of each smart consensus node; Constructing a Markov decision process model based on the agent information data, wherein the Markov decision process model includes a state space formed by integrating the network environment state and a plurality of the intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function; Based on the dual dueling deep Q network model, the state space, the action space and the reward function, a Byzantine fault-tolerant consensus optimization model is constructed; According to the Byzantine fault-tolerant consensus optimization models at different stages, a Byzantine dynamic adaptive consensus protocol framework is constructed to dynamically adjust the configuration parameters of the terminal device according to changes in the Internet of Things environment and dynamically adapt the communication protocol currently used by the terminal device.

2. The method according to claim 1, characterized in that The expressions of the state space and the action space are respectively: S t =[B m ,T m ,L I ,G] t Among them, S t represents the state space of the Byzantine fault-tolerant consensus optimization model in the tth epoch, B m Indicates the maximum block size, T m Indicates the maximum value of the block interval time, L I represents the candidate node list of the intelligent consensus node, G represents the Byzantine fault tolerance rate, A represents the action space of the Byzantine fault tolerance consensus optimization model, C represents the consensus committee matrix, ICN k Represents the kth smart consensus node in the Byzantine fault-tolerant consensus optimization model.

3. The method according to claim 1, characterized in that The reward function includes: Among them, R t (S t , A) represents the reward function, x i Indicates the location coordinates of the i-th smart consensus node, x j Represents the location coordinates of the jth smart consensus node, represents the coordinate mean of all smart consensus nodes, β represents the dispersion index of smart consensus nodes, T tr Indicates the verification time and transmission time of a single block in the consensus process, T vt Indicates the verification time of a single block in the consensus process, T m represents the maximum value of the block interval time, μ represents the preset ratio parameter of the block verification time to the block interval time, N represents the total number of candidate nodes, P represents the probability of the candidate nodes having Byzantine faults, and n represents the number of smart consensus nodes finally selected in the Byzantine fault-tolerant consensus optimization model.

4. The method according to claim 3, characterized in that The expressions for the block transmission time and verification time of a single block in the consensus process are: Where Y represents the total number of blocks in the Byzantine fault-tolerant consensus optimization model, p represents the pth smart consensus node in the Byzantine fault-tolerant consensus optimization model, γ represents the CPU cycle used to verify the digital signature, η represents the CPU cycle used to generate and verify the message verification code, CR cp Indicates the computing resources owned by the master node, CR ci represents the computing resources owned by the replica node, PT represents the maximum tolerable delay of the Byzantine fault-tolerant consensus optimization model, and R cp,ci represents the data transmission rate between the smart consensus node cp and the smart consensus node ci, R cj,ci represents the data transmission rate between smart consensus node cj and smart consensus node ci, R ci,cj Indicates the data transmission rate between smart consensus node ci and smart consensus node cj.

5. The method according to claim 1, characterized in that The Byzantine fault-tolerant consensus optimization model includes a centralized training layer and a decentralized decision-making layer connected in sequence, wherein the centralized training layer includes a master node, and the decentralized decision-making layer includes multiple replica nodes and multiple intelligent consensus nodes, wherein: The master node is used to obtain a Byzantine fault-tolerant consensus optimization model according to the dual-duel deep Q network training, and send the Byzantine fault-tolerant consensus optimization model to the replica node; The replica node is used to determine whether the received Byzantine fault-tolerant consensus optimization model structures are the same, and send the Byzantine fault-tolerant consensus optimization model with the same structure to the smart consensus node; The intelligent consensus node is used to generate a corresponding optimization plan according to the received Byzantine fault-tolerant consensus optimization model, and dynamically adjust the parameters of the Byzantine fault-tolerant consensus optimization model according to the optimization welfare function to output the same optimization plan as the other intelligent consensus nodes.

6. The method according to claim 5, characterized in that The expression of the optimized welfare function is: Where W represents the optimized welfare function, ω1 represents the weight coefficient corresponding to the smart consensus node score, represents the scoring function of the smart consensus node at the t+1th epoch, F ij represents the score assigned by the i-th smart consensus node to the smart consensus node at the j-th position coordinate at the t+1-th epoch, ω2 represents the weight coefficient corresponding to the block size scoring function, represents the scoring function of the block size at the t+1th epoch, ω3 represents the weight coefficient corresponding to the scoring function of the block interval time, Represents the scoring function assigned to the block interval by the i-th smart consensus node.

7. The method according to claim 5, characterized in that The method further comprises: Obtaining the utility function output by each intelligent consensus node in the Byzantine fault-tolerant consensus optimization model; Determine whether the utility function in each smart consensus node meets the Nash equilibrium condition; If the utility function in each intelligent consensus node meets the Nash equilibrium condition, the current Byzantine fault-tolerant consensus optimization model is output to generate the corresponding optimization plan.

8. The method according to claim 7, characterized in that The expression of the utility function is: in, represents the utility function of the i-th smart consensus node, Represents the optimization suggestions submitted by the i-th smart consensus node. represents the set of optimization suggestions submitted by all smart consensus nodes except the i-th smart consensus node, R base represents the basic reward parameter, R c () represents the consistency reward function, α represents the weight coefficient corresponding to the consistency reward function, W represents the optimized welfare function, R s () represents the consensus reward function, θ represents the weight coefficient corresponding to the consensus reward function, A t+1 represents the set of optimization suggestions submitted by all smart consensus nodes, P d () represents a bias function, and λ represents a weight coefficient corresponding to the bias function.

9. A communication protocol dynamic adaptation device based on the Internet of Things, characterized in that: The communication protocol dynamic adaptation device (1) comprises a data acquisition module (11), a model building module (12) and a protocol matching module (13) which are connected in sequence, wherein: The data acquisition module (11) is used to obtain proxy information data in the terminal device, wherein the proxy information data includes multiple intelligent consensus nodes, network environment status and execution action information of each intelligent consensus node; The model building module (12) is used to build a Markov decision process model based on the agent information data, the Markov decision process model includes a state space formed by integrating the network environment state and a plurality of the intelligent consensus nodes, an action space formed by integrating the network environment state and all execution action information, and a reward function, and based on the dual duel deep Q network model, the state space, the action space and the reward function, a Byzantine fault-tolerant consensus optimization model is built; The protocol matching module (13) is used to construct a Byzantine dynamic adaptive consensus protocol framework according to Byzantine fault-tolerant consensus optimization models at different stages, so as to dynamically adjust the configuration parameters of the terminal device according to changes in the Internet of Things environment, and dynamically adapt the communication protocol currently used by the terminal device.

10. An electronic device, characterized in that: The electronic device (2) comprises a processor (21), a memory (25), a user interface (23) and a network interface (24), wherein the memory (25) is used to store instructions, the user interface (23) and the network interface (24) are used to communicate with other devices, and the processor (21) is used to execute the instructions stored in the memory (25) so that the electronic device (2) executes the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A method and system for automatic adaptation of multiple types of IoT parallel access protocols

    CN113162986B

  • Practical Byzantine fault-tolerant consensus mechanism optimization system for industrial block chain

    CN112118321A

  • Block chain performance adaptive optimization method based on hierarchical consensus and reinforcement learning

    CN115378788A

  • Online dynamic adaptive practical Byzantine consensus protocol implementation method

    CN116722986A

  • Track inspection system based on background learning algorithm

    CN116853320A