CN111915259A - Inventory quantity management method and system for e-commerce - Google Patents

Inventory quantity management method and system for e-commerce Download PDF

Info

Publication number
CN111915259A
CN111915259A CN202010789393.4A CN202010789393A CN111915259A CN 111915259 A CN111915259 A CN 111915259A CN 202010789393 A CN202010789393 A CN 202010789393A CN 111915259 A CN111915259 A CN 111915259A
Authority
CN
China
Prior art keywords
data
inventory
database
inventory data
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010789393.4A
Other languages
Chinese (zh)
Inventor
陈磊
汪照东
胡松
陈斯杭
朱峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Baisheng Software Co ltd
Original Assignee
Shanghai Baisheng Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Baisheng Software Co ltd filed Critical Shanghai Baisheng Software Co ltd
Priority to CN202010789393.4A priority Critical patent/CN111915259A/en
Publication of CN111915259A publication Critical patent/CN111915259A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The invention discloses a method and a system for managing stock quantity of e-commerce. The management method of the inventory quantity for the e-commerce comprises the following steps: initializing inventory data in an inventory table to obtain virtual inventory data, storing the virtual inventory data in a database, inquiring the virtual inventory data in the database, searching a delivery warehouse for delivering the order according to order demand information, performing subtraction or addition operation on the inventory data of the delivery warehouse to obtain subtracted or added inventory data, and storing subtraction or addition records of the delivery warehouse. The invention can rapidly complete the inventory increase and decrease service and can synchronize the inventory to the sales end in time.

Description

