Inventory quantity determination method and device, equipment and storage medium
By obtaining and allocating inventory, combined with pre-occupancy requests, the available inventory of items in each channel is determined, which solves the problem of inaccurate inventory in multi-channel sales, avoids overselling, and improves user experience.
Patent Information
- Application Number
- CN202310347897.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2024-10-15
AI Technical Summary
In the existing technology, when selling through multiple channels, the available inventory of items in each channel is inaccurate, resulting in oversold items and reduced user experience.
By obtaining the current total inventory of the target item, allocate it based on the preset allocation method, and combined with the received pre-emption requests, determine the available inventory of each channel, ensuring that the pre-occupancy status of all channels is simultaneously considered to avoid overselling of items.
It achieves the accurate determination of the available inventory of items in each channel, avoids oversales, improves user experience, and ensures that users can normally purchase pre-occupied items.
Smart Images

Figure CN118780717A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to Internet technology, and in particular to an inventory determination method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of Internet technology, items in warehouses can be sold through online or offline channels.
[0003] At present, the sales model of goods has begun to shift from a single channel to multiple channels, that is, items in the warehouse can be sold through multiple channels at the same time.
[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] When selling items in each channel, there will be a pre-occupation situation, that is, the user makes a reservation for the item he wants to buy, but has not actually purchased it. In addition, the pre-occupations in each channel are isolated from each other, so that multiple channels will be pre-occupied together, resulting in inaccurate available inventory of items corresponding to each channel determined by the existing method, which in turn leads to oversold items, making it impossible for users to purchase the pre-occupied items normally, reducing the user experience. Summary of the invention
[0006] The embodiments of the present invention provide a method, apparatus, device and storage medium for determining inventory quantity, so as to accurately determine the available inventory quantity of items in the channel corresponding to each application end, thereby effectively avoiding the situation where items are oversold in each channel and improving the user experience.
[0007] In a first aspect, an embodiment of the present invention provides a method for determining inventory, including:
[0008] Obtaining the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals;
[0009] Based on a preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application end;
[0010] Determine the newly added total pre-occupancy amount corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received;
[0011] Based on the currently allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity, the current available inventory corresponding to the target item in each application terminal is determined.
[0012] In a second aspect, an embodiment of the present invention further provides an inventory determination device, comprising:
[0013] A current total inventory acquisition module is used to acquire the current total inventory corresponding to a target item, wherein the target item corresponds to at least two application terminals;
[0014] A current total inventory allocation module, used to allocate the current total inventory based on a preset allocation method, and determine the current allocated inventory corresponding to the target item in each application end;
[0015] A newly added total pre-occupancy amount determination module, configured to determine a newly added total pre-occupancy amount corresponding to the target item based on a current pre-occupancy request corresponding to the target item sent by each current application terminal currently received;
[0016] The current available inventory determination module is used to determine the current available inventory corresponding to the target item in each application end based on the current allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity.
[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0018] one or more processors;
[0019] A memory for storing one or more programs;
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the inventory quantity determination method provided by any embodiment of the present invention.
[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the inventory determination method provided in any embodiment of the present invention.
[0022] One embodiment of the above invention has the following advantages or beneficial effects:
[0023] By obtaining the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals, and each application terminal corresponds to a channel. Based on the preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application terminal; based on the current pre-occupancy request corresponding to the target item sent by each current application terminal, the newly added total pre-occupancy corresponding to the target item is determined, and based on the current allocated inventory, the current total pre-occupancy corresponding to the target item and the newly added total pre-occupancy, the current available inventory corresponding to the target item in each application terminal is determined, so that by synchronously considering the pre-occupancy of the channels corresponding to all application terminals, the available inventory of items in the channels corresponding to each application terminal can be accurately determined, so that sales can be based on the accurate available inventory of items, which can effectively avoid the situation of overselling of items in each channel, ensure that users can purchase pre-occupied items normally, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 is a flow chart of a method for determining inventory quantity provided by an embodiment of the present invention;
[0026] Figure 2 It is an example of the architecture of an inventory determination process involved in an embodiment of the present invention;
[0027] Figure 3 is a flow chart of another method for determining inventory quantity provided by an embodiment of the present invention;
[0028] Figure 4 is a flow chart of another method for determining inventory quantity provided by an embodiment of the present invention;
[0029] Figure 5 is a schematic structural diagram of an inventory determination device provided by an embodiment of the present invention;
[0030] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0032] Figure 1 This is a flow chart of a method for determining inventory quantity provided by an embodiment of the present invention. This embodiment can be applied to the situation where the available inventory quantity of items in each channel is determined when items are sold through multiple channels at the same time. The method can be executed by an inventory quantity determination device, which can be implemented by software and / or hardware and integrated into an electronic device, such as a server. Figure 1 As shown, the method specifically comprises the following steps:
[0033] S110. Obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals.
[0034] Among them, the target item can refer to any item for which the available inventory needs to be determined. The target item can be a physical item or a virtual item. For example, the warehouse stores items in the smallest stock keeping unit SKU (Stock Keeping Unit), that is, the items stored in the warehouse are all sub-category items. When selling items, they can be sold in different specifications. For example, mineral water can be sold in single bottles or in single boxes. That is to say, the items sold can be sub-category items or parent-category items. The target item can refer to the item with the smallest stock keeping unit stored in the warehouse, or it can refer to the item under a certain selling specification, so as to determine the available inventory under each selling specification.
[0035] Among them, the target item can be sold through at least two channels. Each channel can refer to an online channel or an offline channel. Online channels can be divided into private channels and public channels. Private channels can refer to channels where only some users can purchase items. Public channels can refer to channels where all users of the public can purchase items. Offline channels can refer to offline supermarkets, etc. Each channel corresponds to an application end. The application end can be used to send a pre-occupancy request generated in the corresponding channel. For example, for an online channel, the online shopping end can be used as the application end corresponding to the online channel, so as to directly use the online shopping end to send a pre-occupancy request. For offline channels, if the shopping cart used offline is a smart shopping cart, which can automatically identify the items placed by the user in the shopping cart and generate corresponding pre-emption requests based on the items placed, the smart shopping cart can be used as the application end corresponding to the offline channel, or the background server of the smart shopping cart can be used as the application end corresponding to the offline channel; or, if the shopping cart used offline is not a smart shopping cart, the offline background server can be used as the application end corresponding to the offline channel. At this time, the offline background server can predict the number of items currently added to the purchase based on historical shopping data, and generate corresponding pre-emption requests based on the item data and send them, thereby avoiding the inability to purchase items that have been added to the shopping cart offline, so as to adapt to the situation of deducting inventory when adding items to the shopping cart offline, and realize the integration of online and offline inventory management.
[0036] Specifically, Figure 2 An example of the architecture of the inventory determination process is given. Figure 2 , the inventory collaboration server can obtain the current total inventory corresponding to the target item from the warehouse management end. For example, if the target item is an item with a minimum inventory unit, the inventory of the target item in the warehouse can be directly used as the current total inventory. If the target item is an item under a certain selling specification, the current total inventory corresponding to the target item under this selling specification can be determined based on the inventory of the target item in the warehouse. For example, if the selling specification is a single bottle and the minimum inventory unit is a single bottle, the inventory of the target item in the warehouse can be directly used as the current total inventory under the single bottle specification. If the selling specification is a single box, the minimum inventory unit is a single bottle, and there are 6 bottles in a box, the integer part obtained by dividing the inventory of the target item in the warehouse by 6 can be used as the current total inventory under the single box specification.
[0037] If the items sold in each channel are different, at least two channels that sell the target item are determined based on the items sold in each channel, and an application terminal corresponding to each channel that sells the target item is obtained.
[0038] S120. Allocate the current total inventory based on a preset allocation method to determine the current allocated inventory corresponding to the target item in each application terminal.
[0039] The preset allocation method may be a method of allocating the total inventory that is pre-set based on business needs. For example, the preset allocation method may include but is not limited to a shared allocation method or a proportional allocation method. The currently allocated inventory may refer to the inventory currently allocated to the channel where the application is located.
[0040] Exemplarily, S120 may include: if the preset allocation method is a shared allocation method, determining that the current allocated inventory corresponding to the target item in each application terminal is the current total inventory.
[0041] Specifically, when using the shared allocation method, the channels corresponding to each application end share the entire current total inventory, thereby maximizing inventory utilization and improving the sales efficiency of the target items.
[0042] Exemplarily, S130 may include: if the preset allocation method is a proportional allocation method, the current total inventory is allocated based on the inventory allocation ratio corresponding to each application end, and the current allocated inventory corresponding to the target item in each application end is determined.
[0043] Specifically, when using the proportional allocation method, the inventory allocation ratio corresponding to each application end can be multiplied by the current total inventory, and the multiplication result can be used as the current allocated inventory corresponding to each application end, so as to more strictly avoid the situation of overselling of items.
[0044] S130: Determine a total newly reserved amount corresponding to the target item based on the currently received current reservation request corresponding to the target item sent by each current application terminal.
[0045] The current pre-order request may refer to a request generated at the current time for occupying an item that is to be purchased. The current application end may refer to an application end that sends a pre-order request at the current time. The number of current application ends may be one or more. The newly added total pre-order amount may refer to the total number of target items pre-ordered by all channels at the current time.
[0046] Specifically, Figure 2As shown, when one or more current channels corresponding to the target item generate a current pre-occupancy request, the corresponding current application end can send the current pre-occupancy request to the inventory collaborative server. For example, for online channels, after the user submits an order or makes a payment, a current pre-occupancy request can be generated based on the target item information in the order, and the current pre-occupancy request can be sent to the inventory collaborative server through the application end corresponding to the online channel. For offline channels, after the user puts the target item into the smart shopping cart, a current pre-occupancy request can be generated based on the information of the target item placed therein, and sent to the inventory collaborative server through the application end corresponding to the offline channel; or, the offline background server can be used to predict the number of target items currently added to the purchase based on historical shopping data, and a current pre-occupancy request can be generated based on the target item data and sent.
[0047] The inventory collaboration server can synchronously consider the current pre-occupancy request sent by each current application end, so as to accurately determine the newly added total pre-occupancy quantity corresponding to the target item. For example, the current pre-occupancy request sent by each current application end can be parsed to obtain the current pre-occupancy quantity of the target item pre-occupied by each current application end, and the current pre-occupancy quantities corresponding to all current application ends are added together, and the added result is used as the newly added total pre-occupancy quantity corresponding to the target item at the current time.
[0048] Exemplarily, if there are at least two current application ends, and the current application ends include an external application end and an internal application end, then based on the current pre-occupancy request sent by each internal application end, the total newly-added pre-occupancy amount corresponding to the target item is determined.
[0049] The external application end may refer to the application end corresponding to the public domain channel. The internal application end may refer to the application end corresponding to the private domain channel. The external application end may correspond to one or more internal application ends.
[0050] Specifically, when purchasing items through a private channel, the private channel will send the generated order information to the corresponding public channel, so that the private channel and the public channel may send the same pre-occupancy request at the same time. In response to this, when the current pre-occupancy request sent by the external application end and the internal application end is received at the same time, it is necessary to ignore the current pre-occupancy request sent by the external application end, and determine the total new pre-occupancy corresponding to the target item based only on the current pre-occupancy request sent by each internal application end. For example, only the current pre-occupancy quantities corresponding to all internal application ends are added, and the obtained addition result is used as the total new pre-occupancy corresponding to the target item at the current time, thereby avoiding repeated calculation of the pre-occupancy and thus avoiding the situation where the item is sold less.
[0051] Exemplarily, after receiving the current pre-occupancy request sent by each current application end, it can be detected whether the current pre-occupancy quantity in each current pre-occupancy request exceeds the previous available inventory in the corresponding application end based on the previous available inventory determined by each current application end at the previous time. If it exceeds, it indicates that the pre-occupancy demand cannot be met. At this time, the pre-occupancy failure information can be returned to the corresponding application end. If it does not exceed, the pre-occupancy success information can be returned to the corresponding application end, and the new total pre-occupancy quantity corresponding to the target item at the current time is determined based on all the current pre-occupancy quantities that have been successfully pre-occupied, so as to further avoid the situation of overselling of items and ensure that users can purchase the pre-occupied items normally.
[0052] S140. Determine the current available inventory corresponding to the target item in each application terminal based on the current allocated inventory, the current total reserved quantity corresponding to the target item, and the newly added total reserved quantity.
[0053] The current total pre-occupancy quantity may refer to the total quantity of target items pre-occupied by all channels before the current time, that is, the total quantity of target items pre-occupied currently. The current available inventory quantity may refer to the inventory quantity currently available for sale in the channel where the application is located.
[0054] Specifically, based on the current total reserve quantity and the newly added total reserve quantity corresponding to the target item, the reserve situation of the target item in all channels can be considered simultaneously, so that when each channel calculates the current available inventory, in addition to considering the reserve situation of its own channel, it can also consider the reserve situation of other channels, thereby improving the accuracy of determining the current available inventory.
[0055] Exemplarily, S140 may include: based on the newly added total reserve quantity corresponding to the target item, updating the current total reserve quantity corresponding to the target item to obtain the updated current total reserve quantity; subtracting the current allocated inventory corresponding to each application end from the updated current total reserve quantity to obtain the current available inventory corresponding to the target item in each application end.
[0056] Specifically, the current total reservation amount and the newly added total reservation amount corresponding to the target item can be added together to obtain the target total reservation amount corresponding to the target item, and the current total reservation amount corresponding to the target item can be updated to the target total reservation amount, that is, the updated current total reservation amount is the target total reservation amount. By subtracting the current allocated inventory amount corresponding to each channel from the target total reservation amount reserved by all channels, the current available inventory amount corresponding to each channel where the application end is located can be accurately obtained, and then each channel sells based on the accurate current available inventory amount, which can effectively avoid the situation where items are oversold in each channel, ensuring that users can purchase reserved items normally, and improving the user experience.
[0057] Exemplarily, if the current reservation request sent by all application terminals is not received, it means that no reservation has occurred in all channels at the current time, that is, the new total reservation amount is 0. At this time, the current allocated inventory corresponding to each application terminal can be directly subtracted from the current total reservation amount corresponding to the target item to obtain the current available inventory corresponding to the target item in each application terminal.
[0058] It should be noted that when a user successfully purchases a target item, such as when the item is successfully shipped online or when the item is successfully picked up and paid offline, the application can send a target item acquisition success request, and based on the received target item acquisition success request, the current total inventory and current total pre-occupancy corresponding to the target item are deducted from the target item acquisition quantity, so as to achieve real-time update of the current total inventory and current total pre-occupancy to ensure the accuracy of the available inventory determined each time. Alternatively, when a user cancels an item pre-occupancy, such as canceling an online order or taking out an item that has been added to a shopping cart offline, the application can send a target item pre-occupancy cancellation request, and based on the received target item pre-occupancy cancellation request, the current total inventory and current total pre-occupancy corresponding to the target item are deducted from the target item cancellation quantity, so as to achieve real-time update of the current total pre-occupancy to ensure the accuracy of the available inventory determined each time.
[0059] The technical solution of this embodiment is to obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals, and each application terminal corresponds to a channel. Based on the preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application terminal; based on the current pre-occupancy request corresponding to the target item sent by each current application terminal, the newly added total pre-occupancy corresponding to the target item is determined, and based on the current allocated inventory, the current total pre-occupancy corresponding to the target item and the newly added total pre-occupancy, the current available inventory corresponding to the target item in each application terminal is determined, so that by synchronously considering the pre-occupancy of the channels corresponding to all application terminals, the available inventory of items in the channels corresponding to each application terminal can be accurately determined, so that sales can be based on the accurate available inventory of items, which can effectively avoid the situation of overselling of items in each channel, ensure that users can purchase pre-occupied items normally, and improve user experience.
[0060] Figure 3 A flowchart of another method for determining inventory quantity provided by an embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the step of "determining the newly added total reserved quantity corresponding to the target item based on the current reserved request corresponding to the target item sent by each current application terminal currently received". The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0061] See also Figure 3Another method for determining inventory quantity provided in this embodiment specifically includes the following steps:
[0062] S310. Obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals.
[0063] S320. Based on a preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application terminal.
[0064] S330, parsing the current pre-occupancy request corresponding to each target item currently sent by the current application terminal, and obtaining the current measurement unit corresponding to the current pre-occupancy quantity in each current pre-occupancy request.
[0065] Among them, the current reserved quantity may refer to the number of target items that the application terminal applies for reservation at this time. The current measurement unit may refer to the quantity representation unit of the current reserved quantity. For example, when the target item is a piece item, the current measurement unit may be individual, piece or box, etc. When the target item is a pure weighing item, the current measurement unit may be grams or kilograms, etc. When the target item is a weighing piece item, it needs to be sold by both the number of pieces and the weight, such as king crabs and watermelons. The current measurement unit may be grams or kilograms for each piece, etc.
[0066] Exemplarily, based on the last available inventory determined by each current application end at the last time, it can be detected whether the current reserved quantity in each current reservation request exceeds the last available inventory in the corresponding application end. If it exceeds, it indicates that the reservation demand cannot be met. At this time, the reservation failure information can be returned to the corresponding application end. If it does not exceed, the pre-occupation success information can be returned to the corresponding application end, and then the new total reservation quantity corresponding to the target item at the current time is determined only based on all the current reservation quantities that have been successfully pre-occupied, so as to further avoid the situation of overselling of items and ensure that users can purchase the pre-occupied items normally.
[0067] S340. Based on the standard measurement unit corresponding to the target item, convert the current measurement unit corresponding to the current reserved quantity to determine the target reserved quantity of each current application end under the standard measurement unit.
[0068] The standard measurement unit may refer to a standard unit used to characterize the quantity of the target item. For example, if the target item refers to an item with a minimum inventory unit stored in a warehouse, the minimum inventory unit may be used as the standard measurement unit. If the target item refers to an item under a certain sales specification, the unit of the sales specification may be used as the standard measurement unit.
[0069] Specifically, based on the conversion relationship between the standard measurement unit and the current measurement unit, the current reserved quantity corresponding to each current application end can be converted to obtain the target reserved quantity represented by the standard measurement unit. Since the measurement units used by different channels may be inconsistent, the measurement units can be unified through measurement unit conversion, thereby ensuring the accuracy of the reserved quantity statistics and further improving the accuracy of the available inventory determination.
[0070] S350: Based on the target reserved amount corresponding to each current application end, determine the total newly reserved amount corresponding to the target item.
[0071] Specifically, all target pre-occupancy amounts corresponding to all current application terminals may be added together, and the obtained addition result may be used as the total newly added pre-occupancy amount corresponding to the target item.
[0072] Exemplarily, S350 may include: if there are at least two current application ends, and the current application ends include an external application end and an internal application end, then based on the target pre-occupancy corresponding to each internal application end, determine the total additional pre-occupancy corresponding to the target item.
[0073] The external application end may refer to the application end corresponding to the public domain channel. The internal application end may refer to the application end corresponding to the private domain channel. The external application end may correspond to one or more internal application ends.
[0074] Specifically, when purchasing items through a private channel, the private channel will send the generated order information to the corresponding public channel, so that the private channel and the public channel may send the same pre-order request at the same time. In response to this, when the current pre-order request sent by the external application end and the internal application end is received at the same time, it is necessary to ignore the current pre-order request sent by the external application end, and determine the total new pre-order amount corresponding to the target item based only on the current pre-order request sent by each internal application end. For example, only the target pre-order amounts corresponding to all internal application ends are added, and the obtained addition result is used as the total new pre-order amount corresponding to the target item at the current time, thereby avoiding repeated calculation of the pre-order, and thus avoiding the situation where the item is sold less.
[0075] S360. Determine the current available inventory corresponding to the target item in each application terminal based on the current allocated inventory, the current total reserved quantity corresponding to the target item, and the newly added total reserved quantity.
[0076] Specifically, based on the newly added total reservation corresponding to the target item, the current total reservation corresponding to the target item is updated to obtain the updated current total reservation, and the current allocated inventory corresponding to each application end is subtracted from the updated current total reservation to obtain the current available inventory corresponding to the target item in each application end. The current available inventory obtained at this time is the quantity under the standard measurement unit. In view of this, the current available inventory can be converted based on the conversion relationship between the current measurement unit used by the target item in each application end and the standard measurement unit to obtain the current available inventory under the current measurement unit, and the current available inventory under the current measurement unit is returned to the corresponding application end, so that the channel corresponding to each application end can directly obtain the current available inventory under the current measurement unit used for sales management, thereby further avoiding the situation of overselling or underselling of items.
[0077] The technical solution of this embodiment converts the current measurement unit corresponding to the current reserve quantity based on the standard measurement unit corresponding to the target item, and determines the target reserve quantity of each current application end under the standard measurement unit, so as to unify the measurement unit, thereby ensuring the accuracy of the reserve quantity statistics and further improving the accuracy of the determination of the available inventory.
[0078] Figure 4 A flowchart of another method for determining inventory quantity provided by an embodiment of the present invention. Based on the above embodiments, after determining the newly added total reserved quantity corresponding to the target item, this embodiment also updates the current total reserved quantity of the associated items corresponding to the target item, thereby ensuring the accuracy of the determination of the available inventory quantity of the associated items. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0079] See also Figure 4 Another method for determining inventory quantity provided in this embodiment specifically includes the following steps:
[0080] S410. Obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals.
[0081] S420: Allocate the current total inventory based on a preset allocation method to determine the current allocated inventory corresponding to the target item in each application terminal.
[0082] S430: Determine the newly added total pre-occupancy amount corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal that is currently received.
[0083] S410. Determine the current available inventory corresponding to the target item in each application terminal based on the current allocated inventory, the current total reserved quantity corresponding to the target item, and the newly added total reserved quantity.
[0084] S450: Acquire related items corresponding to the target item, wherein the related items are parent-category items or child-category items.
[0085] The available inventory of the associated items is limited by the available inventory of the target item. A parent item may refer to an item that contains the target item. A child item may refer to a child item in the target item. For example, if the target item is a box of mineral water, the target item is a parent item, and the corresponding associated item is a child item, such as a bottle of mineral water. If the target item is a bottle of mineral water, the target item is a child item, and the corresponding associated item is a parent item, such as a box of mineral water. A child item can be associated with multiple parent items.
[0086] Specifically, it is possible to detect whether the target item has any associated items. If the target item is a single type of item that cannot be separated or combined, it is determined that the target item has no associated items. Otherwise, it is determined that the target item has associated items, and all associated items corresponding to the target item are obtained. If there are at least two associated items, the current total reserved quantity corresponding to each associated item is updated by executing steps S460 and S470 for each associated item.
[0087] S460: Determine the total additional reserved quantity corresponding to the associated items based on the quantity ratio between the parent category items and the child category items and the total additional reserved quantity corresponding to the target item.
[0088] Specifically, when pre-occupying the target item, the associated items will also be pre-occupied at the same time. For example, if the user pre-occupies 1 single box of mineral water, and the single box contains 6 bottles of mineral water, it is equivalent to the user also pre-occupying 6 single bottles of mineral water. Based on the quantity ratio between the parent category items and the child category items, the newly added total pre-occupied quantity corresponding to the target item can be converted into the newly added total pre-occupied quantity corresponding to the associated items.
[0089] Exemplarily, S460 may include: if the target item is a parent item and the associated item is a child item, multiplying the total additional reserve corresponding to the target item by the quantity ratio between the parent item and the child item to obtain the total additional reserve corresponding to the associated item.
[0090] Specifically, when the target item is a parent category item, such as a single box of mineral water, and the corresponding associated item is a subcategory item, such as a single bottle of mineral water, the number of single bottles of mineral water contained in the single box of mineral water can be used as the quantity ratio between the parent category items and the subcategory items. For example, if the quantity ratio is 6, the total additional reserve quantity corresponding to the single box of mineral water can be multiplied by the quantity ratio, and the multiplication result can be used as the total additional reserve quantity corresponding to the single bottle of mineral water.
[0091] Exemplarily, S460 may further include: if the target item is a sub-category item and the associated item is a parent-category item, dividing the newly added total reserved quantity corresponding to the target item by the quantity ratio between the parent-category items and the sub-category items to obtain the newly added total reserved quantity corresponding to the associated item.
[0092] Specifically, when the target item is a sub-category item, such as a single bottle of mineral water, and the corresponding related item is a parent-category item, such as a single box of mineral water, the total new reserve corresponding to the single bottle of mineral water can be divided by the quantity ratio, and the division result can be used as the total new reserve corresponding to the single box of mineral water.
[0093] S470: Based on the newly added total reserved quantity corresponding to the associated items, update the current total reserved quantity corresponding to the associated items.
[0094] Specifically, the current total reserved quantity corresponding to the associated items can be synchronously updated based on the newly added total reserved quantity corresponding to the associated items, so that the available inventory of the associated items in each application end can be determined based on the updated current total reserved quantity, thereby further ensuring the accuracy of the determination of the available inventory of the associated items.
[0095] Exemplarily, S470 may include: adding the current total reserved quantity corresponding to the associated items and the newly added total reserved quantity corresponding to the associated items to obtain the target total reserved quantity corresponding to the associated items; and updating the current total reserved quantity corresponding to the associated items to the target total reserved quantity.
[0096] Specifically, the updated current total reserve quantity of the associated items is the target total reserve quantity, so that the current available inventory quantity corresponding to the associated items can be subsequently determined based on the target total reserve quantity, further ensuring that each item will not be oversold.
[0097] The technical solution of this embodiment determines the total newly reserved quantity corresponding to the associated items based on the quantity ratio between the parent category items and the child category items and the total newly reserved quantity corresponding to the target item, and synchronously updates the current total reserved quantity corresponding to the associated items based on the total newly reserved quantity corresponding to the associated items, thereby further ensuring the accuracy of the determination of the available inventory quantity of the associated items.
[0098] The following is an embodiment of an inventory determination device provided in an embodiment of the present invention. The device and the inventory determination methods of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the inventory determination device, please refer to the embodiment of the above-mentioned inventory determination method.
[0099] Figure 5 This is a schematic diagram of the structure of an inventory determination device provided by an embodiment of the present invention. This embodiment can be applied to the situation where the available inventory of items in each channel is determined when items are sold through multiple channels at the same time. Figure 5 As shown, the device specifically includes: a current total inventory acquisition module 510, a current total inventory allocation module 520, a new total reserved quantity determination module 530 and a current available inventory determination module 540.
[0100] Among them, the current total inventory acquisition module 510 is used to obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals; the current total inventory allocation module 520 is used to allocate the current total inventory based on a preset allocation method, and determine the current allocated inventory corresponding to the target item in each application terminal; the newly added total pre-occupancy determination module 530 is used to determine the newly added total pre-occupancy corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received; the current available inventory determination module 540 is used to determine the current available inventory corresponding to the target item in each application terminal based on the currently allocated inventory, the current total pre-occupancy corresponding to the target item and the newly added total pre-occupancy.
[0101] The technical solution of this embodiment is to obtain the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals, and each application terminal corresponds to a channel. Based on the preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application terminal; based on the current pre-occupancy request corresponding to the target item sent by each current application terminal, the newly added total pre-occupancy corresponding to the target item is determined, and based on the current allocated inventory, the current total pre-occupancy corresponding to the target item and the newly added total pre-occupancy, the current available inventory corresponding to the target item in each application terminal is determined, so that by synchronously considering the pre-occupancy of the channels corresponding to all application terminals, the available inventory of items in the channels corresponding to each application terminal can be accurately determined, so that sales can be based on the accurate available inventory of items, which can effectively avoid the situation of overselling of items in each channel, ensure that users can purchase pre-occupied items normally, and improve user experience.
[0102] Optionally, the current total inventory allocation module 520 is specifically configured to:
[0103] If the preset allocation mode is a shared allocation mode, determining the current allocated inventory corresponding to the target item in each application end as the current total inventory;
[0104] If the preset allocation method is a proportional allocation method, the current total inventory is allocated based on the inventory allocation ratio corresponding to each application end, and the current allocated inventory corresponding to the target item in each application end is determined.
[0105] Optionally, a new total reserved amount determination module 530 is added, including:
[0106] A current measurement unit acquisition unit is used to parse the current reservation request corresponding to the target item sent by each current application terminal and obtain the current measurement unit corresponding to the current reservation amount in each current reservation request;
[0107] A measurement unit conversion unit, configured to convert the current measurement unit corresponding to the current reserved amount based on the standard measurement unit corresponding to the target item, and determine the target reserved amount of each current application terminal under the standard measurement unit;
[0108] The newly added total reserved quantity determining unit is used to determine the newly added total reserved quantity corresponding to the target item based on the target reserved quantity corresponding to each current application end.
[0109] Optionally, a total reserved amount determination unit is added, which is specifically used to:
[0110] If there are at least two current application ends, and the current application ends include an external application end and an internal application end, then the newly added total pre-occupancy amount corresponding to the target item is determined based on the target pre-occupancy amount corresponding to each internal application end.
[0111] Optionally, the current available inventory determination module 540 is specifically configured to:
[0112] Based on the newly added total reserve quantity corresponding to the target item, the current total reserve quantity corresponding to the target item is updated to obtain the updated current total reserve quantity; the current allocated inventory corresponding to each application end is subtracted from the updated current total reserve quantity to obtain the current available inventory corresponding to the target item in each application end.
[0113] Optionally, the device further comprises:
[0114] A related item acquisition module, configured to acquire related items corresponding to the target item after determining the newly added total reserved amount corresponding to the target item, wherein the related items are parent-category items or child-category items;
[0115] A pre-occupied quantity determination module, configured to determine the newly added total pre-occupied quantity corresponding to the associated items based on the quantity ratio between the parent-category items and the child-category items and the newly added total pre-occupied quantity corresponding to the target item;
[0116] The reserved quantity updating module is used to update the current total reserved quantity corresponding to the associated items based on the newly added total reserved quantity corresponding to the associated items.
[0117] Optionally, the pre-occupancy amount determination module is specifically configured to:
[0118] If the target item is a parent item and the associated item is a child item, then the total newly added pre-occupancy amount corresponding to the target item and the quantity ratio between the parent item and the child item are multiplied to obtain the total newly added pre-occupancy amount corresponding to the associated item;
[0119] If the target item is a sub-category item and the associated item is a parent-category item, the newly added total reserved quantity corresponding to the target item is divided by the quantity ratio between the parent-category items and the sub-category items to obtain the newly added total reserved quantity corresponding to the associated items.
[0120] Optionally, the pre-occupancy update module is specifically used to:
[0121] The current total reserved amount corresponding to the associated items and the newly added total reserved amount corresponding to the associated items are added to obtain the target total reserved amount corresponding to the associated items; and the current total reserved amount corresponding to the associated items is updated to the target total reserved amount.
[0122] The inventory quantity determination device provided in the embodiment of the present invention can execute the inventory quantity determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the inventory quantity determination method.
[0123] It is worth noting that in the embodiment of the above-mentioned inventory determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0124] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0125] like Figure 6As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0126] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0127] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0128] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0129] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0130] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0131] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the steps of an inventory determination method provided in the embodiment of the present invention, the method comprising:
[0132] Obtaining the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals;
[0133] Based on a preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application end;
[0134] Determine the newly added total pre-occupancy amount corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received;
[0135] Based on the currently allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity, the current available inventory corresponding to the target item in each application terminal is determined.
[0136] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the inventory determination method provided by any embodiment of the present invention.
[0137] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the method for determining the inventory quantity provided in any embodiment of the present invention are implemented. The method includes:
[0138] Obtaining the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals;
[0139] Based on a preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application end;
[0140] Determine the newly added total pre-occupancy amount corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received;
[0141] Based on the currently allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity, the current available inventory corresponding to the target item in each application terminal is determined.
[0142] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0143] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0144] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0145] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0146] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0147] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining inventory, characterized in that: include: Obtaining the current total inventory corresponding to the target item, wherein the target item corresponds to at least two application terminals; Based on a preset allocation method, the current total inventory is allocated to determine the current allocated inventory corresponding to the target item in each application end; Determine the newly added total pre-occupancy amount corresponding to the target item based on the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received; Based on the currently allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity, the current available inventory corresponding to the target item in each application terminal is determined.
2. The method according to claim 1, characterized in that The allocating the current total inventory based on a preset allocation method to determine the current allocated inventory corresponding to the target item in each application terminal includes: If the preset allocation mode is a shared allocation mode, determining the current allocated inventory corresponding to the target item in each application end as the current total inventory; If the preset allocation method is a proportional allocation method, the current total inventory is allocated based on the inventory allocation ratio corresponding to each application end, and the current allocated inventory corresponding to the target item in each application end is determined.
3. The method according to claim 1, characterized in that The determining, based on the currently received current pre-occupancy request corresponding to the target item sent by each current application terminal, the newly added total pre-occupancy amount corresponding to the target item includes: Parsing the current pre-occupancy request corresponding to the target item sent by each current application terminal currently received, and obtaining the current measurement unit corresponding to the current pre-occupancy amount in each current pre-occupancy request; Based on the standard measurement unit corresponding to the target item, convert the current measurement unit corresponding to the current reserved amount to determine the target reserved amount of each current application terminal under the standard measurement unit; Based on the target reserved amount corresponding to each current application end, the newly added total reserved amount corresponding to the target item is determined.
4. The method according to claim 3, characterized in that The determining, based on the target reserved amount corresponding to each current application end, the newly added total reserved amount corresponding to the target item includes: If there are at least two current application ends, and the current application ends include an external application end and an internal application end, then the newly added total pre-occupancy amount corresponding to the target item is determined based on the target pre-occupancy amount corresponding to each internal application end.
5. The method according to claim 1, characterized in that The determining, based on the current allocated inventory, the current total reserved quantity corresponding to the target item, and the newly added total reserved quantity, the current available inventory corresponding to the target item in each application terminal includes: Based on the newly added total reserved quantity corresponding to the target item, the current total reserved quantity corresponding to the target item is updated to obtain an updated current total reserved quantity; The current allocated inventory corresponding to each application end is subtracted from the updated current total reserved amount to obtain the current available inventory corresponding to the target item in each application end.
6. The method according to any one of claims 1 to 5, characterized in that: After determining the total newly reserved quantity corresponding to the target item, the method further includes: Obtaining associated items corresponding to the target item, wherein the associated items are parent-category items or child-category items; Determine the total additional reserved quantity corresponding to the associated items based on the quantity ratio between the parent category items and the child category items and the total additional reserved quantity corresponding to the target item; Based on the newly added total reserved quantity corresponding to the associated items, the current total reserved quantity corresponding to the associated items is updated.
7. The method according to claim 6, characterized in that The determining the total newly reserved quantity corresponding to the associated items based on the quantity ratio between the parent-category items and the child-category items and the total newly reserved quantity corresponding to the target item includes: If the target item is a parent item and the associated item is a child item, then the total newly added pre-occupancy amount corresponding to the target item and the quantity ratio between the parent item and the child item are multiplied to obtain the total newly added pre-occupancy amount corresponding to the associated item; If the target item is a sub-category item and the associated item is a parent-category item, the newly added total reserved quantity corresponding to the target item is divided by the quantity ratio between the parent-category items and the sub-category items to obtain the newly added total reserved quantity corresponding to the associated items.
8. The method according to claim 6, characterized in that The updating of the current total reserved quantity corresponding to the associated items based on the newly added total reserved quantity corresponding to the associated items includes: Adding the current total reserved amount corresponding to the associated items and the newly added total reserved amount corresponding to the associated items to obtain the target total reserved amount corresponding to the associated items; The current total reserved quantity corresponding to the associated items is updated to the target total reserved quantity.
9. A device for determining inventory quantity, characterized in that: include: A current total inventory acquisition module is used to acquire the current total inventory corresponding to a target item, wherein the target item corresponds to at least two application terminals; A current total inventory allocation module, used to allocate the current total inventory based on a preset allocation method, and determine the current allocated inventory corresponding to the target item in each application end; A newly added total pre-occupancy amount determination module, configured to determine a newly added total pre-occupancy amount corresponding to the target item based on a current pre-occupancy request corresponding to the target item sent by each current application terminal currently received; The current available inventory determination module is used to determine the current available inventory corresponding to the target item in each application end based on the current allocated inventory, the current total reserved quantity corresponding to the target item and the newly added total reserved quantity.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the inventory determination method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the inventory quantity determination method as described in any one of claims 1 to 8 is implemented.
