CN113935694A - Goods inventory pre-occupation method and device and goods inventory system - Google Patents

Goods inventory pre-occupation method and device and goods inventory system Download PDF

Info

Publication number
CN113935694A
CN113935694A CN202111254101.8A CN202111254101A CN113935694A CN 113935694 A CN113935694 A CN 113935694A CN 202111254101 A CN202111254101 A CN 202111254101A CN 113935694 A CN113935694 A CN 113935694A
Authority
CN
China
Prior art keywords
inventory
goods
stock
record
records
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
CN202111254101.8A
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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology 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 Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202111254101.8A priority Critical patent/CN113935694A/en
Publication of CN113935694A publication Critical patent/CN113935694A/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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a cargo inventory pre-occupation method and device and a cargo inventory system, and relates to the field of computers. The method comprises the steps of splitting a first stock record of a goods in a primary stock to form a plurality of second stock records of the goods in a secondary stock; according to the quantity of the goods requested by the calling party, pre-occupying at least one second stock record of the goods in a secondary stock based on a row lock and deducting the stock; persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records; asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory decrement amount for the item in secondary inventory. Each second inventory record can be respectively locked to perform inventory pre-occupation, so that the lock-occupation competition is reduced, the concurrence performance and the throughput of the inventory pre-occupation are improved, and the user experience is improved.

Description