Inventory quantity management method and system for e-commerce
Technical Field
The invention relates to the technical field of e-commerce inventory management, in particular to a method and a system for managing inventory quantity of e-commerce.
Background
Tens of millions of orders in the scene of the e-market need to be rapidly circulated and processed, more than 100 tens of thousands of orders need to be processed in each hour after decomposition, which relates to a great amount of stock deduction, and the existing management system cannot deal with the orders and the stock quantity which are tens of millions.
At present, the database needs to be updated in a very short time when stock of an exploded SKU (stock keeping unit) is encountered, data can not be dispersed from the aspect of business, the problem needs to be solved through a scheme of hot spot stock updating from a technical level, and meanwhile, over-selling needs to be avoided and the accuracy of stock data needs to be ensured.
Since inventory of hot goods detracts from the ability to update hot rows, however, highly concurrent updates in the same row can cause severe row lock wait phenomena, leading to database avalanches, and therefore improvements are urgently needed.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method and a system for managing inventory quantity for e-commerce, which are used to solve the problem that the inventory deduction of hot spot goods in the prior art is highly concurrent with the update of the same row, which causes a serious row lock waiting phenomenon, thereby causing an avalanche to be caused to the database.
To achieve the above and other related objects, the present invention provides a method for managing inventory amounts for an e-commerce, comprising:
initializing inventory data in an inventory table to obtain virtual inventory data;
storing the virtual inventory data into a database;
inquiring virtual inventory data in the database, and searching a delivery warehouse for delivering the order according to the order demand information;
deducting or increasing the inventory data of the delivery warehouse to obtain the subtracted or increased inventory data;
saving a deduction or increase record of the shipping warehouse.
In an embodiment of the present invention, the method for managing the inventory amount for the e-commerce further includes:
and judging whether the virtual inventory data in the database is consistent with the deducted inventory data or not, if so, judging that the virtual inventory data is in a normal state, and if not, executing early warning operation.
In an embodiment of the present invention, the step of initializing the inventory data in the inventory table to obtain the virtual inventory data includes:
establishing a first timing task;
querying virtual warehouse data according to the first timing task;
and obtaining virtual inventory data according to the virtual warehouse data.
In an embodiment of the present invention, the step of finding a shipping warehouse for shipping the order according to the order demand information includes:
according to the order demand information and the order distribution configuration strategy, a delivery warehouse for delivering the order is found;
the distribution configuration strategy comprises judgment of one or more of receiving address distance data, warehouse inventory depth data, sales organization data and warehouse organization data.
In an embodiment of the present invention, the step of subtracting or adding the inventory data of the shipping warehouse to obtain subtracted or added inventory data includes:
deducting the virtual inventory data for the first time in the database to obtain the virtual inventory data after deducting for the first time;
and judging whether the inventory data of the delivery warehouse is larger than or equal to the virtual inventory data after the first deduction, if so, deducting the virtual inventory data in the database, and if not, executing rollback operation.
In an embodiment of the present invention, the step of subtracting or adding the inventory data of the shipping warehouse to obtain subtracted or added inventory data further includes:
and judging whether the database successfully subtracts the virtual inventory data, if so, executing data insertion operation by the database, and if not, executing rollback operation.
In an embodiment of the present invention, the step of subtracting or adding the inventory data of the shipping warehouse to obtain subtracted or added inventory data further includes:
judging whether the database is successfully inserted with data, if so, submitting data transactions by the database, and if not, executing rollback operation;
and judging whether the database successfully submits the data transaction, if so, performing addition operation on the inventory data of the delivery warehouse, and if not, performing rollback operation.
In an embodiment of the present invention, the step of determining whether the virtual inventory data in the database is consistent with the subtracted inventory data includes:
establishing a second timing task;
inquiring the inventory records of the inventory table according to the second timing task;
and judging whether the same warehouse data, the same stock level data and the same stock level unit data in the inventory list and the database are consistent, if so, the virtual stock level data is in a normal state, and if not, executing early warning operation.
In an embodiment of the present invention, the performing the early warning operation includes:
setting a repair page;
and setting the virtual inventory data in the database through the repair page.
The present invention also provides a system for managing inventory amounts for e-commerce, comprising:
the initialization device is used for initializing inventory data in the inventory table to obtain virtual inventory data;
the first storage device is used for storing the virtual inventory data into a database;
the query equipment is used for querying the virtual inventory data in the database and searching a delivery warehouse for delivering the order according to the order demand information;
the deduction or increase equipment is used for carrying out deduction or increase operation on the inventory data of the delivery warehouse so as to obtain the subtracted or increased inventory data;
a second storage device for maintaining a deduction or increase record for the shipping warehouse.
As described above, the method and system for managing inventory quantity of e-commerce according to the present invention have the following advantages:
the inventory quantity management method for the E-commerce can deduct or increase the inventory data of the delivery warehouse, support high concurrent deduction and inventory deduction of the same warehouse in terms of explosive inventory units, support deduction for millions of times per hour, can rapidly complete inventory increase and decrease service, and can timely synchronize inventory to a sales end to prevent over-selling.
The inventory quantity management method for the e-commerce can respond in milliseconds under the condition of high concurrency.
When the inventory deduction is carried out, if the inventory deduction of the database is successful and the database writing fails, transaction rollback is needed, meanwhile, reverse compensation is carried out on the inventory deduction operation of the database once, if the compensation fails, automatic retry compensation is asynchronously carried out, and if the retry upper limit is exceeded, automatic early warning compensation is carried out.
Drawings
Fig. 1 is a flowchart illustrating a method for managing inventory amounts of an e-commerce business according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method for managing inventory amounts of e-commerce according to another embodiment of the present disclosure.
Fig. 3 is a flowchart of a step S1 of a method for managing the inventory quantity of the e-commerce in fig. 1 according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of a step S3 of a method for managing the inventory quantity of the e-commerce in fig. 1 according to an embodiment of the present disclosure.
Fig. 5 is a flowchart of a step S4 of a method for managing the inventory quantity of the e-commerce system in fig. 1 according to an embodiment of the present disclosure.
Fig. 6 is a flowchart of a step S6 of a method for managing the inventory quantity of the e-commerce in fig. 1 according to an embodiment of the present disclosure.
Fig. 7 is a flowchart of a step S63 of the method for managing the inventory quantity of the e-commerce in fig. 6 according to an embodiment of the present application.
Fig. 8 is a schematic block diagram of a system for managing inventory amounts of e-commerce according to an embodiment of the present disclosure.
Fig. 9 is a schematic block diagram of a structure of an electronic device according to an embodiment of the present disclosure.
Fig. 10 is a schematic block diagram of a structure of a computer-readable storage medium according to an embodiment of the present application.
Fig. 11 is a Redis hot spot inventory difference monitoring page of a method for managing the inventory quantity of an e-commerce according to an embodiment of the present application.
Description of the element reference numerals
10 initialization device
20 first storage device
30 query device
40 minus or plus devices
50 second storage device
60 processor
70 memory
80 computer instructions
801 computer readable storage medium
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for managing inventory amounts of e-commerce according to an embodiment of the present disclosure. The invention provides a method for managing the stock quantity of an e-commerce, which can be applied to the technical field of e-commerce stock management and comprises the following steps: step S1, initializing inventory data in the inventory table to obtain virtual inventory data. Specifically, in step S1, the inventory data may be hot spot inventory data, which is derived from the inventory table, and the mysql (relational database management system) counts the row records of the inventory table per second to execute the Select command or Update command, and the hot spot inventory data is executed when the row records of the inventory table execute Update more than 350 times per second or execute Select more than 1000 times per second.
As shown in fig. 1, step S2 stores the virtual inventory amount data in a database. Specifically, in step S2, the database may be Redis, which is an open-source, network-supported, memory-based, and persistent database of a log-based, distributed storage system, and provides APIs (application programming interfaces) in multiple languages. And step S3, inquiring the virtual inventory data in the database, and finding a delivery warehouse for delivering the order according to the order demand information. And step S4, subtracting or adding the inventory data of the delivery warehouse to obtain subtracted or added inventory data. Specifically, the deduction operation and the addition operation refer to executing an addition command or a subtraction command on the row records of the inventory table, wherein the row records of the inventory table are warehouse, stock level, SKU (stock keeping unit) and stock quantity. The adding command refers to the situations of returning goods, canceling, refunding, purchasing, warehousing and the like, and the subtracting command refers to the situations of normal delivery and the like. And step S5, saving the deduction or addition record of the delivery warehouse. Specifically, in step S5, the saving of the deduction record or the addition record of the shipping warehouse refers to saving of a journal of the database, and it may also be determined whether saving of the journal of the database is successful, if the saving of the journal of the database is successful, the ordering is successful, and if not, the rollback operation is performed.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for managing inventory amounts of e-commerce according to another embodiment of the present application. The method for managing the inventory quantity for the e-commerce further comprises the following steps: step S6, determining whether the virtual inventory data in the database is consistent with the subtracted inventory data, if so, the virtual inventory data is in a normal state, and if not, executing an early warning operation. Specifically, in step S6, the difference between Redis and the available data in the database may be periodically scanned, and automatic repair and early warning may be triggered when there is a difference, for example, 8000 pieces of stock data before deduction and 6000 pieces of stock data after deduction are included, and if the virtual stock data in the database is 5000 pieces, 6000 pieces of stock data after deduction are not satisfied, so that an early warning operation is required to prevent occurrence of an insufficient stock.
Referring to fig. 3, fig. 3 is a flowchart illustrating a step S1 of the method for managing the stock quantity of the e-commerce in fig. 1 according to an embodiment of the present application. The step of initializing the inventory data in the inventory table to obtain the virtual inventory data in step S1 includes: and step S11, establishing a first timing task. Specifically, the first timing task may be a high-frequency task, and the first timing task may be, but is not limited to, 1min, 2min, 3min, 4min, 5min, and the like. And step S12, inquiring the virtual warehouse data according to the first timing task. Specifically, in step S12, virtual warehouse data, and virtual inventory amount may be obtained according to the ratio of the physical inventory and the virtual inventory. And step S13, obtaining virtual inventory data according to the virtual warehouse data. Specifically, in step S13, the virtual inventory amount data may be written in the Redis.
Referring to fig. 4, fig. 4 is a flowchart illustrating a step S3 of the method for managing the stock quantity of the e-commerce in fig. 1 according to an embodiment of the present application. The step of finding a delivery warehouse for delivering the order according to the order demand information in step S3 includes: and step S31, according to the order demand information and the order allocation configuration strategy, finding a delivery warehouse for delivering the order. And step S32, the allocation strategy comprises the judgment of one or more of receiving address distance data, warehouse inventory depth data, sales organization data and warehouse organization data. Specifically, the order distribution configuration policy may include multiple policies, for example, when the e-commerce receiving end receives an order, it may be determined according to the receiving address distance data which warehouse is specifically used for delivering the order, the system may select the delivery warehouse closest to the address of the order for delivering the order, for example, when the e-commerce receiving end receives the order, it may be determined according to the logistics cost price data which warehouse is specifically used for delivering the order, the system may select the delivery warehouse with the lowest logistics cost price data for delivering the order, and the system may also comprehensively consider the receiving address distance data, the warehouse inventory depth data, the sales organization data, the warehouse organization data, and the logistics cost price data, so as to determine which warehouse is specifically used for delivering the order.
Referring to fig. 5, fig. 5 is a flowchart illustrating a step S4 of the method for managing the stock quantity of the e-commerce in fig. 1 according to an embodiment of the present application. The step of subtracting or adding the inventory data of the delivery warehouse in the step S4 to obtain subtracted or added inventory data includes: and step S41, deducting the virtual inventory data for the first time in the database to obtain the virtual inventory data after deducting for the first time. Specifically, in step S41, the virtual inventory amount data may be deducted for the first time in the Redis cache, where deducting the virtual inventory amount data for the first time refers to attempting deducting the virtual inventory amount data in the Redis cache. Step S42, determining whether the inventory data of the shipping warehouse is greater than or equal to the virtual inventory data after the first deduction, if the inventory data of the shipping warehouse is greater than or equal to the virtual inventory data after the first deduction, executing step S43, and if the inventory data of the shipping warehouse is less than the virtual inventory data after the first deduction, executing step S410. And step S43, deducting the virtual inventory amount data in the database. Specifically, step S43 is a deduction operation of the virtual inventory data, and in an inventory deduction scenario, the deduction operation of the virtual inventory data may be performed in Redis first, and then the inventory is deducted by the database, so as to avoid that the database deduction operation is successful and the database rollback operation is required after the Redis deduction operation fails.
As shown in fig. 5, in step S44, it is determined whether the database successfully subtracts the virtual inventory amount data, if the database successfully subtracts the virtual inventory amount data, the operation in step S45 is executed, and if the database unsuccessfully subtracts the virtual inventory amount data, the operation in step S410 is executed. And step S45, the database executes the data inserting operation. And step S46, judging whether the database is inserted with data successfully or not, if the database is inserted with data successfully, executing the operation of step S47, and if the database is inserted with data unsuccessfully, executing the operation of step S410. Specifically, in step S45, the database performing Insert data operation may perform Insert operation for the database cache.
As shown in fig. 5, in step S46, it is determined whether the database successfully commits the data transaction, if the database successfully commits the data transaction, the operation in step S47 is performed, and if the database fails to commit the data transaction, the operation in step S410 is performed. And step S48, judging whether the database successfully submits the data transaction, if the database successfully submits the data transaction, executing the operation of step S49, and if the database fails to submit the data transaction, executing the operation of step S410. And step S49, adding operation is carried out on the inventory data of the delivery warehouse. Specifically, in step S48, the successful committing of the data transaction by the database means that two actions need to be completed, one of which is the success of the Redis deduction operation, and the other is the success of the database deduction operation, and the transaction can be closed only when both actions are successful, and if one of the actions is not successful, the operation of step S410 is executed. And step S410, executing a rollback operation. Specifically, if any operation step fails, the transaction rollback is finished, so that the rollback probability of invalid resource operation can be reduced, and the phenomenon of over-selling is reduced. In step S49, in order to perform an increase operation on the inventory data of the shipping warehouse, in an inventory increase scenario, an inventory data increase operation in Database may be performed first, and then an inventory data increase operation in Redis may be performed, so as to avoid that the inventory data increase in Database fails, and the inventory data in Redis used, thereby causing an over-selling phenomenon. And if the inventory data increasing operation in the Redis is successful and the database transaction fails, recording a compensation log, and performing asynchronous automatic retry reverse Redis updating operation.
Referring to fig. 6, fig. 6 is a flowchart illustrating a step S6 of the method for managing the inventory quantity of the e-commerce in fig. 1 according to an embodiment of the present application. The step of determining whether the virtual stock quantity data in the database coincides with the deducted stock quantity data in step S6 includes: and step S61, establishing a second timing task. Specifically, in step S61, the second timing task may be a low frequency task, and the second timing task may be, but is not limited to, 1h, 2h, 3h, 4h, 5h, and the like. And step S62, inquiring the inventory record of the inventory table according to the second timing task. Step S63, determining whether the same warehouse data, the same stock level data, and the same stock level unit data in the inventory and the database are consistent, if yes, the virtual stock level data is in a normal state, and if not, performing an early warning operation.
As shown in fig. 6, the method for managing the inventory amount of the e-commerce provides an effective monitoring mechanism, can perform unattended automatic detection and automatic repair, can enter an early warning mode when a special condition is met, and provides an auxiliary tool. In step S63, the buffered running regression inventory table may be periodically updated from inventory, and automatic repair and early warning may be triggered by checking whether there is a difference between Redis and the database. In step S63, data differences between Redis and the database may be periodically scanned, and automatic repair and early warning may be triggered when there is a difference. Wherein the data difference between Redis and the database is: diff-db < a + SUM, where diff denotes a difference in data between Redis and a Database, Redis denotes data located in Redis, db denotes inventory data located in Database, a denotes data located in an inventory table, and SUM denotes an inventory update flow.
Referring to fig. 7 and 11, fig. 7 is a flowchart illustrating a step S63 of the method for managing the stock quantity of the e-commerce according to fig. 6 according to an embodiment of the present disclosure. Fig. 11 is a Redis hot spot inventory difference monitoring page of a method for managing the inventory quantity of an e-commerce according to an embodiment of the present application. As shown in fig. 7, the performing of the warning operation in step S63 includes: and step S531, setting a repair page. And step S532, setting the virtual inventory data in the database through the repair page. As shown in fig. 11, on the Redis hot spot inventory difference monitoring page, the values and differences of the hot spot inventory in the inventory of the Redis and the database may be directly checked, and an early warning rule and an automatic repair rule may also be configured, where the Redis hot spot inventory difference monitoring page displays a warehouse, a stock location, a stock quantity unit, and the like, and may modify data of the warehouse, the stock location, the stock quantity unit, and the like. For example, with reference to the database, if the data in the Redis is more than the stock data in the database, it indicates that some SKU stocks are allocated to the orders and need reverse processing, if diff is greater than or equal to Redis, a deduction operation is directly performed in the Redis, if diff is less than Redis, the data in the Redis is firstly deducted to 0, because some SKU stocks in the orders are actually not enough to be repaired, and if the data in the database is more than the data in the Redis, it indicates that some SKU stocks cannot be used and needs to be updated.
As shown in fig. 7, when the Redis update operation fails, the operation enters a retry message queue, a retry is automatically performed by consuming a retry queue message, a delay message is sent after the retry fails to trigger a next retry, retry number information may be recorded in the message, for example, the retry number exceeds a maximum retry number by 5 times, a file log requiring manual compensation is recorded, an exception record table requiring manual processing is written, and a trigger is notified to the operation and maintenance staff. The additional consideration of recording the inventory update buffer flow is to ensure the integrity of the inventory data of the database by using database transactions and ensure higher performance. Since the entire inventory update buffer flow is designed to buffer, should not exist for a long period of time, and to maintain performance, the records of the inventory update buffer flow need to be controlled by a small order of magnitude, a strategy is needed to periodically return the flow to the inventory tables.
Referring to fig. 8, fig. 8 is a schematic structural block diagram of a system for managing inventory amounts of e-commerce according to an embodiment of the present disclosure. Similar to the principle of a method for managing the inventory amount of the e-commerce, the present invention also provides a system for managing the inventory amount of the e-commerce, which includes, but is not limited to, an initialization device 10, a first storage device 20, a query device 30, a deduction or addition device 40, and a second storage device 50. The management system for the inventory quantity of the e-commerce has the advantages of accurate data, higher performance and lower operation and maintenance cost. The initialization device 10 is used for initializing inventory data in an inventory table to obtain virtual inventory data. The first storage device 20 is configured to store the virtual inventory data in a database. The query device 30 is configured to query the virtual inventory data in the database, and find a delivery warehouse for delivering the order according to the order demand information. The deduction or addition device 40 is used for deduction or addition operation of the stock data of the delivery warehouse to obtain the subtracted or added stock data. The second storage device 50 is used to keep a record of deductions or additions to the shipping warehouse. Specifically, the first storage device 20 and the second storage device 50 may be storage media, for example, a database or a Redis inventory, to store the virtual inventory data, the deduction or addition record of the shipping warehouse, and the initialization device 10, the query device 30, the deduction or addition device 40 may be disposed inside a computer or a server.
Referring to fig. 9, fig. 9 is a schematic structural block diagram of an electronic device according to an embodiment of the present disclosure. The present invention also provides an electronic device, which includes a processor 60 and a memory 70, where the memory 70 stores program instructions, and the processor 60 executes the program instructions to implement the above-mentioned method for managing the stock quantity of the e-commerce. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component; the Memory 70 may include a Random Access Memory (RAM), and may further include a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory. The Memory 70 may also be an internal Memory of Random Access Memory (RAM) type, and the processor 60 and the Memory 70 may be integrated into one or more independent circuits or hardware, such as: application Specific Integrated Circuit (ASIC). It should be noted that the computer program in the memory 70 may be implemented in the form of software functional units and stored in a computer readable storage medium when the computer program is sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention.
Referring to fig. 10, fig. 10 is a schematic block diagram illustrating a structure of a computer-readable storage medium according to an embodiment of the present disclosure. The present invention also provides a computer-readable storage medium 801, wherein the computer-readable storage medium 801 stores computer instructions 80, and the computer instructions 80 are used for causing the computer to execute the above-mentioned method for managing the stock quantity of the e-commerce. The computer readable storage medium 801 may be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system or propagation medium. The computer-readable storage medium 801 may also include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a Random Access Memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Optical disks may include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-RW), and DVD.
In summary, the method for managing the stock quantity of the e-commerce can perform deduction or increase operation on the stock data of the delivery warehouse, support high concurrent deduction and stock reduction of the stock unit of the explosive money under the same warehouse, support hundred thousand deductions per hour, can rapidly complete stock increase and decrease service, and can timely synchronize the stock to a sales end to prevent the over-sale phenomenon.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A method for managing inventory quantities for an e-commerce comprising:
initializing inventory data in an inventory table to obtain virtual inventory data;
storing the virtual inventory data into a database;
inquiring virtual inventory data in the database, and searching a delivery warehouse for delivering the order according to the order demand information;
deducting or increasing the inventory data of the delivery warehouse to obtain the subtracted or increased inventory data;
saving a deduction or increase record of the shipping warehouse.
2. The method for managing the inventory quantity of the e-commerce according to claim 1, further comprising:
and judging whether the virtual inventory data in the database is consistent with the deducted inventory data or not, if so, judging that the virtual inventory data is in a normal state, and if not, executing early warning operation.
3. The method as claimed in claim 1, wherein the step of initializing the inventory data in the inventory table to obtain the virtual inventory data comprises:
establishing a first timing task;
querying virtual warehouse data according to the first timing task;
and obtaining virtual inventory data according to the virtual warehouse data.
4. The method for managing the stock quantity of the e-commerce according to claim 1, wherein the step of finding the delivery warehouse for delivering the order according to the order demand information comprises:
according to the order demand information and the order distribution configuration strategy, a delivery warehouse for delivering the order is found;
the distribution configuration strategy comprises judgment of one or more of receiving address distance data, warehouse inventory depth data, sales organization data and warehouse organization data.
5. The method for managing the inventory quantity of the e-commerce according to claim 1, wherein the step of subtracting or adding the inventory data of the delivery warehouse to obtain the subtracted or added inventory data comprises:
deducting the virtual inventory data for the first time in the database to obtain the virtual inventory data after deducting for the first time;
and judging whether the inventory data of the delivery warehouse is larger than or equal to the virtual inventory data after the first deduction, if so, deducting the virtual inventory data in the database, and if not, executing rollback operation.
6. The method for managing inventory quantity of E-commerce according to claim 5, wherein the step of subtracting or adding the inventory data of the delivery warehouse to obtain the subtracted or added inventory data further comprises:
and judging whether the database successfully subtracts the virtual inventory data, if so, executing data insertion operation by the database, and if not, executing rollback operation.
7. The method for managing inventory quantity of E-commerce according to claim 6, wherein the step of subtracting or adding the inventory data of the delivery warehouse to obtain the subtracted or added inventory data further comprises:
judging whether the database is successfully inserted with data, if so, submitting data transactions by the database, and if not, executing rollback operation;
and judging whether the database successfully submits the data transaction, if so, performing addition operation on the inventory data of the delivery warehouse, and if not, performing rollback operation.
8. The method as claimed in claim 2, wherein the step of determining whether the virtual inventory data in the database is consistent with the deducted inventory data comprises:
establishing a second timing task;
inquiring the inventory records of the inventory table according to the second timing task;
and judging whether the same warehouse data, the same stock level data and the same stock level unit data in the inventory list and the database are consistent, if so, the virtual stock level data is in a normal state, and if not, executing early warning operation.
9. The method of claim 8, wherein the performing of the pre-warning operation comprises:
setting a repair page;
and setting the virtual inventory data in the database through the repair page.
10. A system for managing inventory quantities for e-commerce, comprising:
the initialization device is used for initializing inventory data in the inventory table to obtain virtual inventory data;
the first storage device is used for storing the virtual inventory data into a database;
the query equipment is used for querying the virtual inventory data in the database and searching a delivery warehouse for delivering the order according to the order demand information;
the deduction or increase equipment is used for carrying out deduction or increase operation on the inventory data of the delivery warehouse so as to obtain the subtracted or increased inventory data;
a second storage device for maintaining a deduction or increase record for the shipping warehouse.
CN202010789393.4A 2020-08-07 2020-08-07 Inventory quantity management method and system for e-commerce Pending CN111915259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010789393.4A CN111915259A (en) 2020-08-07 2020-08-07 Inventory quantity management method and system for e-commerce

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010789393.4A CN111915259A (en) 2020-08-07 2020-08-07 Inventory quantity management method and system for e-commerce

