Abstract:The combination of blockchain technology and internet of things can play a decentralized advantage and improve the data security and reliability of the internet of things system to a certain extent, but the flux limitation characteristics of the blockchain make the low transaction throughput of blockchain difficult to meet the high throughput business requirements in the internet of things scenario. In this paper, a minimum loss function algorithm is proposed,in which the state space and behavior space are first constructed according to the state and action input, and then the behavior value function of state space and behavior space are calculated iteratively under the condition of system delay constraint. Finally, the block size and block interval is adjusted by using the loss function to compare the true value and estimated value of the behavior value function. The simulation results show that,compared with the DDRL algorithm and the DRL algorithm, the minimum loss algorithm dynamically adjusts the block size and block spacing, and can obtain higher throughput after the blockchain based internet of things system reaches stablility.