Goods inventory pre-occupation method and device and goods inventory system
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and an apparatus for pre-occupying a stock of goods, and a stock system of goods.
Background
Aiming at the goods delivery link of the sales order, the inventory system needs to add a line lock to pre-occupy the inventory record of the goods, deduct the inventory of the goods in the inventory record according to the quantity of the goods in the sales order, and can process the next sales order of the goods after releasing the line lock.
Research shows that when a plurality of sales orders of a certain goods arrive at the same time, the row lock competition problem exists, the inventory system can only occupy the inventory records of the goods in sequence by using the row lock, the inventory occupation throughput is limited, the processing of the sales orders is overtime, and the user experience is influenced.
Disclosure of Invention
One technical problem to be solved by the embodiments of the present disclosure is: reduce the line lock competition, improve the stock and pre-occupy the throughput.
According to the embodiment of the disclosure, one first inventory record of the goods in the primary inventory is split to form a plurality of second inventory records of the goods in the secondary inventory, and each second inventory record can be respectively locked to pre-occupy the goods, so that lock competition is reduced, concurrence performance and throughput of the pre-occupy of the goods are improved, and user experience is improved.
Some embodiments of the present disclosure provide a method for pre-occupying a stock of goods, including:
splitting a first inventory record of a good in a primary inventory to form a plurality of second inventory records of the good in a secondary inventory;
according to the quantity of the goods requested by the calling party, pre-occupying at least one second stock record of the goods in a secondary stock based on a row lock and deducting the stock;
persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records;
asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory decrement amount for the item in secondary inventory.
In some embodiments, pre-empting and deducting inventory based on row locks at least one second inventory record of the goods in secondary inventory based on the quantity of the goods requested by the caller comprises:
selecting a second inventory record from the secondary inventory, wherein the inventory level of the goods is greater than 0;
according to the quantity of the goods requested by the calling party, pre-occupying a second stock record of the currently selected goods based on a row lock and deducting the stock;
calculating the remaining inventory of the second inventory record in which the goods are currently selected;
and if the residual inventory is greater than or equal to 0, determining that the actually deducted inventory of the currently selected second inventory record of the goods is the quantity of the goods requested by the calling party, and marking the successful preemption.
In some embodiments, if the remaining inventory amount is less than 0 and the absolute value of the remaining inventory amount is less than the quantity of the goods requested by the caller, the remaining inventory amount of the second inventory record in which the goods are currently selected is updated to 0, the inventory amount actually deducted from the second inventory record in which the goods are currently selected is determined to be the difference value between the quantity of the goods requested by the caller and the absolute value of the remaining inventory amount before updating, the second inventory record is determined to be required to provide the goods of which the quantity is the absolute value of the remaining inventory amount before updating, and the second inventory record selection step is returned to select another second inventory record to continue the execution.
In some embodiments, asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory reduction of the item in secondary inventory comprises: and according to the stock reduction amount of the goods in the secondary stock, pre-occupying the first stock record of the goods in the primary stock based on the row lock and deducting the stock, and releasing the row lock of the pre-occupied first stock record after the deduction is successful.
In some embodiments, further comprising:
monitoring the balance degree of the remaining inventory quantities of all second inventory records of the goods in the secondary inventory;
and if the monitored balance degree indicates that the residual inventory amount of each second inventory record of the goods is not balanced, locking all the second inventory records of the goods, equally distributing the residual inventory total amount of all the second inventory records of the goods in each second inventory record of the goods, and then releasing the locks of all the second inventory records of the goods.
Some embodiments of the present disclosure provide a method for pre-occupying a stock of goods, including:
splitting a first inventory record of a good in a primary inventory to form a plurality of second inventory records of the good in a secondary inventory;
according to the stock quantity which is indicated by the stock increasing task and needs to be increased, at least one second stock record of the goods in the secondary stock is preempted on the basis of the row lock, and the stock is increased;
persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records;
and synchronously increasing the inventory data of the first inventory record of the goods in the primary inventory according to the inventory quantity which is indicated by the inventory increasing task and needs to be increased.
In some embodiments, pre-empting and adding inventory of the item in secondary inventory based on the row lock according to the inventory amount of the item requiring the increase indicated by the inventory increase task comprises: and judging whether the stock required to be increased of the goods is smaller than the number of second stock records of the goods or not according to the stock required to be increased of the goods indicated by the stock increasing task, if so, locking all the second stock records of the goods, uniformly adding the stock required to be increased of the goods to each second stock record of the goods according to a preset balance strategy, and then releasing the row locks of all the second stock records.
In some embodiments, if less than, the lock is applied to one of the second inventory records for the item, the inventory of the item that needs to be added is added to the second inventory record for the lock, and then the lock of the second inventory record is released.
In some embodiments, the adding the inventory quantity of the goods required to be added to the second inventory records of the goods in a balanced manner according to the preset balancing strategy includes:
performing modular operation on the quantity of the second inventory records of the goods according to the stock quantity of the goods which needs to be increased;
if the modular operation result is equal to 0, averagely adding the stock quantity of the goods which needs to be added to each second stock record of the goods;
and if the modulus operation result is not equal to 0, increasing a first value by the stock of one second stock record of the goods, and increasing second values by the stocks of other second stock records of the goods respectively, wherein the second value is equal to the quotient of the stock quantity of the goods required to be increased divided by the quantity of the second stock records of the goods, and the first value is equal to the sum of the second value and the modulus operation result.
In some embodiments, further comprising: and recording the inventory operation flow by utilizing the inventory data of the first inventory record in the primary inventory.
Some embodiments of the present disclosure provide a cargo inventory preemption device, comprising: a memory; and a processor coupled to the memory, the processor configured to perform the cargo inventory preemption method of the embodiments based on instructions stored in the memory.
Some embodiments of the present disclosure provide a cargo inventory preemption device, comprising:
a splitting module configured to split a first inventory record of a good in a primary inventory into a plurality of second inventory records of the good in a secondary inventory;
the secondary pre-occupation and deduction module is configured to pre-occupy at least one second stock record of the goods in the secondary stock and deduct the stock based on the row lock according to the quantity of the goods requested by the calling party;
a persistence module configured to persist inventory data of each second inventory record of the goods in secondary inventory and then release a row lock of the preempted second inventory record;
an asynchronous deduction module configured to asynchronously deduct inventory data of a first inventory record of the item in primary inventory based on an inventory decrement amount of the item in secondary inventory.
Some embodiments of the present disclosure provide a cargo inventory preemption device, comprising:
a splitting module configured to split a first inventory record of a good in a primary inventory into a plurality of second inventory records of the good in a secondary inventory;
the second-level pre-occupation and increase module is configured to pre-occupy and increase the stock based on the row lock according to the stock required to be increased of the goods indicated by the stock increase task, wherein the stock is at least one second stock record of the goods in the second-level stock;
a persistence module configured to persist inventory data of each second inventory record of the goods in secondary inventory and then release a row lock of the preempted second inventory record;
and the synchronous increasing module is configured to synchronously increase the stock data of the first stock record of the goods in the primary stock according to the stock quantity which is indicated by the stock increasing task and needs to be increased.
In some embodiments, further comprising:
a monitoring module configured to monitor a degree of balance of remaining inventory amounts of all second inventory records of the goods in a secondary inventory;
and the balancing module is configured to lock all the second inventory records of the goods, evenly distribute the total amount of the remaining inventory of all the second inventory records of the goods in all the second inventory records of the goods and then release the locks of all the second inventory records of the goods if the monitored balancing degree indicates that the remaining inventory amounts of all the second inventory records of the goods are not balanced.
Some embodiments of the present disclosure provide a cargo inventory system, comprising: the system comprises a primary inventory, a secondary inventory and a goods inventory pre-occupation device for managing the primary inventory and the secondary inventory, wherein a first inventory record of goods in the primary inventory is split into a plurality of second inventory records of the goods in the secondary inventory.
Some embodiments of the present disclosure provide a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, performs the steps of the cargo inventory preemption method of the embodiments.
Drawings
The drawings that will be used in the description of the embodiments or the related art will be briefly described below. The present disclosure can be understood more clearly from the following detailed description, which proceeds with reference to the accompanying drawings.
It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without undue inventive faculty.
Fig. 1 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure.
Fig. 2 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure.
Fig. 3 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure.
Fig. 4 illustrates a schematic diagram of a cargo inventory system of some embodiments of the present disclosure.
Fig. 5 illustrates a schematic diagram of a cargo inventory preemption device in accordance with some embodiments of the present disclosure.
Fig. 6 shows a schematic structural diagram of a cargo inventory preemption device of some embodiments of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure.
Unless otherwise specified, "first", "second", and the like in the present disclosure are described to distinguish different objects, and are not intended to mean size, timing, or the like.
Fig. 1 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure. The cargo inventory preemption method is performed by a cargo inventory preemption device, for example, and can be applied to cargo delivery scenarios.
As shown in fig. 1, the cargo inventory preemption method of this embodiment includes: step 110, step 140 may further comprise step 150.
At step 110, a first inventory record for a good in a primary inventory is split to form a plurality of second inventory records for the good in a secondary inventory.
For example, a first inventory record is split into 2 to the power of n second inventory records, n being an integer greater than 0.
An example inventory split is listed below. Assuming that a first inventory record in the primary inventory is shown in table 1, and an inventory splitting configuration table is shown in table 2, inventory splitting configuration is performed on hot spot goods, the goods with higher access heat can be configured with a larger splitting line number, and the first inventory record in table 1 is split according to the splitting configuration information in table 2 to obtain 4 second inventory records in table 3.
TABLE 1
Figure BDA0003323298900000061
TABLE 2
Figure BDA0003323298900000062
Figure BDA0003323298900000071
TABLE 3
Figure BDA0003323298900000072
At step 120, at least one second inventory record of the item in secondary inventory is preempted and inventory is decremented based on row locks, depending on the quantity of the item requested by the caller.
In some embodiments, pre-empting and deducting inventory based on row locks at least one second inventory record of the item in secondary inventory comprises, in accordance with the quantity of the item requested by the caller:
at step 120.1, a second inventory record of the item having an inventory level greater than 0 is selected from the secondary inventory, which may be selected randomly.
At step 120.2, pre-empting the second inventory record of the item currently selected and deducting inventory based on row locks according to the quantity of the item requested by the caller.
At step 120.3, the remaining inventory amount of the second inventory record for which the item is currently selected is calculated.
At step 120.3a, if the remaining inventory amount is greater than or equal to 0, which indicates that the inventory amount of the currently selected second inventory record is sufficient, the inventory amount actually deducted from the currently selected second inventory record of the goods is determined as the quantity of the goods requested by the calling party, and the preemption success is marked.
In step 120.3b, if the remaining inventory amount is less than 0 and the absolute value of the remaining inventory amount is less than the quantity of the goods requested by the caller, the remaining inventory amount of the second inventory record in which the goods are currently selected is updated to 0, and determines the stock quantity currocupyqty actually deducted from the second stock record in which the goods are currently selected as the difference between the quantity | opQty | of the goods requested by the caller and the absolute value | X | of the remaining stock quantity before update, and determines that the secondary inventory is still needed to provide the quantity of goods that is the absolute value | X | of the remaining inventory quantity before updating, returns to the second inventory record selection step 120.1 to select another second inventory record to continue the loop execution, and, when continuing to execute step 120.2, and according to the quantity of the goods which are required to be provided by the secondary inventory, pre-occupying the second inventory record of the goods which are selected currently based on the row lock and reducing the inventory.
After the pre-occupation is successful, the subsequent step 130 is continuously executed, a pre-occupation task is generated and added to the pre-occupation task pool, the pre-occupation tasks in the pre-occupation task pool are subscribed, the pre-occupation task newly added to the pre-occupation task pool triggers a corresponding consumption task, the consumption task reads the persistent secondary inventory data, and a pre-occupation interface of the primary inventory is called to execute the step 140. In addition, a timer can be set to periodically check whether the pre-occupied task pool has unprocessed pre-occupied tasks, and if the unprocessed pre-occupied tasks are detected, the pre-occupied tasks are processed by referring to the method.
At step 130, the inventory data for each second inventory record for the item in secondary inventory is persisted and then the row lock for the preempted second inventory record is released.
At step 140, inventory data for a first inventory record for the item in primary inventory is asynchronously subtracted from inventory reductions for the item in secondary inventory.
According to the inventory reduction of the goods in the secondary inventory, pre-occupying the first inventory record of the goods in the primary inventory and reducing the inventory based on the row lock.
In step 150, after the first inventory record is successfully deducted, the inventory data of the first inventory record in the primary inventory is used to record the running water of the inventory operation, and then the row lock of the first inventory record is released.
In the embodiment, one first inventory record of the goods in the primary inventory is split to form a plurality of second inventory records of the goods in the secondary inventory, and each second inventory record can be respectively locked to pre-occupy the inventory, so that lock competition is reduced, concurrence performance and throughput of the pre-occupy of the inventory are improved, and user experience is improved.
When the secondary inventory is continuously reserved, the inventory of each second inventory record may be unbalanced, and even some of the inventory of the second inventory records may be 0, which affects the concurrent performance and throughput of the inventory reservation, so that in the process of executing the method shown in fig. 1, the method shown in fig. 2 may also be executed simultaneously, so as to equalize the inventory of each second inventory record of the goods as much as possible, and further improve the concurrent performance and throughput of the inventory reservation.
Fig. 2 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure. The stock-of-goods preemption method is performed, for example, by a stock-of-goods preemption device.
As shown in fig. 2, the cargo inventory preemption method of this embodiment includes: step 210, 220.
At step 210, the balance of the remaining inventory amounts of all second inventory records for the item in secondary inventory is monitored.
The monitoring may be performed periodically and the monitoring period may be configurable.
In step 220, if the monitored balance degree indicates that the remaining inventory amounts of the second inventory records of the goods are not balanced, locking all the second inventory records of the goods, equally distributing the remaining inventory amounts of the second inventory records of the goods in the second inventory records of the goods, and then releasing the locks of all the second inventory records of the goods.
The imbalance determination condition may be configured, for example, the difference between the stock amounts of the second stock records is greater than a preset value or a preset ratio, and the imbalance is determined.
In some embodiments, the step of evenly distributing the total remaining inventory amount of all second inventory records of the item among the second inventory records of the item comprises: setting the total remaining inventory amount of all the second inventory records of the goods as N1, setting the number of all the second inventory records of the goods as N2, N1 mod N2 as x, wherein if x is equal to 0, the inventory amount of each second inventory record of the goods is N1/N2, if x is not equal to 0, the inventory amount of one of the second inventory records (such as the first second inventory record) of the goods is N1/N2+ x, and the inventory amount of the other second inventory records of the goods is N1/N2. But are not limited to, the examples.
Therefore, the inventory of each second inventory record of the goods is balanced as much as possible, and the concurrence performance and the throughput of inventory pre-occupation are further improved.
The inventory management includes the ex-warehouse management of goods after the goods are sold and the in-warehouse management of goods after the goods are purchased. The embodiment shown in fig. 1 and fig. 2 mainly relates to the goods delivery management after goods sale, and the goods delivery management after goods purchase is described below with reference to fig. 3.
Fig. 3 illustrates a flow diagram of a method of stock preemption of goods according to some embodiments of the present disclosure. The cargo inventory preemption method is performed by a cargo inventory preemption device, for example, and can be applied to a cargo warehousing scenario.
As shown in fig. 3, the cargo inventory preemption method of this embodiment includes: step 310, step 340 further comprises step 350.
In step 310, the first inventory record of the goods in the primary inventory is split to form a plurality of second inventory records of the goods in the secondary inventory, which may be referred to as step 110.
At step 320, pre-empting and adding inventory of the item in secondary inventory based on the row lock according to the inventory amount of the item requiring the increase indicated by the inventory increase task.
In some embodiments, step 320 specifically includes: and judging whether the stock quantity required to be increased of the goods is smaller than the number of second stock records of the goods or not according to the stock quantity required to be increased of the goods indicated by the stock increasing task, if so, locking all the second stock records of the goods, uniformly adding the stock quantity required to be increased of the goods to each second stock record of the goods according to a preset balance strategy, then releasing the row locks of all the second stock records, if so, locking one of the second stock records of the goods, adding the stock quantity required to be increased of the goods to the second stock record of the row lock, and then releasing the row lock of the second stock record.
In some embodiments, the adding the inventory quantity of the goods required to be added to the second inventory records of the goods in a balanced manner according to the preset balancing policy includes, for example: performing modular operation on the quantity of the second inventory records of the goods according to the stock quantity of the goods which needs to be increased; if the modular operation result is equal to 0, averagely adding the stock quantity of the goods which needs to be added to each second stock record of the goods; and if the modulus operation result is not equal to 0, increasing a first value by the stock of one second stock record of the goods, and increasing second values by the stocks of other second stock records of the goods respectively, wherein the second value is equal to the quotient of the stock quantity of the goods required to be increased divided by the quantity of the second stock records of the goods, and the first value is equal to the sum of the second value and the modulus operation result.
At step 330, the inventory data of each second inventory record of the item in secondary inventory is persisted, and then the row lock of the preempted second inventory record is released, as described in detail with reference to step 130.
In step 340, the inventory data of the first inventory record of the goods in the primary inventory is synchronously increased according to the inventory quantity required to be increased of the goods indicated by the inventory increasing task.
The primary inventory usually has a first inventory record of a certain goods in a warehouse, so that according to the inventory quantity required to be increased of the goods indicated by the inventory increasing task, the first inventory record of the goods in the primary inventory is locked and corresponding inventory data is updated, and then the row lock of the first inventory record of the goods is released.
In step 350, after the primary inventory is successfully added, the inventory data recorded in the first inventory in the primary inventory is used to record the inventory operation flow.
The method adopts different technologies to realize the addition and subtraction of the stock aiming at different service flow characteristics of goods delivery and goods storage. Specifically, aiming at the characteristic that the traffic flow of goods ex-warehouse service is large, an asynchronous inventory deduction method is adopted for the secondary inventory and the primary inventory, and aiming at the characteristic that the traffic flow of goods in-warehouse service is small, a synchronous inventory increasing method is adopted for the secondary inventory and the primary inventory, so that the warehousing efficiency is improved.
Fig. 4 illustrates a schematic diagram of a cargo inventory system of some embodiments of the present disclosure.
As shown in fig. 4, the cargo inventory system 400 of this embodiment includes: a primary inventory 410, a secondary inventory 420, and a goods inventory preemption device 430 for managing the primary inventory and the secondary inventory, wherein a first inventory record of a good in the primary inventory is split into a plurality of second inventory records of the good in the secondary inventory, and the goods inventory preemption device is configured to perform the goods inventory preemption method of the foregoing embodiments.
For example, in an ex-warehouse scenario, a first inventory record of a good in a primary inventory is split to form a plurality of second inventory records of the good in a secondary inventory; according to the quantity of the goods requested by the calling party, pre-occupying at least one second stock record of the goods in a secondary stock based on a row lock and deducting the stock; the stock data of each second stock record of the goods in the secondary stock is durably changed, and then the row lock of the preempted second stock record is released; asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory decrement amount for the item in secondary inventory.
For example, in a warehousing scene, splitting a first inventory record of goods in a primary inventory to form a plurality of second inventory records of the goods in a secondary inventory; according to the stock quantity which is indicated by the stock increasing task and needs to be increased, at least one second stock record of the goods in the secondary stock is preempted on the basis of the row lock, and the stock is increased; persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records; and synchronously increasing the inventory data of the first inventory record of the goods in the primary inventory according to the inventory quantity which is indicated by the inventory increasing task and needs to be increased.
Fig. 5 illustrates a schematic diagram of a cargo inventory preemption device in accordance with some embodiments of the present disclosure.
As shown in fig. 5, the cargo inventory preemption device 430 of this embodiment includes: the modules 510, 520a, 530, 540a may be applied to outbound scenarios, or/and the modules 510, 520b, 530, 540b may be applied to inbound scenarios. In addition, the inventory preemption device 430 can also include a module 550 and 560.
A splitting module 510 configured to split a first inventory record for a good in a primary inventory into a plurality of second inventory records for the good in a secondary inventory.
A secondary preemption and deduction module 520a configured to preempt and deduct inventory based on row-lock at least one second inventory record for the goods in secondary inventory based on the quantity of the goods requested by the caller.
A secondary preemption and deduction module 520a configured to select a second inventory record from the secondary inventory for which the inventory level of the good is greater than 0; according to the quantity of the goods requested by the calling party, pre-occupying a second stock record of the currently selected goods based on a row lock and deducting the stock; calculating the remaining inventory of the second inventory record in which the goods are currently selected; if the residual inventory is greater than or equal to 0, determining that the actually deducted inventory of the currently selected second inventory record of the goods is the quantity of the goods requested by the calling party, and marking the successful preemption; if the residual inventory is less than 0 and the absolute value of the residual inventory is less than the quantity of the goods requested by the calling party, updating the residual inventory of the second inventory record of the currently selected goods to 0, determining that the actual subtracted inventory of the second inventory record of the currently selected goods is the difference value between the quantity of the goods requested by the calling party and the absolute value of the residual inventory before updating, determining that the goods of which the quantity is also required to be provided by the secondary inventory and is the absolute value of the residual inventory before updating, returning to the second inventory record selection step, and selecting another second inventory record to continue execution.
A secondary preemption and increment module 520b configured to preempt and increment inventory based on the row lock at least one second inventory record for the item in the secondary inventory based on the inventory amount required to be increased for the item as indicated by the inventory-increasing task.
The secondary preemption and increase module 520b is configured to determine whether the inventory quantity of the cargo to be increased is less than the second inventory record quantity of the cargo according to the inventory quantity of the cargo to be increased indicated by the inventory increase task. And if not, locking all the second inventory records of the goods, uniformly adding the stock quantity of the goods which needs to be added to each second inventory record of the goods according to a preset balance strategy, and then releasing the row locks of all the second inventory records. And if the inventory quantity of the goods is less than the preset value, locking one second inventory record of the goods, adding the inventory quantity of the goods needing to be increased to the second inventory record of the locked inventory, and then releasing the lock of the second inventory record. Wherein the step of adding the inventory quantity of the goods required to be added to each second inventory record of the goods in a balanced manner according to a preset balancing strategy comprises the following steps: performing modular operation on the quantity of the second inventory records of the goods according to the stock quantity of the goods which needs to be increased; if the modular operation result is equal to 0, averagely adding the stock quantity of the goods which needs to be added to each second stock record of the goods; and if the modulus operation result is not equal to 0, increasing a first value by the stock of one second stock record of the goods, and increasing second values by the stocks of other second stock records of the goods respectively, wherein the second value is equal to the quotient of the stock quantity of the goods required to be increased divided by the quantity of the second stock records of the goods, and the first value is equal to the sum of the second value and the modulus operation result.
A persistence module 530 configured to persist inventory data of each second inventory record of the goods in secondary inventory and then release row locks of preempted second inventory records;
the asynchronous deduction module 540a is configured to asynchronously deduct the inventory data of the first inventory record of the goods in the primary inventory according to the inventory decrement of the goods in the secondary inventory, specifically, based on the row lock pre-occupying the first inventory record of the goods in the primary inventory and deducting the inventory, and release the row lock of the pre-occupied first inventory record after the deduction is successful.
A synchronous adding module 540b configured to synchronously add the inventory data of the first inventory record of the goods in the primary inventory according to the inventory amount required to be added of the goods indicated by the inventory adding task.
A monitoring module 550 configured to monitor a balance of remaining inventory amounts of all second inventory records of the goods in the secondary inventory;
and the balancing module 560 is configured to lock all the second inventory records of the goods and equally distribute the total amount of remaining inventory of all the second inventory records of the goods in each second inventory record of the goods if the monitored balancing degree indicates that the remaining inventory amounts of all the second inventory records of the goods are unbalanced, and then release the locks of all the second inventory records of the goods.
Fig. 6 shows a schematic structural diagram of a cargo inventory preemption device of some embodiments of the present disclosure.
As shown in fig. 6, the cargo inventory preemption device 430 of this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610, the processor 620 being configured to perform the cargo inventory preemption method of any of the preceding embodiments based on instructions stored in the memory 610.
For example, in an ex-warehouse scenario, a first inventory record of a good in a primary inventory is split to form a plurality of second inventory records of the good in a secondary inventory; according to the quantity of the goods requested by the calling party, pre-occupying at least one second stock record of the goods in a secondary stock based on a row lock and deducting the stock; the stock data of each second stock record of the goods in the secondary stock is durably changed, and then the row lock of the preempted second stock record is released; asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory decrement amount for the item in secondary inventory.
For example, in a warehousing scene, splitting a first inventory record of goods in a primary inventory to form a plurality of second inventory records of the goods in a secondary inventory; according to the stock quantity which is indicated by the stock increasing task and needs to be increased, at least one second stock record of the goods in the secondary stock is preempted on the basis of the row lock, and the stock is increased; persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records; and synchronously increasing the inventory data of the first inventory record of the goods in the primary inventory according to the inventory quantity which is indicated by the inventory increasing task and needs to be increased.
Memory 610 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.
The processor 620 may be implemented as discrete hardware components, such as a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gates or transistors, or the like.
The apparatus 430 may also include an input-output interface 630, a network interface 640, a storage interface 650, and the like. These interfaces 630, 640, 650 and the connections between the memory 610 and the processor 620 may be, for example, via a bus 660. The input/output interface 630 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 640 provides a connection interface for various networking devices. The storage interface 650 provides a connection interface for external storage devices such as an SD card and a usb disk. The bus 660 may use any of a variety of bus architectures. For example, bus structures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.
The disclosed embodiments provide a non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by a processor, performs the steps of the cargo inventory preemption method of the embodiments.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more non-transitory computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (16)

