A blockchain-based data processing method, comprising: sending, by a first client device, a first channel closing message in a second state to a second client device on an off-chain channel, wherein the first channel closing message in the second state comprises fund information in the second state and a first hash lock in the second state, the first channel closing message in the second state is used by the second client device to switch a fund status from a first state to the second state based on the fund information in the second state, and the first hash lock in the second state is a hash lock of the first client device in the second state; receiving, by the first client device, a second signature in the second state and a second channel closing message in the second state that are sent by the second client device on the off-chain channel, wherein the second signature in the second state is obtained by signing the second channel closing message in the second state by the second client device based on a private key of the second client device, the second channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and a second hash lock in the second state, and the second hash lock in the second state is a hash lock of the second client device in the second state; and signing, by the first client device, a third channel closing message in the second state based on a private key of the first client device, to obtain a first signature in the second state; and sending the first signature in the second state to the second client device, wherein the third channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and the second hash lock in the second state. sending, by a first client device, a first channel closing message in a second state to a second client device on an off-chain channel, wherein the first channel closing message in the second state comprises fund information in the second state and a first hash lock in the second state, the first channel closing message in the second state is used by the second client device to switch a fund status from a first state to the second state based on the fund information in the second state, and the first hash lock in the second state is a hash lock of the first client device in the second state; receiving, by the first client device, a second signature in the second state and a second channel closing message in the second state that are sent by the second client device on the off-chain channel, wherein the second signature in the second state is obtained by signing the second channel closing message in the second state by the second client device based on a private key of the second client device, the second channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and a second hash lock in the second state, and the second hash lock in the second state is a hash lock of the second client device in the second state; and signing, by the first client device, a third channel closing message in the second state based on a private key of the first client device, to obtain a first signature in the second state; and sending the first signature in the second state to the second client device, wherein the third channel closing message in the second state comprises the fund information in the second state, the first hash lock in the second state, and the second hash lock in the second state.