The invention discloses a coupon code prize receiving method,
system and device, a storage medium and a program product, and relates to the technical field of
concurrency control, and the method comprises the steps: storing a received coupon code hash into a corresponding data sub-
library according to a preset sub-
library rule; when a prize receiving request is received,
polling the data sub-
library based on a preset routing rule, and determining a target sub-library
processing request; and based on the target sub-library
processing request, according to a preset
database optimistic lock, obtaining a coupon code in the target data sub-library, and issuing the obtained coupon code to the user. According to the scheme, a multi-data sub-library structure and a
polling mechanism are introduced, the high-
concurrency request pressure is effectively dispersed, and the
throughput capacity and stability of the
system are improved; in combination with a
database optimistic lock mechanism, the
atomicity and consistency of coupon code issuing are ensured in a concurrent receiving scene, the problems of repeated receiving and over-issuing are avoided, and the security and accuracy of coupon code issuing are improved.