1. A method of pre-empting inventory of goods, comprising:
splitting a first inventory record of a good in a primary inventory to form a plurality of second inventory records of the good in a secondary inventory;
according to the quantity of the goods requested by the calling party, pre-occupying at least one second stock record of the goods in a secondary stock based on a row lock and deducting the stock;
persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records;
asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory decrement amount for the item in secondary inventory.
2. The method of claim 1, wherein pre-empting and reducing inventory based on row locks at least one second inventory record of the item in secondary inventory based on the quantity of the item requested by the caller comprises:
selecting a second inventory record from the secondary inventory, wherein the inventory level of the goods is greater than 0;
according to the quantity of the goods requested by the calling party, pre-occupying a second stock record of the currently selected goods based on a row lock and deducting the stock;
calculating the remaining inventory of the second inventory record in which the goods are currently selected;
and if the residual inventory is greater than or equal to 0, determining that the actually deducted inventory of the currently selected second inventory record of the goods is the quantity of the goods requested by the calling party, and marking the successful preemption.
3. The method of claim 2,
if the residual inventory is less than 0 and the absolute value of the residual inventory is less than the quantity of the goods requested by the calling party, updating the residual inventory of the second inventory record of the currently selected goods to 0, determining that the actual subtracted inventory of the second inventory record of the currently selected goods is the difference value between the quantity of the goods requested by the calling party and the absolute value of the residual inventory before updating, determining that the goods of which the quantity is also required to be provided by the secondary inventory and is the absolute value of the residual inventory before updating, returning to the second inventory record selection step, and selecting another second inventory record to continue execution.
4. The method of claim 1, wherein asynchronously decrementing inventory data for a first inventory record for the item in primary inventory based on an inventory reduction for the item in secondary inventory comprises:
and according to the stock reduction amount of the goods in the secondary stock, pre-occupying the first stock record of the goods in the primary stock based on the row lock and deducting the stock, and releasing the row lock of the pre-occupied first stock record after the deduction is successful.
5. The method of claim 1, further comprising:
monitoring the balance degree of the remaining inventory quantities of all second inventory records of the goods in the secondary inventory;
and if the monitored balance degree indicates that the residual inventory amount of each second inventory record of the goods is not balanced, locking all the second inventory records of the goods, equally distributing the residual inventory total amount of all the second inventory records of the goods in each second inventory record of the goods, and then releasing the locks of all the second inventory records of the goods.
6. A method of pre-empting inventory of goods, comprising:
splitting a first inventory record of a good in a primary inventory to form a plurality of second inventory records of the good in a secondary inventory;
according to the stock quantity which is indicated by the stock increasing task and needs to be increased, at least one second stock record of the goods in the secondary stock is preempted on the basis of the row lock, and the stock is increased;
persisting inventory data of each second inventory record of the goods in the secondary inventory, and then releasing row locks of the preempted second inventory records;
and synchronously increasing the inventory data of the first inventory record of the goods in the primary inventory according to the inventory quantity which is indicated by the inventory increasing task and needs to be increased.
7. The method of claim 6, wherein pre-empting and adding inventory based on row locks at least one second inventory record of the item in secondary inventory comprises, in accordance with an inventory level of the item indicated by the inventory increase task requiring an increase,:
and judging whether the stock required to be increased of the goods is smaller than the number of second stock records of the goods or not according to the stock required to be increased of the goods indicated by the stock increasing task, if so, locking all the second stock records of the goods, uniformly adding the stock required to be increased of the goods to each second stock record of the goods according to a preset balance strategy, and then releasing the row locks of all the second stock records.
8. The method of claim 7,
and if the inventory quantity of the goods is less than the preset value, locking one second inventory record of the goods, adding the inventory quantity of the goods needing to be increased to the second inventory record of the locked inventory, and then releasing the lock of the second inventory record.
9. The method of claim 7, wherein the adding the inventory quantity of the goods required to be added to the second inventory records of the goods in a balanced manner according to a preset balancing strategy comprises:
performing modular operation on the quantity of the second inventory records of the goods according to the stock quantity of the goods which needs to be increased;
if the modular operation result is equal to 0, averagely adding the stock quantity of the goods which needs to be added to each second stock record of the goods;
and if the modulus operation result is not equal to 0, increasing a first value by the stock of one second stock record of the goods, and increasing second values by the stocks of other second stock records of the goods respectively, wherein the second value is equal to the quotient of the stock quantity of the goods required to be increased divided by the quantity of the second stock records of the goods, and the first value is equal to the sum of the second value and the modulus operation result.
10. The method according to any one of claims 1-9, further comprising:
and recording the inventory operation flow by utilizing the inventory data of the first inventory record in the primary inventory.
11. A cargo inventory preemption device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the cargo inventory preemption method of any of claims 1-10 based on instructions stored in the memory.
12. A cargo inventory preemption device, comprising:
a splitting module configured to split a first inventory record of a good in a primary inventory into a plurality of second inventory records of the good in a secondary inventory;
the secondary pre-occupation and deduction module is configured to pre-occupy at least one second stock record of the goods in the secondary stock and deduct the stock based on the row lock according to the quantity of the goods requested by the calling party;
a persistence module configured to persist inventory data of each second inventory record of the goods in secondary inventory and then release a row lock of the preempted second inventory record;
an asynchronous deduction module configured to asynchronously deduct inventory data of a first inventory record of the item in primary inventory based on an inventory decrement amount of the item in secondary inventory.
13. A cargo inventory preemption device, comprising:
a splitting module configured to split a first inventory record of a good in a primary inventory into a plurality of second inventory records of the good in a secondary inventory;
the second-level pre-occupation and increase module is configured to pre-occupy and increase the stock based on the row lock according to the stock required to be increased of the goods indicated by the stock increase task, wherein the stock is at least one second stock record of the goods in the second-level stock;
a persistence module configured to persist inventory data of each second inventory record of the goods in secondary inventory and then release a row lock of the preempted second inventory record;
and the synchronous increasing module is configured to synchronously increase the stock data of the first stock record of the goods in the primary stock according to the stock quantity which is indicated by the stock increasing task and needs to be increased.
14. The apparatus of claim 12 or 13, further comprising:
a monitoring module configured to monitor a degree of balance of remaining inventory amounts of all second inventory records of the goods in a secondary inventory;
and the balancing module is configured to lock all the second inventory records of the goods, evenly distribute the total amount of the remaining inventory of all the second inventory records of the goods in all the second inventory records of the goods and then release the locks of all the second inventory records of the goods if the monitored balancing degree indicates that the remaining inventory amounts of all the second inventory records of the goods are not balanced.
15. A cargo inventory system, comprising:
primary inventory, secondary inventory and the stock preemption device of any of claims 11-14 used to manage primary inventory and secondary inventory wherein a first inventory record for a good in a primary inventory is split into a plurality of second inventory records for the good in a secondary inventory.
16. A non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the cargo inventory preemption method of any of claims 1-10.
CN202111254101.8A 2021-10-27 2021-10-27 Goods inventory pre-occupation method and device and goods inventory system Pending CN113935694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111254101.8A CN113935694A (en) 2021-10-27 2021-10-27 Goods inventory pre-occupation method and device and goods inventory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111254101.8A CN113935694A (en) 2021-10-27 2021-10-27 Goods inventory pre-occupation method and device and goods inventory system

