The invention discloses a high-
concurrency and
sequential data processing method for batch import class interfaces. In a request
verification and forwarding stage, request data are verified, a guarantee sequence is locked based on a merchant ID after
verification is passed, then the data are batched, request and batch information is persisted to a
database, batch information is delivered to a corresponding
message queue Topic according to a service scene, and the request ID is returned. In the consumption
queue data stage, a
consumer thread subscribes to messages of the
message queue, processes the messages, updates a batch state, manually submits consumption offset, and dynamically adjusts the
sleep duration of the thread according to a
system load to realize intelligent peak clipping. And a progress result query stage: extracting data from the
database based on the request ID, calculating a
processing progress and a failure reason, formatting and returning the
processing progress and the failure reason, and supporting front-end visual display. Through the
message queue peak clipping, the differentiation
sequence control strategy and the multi-dimensional data persistence, the high
concurrency bearing capacity of the interface is improved, and the
data consistency and reliability are guaranteed.