CN113159680A - Inventory pre-occupation method, device, electronic equipment and computer readable medium - Google Patents

Inventory pre-occupation method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113159680A
CN113159680A CN202110420819.3A CN202110420819A CN113159680A CN 113159680 A CN113159680 A CN 113159680A CN 202110420819 A CN202110420819 A CN 202110420819A CN 113159680 A CN113159680 A CN 113159680A
Authority
CN
China
Prior art keywords
inventory
information
preemption
occupation
stock
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.)
Granted
Application number
CN202110420819.3A
Other languages
Chinese (zh)
Other versions
CN113159680B (en
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 CN202110420819.3A priority Critical patent/CN113159680B/en
Publication of CN113159680A publication Critical patent/CN113159680A/en
Application granted granted Critical
Publication of CN113159680B publication Critical patent/CN113159680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06313Resource planning in a project environment

Landscapes

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

Abstract

The embodiment of the disclosure discloses an inventory pre-occupation method, an inventory pre-occupation device, an electronic device and a computer-readable medium. One embodiment of the method comprises: for each item information in the item information set corresponding to the target order, in response to the existence of the inventory preemption information corresponding to the item information in the memory database, performing preemption processing on the inventory preemption information; in response to the fact that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information is determined to be successful, adding an inventory pre-occupation task to a target inventory pre-occupation task queue; in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information corresponding to each item information; and in response to the fact that the updating processing of the inventory information is successful, carrying out deduction processing on the accumulated occupied amount corresponding to the inventory information which is successfully updated. The implementation mode improves the stock pre-occupation performance and reduces the overtime times of the stock pre-occupation.

Description

Inventory pre-occupation method, device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to an inventory preemption method, apparatus, electronic device, and computer-readable medium.
Background
The stock pre-occupation is to pre-occupy the stock of the articles in the database according to the order placing quantity of each article in the order. At present, when stock pre-occupation is carried out, the method generally adopted is as follows: and directly deducting the inventory of the articles in the database according to the order quantity of the articles.
However, when the stock preemption is performed in the above manner, there are often the following technical problems: when the number of orders is large, the stock preemption performance is degraded, resulting in a large number of times of stock preemption timeout.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose inventory preemption methods, apparatus, electronic devices, and computer readable media to address one of the technical problems noted in the background section above.
In a first aspect, some embodiments of the present disclosure provide an inventory preemption method, the method comprising: for each item information in an item information set corresponding to a target order, in response to determining that stock pre-occupation information corresponding to the item information exists in a memory database, pre-occupation processing is performed on the pre-occupation amount and the accumulated pre-occupation amount included in the stock pre-occupation information; in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into a first database, and adding the inventory pre-occupation task to a target inventory pre-occupation task queue, wherein the first database stores the inventory pre-occupation tasks corresponding to each order, and the target inventory pre-occupation task queue includes the inventory pre-occupation tasks corresponding to each order; in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating inventory information in a second database corresponding to each item information in the item information set; and in response to the determination that the update processing of the inventory information in the second database is successful, according to the quantity of the items included in the item information corresponding to the inventory information which is successfully updated, performing deduction processing on the accumulated pre-occupied quantity included in the inventory pre-occupied information in the memory database corresponding to the inventory information which is successfully updated.
Optionally, the method further comprises: in response to determining that the inventory preemption information corresponding to the article information does not exist in the memory database, acquiring inventory information corresponding to the article information from the second database as target inventory information; creating inventory preemption information corresponding to the item information in the in-memory database based on a preemptable amount included in the target inventory information.
Optionally, the method further comprises: and in response to receiving the delivery information of the target order, performing deduction processing on each actual stock quantity included in each stock information in the second database corresponding to each article information in the article information set.
Optionally, the method further comprises: in response to that a first and a second pre-emptible amount satisfy a first predetermined difference condition, or that each first pre-emptible amount in the memory database and each second pre-emptible amount in the second database satisfy a second predetermined difference condition, determining stock preemption information corresponding to the first pre-emptible amount as expired stock preemption information, wherein the first pre-emptible amount is a pre-emptible amount included in the stock preemption information in the memory database, the second pre-emptible amount is a pre-emptible amount included in the stock information corresponding to the stock preemption information in the second database, and the expired stock preemption information is not available for preemption.
Optionally, the method further comprises: and in response to that the first database has the inventory pre-occupation task with the task state of non-execution in the target preset period, adding the inventory pre-occupation task with the task state of non-execution in the first database to the target inventory pre-occupation task queue.
Optionally, the method further comprises: and performing rollback processing on each stock preemption information which is successful in the prior preemption processing in response to determining that the stock preemption information preemption processing corresponding to the article information in the article information set fails.
Optionally, the method further comprises: and in response to the fact that the rollback processing of each stock preemption information successfully processed in the prior preemption is determined to be successful, sending preset prompt information to the terminal equipment corresponding to the target order, wherein the preset prompt information represents that the stock is insufficient.
Optionally, the method further comprises: responding to the fact that the rollback processing of each stock pre-occupation information which is successful in the prior pre-occupation processing is successful, and generating a regulating quantity based on the pre-occupation quantity included in the stock pre-occupation information which is failed in the pre-occupation processing and the quantity included in the item information corresponding to the stock pre-occupation information which is failed in the pre-occupation processing; the adjustment amount is sent to an associated display device.
Optionally, the method further comprises: and controlling the associated scheduling equipment to execute the item scheduling operation according to the scheduling amount.
In a second aspect, some embodiments of the present disclosure provide an inventory preemption device, the device comprising: the pre-occupation unit is configured to pre-occupation process the pre-occupation amount and the accumulated pre-occupation amount included by the inventory pre-occupation information in response to determining that the inventory pre-occupation information corresponding to the item information exists in the memory database for each item information in the item information set corresponding to the target order; an inserting unit configured to insert an inventory preemption task corresponding to the target order in a first database in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory preemption information corresponding to each item information in the item information set is successful, and add the inventory preemption task to a target inventory preemption task queue, wherein the first database stores the inventory preemption task corresponding to each order, and the target inventory preemption task queue includes the inventory preemption task corresponding to each order; an updating unit configured to update the inventory information in the second database corresponding to each item information in the item information set in response to a task state of an inventory preemption task corresponding to the target order in the target inventory preemption task queue being an execution state; and the deduction unit is configured to perform deduction processing on the accumulated occupation amount included in the inventory occupation information in the memory database corresponding to the inventory information which is successfully updated according to the quantity of the articles included in the article information corresponding to the inventory information which is successfully updated in response to the determination that the update processing on the inventory information in the second database is successful.
Optionally, the apparatus further comprises: an acquisition unit and a creation unit. Wherein the acquisition unit is configured to acquire, as the target inventory information, inventory information corresponding to the item information from the second database in response to determining that there is no inventory preemption information corresponding to the item information in the in-memory database. The creating unit is configured to create inventory preemption information corresponding to the item information in the in-memory database based on a preemptible amount included in the target inventory information.
Optionally, the apparatus further comprises: and an actual stock quantity deduction unit configured to perform deduction processing on each actual stock quantity included in each stock information in the second database corresponding to each item information in the item information set in response to receiving the shipment information of the target order.
Optionally, the apparatus further comprises: a determining unit configured to determine stock preemption information corresponding to a first preemptible amount as expired stock preemption information in response to the first and second preemptible amounts satisfying a first predetermined difference condition or each of the first preemptible amounts in the memory database and each of the second preemptible amounts in the second database satisfying a second predetermined difference condition, wherein the first preemptible amount is a preemptible amount included in the stock preemption information in the memory database, and the second preemptible amount is a preemptible amount included in the stock information in the second database corresponding to the stock preemption information, and the expired stock preemption information is not available for preemption processing.
Optionally, the apparatus further comprises: and the stock pre-occupation task adding unit is configured to respond to the fact that stock pre-occupation tasks with task states of non-execution exist in the first database in a target preset period, and add the stock pre-occupation tasks with the task states of non-execution in the first database to the target stock pre-occupation task queue.
Optionally, the apparatus further comprises: and the rollback unit is configured to perform rollback processing on each stock preemption information, of which the prior preemption processing is successful, in response to determining that the stock preemption information preemption processing corresponding to the item information in the item information set fails.
Optionally, the apparatus further comprises: and the preset prompting information sending unit is configured to respond to the fact that the rollback processing of each stock preemption information of which the prior preemption processing is successful is determined to be successful, and send the preset prompting information to the terminal equipment corresponding to the target order, wherein the preset prompting information represents that the stock is insufficient.
Optionally, the apparatus further comprises: a generating unit and a scheduling amount transmitting unit. Wherein the generation unit is configured to generate the adjustment amount based on the pre-occupiable amount included in the stock preemption information that has failed in the preemption processing and the amount of the item included in the item information corresponding to the stock preemption information that has failed in the preemption processing, in response to determining that the rollback processing is successful for each stock preemption information that has succeeded in the preemption processing. The scheduling amount transmitting unit is configured to transmit the scheduling amount to an associated display apparatus.
Optionally, the apparatus further comprises: and the control unit is configured to control the associated scheduling equipment to execute the item scheduling operation according to the scheduling amount.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: by the inventory preemption method of some embodiments of the present disclosure, inventory preemption timeout times are reduced. Specifically, the reason why the number of times of the stock preemption timeout is large is that: when the number of orders is large, the stock preemption performance is degraded, resulting in a large number of times of stock preemption timeout. Based on this, the inventory preemption method of some embodiments of the present disclosure first performs preemption processing on the pre-emptible amount and the accumulated pre-emptive amount included in the inventory preemption information in response to determining that the inventory preemption information corresponding to the item information exists in the memory database for each item information in the item information set corresponding to the target order. Thus, it is possible to pre-camp on the stock by the pre-camp-on process of the stock pre-camp-on information in the stock database. Then, in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into a first database, and adding the inventory pre-occupation task to a target inventory pre-occupation task queue, wherein the first database stores the inventory pre-occupation tasks corresponding to each order, and the target inventory pre-occupation task queue includes the inventory pre-occupation tasks corresponding to each order. Therefore, when the pre-occupation of each stock pre-occupation information corresponding to the target order in the stock database is successful, the stock pre-occupation task corresponding to the target order is added to the target stock pre-occupation task queue for unified scheduling. And then, in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information in the second database corresponding to each item information in the item information set. Thus, when the stock pre-occupation task corresponding to the target order in the target stock pre-occupation task queue is executed, the stock information corresponding to the target order in the second database can be updated, namely, the stock of each article corresponding to the target order is actually pre-occupied. And finally, in response to the fact that the updating processing of the inventory information in the second database is successful, according to the quantity of the articles included in the article information corresponding to the inventory information which is successfully updated, reducing the accumulated pre-occupied quantity included in the inventory pre-occupied information in the memory database corresponding to the inventory information which is successfully updated. Thus, after the inventory information corresponding to the target order in the second database is successfully updated, the accumulated pre-occupation amount corresponding to the inventory information in the second database can be dynamically updated. And the inventory information in the second database is not directly updated, but the inventory pre-occupation is performed through the memory database firstly, and then the unified scheduling is performed on each inventory pre-occupation task through the target inventory pre-occupation task queue so as to update the inventory information in the second database, so that the inventory pre-occupation performance is improved. Thus, inventory preemption timeout times are reduced.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
1-2 are schematic diagrams of one application scenario of an inventory preemption method according to some embodiments of the present disclosure;
FIG. 3 is a flow diagram of some embodiments of an inventory preemption method according to the present disclosure;
FIG. 4 is a flow diagram of further embodiments of an inventory preemption method according to the present disclosure;
FIG. 5 is a schematic block diagram of some embodiments of an inventory preemption device according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
1-2 are schematic diagrams of one application scenario of an inventory preemption method according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, for each item information (e.g., item information 1021) in the item information set 102 corresponding to the target order, the computing device 101 may perform preemption processing on the amount 1031 and the cumulative amount 1032 that are included in the stock preemption information 103 in response to determining that the stock preemption information 103 corresponding to the item information 1021 exists in the in-memory database. Then, in response to determining that the pre-emptible amount pre-emption process included in the inventory pre-emptive information corresponding to each item information in the item information set 102 is successful, the computing device 101 may insert an inventory pre-emptive task 104 corresponding to the target order into the first database, and add the inventory pre-emptive task 104 to the target inventory pre-emptive task queue 105. The first database stores stock pre-occupation tasks corresponding to the orders. The target stock preemption task queue 105 includes stock preemption tasks corresponding to respective orders. Thereafter, the computing device 101 may update the inventory information (e.g., the inventory information 106) in the second database corresponding to each item information (e.g., the item information 1021) in the item information set 102 in response to the task status of the inventory preemption task 104 corresponding to the target order in the target inventory preemption task queue 105 being in an execution status. Finally, in response to determining that the update process of the inventory information (e.g., the inventory information 106) in the second database is successful, the computing device 101 may perform a deduction process on the accumulated pre-occupation amount 1032 included in the inventory pre-occupation information 103 in the memory database corresponding to the inventory information 106 that is successfully updated according to the amount of the item included in the item information (e.g., the item information 1021) corresponding to the inventory information (e.g., the inventory information 106) that is successfully updated.
Alternatively, as shown in fig. 2, in response to receiving the ex-warehouse information 107 of the target order, the computing device 101 may perform a deduction process on each actual stock amount 108 included in each stock information in the second database corresponding to each item information in the item information set 102.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in fig. 1-2 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With continued reference to fig. 3, a flow 300 of some embodiments of an inventory preemption method in accordance with the present disclosure is illustrated. The inventory pre-occupation method comprises the following steps:
step 301, for each item information in the item information set corresponding to the target order, in response to determining that the inventory preemption information corresponding to the item information exists in the memory database, performing preemption processing on the pre-occupation amount and the accumulated pre-occupation amount included in the inventory preemption information.
In some embodiments, for each item information in the set of item information corresponding to the target order, an executing entity (e.g., computing device 101 shown in fig. 1) of the inventory preemption method can perform preemption processing on the preemptable amount and the accumulated preempted amount included in the inventory preemption information in response to determining that the inventory preemption information corresponding to the item information exists in the in-memory database. The target order may be an order currently received by the executing agent. The item information set may be item information of each item selected by the user corresponding to the target order when placing the order. The article information may be related information of the article. The above item information may include, but is not limited to: item number, item name, item quantity. The item number may be used to uniquely identify the item. The quantity of the items may be the quantity of the items determined by the user when placing an order. The memory database may be a database for pre-empting the stock in the memory. For example, the in-memory database may be a "Redis database". The stock preemption information may be stock preemption related information corresponding to an item in the memory database. The inventory preemption information may include, but is not limited to: item number, warehouse number, pre-occupied amount, cumulative pre-occupied amount. The above-mentioned warehouse number may be used to uniquely identify the warehouse. The pre-occupation amount can be the residual amount of the articles corresponding to the article numbers in the warehouse corresponding to the warehouse numbers. The accumulated amount of the pre-emption may be the number of the items in the warehouse in the pre-emption state. The above-described preemption processing may include a deduction processing for a preemptible amount and an accumulation processing for an accumulated preemption amount. In practice, first, the execution body may determine a difference between the pre-emptible quantity and the quantity of the article as the pre-emptible quantity to update the pre-emptible quantity. Then, the execution body may determine a sum of the cumulative preemption amount and the item amount as a cumulative preemption amount to update the cumulative preemption amount. Thus, it is possible to pre-camp on the stock by the pre-camp-on process of the stock pre-camp-on information in the stock database.
Step 302, in response to determining that the pre-occupation processing for the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into the first database, and adding the inventory pre-occupation task to the target inventory pre-occupation task queue.
In some embodiments, the execution main body may insert an inventory preemption task corresponding to the target order in the first database in response to determining that the preemptible amount preemption processing included in the inventory preemption information corresponding to each item information in the item information set is successful, and add the inventory preemption task to the target inventory preemption task queue. The first database may be a database for storing an inventory preemption task. For example, the first database may be a "MYSQL database". The stock preemption task may be represented by stock preemption information with a task state added. The first database stores stock preemption tasks corresponding to respective orders. The target inventory preemption task queue may be a queue for adding an inventory preemption task corresponding to the target order. The target inventory preemption task queue includes inventory preemption tasks corresponding to each order. And the stock pre-occupation tasks of all orders in the target stock pre-occupation task queue are tasks to be executed. In practice, the execution subject may add the inventory preemption task to the tail of the target inventory preemption task queue. Therefore, when the pre-occupation of each stock pre-occupation information corresponding to the target order in the stock database is successful, the stock pre-occupation task corresponding to the target order is added to the target stock pre-occupation task queue for unified scheduling.
Step 303, in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information in the second database corresponding to each item information in the item information set.
In some embodiments, the executing agent may update the inventory information in the second database corresponding to each item information in the item information set in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state. The execution state may represent that the execution subject currently executes the inventory preemption task. The second database may be a database for actually pre-empting the inventory. For example, the second database may be a "MYSQL database". The inventory information may be inventory related information corresponding to an item in the second database. The inventory information may include, but is not limited to: article number, warehouse number, pre-occupiable volume. In practice, the execution main body may determine a difference between the amount of the product and the amount of the product included in the inventory information as a pre-emptible amount, so as to update the pre-emptible amount included in the inventory information. Thus, when the stock pre-occupation task corresponding to the target order in the target stock pre-occupation task queue is executed, the stock information corresponding to the target order in the second database can be updated, namely, the stock of each article corresponding to the target order is actually pre-occupied.
Step 304, in response to determining that the update processing of the inventory information in the second database is successful, according to the quantity of the items included in the item information corresponding to the inventory information that is successfully updated, performing deduction processing on the accumulated pre-occupation quantity included in the inventory pre-occupation information in the memory database corresponding to the inventory information that is successfully updated.
In some embodiments, the executing entity may perform, in response to determining that the update processing of the inventory information in the second database is successful, a deduction processing on an accumulated pre-occupation amount included in the inventory pre-occupation information in the memory database corresponding to the inventory information that is successfully updated according to an item amount included in the item information corresponding to the inventory information that is successfully updated. In practice, the execution subject may determine a difference between the accumulated occupancy amount and the item amount as an accumulated occupancy amount to reduce the accumulated occupancy amount included in the stock occupancy information. Thus, after the inventory information corresponding to the target order in the second database is successfully updated, the accumulated pre-occupation amount corresponding to the inventory information in the second database can be dynamically updated.
Optionally, the executing entity may perform, in response to receiving the shipment information of the target order, deduction processing on each actual stock amount included in each stock information in the second database corresponding to each item information in the item information set. The warehouse-out information may represent that each article corresponding to the target order has been warehouse-out. The inventory information in the above-mentioned respective inventory information may further include an actual inventory amount. The actual stock quantity may be the stock quantity of the article corresponding to the article number in the warehouse corresponding to the warehouse number included in the stock information. In practice, for each item information of the respective item information, the execution main body may determine a difference between an actual stock quantity corresponding to the item information and an item amount included in the item information as an actual stock quantity to reduce the actual stock quantity. Thus, the actual stock quantity of each item in the second database can be updated after each item corresponding to the target order is delivered.
Optionally, the executing body may add, in response to that an inventory preemption task whose task state is unexecuted exists in the first database within a target preset period, the inventory preemption task whose task state is unexecuted in the first database to the target inventory preemption task queue. The target preset cycle may be a current cycle period. In practice, the executing body may sequentially add each inventory preemption task whose task state is not executed to the tail of the target inventory preemption task queue. Thus, when the execution of the stock-keeping task fails, the stock-keeping task can be executed again.
Optionally, the executing body may perform rollback processing on each stock preemption information that the previous preemption processing succeeds, in response to determining that the stock preemption information preemption processing corresponding to the item information in the item information set fails. The rollback process may be a process of canceling a previously pre-reserved stock. In practice, the execution main body may determine that the preemption processing for the inventory preemption information is failed in response to determining that a difference between a preemptible amount included in the inventory preemption information and an amount of an item included in the item information corresponding to the inventory preemption information is less than zero. For each of the stock preemption information for which the preemption process is successful, the execution main body may determine a sum of a preemptible amount included in the stock preemption information and an amount of an item included in the item information corresponding to the stock preemption information as the preemptible amount of the stock preemption information to rollback the stock preemption information. Thus, when the stock preemption information corresponding to the item information in the item information set fails to preempt, the previously preempted stock can be cancelled.
Optionally, the execution main body may send preset prompting information to the terminal device corresponding to the target order in response to determining that the rollback processing of each stock preemption information that succeeds in the prior preemption processing is successful. Wherein, the preset prompt information represents that the inventory is insufficient. The preset prompting information may be preset information for prompting a user corresponding to the terminal device. For example, the preset prompting message may be "there is an article out of stock in your order". Thus, after the stock of the pre-occupied goods is withdrawn, the user can be prompted that the current stock is insufficient.
Alternatively, first, the execution main body may generate the adjustment amount based on the pre-occupation amount included in the stock preemption information that has failed in the preemption processing and the amount of the item included in the item information corresponding to the stock preemption information that has failed in the preemption processing, in response to determining that the rollback processing is successful for each stock preemption information that has succeeded in the preemption processing. In practice, the executing body may determine an absolute value of a difference between the pre-emptible quantity and the quantity of the article as the adjustment quantity. Then, the execution main body may transmit the scheduled amount to an associated display apparatus. The display device may be a device having a display function. The display device may be a display device on a warehouse side that stores the article corresponding to the stock preemption information. In practice, the execution main body may transmit the adjustment amount to the display device through a wired connection manner or a wireless connection manner. Thus, the amount of dispatch of the article for which the preemption process failed can be displayed.
Optionally, controlling the associated scheduling device to execute the item scheduling operation according to the scheduling amount. The scheduling device may be a device for scheduling an article. For example, the scheduling device may be an "unmanned vehicle". In practice, the executing body may control the dispatching device to dispatch the dispatched articles. The article is an article corresponding to the article information corresponding to the dispatch amount. Therefore, the scheduling equipment can be enabled to automatically schedule the articles according to the scheduling amount.
The above embodiments of the present disclosure have the following advantages: by the inventory preemption method of some embodiments of the present disclosure, inventory preemption timeout times are reduced. Specifically, the reason why the number of times of the stock preemption timeout is large is that: when the number of orders is large, the stock preemption performance is degraded, resulting in a large number of times of stock preemption timeout. Based on this, the inventory preemption method of some embodiments of the present disclosure first performs preemption processing on the pre-emptible amount and the accumulated pre-emptive amount included in the inventory preemption information in response to determining that the inventory preemption information corresponding to the item information exists in the memory database for each item information in the item information set corresponding to the target order. Thus, it is possible to pre-camp on the stock by the pre-camp-on process of the stock pre-camp-on information in the stock database. Then, in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into a first database, and adding the inventory pre-occupation task to a target inventory pre-occupation task queue, wherein the first database stores the inventory pre-occupation tasks corresponding to each order, and the target inventory pre-occupation task queue includes the inventory pre-occupation tasks corresponding to each order. Therefore, when the pre-occupation of each stock pre-occupation information corresponding to the target order in the stock database is successful, the stock pre-occupation task corresponding to the target order is added to the target stock pre-occupation task queue for unified scheduling. And then, in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information in the second database corresponding to each item information in the item information set. Thus, when the stock pre-occupation task corresponding to the target order in the target stock pre-occupation task queue is executed, the stock information corresponding to the target order in the second database can be updated, namely, the stock of each article corresponding to the target order is actually pre-occupied. And finally, in response to the fact that the updating processing of the inventory information in the second database is successful, according to the quantity of the articles included in the article information corresponding to the inventory information which is successfully updated, reducing the accumulated pre-occupied quantity included in the inventory pre-occupied information in the memory database corresponding to the inventory information which is successfully updated. Thus, after the inventory information corresponding to the target order in the second database is successfully updated, the accumulated pre-occupation amount corresponding to the inventory information in the second database can be dynamically updated. And the inventory information in the second database is not directly updated, but the inventory pre-occupation is performed through the memory database firstly, and then the unified scheduling is performed on each inventory pre-occupation task through the target inventory pre-occupation task queue so as to update the inventory information in the second database, so that the inventory pre-occupation performance is improved. Thus, inventory preemption timeout times are reduced.
With further reference to FIG. 4, a flow 400 of further embodiments of an inventory preemption method is illustrated. The process 400 of the inventory preemption method includes the steps of:
step 401, for each item information in the item information set corresponding to the target order, in response to determining that the inventory preemption information corresponding to the item information exists in the memory database, performing preemption processing on the pre-occupation amount and the accumulated pre-occupation amount included in the inventory preemption information.
Step 402, in response to determining that the pre-occupation processing for the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into the first database, and adding the inventory pre-occupation task to the target inventory pre-occupation task queue.
Step 403, in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information in the second database corresponding to each item information in the item information set.
Step 404, in response to determining that the update processing of the inventory information in the second database is successful, according to the quantity of the items included in the item information corresponding to the inventory information that is successfully updated, performing deduction processing on the accumulated pre-occupation quantity included in the inventory pre-occupation information in the memory database corresponding to the inventory information that is successfully updated.
In some embodiments, the specific implementation and technical effects of steps 401 and 404 can refer to steps 301 and 304 in those embodiments corresponding to fig. 3, which are not described herein again.
Step 405, in response to determining that the inventory preemption information corresponding to the item information does not exist in the memory database, acquiring inventory information corresponding to the item information from the second database as target inventory information.
In some embodiments, an executing entity (e.g., the computing device 101 shown in fig. 1) of the inventory preemption method may acquire inventory information corresponding to the item information from the second database as target inventory information in response to determining that the inventory preemption information corresponding to the item information does not exist in the in-memory database. In practice, the executing entity may obtain, from the second database, inventory information including an item code and a warehouse code that are respectively the same as the item code and the warehouse code included in the item information, as the target inventory information, through a wired connection manner or a wireless connection manner.
At step 406, inventory preemption information corresponding to the item information is created in an inventory database based on the amount of preemption included with the target inventory information.
In some embodiments, the execution agent may create inventory preemption information corresponding to the item information in the in-memory database based on a preemptible amount included in the target inventory information. In practice, the execution agent may newly establish an inventory preemption message in the in-memory database. The newly created stock pre-occupation information includes an article code identical to the article code included in the article information, a warehouse code of a warehouse storing the article corresponding to the article information, a pre-occupation amount included in the target stock information, and an accumulated pre-occupation amount with an initial value of zero. Thus, when the stock preemption information corresponding to the article information does not exist in the stock database, the stock database can be initialized.
Step 407, in response to that the first and second pre-emptible amounts satisfy the first predetermined difference condition, or that each of the first pre-emptible amounts in the memory database and each of the second pre-emptible amounts in the second database satisfy the second predetermined difference condition, determining the inventory preemption information corresponding to the first pre-emptible amount as the expired inventory preemption information.
In some embodiments, the execution agent may determine, as the expired inventory preemption information, inventory preemption information corresponding to the first preemptable amount in response to the first and second preemptable amounts satisfying a first predetermined difference condition, or each of the first preemptable amounts in the in-memory database and each of the second preemptable amounts in the second database satisfying a second predetermined difference condition. The first preemptible amount may be a preemptible amount included in the inventory preemption information in the memory database. The second preemptible amount may be a preemptible amount included in the inventory information corresponding to the inventory preemption information in the second database. The expired inventory preemption information described above is not available for preemption processing. The above-described first predetermined difference condition may be "the first preemptable amount is larger than the second preemptable amount". The second predetermined difference condition may be "the number of second preemptible amounts having a difference from the corresponding first preemptible amount greater than a preset threshold is greater than a preset number" among the respective second preemptible amounts. Here, the setting of the preset threshold and the preset number is not limited. In practice, the execution main body may determine the remaining expiration time corresponding to the stock preemption information corresponding to the first preemptable amount to be zero, so that the stock preemption information is expiration stock preemption information. The remaining expiration time may be a time from a current time to a time at which the stock preemption information expires. It is understood that, in response to determining that the expired inventory preemption information corresponding to the item information exists in the memory database, the execution main body may determine that the inventory preemption information corresponding to the item information does not exist in the memory database, and may further create the inventory preemption information corresponding to the item information. Therefore, when the first pre-occupation amount exceeds the second pre-occupation amount or the difference between the second pre-occupation amount and the first pre-occupation amount meets the condition, the corresponding stock pre-occupation information is determined as the expired stock pre-occupation information, so that when the expired stock pre-occupation information is read, new stock pre-occupation information is created to correct the expired stock pre-occupation information.
As can be seen in fig. 4, the flow 400 of the inventory preemption method in some embodiments corresponding to fig. 4 embodies the steps of extending the creation of inventory preemption information and the determination of stale inventory preemption information as compared to the description of some embodiments corresponding to fig. 3. Therefore, the solutions described in the embodiments can initialize the memory database without the stock preemption information corresponding to the article information in the memory database. Meanwhile, when the first pre-occupation amount exceeds the second pre-occupation amount or the difference between the second pre-occupation amount and the first pre-occupation amount meets the condition, the corresponding stock pre-occupation information is determined as the expired stock pre-occupation information, so that when the expired stock pre-occupation information is read, new stock pre-occupation information is created to correct the expired stock pre-occupation information. Thus, the number of times the number of sold articles exceeds the stock amount can be reduced.
With further reference to fig. 5, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of an inventory preemption device, which correspond to those method embodiments illustrated in fig. 3, and which are particularly applicable to various electronic devices.
As shown in fig. 5, the inventory preemption device 500 of some embodiments includes: a preemption unit 501, an insertion unit 502, an update unit 503, and a deduction unit 504. The preemption unit 501 is configured to, for each item information in an item information set corresponding to a target order, perform preemption processing on a preemptable amount and an accumulated preemption amount included in inventory preemption information in response to determining that the inventory preemption information corresponding to the item information exists in a memory database; the inserting unit 502 is configured to insert an inventory preemption task corresponding to the target order in a first database in which inventory preemption tasks corresponding to various orders are stored, and add the inventory preemption task to a target inventory preemption task queue in which inventory preemption tasks corresponding to various orders are included, in response to determining that the pre-emptible amount preemption process included in the inventory preemption information corresponding to various item information in the item information set is successful; the updating unit 503 is configured to update the inventory information in the second database corresponding to each item information in the item information set in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state; the deduction unit 504 is configured to, in response to determining that the update processing of the inventory information in the second database is successful, perform deduction processing on an accumulated occupation amount included in the inventory occupation information in the memory database corresponding to the inventory information that is successfully updated according to an item amount included in the item information corresponding to the inventory information that is successfully updated.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: an acquisition unit and a creation unit (not shown in the figure). Wherein the acquisition unit is configured to acquire, as the target inventory information, inventory information corresponding to the item information from the second database in response to determining that there is no inventory preemption information corresponding to the item information in the in-memory database. The creating unit is configured to create inventory preemption information corresponding to the item information in the in-memory database based on a preemptible amount included in the target inventory information.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: and an actual stock quantity deducting unit (not shown in the figure) configured to perform deduction processing on each actual stock quantity included in each stock information in the second database corresponding to each item information in the item information set in response to receiving the shipment information of the target order.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: a determining unit (not shown in the drawings) configured to determine stock preemption information corresponding to a first preemptable amount as expired stock preemption information in response to the first preemptable amount and a second preemptable amount satisfying a first predetermined difference condition or each of the first preemptable amounts in the memory database and each of the second preemptable amounts in the second database satisfying a second predetermined difference condition, wherein the first preemptable amount is a preemptable amount included in the stock preemption information in the memory database, and the second preemptable amount is a preemptable amount included in the stock information corresponding to the stock preemption information in the second database, and the expired stock preemption information is not available for preemption.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: an inventory preemption task adding unit (not shown in the figure) configured to add an inventory preemption task whose task state is not executed in the first database to the target inventory preemption task queue in response to the first database having an inventory preemption task whose task state is not executed in a target preset period.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: and a rollback unit (not shown in the figure) configured to perform rollback processing on each stock preemption information that the previous preemption processing succeeds, in response to determining that the stock preemption information preemption processing corresponding to the item information in the item information set fails.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: and a preset prompting information sending unit (not shown in the figure) configured to send preset prompting information to the terminal device corresponding to the target order in response to determining that the rollback processing is successful for each stock preemption information that succeeds in the preceding preemption processing, wherein the preset prompting information indicates that the stock is insufficient.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: a generating unit and a scheduling amount transmitting unit (not shown in the figure). Wherein the generation unit is configured to generate the adjustment amount based on the pre-occupiable amount included in the stock preemption information that has failed in the preemption processing and the amount of the item included in the item information corresponding to the stock preemption information that has failed in the preemption processing, in response to determining that the rollback processing is successful for each stock preemption information that has succeeded in the preemption processing. The scheduling amount transmitting unit is configured to transmit the scheduling amount to an associated display apparatus.
In an alternative implementation of some embodiments, the inventory preemption device 500 may further include: and a control unit (not shown in the figure) configured to control the associated scheduling device to perform the item scheduling operation according to the scheduling amount.
It will be understood that the elements described in the apparatus 500 correspond to various steps in the method described with reference to fig. 3. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and are not described herein again.
Referring now to FIG. 6, a block diagram of an electronic device (e.g., computing device 101 of FIG. 1)600 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: for each item information in an item information set corresponding to a target order, in response to determining that stock pre-occupation information corresponding to the item information exists in a memory database, pre-occupation processing is performed on the pre-occupation amount and the accumulated pre-occupation amount included in the stock pre-occupation information; in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into a first database, and adding the inventory pre-occupation task to a target inventory pre-occupation task queue, wherein the first database stores the inventory pre-occupation tasks corresponding to each order, and the target inventory pre-occupation task queue includes the inventory pre-occupation tasks corresponding to each order; in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating inventory information in a second database corresponding to each item information in the item information set; and in response to the determination that the update processing of the inventory information in the second database is successful, according to the quantity of the items included in the item information corresponding to the inventory information which is successfully updated, performing deduction processing on the accumulated pre-occupied quantity included in the inventory pre-occupied information in the memory database corresponding to the inventory information which is successfully updated.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a preemption unit, an update unit, and a deduction unit. For example, the preemption unit may be further described as a unit that performs preemption processing on the preemptable amount and the accumulated preempted amount included in the inventory preemption information in response to determining that the inventory preemption information corresponding to the item information exists in the memory database.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (12)

1. An inventory preemption method, comprising:
for each item information in an item information set corresponding to a target order, in response to determining that stock pre-occupation information corresponding to the item information exists in a memory database, pre-occupation processing is performed on the pre-occupation amount and the accumulated pre-occupation amount included in the stock pre-occupation information;
in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory pre-occupation information corresponding to each item information in the item information set is successful, inserting an inventory pre-occupation task corresponding to the target order into a first database, and adding the inventory pre-occupation task to a target inventory pre-occupation task queue, wherein the first database stores the inventory pre-occupation tasks corresponding to each order, and the target inventory pre-occupation task queue includes the inventory pre-occupation tasks corresponding to each order;
in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state, updating the inventory information in the second database corresponding to each item information in the item information set;
and in response to the determination that the updating processing of the inventory information in the second database is successful, according to the quantity of the items included in the item information corresponding to the inventory information which is successfully updated, performing deduction processing on the accumulated occupied quantity included in the inventory occupied information in the memory database corresponding to the inventory information which is successfully updated.
2. The method of claim 1, wherein the method further comprises:
in response to determining that the inventory preemption information corresponding to the item information does not exist in the memory database, acquiring inventory information corresponding to the item information from the second database as target inventory information;
creating inventory preemption information corresponding to the item information in the in-memory database based on a preemptable amount included in the target inventory information.
3. The method of claim 1, wherein the method further comprises:
and in response to the received warehouse-out information of the target order, carrying out deduction processing on each actual stock quantity included in each stock information in the second database corresponding to each item information in the item information set.
4. The method of claim 1, wherein the method further comprises:
in response to a first and a second pre-emptible amount satisfying a first predetermined difference condition, or each first pre-emptible amount in the memory database and each second pre-emptible amount in the second database satisfying a second predetermined difference condition, determining inventory preemption information corresponding to the first pre-emptible amount as expired inventory preemption information, wherein the first pre-emptible amount is a pre-emptible amount included in inventory preemption information in the memory database, and the second pre-emptible amount is a pre-emptible amount included in inventory information in the second database corresponding to the inventory preemption information, and the expired inventory preemption information is not available for preemption.
5. The method of claim 1, wherein the method further comprises:
in response to that the first database has the inventory pre-occupation task with the task state of non-execution in the target preset period, adding the inventory pre-occupation task with the task state of non-execution in the first database to the target inventory pre-occupation task queue.
6. The method of claim 1, wherein the method further comprises:
and performing rollback processing on each stock preemption information which is successfully subjected to the prior preemption processing in response to determining that the stock preemption information preemption processing corresponding to the article information in the article information set fails.
7. The method of claim 6, wherein the method further comprises:
and responding to the fact that the rollback processing of each stock pre-occupation information successfully processed in the prior pre-occupation processing is successful, and sending preset prompt information to the terminal equipment corresponding to the target order, wherein the preset prompt information represents that the stock is insufficient.
8. The method of claim 6, wherein the method further comprises:
in response to determining that the rollback processing of each stock preemption information that succeeds the prior preemption processing succeeds, generating an adjustment amount based on a pre-occupation amount included in the stock preemption information that fails the preemption processing and an article amount included in article information corresponding to the stock preemption information that fails the preemption processing;
and sending the scheduling amount to the associated display equipment.
9. The method of claim 8, wherein the method further comprises:
and controlling the associated scheduling equipment to execute the item scheduling operation according to the scheduling amount.
10. An inventory preemption device, comprising:
the pre-occupation unit is configured to pre-occupation process the pre-occupation amount and the accumulated pre-occupation amount included by the inventory pre-occupation information in response to determining that the inventory pre-occupation information corresponding to the item information exists in the memory database for each item information in the item information set corresponding to the target order;
an inserting unit configured to insert an inventory preemption task corresponding to the target order in a first database in response to determining that the pre-occupation processing of the pre-occupation amount included in the inventory preemption information corresponding to each item information in the item information set is successful, and add the inventory preemption task to a target inventory preemption task queue, wherein the first database stores the inventory preemption task corresponding to each order, and the target inventory preemption task queue includes the inventory preemption task corresponding to each order;
an updating unit configured to update the inventory information in the second database corresponding to each item information in the item information set in response to that the task state of the inventory preemption task corresponding to the target order in the target inventory preemption task queue is an execution state;
and the deduction unit is configured to perform deduction processing on accumulated occupation amount included by the inventory occupation information in the memory database corresponding to the inventory information which is successfully updated according to the quantity of the items included by the item information corresponding to the inventory information which is successfully updated in response to the determination that the update processing on the inventory information in the second database is successful.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-9.
CN202110420819.3A 2021-04-19 2021-04-19 Inventory preemption method, apparatus, electronic device, and computer-readable medium Active CN113159680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110420819.3A CN113159680B (en) 2021-04-19 2021-04-19 Inventory preemption method, apparatus, electronic device, and computer-readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110420819.3A CN113159680B (en) 2021-04-19 2021-04-19 Inventory preemption method, apparatus, electronic device, and computer-readable medium

Publications (2)

Publication Number Publication Date
CN113159680A true CN113159680A (en) 2021-07-23
CN113159680B CN113159680B (en) 2023-11-03

Family

ID=76868746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110420819.3A Active CN113159680B (en) 2021-04-19 2021-04-19 Inventory preemption method, apparatus, electronic device, and computer-readable medium

Country Status (1)

Country Link
CN (1) CN113159680B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723892A (en) * 2021-09-13 2021-11-30 北京沃东天骏信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN107871221A (en) * 2016-09-28 2018-04-03 北京京东尚科信息技术有限公司 For obtaining the method and apparatus that can sell stockpile number
WO2018126943A1 (en) * 2017-01-06 2018-07-12 阿里巴巴集团控股有限公司 Order processing system
CN108874809A (en) * 2017-05-10 2018-11-23 北京京东尚科信息技术有限公司 Data processing method and device, electronic equipment, storage medium
WO2018229158A1 (en) * 2017-06-16 2018-12-20 Amadeus S.A.S. Geographically distributed database
CN109146350A (en) * 2017-06-28 2019-01-04 菜鸟智能物流控股有限公司 Warehouse delivery operation execution method and device
CN110321242A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 Data processing method and device
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
CN111292028A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Inventory information processing method and system, computer system and readable storage medium
CN111861298A (en) * 2019-04-30 2020-10-30 北京京东振世信息技术有限公司 Order canceling method and device
CN112435101A (en) * 2020-12-02 2021-03-02 北京沃东天骏信息技术有限公司 Order information processing method and device, electronic equipment and computer readable medium
US20210097484A1 (en) * 2019-09-26 2021-04-01 International Business Machines Corporation Anonymous inventory tracking system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107871221A (en) * 2016-09-28 2018-04-03 北京京东尚科信息技术有限公司 For obtaining the method and apparatus that can sell stockpile number
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
WO2018126943A1 (en) * 2017-01-06 2018-07-12 阿里巴巴集团控股有限公司 Order processing system
CN108874809A (en) * 2017-05-10 2018-11-23 北京京东尚科信息技术有限公司 Data processing method and device, electronic equipment, storage medium
WO2018229158A1 (en) * 2017-06-16 2018-12-20 Amadeus S.A.S. Geographically distributed database
CN109146350A (en) * 2017-06-28 2019-01-04 菜鸟智能物流控股有限公司 Warehouse delivery operation execution method and device
CN110321242A (en) * 2018-03-30 2019-10-11 北京京东尚科信息技术有限公司 Data processing method and device
CN111292028A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Inventory information processing method and system, computer system and readable storage medium
CN111861298A (en) * 2019-04-30 2020-10-30 北京京东振世信息技术有限公司 Order canceling method and device
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
US20210097484A1 (en) * 2019-09-26 2021-04-01 International Business Machines Corporation Anonymous inventory tracking system
CN112435101A (en) * 2020-12-02 2021-03-02 北京沃东天骏信息技术有限公司 Order information processing method and device, electronic equipment and computer readable medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
THIAGO HENRIQUE NOGUEIRA 等: "Parallel-machine scheduling methodology for a multi-dock truck sequencing problem in a cross-docking center", 《COMPUTERS & INDUSTRIAL ENGINEERING》, vol. 143, pages 1 - 15 *
陈炫岩: "ERP环境下基于预占的自适应库存控制模型研究", 《软件导刊》, vol. 12, no. 10, pages 41 - 43 *
高慕航: "基于社区电商的订单履约系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, vol. 2020, no. 1, pages 138 - 430 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723892A (en) * 2021-09-13 2021-11-30 北京沃东天骏信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113159680B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN112787958B (en) Delay message processing method and device
CN114048931B (en) Replenishment information generation method and device, electronic equipment and computer readable medium
CN112346926A (en) Resource state monitoring method and device and electronic equipment
CN113722056A (en) Task scheduling method and device, electronic equipment and computer readable medium
CN112347111A (en) Data updating method and device
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN113159680A (en) Inventory pre-occupation method, device, electronic equipment and computer readable medium
CN112581241B (en) Device control method, device, electronic device and computer readable medium
CN113610448A (en) Article scheduling method and device, electronic equipment and computer readable medium
CN112581043A (en) Device control method, device, electronic device and computer readable medium
CN112559898A (en) Item information sending method, item information sending device, electronic equipment and computer readable medium
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN114418482A (en) Order information processing method and device, electronic equipment and computer readable medium
CN112734309B (en) Vehicle scheduling method, device, equipment and computer readable medium for article
CN114418625A (en) Information display method and device, electronic equipment and computer readable medium
CN113112202A (en) Item information sending method, item information sending device, electronic equipment and computer readable medium
CN113791876A (en) System, method and apparatus for processing tasks
CN113064905A (en) Business process processing method and device, electronic equipment and computer readable medium
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN112182003A (en) Data synchronization method and device
CN113743807B (en) Scheduling information generation method, device, electronic equipment and computer readable medium
CN111698132B (en) Method, apparatus, device and medium for controlling heartbeat events in a cluster
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN113962782A (en) Order information processing method and device, electronic equipment and computer readable medium
CN113554385B (en) Distribution robot control method, distribution robot control device, electronic equipment and computer readable medium

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
GR01 Patent grant
GR01 Patent grant