Publications (1)

Publication Number Publication Date
CN113935694A true CN113935694A (en) 2022-01-14

Family

ID=79284668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111254101.8A Pending CN113935694A (en) 2021-10-27 2021-10-27 Goods inventory pre-occupation method and device and goods inventory system

Country Status (1)

Country Link
CN (1) CN113935694A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010047293A1 (en) * 1999-01-26 2001-11-29 Waller Matthew A. System, method and article of manufacture to optimize inventory and inventory investment utilization in a collaborative context
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN110310060A (en) * 2019-05-27 2019-10-08 阿里巴巴集团控股有限公司 Inventory management method and device based on fragment
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
CN111127250A (en) * 2019-12-17 2020-05-08 国网智能科技股份有限公司 Electric power data monitoring event analysis system and method
CN112069253A (en) * 2020-08-20 2020-12-11 上海钧正网络科技有限公司 Inventory item management method, system, terminal and storage medium suitable for multiple scenes
KR102254388B1 (en) * 2020-07-28 2021-05-21 남시범 Mobile communication terminal opening, sales and inventory management system
CN112860746A (en) * 2021-02-01 2021-05-28 上海悦易网络信息技术有限公司 Cache reduction-based method, equipment and system
CN112990836A (en) * 2021-05-12 2021-06-18 北京天健源达科技股份有限公司 Material cancellation warehouse-in processing method
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010047293A1 (en) * 1999-01-26 2001-11-29 Waller Matthew A. System, method and article of manufacture to optimize inventory and inventory investment utilization in a collaborative context
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN110310060A (en) * 2019-05-27 2019-10-08 阿里巴巴集团控股有限公司 Inventory management method and device based on fragment
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
CN111127250A (en) * 2019-12-17 2020-05-08 国网智能科技股份有限公司 Electric power data monitoring event analysis system and method
KR102254388B1 (en) * 2020-07-28 2021-05-21 남시범 Mobile communication terminal opening, sales and inventory management system
CN112069253A (en) * 2020-08-20 2020-12-11 上海钧正网络科技有限公司 Inventory item management method, system, terminal and storage medium suitable for multiple scenes
CN112860746A (en) * 2021-02-01 2021-05-28 上海悦易网络信息技术有限公司 Cache reduction-based method, equipment and system
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium
CN112990836A (en) * 2021-05-12 2021-06-18 北京天健源达科技股份有限公司 Material cancellation warehouse-in processing method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RAHIL SHETH 等: "A Proficient Process for Systematic Inventory Management", 《 2020 INTERNATIONAL CONFERENCE FOR EMERGING TECHNOLOGY (INCET)》, 3 August 2020 (2020-08-03), pages 1 - 5 *
陈炫岩: "ERP环境下基于预占的自适应库存控制模型研究", 《软件导刊》, vol. 12, no. 10, 20 October 2013 (2013-10-20), pages 41 - 43 *
韩伟: "基于决策支持的火电厂备品备件管理***", 《中国优秀硕士论文全文数据库 工程科技Ⅱ辑》, no. 03, 15 March 2006 (2006-03-15), pages 042 - 112 *