Publications (1)

Publication Number Publication Date
CN111915259A true CN111915259A (en) 2020-11-10

Family

ID=73283262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010789393.4A Pending CN111915259A (en) 2020-08-07 2020-08-07 Inventory quantity management method and system for e-commerce

Country Status (1)

Country Link
CN (1) CN111915259A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749199A (en) * 2021-01-25 2021-05-04 上海伯俊软件科技有限公司 Inventory management method
CN112765277A (en) * 2021-01-28 2021-05-07 树根互联股份有限公司 Data synchronization method, device and system
CN113762865A (en) * 2021-01-06 2021-12-07 北京京东乾石科技有限公司 Inventory information processing method and device
CN116503000A (en) * 2023-06-27 2023-07-28 广州晨安网络科技有限公司 Manufacturing order inventory ERP management method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
WO2016173445A1 (en) * 2015-04-30 2016-11-03 阿里巴巴集团控股有限公司 Method and system for processing stock information of commodity objects
CN107145972A (en) * 2017-04-20 2017-09-08 北京慧智八方网络技术有限公司 Commerce and trade intellectuality order processing system and method
CN107944788A (en) * 2017-11-14 2018-04-20 上海伯俊软件科技有限公司 A kind of cloud storehouse system for the retail of full channel
CN111028033A (en) * 2019-05-22 2020-04-17 珠海随变科技有限公司 Inventory processing method, device, equipment and storage medium based on e-commerce platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
WO2016173445A1 (en) * 2015-04-30 2016-11-03 阿里巴巴集团控股有限公司 Method and system for processing stock information of commodity objects
CN107145972A (en) * 2017-04-20 2017-09-08 北京慧智八方网络技术有限公司 Commerce and trade intellectuality order processing system and method
CN107944788A (en) * 2017-11-14 2018-04-20 上海伯俊软件科技有限公司 A kind of cloud storehouse system for the retail of full channel
CN111028033A (en) * 2019-05-22 2020-04-17 珠海随变科技有限公司 Inventory processing method, device, equipment and storage medium based on e-commerce platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113762865A (en) * 2021-01-06 2021-12-07 北京京东乾石科技有限公司 Inventory information processing method and device
CN112749199A (en) * 2021-01-25 2021-05-04 上海伯俊软件科技有限公司 Inventory management method
CN112765277A (en) * 2021-01-28 2021-05-07 树根互联股份有限公司 Data synchronization method, device and system
CN116503000A (en) * 2023-06-27 2023-07-28 广州晨安网络科技有限公司 Manufacturing order inventory ERP management method and system

