CN110019330B - Information output method and device - Google Patents

Information output method and device Download PDF

Info

Publication number
CN110019330B
CN110019330B CN201710801348.4A CN201710801348A CN110019330B CN 110019330 B CN110019330 B CN 110019330B CN 201710801348 A CN201710801348 A CN 201710801348A CN 110019330 B CN110019330 B CN 110019330B
Authority
CN
China
Prior art keywords
order
inventory
item
article
cache
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.)
Active
Application number
CN201710801348.4A
Other languages
Chinese (zh)
Other versions
CN110019330A (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 Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710801348.4A priority Critical patent/CN110019330B/en
Priority to PCT/CN2018/081956 priority patent/WO2019047516A1/en
Publication of CN110019330A publication Critical patent/CN110019330A/en
Application granted granted Critical
Publication of CN110019330B publication Critical patent/CN110019330B/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24539Query rewriting; Transformation using cached or materialised query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0639Item locations

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Human Resources & Organizations (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an information output method and device. One embodiment of the method comprises: acquiring a to-be-processed order set pre-stored in a cache; reading a set of inventory information from an inventory database for storing inventory information into a cache; for each order in the order set, determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache; for each order in the order set, if the inventory quantity of the items corresponding to the item storage position matched with the order stored in the inventory database is not less than the inventory quantity of the items matched with the order, modifying the inventory information in the inventory database according to the item storage position matched with the order and the inventory quantity of the items matched with the order, and outputting the item storage position matched with the order and the inventory quantity of the items matched with the order. The implementation mode reduces the times of reading the inventory database and improves the positioning efficiency.

Description

Information output method and device
Technical Field
The application relates to the technical field of computers, in particular to the technical field of internet, and particularly relates to an information output method and device.
Background
With the wide and deep development of the internet industry, online shopping is adopted by more and more people. After a user places an order in an online shopping mall, order information is downloaded to a warehousing system platform in an e-commerce logistics system, the platform can assist warehouse operators to determine the specific position of a commodity in the order in a warehouse and finally complete the distribution of the commodity, and the process of searching the position of the commodity in the warehouse is called positioning. Positioning is an important step in the warehouse production link, plays a role of starting and stopping, and after positioning is completed, commodities are delivered to customers by a carrier.
After the warehouse operator operates and positions, the warehousing system records the orders to be distributed in the database, and then the orders are randomly distributed in an asynchronous mode. And a concurrent mode is adopted during asynchronous positioning, when the same commodity is contained in different orders, competition is generated for the stock of the same commodity, and after the competition fails, the positioning can be completed by repeating the operation for many times. Resulting in the need to read the database multiple times over and over, thereby reducing the efficiency of the location.
Disclosure of Invention
An object of the embodiments of the present application is to provide an information output method and apparatus, so as to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides an information output method, where the method includes: acquiring a to-be-processed order set pre-stored in a cache, wherein each order in the order set comprises an item name and an item demand; reading an inventory information set from an inventory database for storing inventory information into a cache, wherein each piece of inventory information in the inventory information set comprises an item storage position, an item name and an item inventory corresponding to the item storage position; for each order in the set of orders, the following allocation steps are performed: determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache; and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
In some embodiments, before obtaining the set of pending orders pre-stored in the cache, the method further comprises: in response to receiving the order, the received order is stored at the tail of the order queue in the cache.
In some embodiments, the order includes a delivery time; and before acquiring the to-be-processed order set pre-stored in the cache, the method further comprises: in response to receiving the order, the received order is stored in an order queue in the cache such that the orders in the order queue are ordered in a delivery time first-to-last order.
In some embodiments, determining the storage location of the item matching the order and the inventory amount of the item matching the order according to the inventory information stored in the cache includes: generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name; generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name; for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name; for each order in the order set, if the corresponding item storage position and item inventory amount have been determined for each item name of the order, the item storage position and item inventory amount corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache are updated.
In some embodiments, the method further comprises: and if the inventory quantity of the items corresponding to the item storage position matched with the order stored in the inventory database is less than that of the items matched with the order, reading the inventory information set from the inventory database into the cache again and repeatedly executing the distribution step.
In some embodiments, the method further comprises: in response to detecting a change in the log file of the inventory database, the changed inventory information set is read from the inventory database into the cache according to the log file.
In a second aspect, an embodiment of the present application provides an information output apparatus, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a to-be-processed order set which is pre-stored in a cache, and each order in the order set comprises an item name and an item demand; the reading unit is used for reading an inventory information set from an inventory database for storing inventory information into a cache, wherein each piece of inventory information in the inventory information set comprises an article storage position, an article name and an article inventory corresponding to the article storage position; a positioning unit, configured to perform, for each order in the order set, the following allocation steps: determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache; and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
In some embodiments, the apparatus further comprises a first storage unit to: and storing the received order into the tail of the order queue in the cache in response to receiving the order before acquiring the to-be-processed order set stored in the cache in advance.
In some embodiments, the order includes a delivery time; and the apparatus further comprises a second storage unit for: before acquiring a to-be-processed order set pre-stored in a cache, in response to receiving an order, storing the received order in an order queue in the cache so that the orders in the order queue are ordered according to the delivery time from first to last.
In some embodiments, the positioning unit is further configured to: generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name; generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name; for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name; for each order in the order set, if the corresponding item storage position and item inventory amount have been determined for each item name of the order, the item storage position and item inventory amount corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache are updated.
In some embodiments, the reading unit is further configured to: if the stock quantity of the article corresponding to the article storage position matched with the order stored in the stock database is smaller than that of the article matched with the order, reading the stock information set from the stock database into a cache again; and the positioning unit is further used for repeatedly executing the distribution step.
In some embodiments, the apparatus further comprises an inventory update unit to: in response to detecting a change in the log file of the inventory database, the changed inventory information set is read from the inventory database into the cache according to the log file.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; storage means for storing one or more programs which, when executed by one or more processors, cause the one or more processors to carry out a method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to any one of the first aspect.
According to the information output method and the information output device, the inventory information of the inventory database is read into the cache, and the items required by the order are positioned according to the inventory information stored in the cache, so that the inventory database is prevented from being read repeatedly in the positioning process, and the positioning efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an information output method according to the present application;
3a, 3b, 3c, 3d are schematic diagrams of an application scenario of the information output method according to the present application;
FIG. 4 is a flow chart of yet another embodiment of an information output method according to the present application;
FIG. 5 is a schematic block diagram of an embodiment of an information output apparatus according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the information output method or information output apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a distribution application, a web browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting information browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background location server providing support for storing location and quantity information of items required for orders displayed on the terminal devices 101, 102, 103. The background positioning server may analyze and perform other processing on the received data such as the order-required item positioning request, and feed back the processing result (e.g., the storage location and the storage quantity information of the order-required item) to the terminal device.
It should be noted that the information output method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the information output apparatus is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of an information output method according to the present application is shown. The information output method comprises the following steps:
step 201, obtaining a to-be-processed order set pre-stored in a cache.
In this embodiment, the electronic device (for example, the server shown in fig. 1) on which the information output method operates may obtain the order from the terminal with which the user performs the order placing operation in a wired connection manner or a wireless connection manner, and store the order in the cache. Each order in the order set has an order number and comprises an item name and an item demand, and each order can comprise demand information of at least one item. For example, the order includes 5H pencils and 2B erasers. The cache may be a Redis cache (an open source journaled, key-value database written in standard C language, network-enabled, memory-based, or persistent). The consistency of the inventory information in the memory is ensured by utilizing the single thread characteristic of the Redis cache. Scanning an unprocessed queue in the Redis cache at preset time intervals, for example, at intervals of 10 seconds (unprocessed orders are stored in the unprocessed queue), taking out the names and the demands of the items to be allocated of the orders to be allocated in the unprocessed queue for preprocessing, and storing the names and the demands in the queue to be processed.
In some optional implementations of this embodiment, in response to receiving the order, the received order may be stored at a tail of an order queue in the cache, with each unprocessed order constituting an unprocessed queue. For example, with the list data structure of Redis cache, when new data comes in, the order of data processing is guaranteed using the RPUSH (insert all specified values, at the end of the key stored in the list) command. At this time, the orders are put into the order queue according to the order from the first to the last of the time when the orders are received. The data structure of each node in the List takes the String type: the value is the primary key of the order number.
In some alternative implementations of the present embodiment, the order includes a delivery time for specifying a time of receipt for the user. The method for storing the order comprises the following steps: in response to receiving the orders, storing the received orders into an order queue in a cache so that the orders in the order queue are sorted according to the delivery time from first to last, and each unprocessed order forms an unprocessed queue. At this time, the orders are put into the order queue according to the delivery time from the first to the last in the received orders. For example, when two original orders in the order queue are received, the order a is delivered at 9 th, the order B is delivered at 16 th, the order a is arranged in front of the order B, and when the order C with the delivery time of 8 th, 16 th is received, the order C is arranged in front of the order a and the order B. That is, newly received orders can be queued, so that delivery timeliness can be ensured. If any order specifies a delivery time and any order does not, the order with the non-specified delivery time is stored at the end of the order queue.
In step 202, a set of inventory information is read from an inventory database for storing inventory information into a cache.
In the present embodiment, the inventory database may be, for example, a MySQL database (general relational database). Each piece of inventory information in the inventory information set comprises an item storage position, an item name and an item inventory corresponding to the item storage position, for example, storage position 1, pencil of H brand, and 20 stocks; the storage position is 2, the number of M pencils is 200; storage position 3, H-brand rubber, stock 20 pieces. In the present application, the inventory information in the inventory database may be considered as actual inventory, and the inventory information in the cache may be considered as near real-time inventory. The orders are allocated according to the quasi-real-time inventory without synchronously reading the inventory information of the inventory database in real time. After the inventory information is read into the cache, the inventory information can be processed, and the inventory information corresponding to the same article is stored in the same linked list. For example, for the stock information of H-card pencils, as shown in fig. 3c, the same item may be stored in different locations, and the stock amount may be different for each location.
And step 203, determining the storage position of the item matched with the order and the inventory quantity of the item matched with the order for each order in the order set according to the inventory information stored in the cache.
In this embodiment, the storage locations of the items listed in the order and the quantity to be taken out from the storage locations may be sequentially located in the order of the queue to be processed in the cache according to the inventory information stored in the cache, rather than according to the inventory information stored in the inventory database. For example, the storage information stored in the cache includes: storage position 1, H-brand pencils, 20 stocks; the storage position is 2, the number of M pencils is 200; storage position 3, storing 20 pieces of H-brand rubber; and the storage position 4 is used for storing 200H-brand pencils. The order includes: 100H-brand pencils are needed. 100H-pencils in bin 4 can be located. It is also possible to locate 20H-pencils in bin 1 and 80H-pencils in bin 4. The specific positioning algorithm is determined according to different requirements of users. The stock of the storage position can be emptied preferentially, and the goods can be taken from one storage position as much as possible in order to save the carrying cost.
In some optional implementation manners of this embodiment, determining, according to each inventory information stored in the cache, an item storage location matched with the order and an item inventory matched with the order, includes: generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name; generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name; for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name; for each order in the order set, if the corresponding item storage position and item inventory amount have been determined for each item name of the order, the item storage position and item inventory amount corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache are updated.
Aggregating the inventory information, establishing a total inventory table according to the new article, and using a Map (mapping) data structure of Redis cache, wherein the data structure is defined as follows:
article storage quantity, data link list address
And the maintenance of the total inventory table is carried out at the moment that after the inventory information is read to the cache, the inventory information of the same articles is gathered together, and the inventory and the pointer of the articles in the total inventory table in the Redis cache are updated. The final collated data structure may be as shown in FIG. 3c, for example.
In order to prevent positioning failure caused by conflict when different orders are positioned, a total demand table can be generated according to the article demand of each order. And then determining the storage positions of the items meeting the orders in turn according to the total demand table for each item. Namely, the orders in the current queue to be processed are uniformly positioned, so that the situation that the stock quantity of a certain article in the preset time does not satisfy all the orders, and the stock quantity is only distributed to a certain order and not distributed to other orders is avoided. After positioning of each article in each order in the queue to be processed is completed, the distribution status identifier of the order is modified, the distribution status identifier is successfully updated after the positioning is successful, and the distribution status identifier is not successfully updated when the inventory is insufficient. If only one item in the order is in insufficient stock, even if other items are in sufficient stock, the distribution state of the order is still marked as unsuccessful, the order is stopped to be positioned, and the positioning is carried out again after the stock is sufficient.
Step 204, for each order in the order set, determining whether the inventory quantity of the items stored in the inventory database corresponding to the storage location of the item matched with the order is less than the inventory quantity of the items matched with the order.
In this embodiment, since the inventory information stored in the cache is not real-time, the inventory information in the cache may not be consistent with the actual inventory information stored in the inventory database. The amount of stock can only be allocated to an order if it can be satisfied, otherwise it is reallocated by waiting until the amount of stock increases to be able to satisfy the order.
Step 205, if the inventory quantity of the article corresponding to the article storage location matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage location matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage location matched with the order and the inventory quantity of the article matched with the order.
In this embodiment, if the actual stock quantity can satisfy the order, the positioning is successful, and the actual stock information is modified according to the positioning result, that is, the stock quantity corresponding to the positioned storage location is subtracted by the amount required by the order. For example, the storage information stored in the cache includes: storage position 1, H brand pencil, stock 20. The order includes: 10H-brand pencils are needed. After 10H-brand pencils in the storage position 1 can be positioned, the inventory information in the inventory database is modified into the storage position 1, the H-brand pencils and the 10 inventory.
With continuing reference to fig. 3a-3d, fig. 3a-3d are schematic diagrams of application scenarios of the information output method according to the present embodiment. In the application scenarios of fig. 3a to 3c, after receiving an order sent by a user through a terminal, the electronic device puts the order into an unprocessed queue (not shown) of the Redis cache 300. The item names and item demand for orders in the pending queue are then read into the pending queue 301 at predetermined intervals of 10 seconds. As shown in fig. 3b, the set of inventory information 303 is read from the inventory database 302 for storing inventory information into the Redis cache 300 according to an inventory database log file 3021. As shown in fig. 3c, the set of inventory information is stored in a linked list and the inventory information has been sorted to generate the data structure shown in fig. 3 d. The position of each item in the queue 301 to be processed and the inventory amount required to be provided at the position are determined according to the inventory information set 303. When the inventory quantity of the items meets the order demand, the inventory information in the inventory database 302 is modified, and the positioning information 304 of each item matched with the order is output, wherein the positioning information comprises the storage position of the item and the inventory quantity of the item matched with the order.
According to the method provided by the embodiment of the application, the items required by the order are positioned by utilizing the inventory information read into the cache, so that the number of times of interaction with the inventory database is reduced, the database access pressure is reduced, and the positioning efficiency is improved.
With further reference to fig. 4, a flow 400 of yet another embodiment of an information output method is shown. The process 400 of the information output method includes the following steps:
step 401, obtaining a to-be-processed order set pre-stored in a cache.
Step 402 reads a set of inventory information from an inventory database for storing inventory information into a cache.
Step 403, for each order in the order set, determining the storage location of the item matched with the order and the inventory of the item matched with the order according to the inventory information stored in the cache.
Step 404, for each order in the order set, determining whether the inventory quantity of the items stored in the inventory database corresponding to the storage location of the item matched with the order is less than the inventory quantity of the items matched with the order.
The steps 401 and 404 are substantially the same as the steps 201 and 204, and therefore, the description thereof is omitted.
Step 405, if the inventory quantity of the item corresponding to the storage location of the item matching the order stored in the inventory database is less than the inventory quantity of the item matching the order, reading the inventory information set from the inventory database into the cache again and repeating the above allocation step.
In this embodiment, since the inventory information stored in the cache may not be consistent with the inventory information stored in the inventory database, the inventory information stored in the inventory database needs to be reloaded into the cache. The above step 204 and 205 are executed again until the positioning is successful.
In some optional implementations of this embodiment, in response to detecting that the log file of the inventory database has changed, the changed inventory information set is read from the inventory database into the cache according to the log file. Therefore, the change of the inventory information can be known without directly inquiring the database, and the changed inventory information is synchronously updated into the cache, so that the inquiry pressure of the inventory database can be reduced.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the information output method in this embodiment highlights a step of synchronizing the inventory information stored in the cache with the inventory information stored in the inventory database when the order positioning fails. Thereby improving the success rate of positioning.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an information output apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the information output apparatus 500 of the present embodiment includes: an acquisition unit 501, a reading unit 502 and a positioning unit 503. The acquiring unit 501 is configured to acquire a to-be-processed order set pre-stored in a cache, where each order in the order set includes an item name and an item demand; the reading unit 502 is configured to read an inventory information set from an inventory database for storing inventory information into a cache, where each piece of inventory information in the inventory information set includes an item storage location, an item name, and an item inventory corresponding to the item storage location; the positioning unit 503 is configured to perform the following allocation steps for each order in the order set: determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache; and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
In the present embodiment, specific processing of the acquisition unit 501 and the reading unit 502 of the information output apparatus 500 may refer to step 201 and step 202 in the corresponding embodiment of fig. 2. The specific processing of the positioning unit 503 may refer to step 203, step 204, and step 205 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the apparatus 500 further includes a first storage unit (not shown) for: and storing the received order into the tail of the order queue in the cache in response to receiving the order before acquiring the to-be-processed order set stored in the cache in advance.
In some optional implementations of this embodiment, the order includes a delivery time; and the apparatus 500 further comprises a second storage unit (not shown) for: before acquiring a to-be-processed order set pre-stored in a cache, in response to receiving an order, storing the received order in an order queue in the cache so that the orders in the order queue are ordered according to the delivery time from first to last.
In some optional implementations of this embodiment, the positioning unit 503 is further configured to: generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name; generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name; for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name; for each order in the order set, if the corresponding item storage position and item inventory amount have been determined for each item name of the order, the item storage position and item inventory amount corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache are updated.
In some optional implementations of the present embodiment, the reading unit 502 is further configured to: if the stock quantity of the article corresponding to the article storage position matched with the order stored in the stock database is smaller than that of the article matched with the order, reading the stock information set from the stock database into a cache again; and the positioning unit 502 is further configured to repeatedly perform the above-mentioned allocating step.
In some optional implementations of this embodiment, the apparatus 500 further includes an inventory update unit (not shown) configured to: in response to detecting a change in the log file of the inventory database, the changed inventory information set is read from the inventory database into the cache according to the log file.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server 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 application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, 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 such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can 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 the present application, 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 this application, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 application. 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 the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a reading unit, and a positioning unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the acquiring unit may also be described as a "unit that acquires a set of orders to be processed that are stored in advance in a cache".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring a to-be-processed order set pre-stored in a cache, wherein each order in the order set comprises an item name and an item demand; reading an inventory information set from an inventory database for storing inventory information into a cache, wherein each piece of inventory information in the inventory information set comprises an item storage position, an item name and an item inventory corresponding to the item storage position; for each order in the set of orders, the following allocation steps are performed: determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache; and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. An information output method, characterized in that the method comprises:
scanning an unprocessed queue in a cache at preset time intervals, and acquiring a to-be-processed order set stored in the unprocessed queue in advance, wherein each order in the order set comprises an item name and an item demand;
reading an inventory information set from an inventory database for storing inventory information into the cache, wherein each piece of inventory information in the inventory information set comprises an item storage position, an item name and an item inventory corresponding to the item storage position;
for each order in the set of orders, performing the following allocation steps:
determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache;
and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
2. The method of claim 1, wherein prior to said retrieving the pending order set pre-stored in the cache, the method further comprises:
in response to receiving the order, the received order is stored at the tail of the order queue in the cache.
3. The method of claim 1, wherein the order comprises a delivery time; and
before the acquiring the pending order set pre-stored in the cache, the method further includes:
in response to receiving the orders, storing the received orders in an order queue in the cache such that the orders in the order queue are ordered in a delivery time first-to-last order.
4. The method according to any one of claims 1 to 3, wherein determining the storage location of the item matching the order and the inventory amount of the item matching the order according to the inventory information stored in the cache comprises:
generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name;
generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name;
for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name;
and for each order in the order set, if the corresponding item storage position and item inventory quantity of each item name of the order have been determined, updating the item storage position and the item inventory quantity corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache.
5. The method according to one of claims 1 to 3, characterized in that the method further comprises:
and if the inventory quantity of the items corresponding to the item storage position matched with the order stored in the inventory database is less than the inventory quantity of the items matched with the order, reading the inventory information set from the inventory database into the cache again and repeatedly executing the distribution step.
6. The method according to one of claims 1 to 3, characterized in that the method further comprises:
in response to detecting a change in a log file of the inventory database, reading a changed set of inventory information from the inventory database into the cache according to the log file.
7. An information output apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for scanning an unprocessed queue in a cache at preset time intervals and acquiring a to-be-processed order set stored in the unprocessed queue in advance, and each order in the order set comprises an article name and an article demand;
the reading unit is used for reading an inventory information set from an inventory database for storing inventory information into the cache, wherein each piece of inventory information in the inventory information set comprises an item storage position, an item name and an item inventory corresponding to the item storage position;
a positioning unit, configured to perform, for each order in the order set, the following allocation steps:
determining an article storage position matched with the order and an article inventory matched with the order according to each inventory information stored in the cache;
and if the inventory quantity of the article corresponding to the article storage position matched with the order stored in the inventory database is not less than the inventory quantity of the article matched with the order, modifying the inventory information in the inventory database according to the article storage position matched with the order and the inventory quantity of the article matched with the order, and outputting the article storage position matched with the order and the inventory quantity of the article matched with the order.
8. The apparatus of claim 7, further comprising a first storage unit configured to:
and before the to-be-processed order set pre-stored in the cache is obtained, in response to receiving the order, storing the received order in the tail of the order queue in the cache.
9. The apparatus of claim 7, wherein the order comprises a delivery time; and the apparatus further comprises a second storage unit for:
before the to-be-processed order set pre-stored in the cache is obtained, in response to receiving an order, storing the received order into an order queue in the cache so that the orders in the order queue are ordered according to the delivery time from first to last.
10. The apparatus according to one of claims 7-9, wherein the positioning unit is further configured to:
generating a total demand table according to the article demand of each order, wherein the total demand table is used for representing the corresponding relation between the article name and the sum of the article demands corresponding to the article name;
generating a total inventory table according to the inventory of each item of inventory information in the inventory information set stored in the cache, wherein the total inventory table is used for representing the corresponding relation between the item name and the total inventory sum of the items corresponding to the item name;
for each item name in the total demand table, if the sum of the inventory amount corresponding to the item name is not less than the sum of the demand amount corresponding to the item name, determining the storage position and the inventory amount of the item corresponding to the item name;
and for each order in the order set, if the corresponding item storage position and item inventory quantity of each item name of the order have been determined, updating the item storage position and the item inventory quantity corresponding to each item name of the order in each item of inventory information in the inventory information set stored in the cache.
11. The apparatus according to one of claims 7 to 9, wherein the reading unit is further configured to:
if the stock quantity of the article corresponding to the article storage position matched with the order stored in the stock database is smaller than that of the article matched with the order, reading the stock information set from the stock database into the cache again; and
the positioning unit is further configured to repeatedly perform the above-described assigning step.
12. The apparatus according to one of claims 7 to 9, characterized in that the apparatus further comprises an inventory update unit for:
in response to detecting a change in a log file of the inventory database, reading a changed set of inventory information from the inventory database into the cache according to the log file.
13. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201710801348.4A 2017-09-07 2017-09-07 Information output method and device Active CN110019330B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710801348.4A CN110019330B (en) 2017-09-07 2017-09-07 Information output method and device
PCT/CN2018/081956 WO2019047516A1 (en) 2017-09-07 2018-04-04 Method and device for information output

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710801348.4A CN110019330B (en) 2017-09-07 2017-09-07 Information output method and device

Publications (2)

Publication Number Publication Date
CN110019330A CN110019330A (en) 2019-07-16
CN110019330B true CN110019330B (en) 2021-07-06

Family

ID=65634548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710801348.4A Active CN110019330B (en) 2017-09-07 2017-09-07 Information output method and device

Country Status (2)

Country Link
CN (1) CN110019330B (en)
WO (1) WO2019047516A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537852A (en) * 2020-04-14 2021-10-22 成都鼎桥通信技术有限公司 Second killing processing method and system
CN113689155A (en) * 2020-05-18 2021-11-23 北京京东乾石科技有限公司 Warehouse-out method and warehouse-out device
CN111785346A (en) * 2020-05-29 2020-10-16 北京沃东天骏信息技术有限公司 Prescription order distribution method, system, device and storage medium
CN113807760A (en) * 2021-01-07 2021-12-17 北京沃东天骏信息技术有限公司 Inventory information processing method and device, readable storage medium and electronic equipment
CN112765277A (en) * 2021-01-28 2021-05-07 树根互联股份有限公司 Data synchronization method, device and system
CN113780924B (en) * 2021-01-29 2024-04-16 北京京东振世信息技术有限公司 Method and device for generating information
CN113052536A (en) * 2021-04-06 2021-06-29 北京京东振世信息技术有限公司 Order processing method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978639A (en) * 2014-04-09 2015-10-14 阿里巴巴集团控股有限公司 Method and device for showing inventory
CN105096065A (en) * 2014-04-16 2015-11-25 阿里巴巴集团控股有限公司 Inventory deduction method and inventory deduction device
CN106875262A (en) * 2017-02-28 2017-06-20 网易无尾熊(杭州)科技有限公司 Method, device and computer-readable recording medium for order processing
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515391B (en) * 2009-03-20 2010-08-11 北京理工大学 Automatic book management system based on closed stacks
CN103426072B (en) * 2013-07-16 2016-02-17 无限极(中国)有限公司 The order processing system of a kind of high concurrent competition stock and disposal route thereof
CN104021481A (en) * 2014-07-01 2014-09-03 浪潮软件股份有限公司 High-efficiency order batch-processing method of tobacco industry orders
US10582001B2 (en) * 2015-08-11 2020-03-03 Oracle International Corporation Asynchronous pre-caching of synchronously loaded resources
CN106803158A (en) * 2015-11-26 2017-06-06 阿里巴巴集团控股有限公司 The processing method of storage data, device and system in products storage circulation system
CN106709071A (en) * 2017-02-03 2017-05-24 北京小米移动软件有限公司 Network transaction processing method and apparatus
CN106886938B (en) * 2017-02-21 2021-02-12 驼队重卡(北京)物流信息技术有限责任公司 Method and device for updating bulk commodity freight handling information
CN107038629A (en) * 2017-06-13 2017-08-11 舒达家居用品(深圳)有限公司 Order processing method, device and server in a kind of commodity transaction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978639A (en) * 2014-04-09 2015-10-14 阿里巴巴集团控股有限公司 Method and device for showing inventory
CN105096065A (en) * 2014-04-16 2015-11-25 阿里巴巴集团控股有限公司 Inventory deduction method and inventory deduction device
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device
CN106875262A (en) * 2017-02-28 2017-06-20 网易无尾熊(杭州)科技有限公司 Method, device and computer-readable recording medium for order processing

Also Published As

Publication number Publication date
CN110019330A (en) 2019-07-16
WO2019047516A1 (en) 2019-03-14

Similar Documents

Publication Publication Date Title
CN110019330B (en) Information output method and device
CN110866709B (en) Method and device for merging orders
US20200043080A1 (en) Order processing method and device, server, and storage medium
US11232392B2 (en) Method for processing orders and electronic device
CN107451785B (en) Method and apparatus for outputting information
CN110473036B (en) Method and device for generating order number
CN111324786B (en) Method and device for processing consultation problem information
CN107844927B (en) Method and device for improving warehousing and ex-warehouse efficiency
CN110033337A (en) The method and apparatus of order production
CN110648089A (en) Method and device for determining delivery timeliness of articles
CN111861298A (en) Order canceling method and device
CN111695840A (en) Method and device for realizing flow control
CN109255563B (en) Method and device for determining storage area of article
CN113393193A (en) Warehouse-out method and device
WO2019015254A1 (en) Information processing method and device
CN113780915A (en) Service docking method and device
CN111260271A (en) Method and device for shortening order picking time of store
US20240054451A1 (en) Inventory information processing method and device
CN112926907B (en) Warehouse inventory layout method and device
CN113222680A (en) Method and device for generating order
CN113538080A (en) Task list splitting method and device
CN112053106A (en) Method and device for managing delivery of articles
CN113762825A (en) Method and device for determining ex-warehouse list
CN111861293A (en) Method and apparatus for transmitting information
CN109902982B (en) Method and apparatus for outputting information

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