Similar Documents

Publication Publication Date Title
CN109144414B (en) Multi-level storage method and device for block chain data
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
JP6498767B2 (en) System for efficient processing of transaction requests related to database accounts
CN105988862B (en) Distributed transaction processing method and device
CN111475262B (en) Transaction request processing method, device, equipment and medium in blockchain
CN104731649A (en) Multi-task processing method and multi-task processing device
US7593947B2 (en) System, method and program for grouping data update requests for efficient processing
US20240208731A1 (en) Task assigning method, device, and warehousing system
KR20200062299A (en) Transaction selection device for selecting blockchain transactions
CN109840248B (en) Operation flow optimization method and device and storage medium
KR20150042874A (en) Sorting
CN114461365A (en) Process scheduling processing method, device, equipment and storage medium
CN113723893A (en) Method and device for processing orders
CN113935694A (en) Goods inventory pre-occupation method and device and goods inventory system
US20230376898A1 (en) Order processing method, apparatus, and device, warehousing system, and storage medium
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN111259045B (en) Data processing method, device, server and medium
CN110381150B (en) Data processing method and device on block chain, electronic equipment and storage medium
CN112434092A (en) Data processing method and device, electronic equipment and readable storage medium
CN103593606A (en) Contextual information managing method and system
CN107958414B (en) Method and system for eliminating long transactions of CICS (common integrated circuit chip) system
CN111737274B (en) Transaction data processing method, device and server
CN116090718A (en) BPMN-based flow processing method and device
CN113592396A (en) Method and device for delivering articles out of warehouse, electronic equipment and computer readable medium
CN112258300A (en) Auditing method and device for order generation

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