Similar Documents

Publication Publication Date Title
CN111915259A (en) Inventory quantity management method and system for e-commerce
Kraska et al. Consistency rationing in the cloud: Pay only when it matters
US7461065B2 (en) Method and system for utilizing shared numeric locks
US9632944B2 (en) Enhanced transactional cache
US20110238641A1 (en) System with multiple conditional commit databases
US9477609B2 (en) Enhanced transactional cache with bulk operation
US20100174628A1 (en) Use of separate rib ledgers in a computerized enterprisere source planning system
CN103154912A (en) Method and system for inserting cache blocks
US9239858B1 (en) High-concurrency transactional commits
US5333310A (en) Data management method and system
US8666959B2 (en) Data access device, data access method and data access program
US10218813B2 (en) Automatic surge protection of system resources
US8271440B2 (en) Apparatus, method and program for refreshing a summary table
US7849110B2 (en) Database garbage collector
CN100403269C (en) Method, system for managing information on relationships between target volumes
US11650922B2 (en) Cache coherency engine
US7653628B2 (en) Persistent data management with different isolation levels
CN112990823A (en) Method, system and storage medium for realizing inventory management
US20140058947A1 (en) Parallel availability control checks in financial management system
US8326714B1 (en) Employee pre-payroll paycheck preview
CN110704488B (en) Method for managing data and corresponding system, computer device and medium
US6556994B1 (en) Method and system for improving concurrency through early release of unnecessary locks
US7516144B2 (en) Method and system for re-population of data in a database
US20130117242A1 (en) Adaptive Data Suppression
US20110055111A1 (en) Hedging agreement roll-overs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination