Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Hot-spot inventory localization deduction method, system, device and medium

A hot and local technology, applied in the field of electronic settlement, can solve problems such as failure to deduct inventory, performance degradation, and no way to solve it, and achieve the effect of improving reliability

Inactive Publication Date: 2019-03-29
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF12 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The issue of inventory deduction is always involved when selling goods on e-commerce websites. The simplest deduction strategy is to use the database optimistic lock "update stocks set version=version+1, stock=stock-? where id=ID andversion=?", but The disadvantage of this method is that if there are a large number of users rushing to buy the product, there will be competition for database row locks, and the concurrency capability of the database itself is not particularly strong, which makes it unable to withstand high concurrency
[0003] The more popular technical solution is to deduct the inventory in the Redis database and write the inventory flow into the database. The optimistic lock of Redis can be realized through the transaction mechanism of the Redis database, but the disadvantage is that because the competition requires continuous retrying, it can be directly locked. Use scripts to complete the inventory remaining judgment logic and inventory deduction logic to achieve high performance of Redis database deduction
[0004] The existing database optimistic lock deduction scheme has the problem of hot database row lock competition, which may cause a chain reaction due to optimistic lock retries and may eventually cause the database to crash. Redis database optimistic lock performance is better than database optimistic lock, but it is the same The problem
Redis database deduction of inventory is a perfect solution, but if there are inventory hotspots, it can’t be solved, and the flow record of deduction of inventory will also become a bottleneck through database records
[0005] In the hot spot inventory solution, it is realized by splitting the inventory in the Redis database. First, the inventory is split into multiple copies, which are stored in the Redis database, and the split KEY is saved to the inventory routing component summary; then the application of deducting the inventory The service will first query the inventory routing component to obtain the split rules, and then poll these split keys to obtain the inventory. The disadvantage of this method is that the introduction of the inventory routing component increases the delay, that is, it needs to be queried every time the inventory is deducted. Inventory routing components, in fact, inventory routing components have become hotspots again, and the problem of removing hotspots has not been solved well; secondly, the KEY needs to be split, this process is not atomic, and it will lead to the moment of splitting, because there is no split KEY yet Registered to the inventory routing component, resulting in failure to deduct inventory; in addition, it is necessary to poll these split KEYs when deducting, resulting in a sharp drop in performance in the worst case

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Hot-spot inventory localization deduction method, system, device and medium
  • Hot-spot inventory localization deduction method, system, device and medium
  • Hot-spot inventory localization deduction method, system, device and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0051] It should be noted that, in the case of no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0052] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.

[0053] figure 1 A specific implementation scenario of a hot spot inventory localization deduction method accord...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a hot spot inventory localization deduction method, a system, a device and a medium. The method comprises the following steps of: pre-storing the pre-purchased pieces of at least one commodity in a local database; Receiving an order including a purchase quantity of the commodity; Judging whether the number of items in advance in the local database is smaller than the purchase quantity of the item in the order; if so, deducting the purchase quantity of the item from the inventory number of the item in a cluster database; If not, the number of pre-purchased pieces of deducting the local database from the purchase quantity of the commodity. The invention localizes part of the inventory, localizes the distributed inventory deduction logic, realizes the multi-level inventory, updates part of the inventory increment to the application locality, ensures that the inventory can be deducted at any instant, and improves the reliability of the whole system transaction.

Description

technical field [0001] The present invention relates to a technology in the field of electronic settlement, and more specifically, relates to a method, system, device and medium for localized deduction of hotspot inventory. Background technique [0002] The issue of inventory deduction is always involved when selling goods on e-commerce websites. The simplest deduction strategy is to use the database optimistic lock "update stocks set version=version+1, stock=stock-? where id=ID andversion=?", but The disadvantage of this method is that if there are a large number of users rushing to buy the product, there will be competition for database row locks, and the concurrency capability of the database itself is not particularly strong, which makes it unable to withstand high concurrency. [0003] The more popular technical solution is to deduct the inventory in the Redis database and write the inventory flow into the database. The optimistic lock of Redis can be realized through t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06Q10/08G06Q30/06
CPCG06Q10/087G06Q30/0635
Inventor 张开涛叶晶姜楠费程
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products