The invention discloses a transaction state compensation method and device,
electronic equipment and a storage medium, relates to the technical field of
data processing, introduces a
finite state machine model, processes complex conversion of multiple transaction states in a transaction state compensation process, decouples multiple states of the model and conversion conditions among the multiple states, reduces the program
coupling degree, and improves the transaction state compensation efficiency. And a transaction compensation mechanism is easier to maintain. For the to-be-compensated transaction, determining the state compensation time corresponding to the transaction according to the
payment service type corresponding to the transaction, the connected
payment channel and the industry party; according to the embodiment of the invention, the transaction state compensation process corresponding to the transaction is executed based on the state compensation time, and the corresponding state compensation time is dynamically matched according to the
transaction type, so that the possible situation that the
payment transaction is still abnormal after the transaction compensation is finished can be avoided, and the timeliness of the transaction state compensation can be improved. And an asynchronous dynamic
thread pool is introduced to decouple payment, charge-off and return processes involved in transaction compensation. And the robustness of a transaction compensation mechanism is improved.