CN111461617B - Inventory counting method and device, computer equipment and storage medium - Google Patents

Inventory counting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111461617B
CN111461617B CN202010269860.0A CN202010269860A CN111461617B CN 111461617 B CN111461617 B CN 111461617B CN 202010269860 A CN202010269860 A CN 202010269860A CN 111461617 B CN111461617 B CN 111461617B
Authority
CN
China
Prior art keywords
record
container
records
goods
query
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
CN202010269860.0A
Other languages
Chinese (zh)
Other versions
CN111461617A (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.)
New Trend International Logis Tech Co ltd
Original Assignee
New Trend International Logis Tech 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 New Trend International Logis Tech Co ltd filed Critical New Trend International Logis Tech Co ltd
Priority to CN202010269860.0A priority Critical patent/CN111461617B/en
Publication of CN111461617A publication Critical patent/CN111461617A/en
Application granted granted Critical
Publication of CN111461617B publication Critical patent/CN111461617B/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
    • G06Q10/0875Itemisation or classification of parts, supplies or services, e.g. bill of materials
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • 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/2455Query execution

Landscapes

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

Abstract

The invention discloses an inventory counting method, an inventory counting device, computer equipment and a storage medium, wherein the method comprises the following steps: when the containers in a given range need to be inquired, inquiring the goods grids meeting the requirements according to the organization structure information, then inquiring the container information of the goods grids according to the goods grid stream record table, and removing the containers which do not meet the requirements according to the container locking record table; when the inventory information of the goods in the given container needs to be inquired, the inventory information of the goods is inquired according to the container operation record table, and the inquired inventory result is corrected according to the order quantity locking record table. The method provided by the invention can realize the inventory summarizing and inquiring under any range condition without operating and updating the inventory summarizing table.

Description

Inventory counting method and device, computer equipment and storage medium
Technical Field
The invention relates to the field of warehouse management, in particular to a warehouse statistical method, a device, computer equipment and a storage medium.
Background
In the warehouse management process, the inventory condition is often required to be queried, and in order to achieve the effect, an inventory summary table is generally recorded. This table is modified synchronously each time there is a change in inventory. When the inventory needs to be inquired, the inventory summary table can be directly checked.
However, the following 3 defects occur in the above manner:
1. each time an inventory is changed, the inventory summary table needs to be updated synchronously. There are sometimes situations where there is no synchronous modification, resulting in errors in the inventory summary and difficult verification and repair.
2. If there are goods in the warehouse, but some goods may not be available for various reasons, so that the normally available stock condition can not be obtained from the stock summary table.
3. From the current inventory summary table, the historical inventory condition at a specific moment cannot be inquired.
Disclosure of Invention
The embodiment of the invention provides an inventory statistics method and device, computer equipment and a storage medium, and aims to solve the problem that inventory statistics cannot be accurately and effectively summarized in the prior art.
The embodiment of the invention provides an inventory statistics method, which comprises the following steps:
acquiring organization structure information among the goods grids, and numbering each goods grid uniquely;
when the operation of moving in or removing the container occurs in the cargo space, recording the information of the moved in or removed container and the operation time to form a cargo space flow record table;
when the container is operated to leave or put goods in storage, recording the goods information and operation time of leaving or putting goods in storage to form a container operation record table;
when the container is locked or unlocked, recording the information of the locked or unlocked container and the operation time to form a container locking record table;
when the order has the goods which are applied but not delivered from the warehouse, locking the goods according to the required quantity; when the needed goods are delivered out of the warehouse, unlocking the goods with the corresponding quantity in the container; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
when the containers in a given range need to be inquired, inquiring the cargo grids meeting the requirements according to the organization structure information, then inquiring the container information of the cargo grids according to the cargo grid stream record table, and removing the containers which do not meet the requirements according to the container locking record table;
when the inventory information of the goods in the given container needs to be inquired, the inventory information of the goods is inquired according to the container operation record table, and the inquired inventory result is corrected according to the order quantity locking record table.
The embodiment of the present invention further provides an inventory statistics apparatus, which includes:
the organization structure information acquisition unit is used for acquiring organization structure information among the cargo grids and uniquely numbering each cargo grid;
the cargo grid flow recording unit is used for recording the container information moved in or removed and the operation time when the cargo grid generates the operation of moving in or removing the container, and forming a cargo grid flow recording table;
the container operation recording unit is used for recording the goods information and the operation time of the warehouse-out or warehouse-in when the goods warehouse-out or warehouse-in operation occurs to the container, and forming a container operation recording table;
the container locking recording unit is used for recording the locked or unlocked container information and the operation time when the container is locked or unlocked to form a container locking recording table;
the order quantity locking and recording unit is used for locking the goods according to the required quantity when the goods which are applied but not delivered from the warehouse exist in the order; when the needed goods are delivered out of the warehouse, unlocking the goods in the container in a corresponding quantity; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
the container inquiry unit is used for inquiring the cargo grids meeting the requirements according to the organization structure information when the containers in a given range need to be inquired, inquiring the container information of the cargo grids according to the cargo grid flow record table, and eliminating the containers not meeting the requirements according to the container locking record table;
and the goods inventory inquiry unit is used for inquiring the goods inventory information according to the container operation record table and correcting the inquired inventory result according to the order quantity locking record table when the goods inventory information in the given container needs to be inquired.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the inventory counting method is realized when the processor executes the computer program.
Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program causes the processor to execute the inventory counting method.
The embodiment of the invention provides an inventory counting method, an inventory counting device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring organization structure information among the goods grids, and numbering each goods grid uniquely; when the operation of moving in or removing the container occurs in the cargo space, recording the information of the moved in or removed container and the operation time to form a cargo space flow record table; when goods are delivered or put in a warehouse of the container, recording goods information delivered or put in the warehouse and operation time to form a container operation record table; when the container is locked or unlocked, recording the information of the locked or unlocked container and the operation time to form a container locking record table; when the order has the goods which are applied but not delivered from the warehouse, locking the goods according to the required quantity; when the needed goods are delivered out of the warehouse, unlocking the goods with the corresponding quantity in the container; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table; when the containers in a given range need to be inquired, inquiring the cargo grids meeting the requirements according to the organization structure information, then inquiring the container information of the cargo grids according to the cargo grid stream record table, and removing the containers which do not meet the requirements according to the container locking record table; when the inventory information of the goods in the given container needs to be inquired, the inventory information of the goods is inquired according to the container operation record table, and the inquired inventory result is corrected according to the order quantity locking record table. The method provided by the embodiment of the invention can realize the inventory query of any range of conditions without updating the inventory summary table, and can realize the inventory query at any time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flow chart of an inventory statistics method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an inventory statistics apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations.
Referring to fig. 1, fig. 1 is a schematic flow chart of an inventory statistics method according to an embodiment of the present invention, and as shown in the figure, the method includes steps S101 to S107:
s101, obtaining organization structure information among the goods grids, and numbering each goods grid uniquely;
s102, when the container is moved in or removed from the cargo grid, recording the information of the moved in or removed container and the operation time to form a cargo grid flow record table;
s103, when goods are delivered or warehoused from the container, the goods information delivered or warehoused and the operation time are recorded, and a container operation record table is formed;
s104, when the container is locked or unlocked, recording the information of the locked or unlocked container and the operation time to form a container locking record table;
s105, when the order has the goods which are applied but not delivered from the warehouse, locking the goods according to the required quantity; when the needed goods are delivered out of the warehouse, unlocking the goods in the container in a corresponding quantity; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
s106, when the containers in a given range need to be inquired, inquiring the qualified goods grids according to the organization structure information, inquiring the container information of the goods grids according to the goods grid flow record table, and eliminating the containers which do not accord with the requirements according to the container locking record table;
s107, when the inventory information of the goods in the given container needs to be inquired, the inventory information of the goods is inquired according to the container operation record table, and the inquired inventory result is corrected according to the order quantity locking record table.
The method provided by the embodiment of the invention does not depend on the inventory summary table any more, so that the data in the inventory summary table does not need to be modified. If the operation involves the adjustment in the container, a container operation record table and a container locking record table are directly added or adjusted. If the operation relates to the corresponding relation between the container and the goods lattice, the additional operation is carried out on the goods lattice flow recording table. And for order placement and other operations requiring quantity guarantee: then the goods information needed by the order is recorded in the order quantity locking record table, and when the final goods are moved out of the container, the corresponding quantity in the container is unlocked and recorded in the order quantity locking record. The method provided by the embodiment of the invention can realize summary query in any range through the table.
In the embodiment of the invention, the container refers to a carrier of specific goods. One or more goods may be stored in one container. A container is the smallest unit of access. For example, when it is necessary to take the goods, the apparatus will take out the corresponding container, except for the special operation (picking), for subsequent operations and then put the remaining goods (if any) into the warehouse. In some warehouses, a container may be a virtual concept that directly handles a single good. For example, for a container yard, each container is stored with one or more items, i.e., containers. And if the product is a container, the container is stored as a product gauge. The container at this time is a virtual concept since the carrier is no longer needed. I.e. the container is placed in a virtual container, which is placed on the grid. The virtual container is the largest difference from the physical container in that the virtual container can be generated by empty space and disappears after being used up; the physical container must be provided at the time of use and kept in custody after use. Meanwhile, the virtual container generates a new container by empty every time, and the virtual container does not have continuous traceability after use is finished; the physical container can be recycled, and all goods carried by the container can be tracked all the time. In industrial production, common containers include trays, bins, gunny bags, and the like.
A shelf refers to a physical location where a container (e.g., a pallet) is stored. A shelf may hold a container. If a compartment can hold multiple containers, it is considered an aggregate compartment that can be subdivided into smaller compartments. Sometimes the container is too large and may occupy multiple successive compartments for storage.
Specifically, in the step S101, the organization structure information between the cargo grids is acquired, and each cargo grid is uniquely numbered.
The organization structure information among the goods grids comprises information such as the positions of the goods grids in the warehouse, the number of the goods grids, the corresponding relation between the goods grids and the containers and the like, and each goods grid is required to have a unique number.
In the step S102, if the container moving in or removing operation occurs in the grid, it needs to be recorded, and the content of the record is the container information of the moving in or removing and the operation time, and the container information may be the number of containers, so that if the moving in or removing operation occurs multiple times, multiple records are formed, and these records form the grid flow record table. Of course, if the containers are classified into different categories, the container information may further include the category of the containers, and the like.
In step S103, if the goods on the container are in-out or in-in operation, it needs to be recorded, where the recorded content is information such as the number of goods in-out or in-in and the operation time, and if the goods are in-out or in-in operation many times, a plurality of records are formed, and these records form a container operation record table.
In step S104, when the container is locked or unlocked, it is necessary to record the locked or unlocked container information, which may include the number of containers, and the like, and the operation time, so as to form a container lock record table. Of course, if the containers are classified into different categories, the container information may further include the category of the containers, and the like.
This is often the case because of business reasons that the container is temporarily not listed as a record of available inventory. For example, unfinished goods cannot be used for daily business delivery, and so their containers are temporarily locked and should not be counted in available inventory. And after the quality inspection is finished, the container can be unlocked and listed as available stock.
In step S105, if there are goods that have been applied for but not delivered from the warehouse in the order, the goods should not be delivered from the warehouse at other time, and the real stock cannot be calculated, so the goods should be locked according to the required quantity; when the required goods are delivered from the warehouse, the corresponding quantity of the goods in the container needs to be unlocked in time.
In the process of locking or unlocking the goods, the locked goods information and the application time, and the unlocked goods information and the unlocking time need to be recorded to form an order quantity locking record table. The cargo information may include the number of cargos, and of course, may also include information such as the type of cargo.
In the step S106, when a container in a given range needs to be queried, querying a good lattice meeting requirements according to the organization structure information, then querying container information of the good lattice according to a good lattice pipelining record table, and excluding containers not meeting requirements according to the container locking record table;
when the container is inquired, the container information in the cargo space can be quickly inquired according to the cargo space flow record table, and then the container which is not qualified needs to be eliminated according to the container locking record table because the container which is not available is possibly recorded in the container locking record table.
In this step, the user specifies range information, which includes: guiding a storage space system to determine a cargo grid required to be inquired; query conditions, such as how to handle non-quality inspected goods, etc.; inquiring time; other filtering information, such as whether the equipment status of the cargo should be taken into account, etc.
In step S107, when querying the inventory information of the goods, the inventory information of the goods may be rapidly queried according to the container operation record table, and since the locked goods may be recorded in the order quantity locking record table, the queried inventory result needs to be corrected according to the order quantity locking record table, that is, the locked goods are excluded.
In this step, the user gives range information, which includes: query conditions, such as whether only a specific batch or specific goods is queried, whether the locked goods need to be calculated; and inquiring the time.
In one embodiment, the inventory statistics method further includes:
s201, when any one of the cargo flow record table, the container operation record table, the container locking record table and the order quantity locking record table needs to be shrunk, obtaining a shrinking range;
s202, summarizing all records in the contraction range to obtain one or two summarized records;
and S203, clearing all records in the shrinkage range.
Since inventory queries typically progressively increase in query granularity for old data over a period of time, historical records may be narrowed down on a time scale. For example, when looking up data from the past year, it is common to focus on a summary of what happens every day, and not on what happens every moment in the day. And when longer data is queried, the query only needs to be accurate to the month or even the year. The records to be contracted may be determined by business requirements, such as all operations of a particular specification in a particular year. To reduce the number of operation records (particularly container operation record tables, order quantity lock record tables, etc.), the history records may be contracted.
Generally, the record table shrinkage is divided into the following three steps: 1. finding a record to be contracted (usually determined according to a standard and a time period) so as to determine a contraction range; 2. summarizing all records in the contraction range, and generating one or two summarized records; 3. and finally cleaning the contracted records.
In one embodiment, the cleaning of each record in the shrinkage range includes:
attribute marking is carried out on each record in the contraction range, and each marked record is ignored when being used;
or, moving each record in the contraction range to a history table for storage;
alternatively, each record within the contraction range is deleted.
That is, there are three methods of cleaning the records: 1. the flag is deleted. Records are attribute marked so that they are ignored for use. This method is typically used in a small number of situations, or where a history needs to be kept in place. 2. And (5) moving and deleting. The method moves the record to the history table for storage, and is suitable for general situations. 3. And (4) directly deleting. This approach is applicable where such detailed information is not really needed.
The time to aggregate the records is typically selected at either end of the contracted record. In addition, both the number of contracted records and the start/end time may be recorded as additional information on the newly generated summary record.
In an embodiment, when the container is operated to warehouse out or warehouse in, the information of the goods warehouse out or warehouse in and the operation time are recorded to form a container operation record table, including:
respectively recording the operation of warehouse-out or warehouse-in to form two container operation record tables; or the unified record is carried out aiming at the operation of warehouse-out or warehouse-in, and a container operation record table is formed.
In other words, in the embodiment of the present invention, record summarization generally has two ways, one is to summarize an operation into one record when the operation is put into the warehouse is positive and the operation is put out of the warehouse is negative; in another method, two records are generated by respectively collecting the warehouse entries and warehouse exits. And according to the requirements of user services, for example, whether the input and output volumes need to be respectively counted or not is selected for use.
The method provided by the embodiments of the invention relies on a fast summary and summation function for the record table in most scenarios. That is, the method provided by the embodiment of the present invention may bring a large amount of summary query requirements for these record tables. Particularly, for the container operation log table and the order quantity locking log table, in the field of warehouse management, the log quantities of the two log tables are very large, so that it is suggested that the capability of rapid summarization is required.
The following ways to realize the quick summary of the record list are provided:
1. the database can provide a technology covering sorting, such as index and aggregation index, and the screening speed of the data can be effectively improved when grouping and summing are carried out by using the technology. This technique does not reduce the number of records that need to be summed and therefore only helps to reduce the access overhead incurred by the summation.
2. Some systems can preset some conditions (for example, independent summary of flow meters at 0 point per day), and through planned archiving, the grouping and summation requirements of the real-time service system are reduced. When the user's condition does not belong to the pre-defined condition, there is limited or no help. For a system with a complex query scene, the probability of hit of the pre-condition is too low, so the significance is not obvious.
The embodiment of the invention provides a function of quickly summarizing and inquiring a record table. Taking the container operation record table as an example, it is obvious that the fast summary query function can be implemented in the same way for other record tables.
In one embodiment, the querying the inventory information of the goods according to the container operation record table includes:
s301, taking out N +1 records which are nearest to the query time and are not later than the query time from a container operation record table, and performing descending processing on the N +1 records according to the insertion time;
s302, extracting each record in the N +1 records one by one from front to back, and acquiring the type of the extracted record;
s303, if the type of the extracted record is a general record, judging whether the general record is the (N + 1) th record: if yes, executing a flow for establishing an accelerated record by taking the query time and the filtering condition field as conditions; if not, grouping the general records according to the grouping condition fields, summing the general records with the values of the similar records, and then continuously extracting the next record;
s304, if the type of the extracted record is an accelerated record, grouping each sub-record in the accelerated record according to a grouping condition field, summing the sub-records with the values of the similar records, and then returning the summation result;
wherein, the process of establishing the accelerated record comprises the following steps: and summarizing the values of the records one by one according to the insertion time of the records in the container operation record table until the accelerated records are summarized or all the records are summarized, establishing an accelerated record containing a summarized result in the container operation record table according to the query time, and returning the summarized result.
In brief, in the query process, after the data is filtered according to the filtering condition, the first record is read first. If the record is an acceleration record, the record is directly returned, if the record is a common record, summation is needed, and then the next record is continuously read until all records are summarized.
By the method provided by the embodiment, when the container operation record table is summarized and summed, the read record quantity can be reduced, so that the summing efficiency of repeated calling is effectively improved. And each summed (or aggregated) result may contribute to a subsequent summation.
It should be noted that, in the embodiments of the present invention, the value refers to a value of a certain key field, and generally refers to a value of an inventory field, and the like.
In step S301, when a query instruction is received, the corresponding record may be taken out from the container operation record table, and specifically, N +1 records that are closest to the query time and are not later than the query time may be taken out. So that the insertion time of these retrieved records will not be later than the query time. And then performing descending processing on the N +1 records, wherein the descending processing is performed according to the inserting time, the later the inserting time is, the farther the inserting time is, the earlier the inserting time is, the farther the inserting time is, the later the inserting time is. This forms a plurality of records that can be queried.
In step S302, each of the N +1 records is extracted from front to back, and since the foregoing steps are performed in descending order according to the insertion time, the record with the later insertion time is arranged in front, and thus the record with the later insertion time is extracted first, and then the record with the earlier insertion time is extracted. Each record has a corresponding type. For example, the normal record in the container operation record table is a normal record, the record used for acceleration in the container operation record table is an acceleration record, and the acceleration record can be specifically divided into a normal acceleration record (i.e. a created acceleration record) and a created acceleration record.
In step S303, if the type of the extracted record is a general record, it needs to be further determined whether the general record is the (N + 1) th record: if yes, executing a flow for establishing an acceleration record by taking the query time and the filtering condition field as conditions; if not, grouping the general records according to the grouping condition field, summing the general records with the values of the similar records, and then continuously extracting the next record.
In this embodiment, the process of establishing the acceleration record includes: and summarizing the values of the records one by one according to the insertion time of the records in the container operation record table until the accelerated records are summarized or all the records are summarized, establishing an accelerated record containing a summarized result in the container operation record table according to the query time, and returning the summarized result.
The accelerated record is used to temporarily store the result of summing the time of day (i.e., the insertion time of the accelerated record) and the values of all earlier records in the same filter condition field. The acceleration of a certain filter condition field at a certain moment includes the sum of the values of records grouped according to the grouping condition field from the longest record of a table to the moment (including), wherein all types of the same filter condition field are records of general data.
When summing, after filtering according to the filtering condition field and the ending time, sorting according to time from new to old, and judging one by one. If the record is a common record, summing the number of the records in the memory according to the grouping condition field, and processing the next record; if the record is an accelerated record, adding the number corresponding to each grouping condition contained in the accelerated record into the summation result in the memory, and ending the processing; if there is no next record, the process is ended.
Through the introduction of the accelerated recording, the number of scanned records during summation can be reduced, and the efficiency of summation operation is greatly improved. However, it is necessary to ensure the accuracy of the value of the accelerated record, and to minimize the influence on the high-frequency operation (e.g., additional operation) of the table while ensuring this condition.
Structure of accelerated recording: since the accelerated record contains the packet summation result for each packet condition field, the accelerated record can be arranged as a master-slave table structure: master and slave tables. The main table is a record table: the main key is random, the data type is 'accelerated record', the insertion time is the cut-off time of the accelerated record, the filtering condition field is the same as the record contained in the accelerated record, and the grouping condition field and the number are null. The slave table is an acceleration record table (or acceleration data table): the main key is random, the outer key of the record table is the main key of the last record, the grouping condition field is the condition field during grouping calculation, and the quantity (the quantity is the value) is the summation quantity. The structure of the accelerated recording can be referred to subsequent embodiment 1.
In step S304, if the type of the extracted record is an accelerated record, it indicates that there is an accelerated record in N +1 records, so each sub-record in the accelerated record is directly grouped according to the grouping condition field, and summed with the value of the record of the same type, and then the summed result is returned.
In one embodiment, the querying the inventory information of the goods according to the container operation record table further includes:
when an instruction to perform a change operation on a record in the container operation record table is detected, the scope of the change operation is declared in advance in the edit status table.
If there is an operation of changing the record in the container operation record table, it needs to make a statement in the edit status table, so that in the query process, the scope to be summarized can be checked in time and processed accordingly.
In an embodiment, the querying the inventory information of the goods according to the container operation record table further includes:
when the change operation is performed on the record in the container operation record table, all the acceleration records affected by the change operation are cleared. That is, if the accelerated record contains the value of the record corresponding to the change operation, the accelerated record will become inaccurate, and the accelerated record at this time is meaningless, so that the corresponding accelerated record needs to be cleared. Of course, the above change operation is performed for normal recording, and the change operation is not performed for accelerated recording. For example, in the container operation record table, the insertion time of one general record is 1 month, 23 days 12. Of course, there may be more than one affected accelerated records, and all affected accelerated records should be cleaned.
In an embodiment, the process of establishing the accelerated record further includes:
regularly detecting whether a statement belonging to a range to be summarized exists in the editing state table, if not, establishing an acceleration record containing a summary result in the container operation record table according to query time, and returning the summary result; if not, no acceleration record is established, and the summary result is returned.
This embodiment is to periodically check whether there is any statement belonging to the scope to be summarized in the query process, and if there is any statement, it is not necessary to establish an acceleration record, but the summary result is returned. This is because, if the accelerated record is continuously created at this time, the record is changed after the accelerated record is created, and the accelerated record created before is meaningless.
In one embodiment, the querying the inventory information of the goods according to the container operation record table further includes:
and locking the records in the range to be summarized according to the query instruction, and controlling to forbid changing of the records in the range to be summarized.
When a query is initiated, a time and filtering conditions are given by the conditions, and then a large amount of data in the record list is selected to be summarized. And the transaction of this query will also be locked by the database. That is, before the query is completed, any operation except the transaction cannot delete and modify the selected data, and cannot add a record which belongs to the range of the original query condition. This transaction ensures that the data to be summarized does not change during the summary calculation process, so as to ensure that the generated accelerated records are consistent with the summarized data results, and errors due to concurrent change operations are avoided.
If there is a change operation, which is just within the original query condition, its operation will enter the wait phase because of the lock of the query transaction. After the change operation is completed, all affected accelerated records are cleared, so that the accelerated record creating process is finished as soon as possible, and the waiting time of the change operation can be reduced, and the meaningless record writing can also be reduced. Therefore, in the process of the change operation, the change operation is declared in the edit status table in advance, so that the concurrent query operation is known and actively suspended.
Therefore, the query operation periodically detects whether the edit status table has a declaration belonging to the scope of the query operation in the summary process. If not, continuing; if so, the attempt to save the results to the accelerated record is stopped. But the summarization operation may continue because the initiating query operator still expects a result, although this result may become inaccurate due to concurrent operations. This inaccurate operation may still have meaning to the initiator, but may not be solidified in the database in the form of an accelerated record.
In an embodiment, the summarizing values of the records one by one according to the insertion time of the records in the container operation record table until the acceleration records are summarized or all the records are summarized, establishing an acceleration record containing a summarized result in the container operation record table according to the query time, and returning the summarized result, includes:
taking out N +1 records which are closest to the query time of the current query and are not later than the query time of the current query in the container operation record table, and performing descending processing on the N +1 records according to the insertion time;
extracting each record in the N +1 records one by one from front to back, and acquiring the type of the extracted record;
if the type of the taken record is a general record, judging whether the general record is the (N + 1) th record, if so, taking the insertion time of the general record as the query time of the sub-query and the field of the filter condition as the condition of the sub-query, executing the process of establishing the accelerated record again and obtaining the summary result of the sub-query, summarizing the summary result of the sub-query and the results of the first N records to obtain a total summary result, establishing an accelerated record containing the total summary result in a container operation record list according to the query time of the current query, and returning the total summary result; if not, grouping the corresponding records according to the grouping condition field, summing the values of the records of the same type, and returning to continue extracting the next record;
and if the type of the extracted record is the accelerated record, grouping each sub-record in the accelerated record according to the grouping condition field, summing the values of the records of the same type, establishing an accelerated record containing a summary result in a container operation record table by inquiring time, and returning the summary result.
And creating an acceleration record in the query time, sequentially processing the records, summarizing the result to the acceleration record for storage, and returning the result. If an accelerated record is processed, it is not necessary to continue processing subsequent records because it will cover all subsequent records. If no accelerated records have been encountered, processing is required until the last eligible piece of data.
In doing so, an acceleration record is generated relating to query time and filtering conditions to accelerate subsequent queries.
But doing so may create a new problem: i.e. only one accelerated record will be created. For example, if the query is made on the current date, the process will continue until the last accelerated record or the oldest first record, but only save the final result. This process needs to be almost repeated if the user makes another query at an earlier time later. Therefore, when a certain time interval is processed and a certain number of records still do not meet the accelerated records, the query suspends the subsequent processing, recursively calls itself under the condition of the current to-be-processed next piece of data, and directly summarizes the calling result into the processing result of itself.
For example, 100 pieces of data are to be processed, and the system is set to process only 10 pieces (i.e., N as described above). The system will judge whether it is acceleration record when processing the 11 th record, if not, it will suspend its subsequent operation and recursively call itself, requiring to restart operation from the 11 th record, and directly assemble the result of sub-call into the result of already collected 1-10 records to regenerate acceleration record. The same procedure is followed for 90 data entries, and once all the entries are processed again in the recursive … …, 10 accelerated records are generated, one for every 10 original records. When the time range of the subsequent query is smaller than that of the query, the acceleration record created at this time can be encountered without completing all scans once. Since the creation of accelerated records itself also incurs storage and writing overhead, when the last accelerated record is not too far from the query time (number of entries), the negative effect of creating a new accelerated record is greater than the subsequent accelerated significance, and therefore it is preferable not to create accelerated records, but to create one accelerated record every N as far as possible.
Since the acceleration record must include all packets, even if the query is required to be performed on a single packet, all packet data must be collected and stored as long as the acceleration record needs to be created. Only when returning the value, only the data of the given grouping condition needs to be returned (since the user explicitly provides the value of the required grouping condition). But if during the query it is found that it is currently not advisable to create acceleration records (due to concurrent change operations), then data processing will not have to be done on all packets.
In an embodiment, the process of establishing the accelerated record further includes:
if the type of the taken record is a general record, judging whether the difference value between the insertion time of the general record and the query time of the current query exceeds a threshold value, if so, taking the insertion time of the general record as the query time of the sub-query and a filtering condition field as the condition of the sub-query, executing the process of establishing an accelerated record again and obtaining a summary result of the sub-query, summarizing the summary result of the sub-query and the results of the first N records to obtain a total summary result, establishing an accelerated record containing the total summary result in a container operation record list according to the query time of the current query, and returning the total summary result; if not, grouping the corresponding records according to the grouping condition field, summing the grouping condition field with the values of the similar records, and returning to continue extracting the next record.
Because the summary query of the container operation record table is often related to the generation of the daily report table, if the acceleration record can be inserted at a specific time, the generation of the daily report table can be effectively assisted. Thus, even if the limit of N is not satisfied, accelerated recording may need to be generated when time meets certain requirements. Whether or not to generate an accelerated record depends on the actual usage requirements of the user for this table of container operation records. Similar to the above embodiment, when the insertion time and the query time of the record exceed a certain time, the accelerated record is generated in segments. For example, when the system automatically generates reports at 0 o 'clock daily, setting T (threshold) fixed at 24 hours may also generate historical accelerated records of 0 o' clock daily. This setting is typically suitable for use in generating reports at fixed times.
In one embodiment, if the type of the extracted record is a general record, determining whether a difference value between the insertion time and the query time of the general record exceeds a threshold, if so, executing a process of establishing an accelerated record by taking the query time and a filtering condition field as conditions; if not, grouping the general records according to the grouping condition field, summing the general records with the values of the similar records, and then continuously extracting the next record.
That is, if the type of the extracted record is a general record, even if the type of the extracted record is not the (N + 1) th record, it can be determined whether the difference between the insertion time of the general record and the query time exceeds the threshold, and if so, an acceleration record needs to be established as in the above embodiment.
Example 1: general inventory query procedure
For example, the query requirements are as follows: query 2020, month 4, day 1, point 0, for all commodity a that has been checked, except that belonging to the first warehouse.
The operations to be performed are:
1, inquiring all containers meeting the conditions according to the conditions (time-0 point at 4/1/2020, condition-quality inspection, specification, commodity A, range-exclusion first warehouse). EXAMPLE 2
2, calculating the stock in the container according to the conditions (time-0 point at 4/1/2020, condition-quality inspection, quality standard-commodity A). EXAMPLE 3
In some scenarios, certain conditions, specification requirements, etc. may be checked repeatedly in both, depending on whether these requirements are simultaneously acting on the container itself and within the container. For example, if the warehouse requires quality inspection only with the container as the minimum unit, the judgment of the quality inspection condition only needs to occur in the stage of inquiring the container, and does not need to occur in the stage of inquiring the number of goods in the container; as another example, if a warehouse allows more than one type of gauge to be stored in the same container at the same time, filtering of gauges may need to be applied to both inquiry processes at the same time.
Example 2: inquiry container
For example, the query requirements are as follows: query 2020, month 4, day 1, point 0, for all commodity a that has been checked, except that belonging to the first warehouse.
First, according to the warehouse structure, the layers are spread from the top layer to the bottom layer, but the nodes of the first warehouse need to be excluded.
All of the grids are queried for each base level node.
Each shelf was queried for containers that were saved at 0 o' clock, 4/1/2020.
And executing prejudgment query on each container, and checking whether the requirements of conditions and quality specifications are met. If not, it is not included in the result. If so, it is included in the results and the query results may be cached.
If the container is already locked and it is desired not to return the locked container, it is also excluded from the results.
All containers in the result are returned.
Example 3: enquiring the quantity of goods in a container
For example, the query requirements are as follows: all the commodities A which have been subjected to quality inspection are inquired at 0 point of 1/4/2020.
First requiring the user to enter into the container area.
For each container, calculate the 0 o' clock of 1/4/2020, and inventory of the inspected product A in all containers.
The inventory is aggregated.
If there is a record of the corresponding order quantity lock and the requirement does not contain these results, the quantity should be subtracted from the inventory.
Example 4
There is a record table (the record table may be a container operation record table, and the following embodiment is the same as this embodiment) as follows:
Figure BDA0002442738640000151
Figure BDA0002442738640000161
setting query filtering conditions: filtration conditions 1=1, filtration conditions 2=1.
Record 2 does not participate in the calculation because it is not eligible.
According to grouping conditions, the obtained summary value result is:
grouping Condition 1 Grouping Condition 2 Results
1 2 5
2 1 2
The above table is recorded as slave table data in the "acceleration data table" because more than one grouping condition combination is used. And a 'speeding record' is recorded in the 'record table' as a main record, and is associated with the record in the table through the ID to form a master-slave relationship.
Example 5
After the record table is set, filtering according to the filtering condition and the insertion time condition, and obtaining the following conditions:
Figure BDA0002442738640000162
since the first record is the acceleration record, the value contained in the first record can be directly returned after the record is extracted for the first time, and certainly, if the query is performed in a mode of all groups, the result of all groups in the acceleration record can be returned, and if the query is performed in a mode of single group, the result of single group in the acceleration record can be returned.
Example 6
After the record table is set, filtering according to the filtering condition and the insertion time condition, and obtaining the following conditions:
Figure BDA0002442738640000171
when the value of N is not less than 3, the system has found an accelerated record within N +1 records. Therefore, the first 4 records are summarized, namely the query result.
Example 7
After the record table is set, filtering according to the filtering condition and the insertion time condition, and obtaining the following conditions:
Figure BDA0002442738640000172
Figure BDA0002442738640000181
let N =10.
The query processing to the 11 (N + 1) th record still does not find an accelerated record, so that an accelerated record tends to be established at the current incoming query time (which is certainly not earlier than 10. Since the system also provides for the ordering of the accelerated records to precede the normal records, the records must be located before the original record 1, and there are no other records with the same filtering condition as the original record 1. In particular, if during the query process, it is found that a record with the same filtering condition is about to occur and a record change or insertion occurs earlier than the query time, no accelerated record is created.
If the method is adopted, the summarizing process is executed until the record is finished, or an acceleration record is encountered, the summarizing record is stored in the newly-added acceleration record, and the summarizing result is returned.
However, if another query follows, using the same filter conditions but with a query time of 9. Thereby introducing optimization of the piecewise recursive query.
That is, when the 11 (N + 1) th record is processed and no accelerated record is found, the processing of the subsequent records is suspended, and the same kind of query (sub-query) is issued again, with the same filtering condition, and the insertion time of the 11 (N + 1) th record is taken as the query time. And summarizing the result returned by the sub-query and the results of the first N records, writing the accelerated records and returning. During the process of sub-query, the above-mentioned process is also executed. The overall result will become one accelerated record inserted every N. This process of segment aggregation does not increase the number of reads of data, but results in more accelerated records. These accelerated records will be effective in providing help for subsequent queries that are the same filter criteria and that are earlier in query time.
Referring to fig. 2, fig. 2 is a schematic block diagram of an inventory statistics apparatus 200 according to an embodiment of the present invention, including:
an organization structure information obtaining unit 201, configured to obtain organization structure information between the cargo grids, and uniquely number each cargo grid;
a cargo grid flow recording unit 202, configured to record container information and operation time of the container moved in or removed when a cargo grid operation occurs, so as to form a cargo grid flow recording table;
the container operation recording unit 203 is used for recording the goods information and the operation time of the warehouse-out or warehouse-in when the goods warehouse-out or warehouse-in operation occurs to the container, and forming a container operation recording table;
a container locking recording unit 204 for recording the locked or unlocked container information and the operation time when the container is locked or unlocked, and forming a container locking recording table;
an order quantity locking and recording unit 205, configured to lock the goods according to the required quantity when the goods that have been applied for but have not been delivered from the warehouse exist in the order; when the needed goods are delivered out of the warehouse, unlocking the goods in the container in a corresponding quantity; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
the container query unit 206 is configured to query, when a container in a given range needs to be queried, a cargo grid meeting requirements according to the organization structure information, then query container information of the cargo grid according to a cargo grid stream record table, and exclude containers not meeting requirements according to the container locking record table;
the goods inventory query unit 207 is configured to query the goods inventory information according to the container operation record table and correct the queried inventory result according to the order quantity locking record table when the goods inventory information in the given container needs to be queried.
Since the embodiments of the apparatus are similar to the embodiments of the method, specific technical details regarding the embodiments of the apparatus may refer to the description of the embodiments of the method, and are not repeated herein.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the inventory counting method is implemented.
Embodiments of the present invention also provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program causes the processor to execute the inventory statistics method as described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electrical, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a mechanical hard disk, a solid state disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. An inventory statistics method, comprising:
acquiring organization structure information among the goods grids, and numbering each goods grid uniquely;
when the operation of moving in or removing the container occurs in the cargo space, recording the information of the moved in or removed container and the operation time to form a cargo space flow record table;
when goods are delivered or put in a warehouse of the container, recording goods information delivered or put in the warehouse and operation time to form a container operation record table;
when the container is locked or unlocked, recording the information of the locked or unlocked container and the operation time to form a container locking record table;
when the order has the goods which are applied but not delivered from the warehouse, locking the goods according to the required quantity; when the needed goods are delivered out of the warehouse, unlocking the goods with the corresponding quantity in the container; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
when the containers in a given range need to be inquired, inquiring the cargo grids meeting the requirements according to the organization structure information, then inquiring the container information of the cargo grids according to the cargo grid stream record table, and removing the containers which do not meet the requirements according to the container locking record table;
when the inventory information of the goods in a given container needs to be inquired, inquiring the inventory information of the goods according to the container operation record table, and correcting the inquired inventory result according to the order quantity locking record table;
the querying of the inventory information of the goods according to the container operation record table comprises the following steps:
taking out N +1 records which are nearest to the query time and are not later than the query time from a container operation record table, and performing descending processing on the N +1 records according to the insertion time;
extracting each record in the N +1 records from front to back one by one, and acquiring the type of the extracted record;
if the type of the extracted record is a general record, judging whether the general record is the (N + 1) th record: if yes, executing a flow for establishing an acceleration record by taking the query time and the filtering condition field as conditions; if not, grouping the general records according to the grouping condition fields, summing the general records with the values of the similar records, and then continuously extracting the next record;
if the type of the extracted record is an accelerated record, grouping each sub-record in the accelerated record according to a grouping condition field, summing the values of the records of the same type, and then returning the summation result;
wherein, the process of establishing the accelerated record comprises the following steps: and summarizing the values of the records one by one according to the insertion time of the records in the container operation record table until the accelerated records are summarized or all the records are summarized, establishing an accelerated record containing a summarized result in the container operation record table according to the query time, and returning the summarized result.
2. The inventory statistics method of claim 1, further comprising:
when any one of the cargo flow record table, the container operation record table, the container locking record table and the order quantity locking record table needs to be shrunk, acquiring a shrinking range;
summarizing all records in the contraction range to obtain one or two summarized records;
and clearing each record in the shrinkage range.
3. The inventory statistics method of claim 2, wherein the cleaning of individual records within a shrinkage range comprises:
attribute marking is carried out on each record in the contraction range, and each marked record is ignored when being used;
or, moving each record in the contraction range to a history table for storage;
alternatively, each record within the contraction range is deleted.
4. The inventory counting method according to claim 1, wherein when the container is operated to warehouse or warehouse, the information of the goods warehouse or warehouse and the operation time are recorded to form a container operation record table, and the method comprises the following steps:
respectively recording the operation of warehouse-out or warehouse-in to form two container operation record tables; or the unified record is carried out aiming at the operation of warehouse-out or warehouse-in, and a container operation record table is formed.
5. The inventory counting method according to claim 1, wherein the aggregating the values of the records one by one according to the insertion time of the records in the container operation record table until the acceleration records are aggregated or all the records are aggregated, establishing an acceleration record containing the aggregated result in the container operation record table according to the query time, and returning the aggregated result, comprises:
taking out N +1 records which are closest to the query time of the current query and are not later than the query time of the current query in the container operation record table, and performing descending processing on the N +1 records according to the insertion time;
extracting each record in the N +1 records from front to back one by one, and acquiring the type of the extracted record;
if the type of the taken record is a general record, judging whether the general record is the (N + 1) th record, if so, taking the insertion time of the general record as the query time of the sub-query and the field of the filter condition as the condition of the sub-query, executing the process of establishing the accelerated record again and obtaining the summary result of the sub-query, summarizing the summary result of the sub-query and the results of the first N records to obtain a total summary result, establishing an accelerated record containing the total summary result in a container operation record list according to the query time of the current query, and returning the total summary result; if not, grouping the corresponding records according to the grouping condition field, summing the values of the records of the same type, and returning to continue extracting the next record;
if the type of the extracted record is an acceleration record, grouping each sub-record in the acceleration record according to a grouping condition field, summing the values of the records of the same type, establishing an acceleration record containing a summary result in a container operation record table by inquiring time, and returning the summary result.
6. The inventory statistics method of claim 5, wherein the process of establishing an accelerated record further comprises:
if the type of the taken record is a general record, judging whether the difference value between the insertion time of the general record and the query time of the current query exceeds a threshold value, if so, taking the insertion time of the general record as the query time of the sub-query and a filtering condition field as the condition of the sub-query, executing the process of establishing an accelerated record again and obtaining a summary result of the sub-query, summarizing the summary result of the sub-query and the results of the first N records to obtain a total summary result, establishing an accelerated record containing the total summary result in a container operation record list according to the query time of the current query, and returning the total summary result; if not, grouping the corresponding records according to the grouping condition field, summing the values of the records of the same type, and returning to continue extracting the next record.
7. An inventory statistics device, comprising:
the organization structure information acquisition unit is used for acquiring organization structure information among the cargo grids and uniquely numbering each cargo grid;
the cargo grid flow recording unit is used for recording the container information moved in or removed and the operation time when the cargo grid generates the operation of moving in or removing the container, and forming a cargo grid flow recording table;
the container operation recording unit is used for recording the goods information and the operation time of the warehouse-out or warehouse-in when the goods warehouse-out or warehouse-in operation occurs to the container, and forming a container operation recording table;
the container locking recording unit is used for recording the locked or unlocked container information and the operation time when the container is locked or unlocked to form a container locking recording table;
the order quantity locking and recording unit is used for locking the goods according to the required quantity when the goods which are applied but not delivered from the warehouse exist in the order; when the needed goods are delivered out of the warehouse, unlocking the goods in the container in a corresponding quantity; recording the locked goods information and the application time, and the unlocked goods information and the unlocking time to form an order quantity locking record table;
the container inquiry unit is used for inquiring the cargo grids meeting the requirements according to the organization structure information when the containers in a given range need to be inquired, inquiring the container information of the cargo grids according to the cargo grid flow record table, and eliminating the containers not meeting the requirements according to the container locking record table;
the goods inventory query unit is used for querying goods inventory information according to the container operation record table and correcting a queried inventory result according to the order quantity locking record table when the goods inventory information in a given container needs to be queried;
the goods inventory query unit is specifically configured to:
taking out N +1 records which are nearest to the query time and are not later than the query time from a container operation record table, and performing descending processing on the N +1 records according to the insertion time;
extracting each record in the N +1 records one by one from front to back, and acquiring the type of the extracted record;
if the type of the extracted record is a general record, judging whether the general record is the (N + 1) th record: if yes, executing a flow for establishing an acceleration record by taking the query time and the filtering condition field as conditions; if not, grouping the general records according to the grouping condition fields, summing the general records with the values of the similar records, and then continuously extracting the next record;
if the type of the extracted record is an accelerated record, grouping each sub-record in the accelerated record according to a grouping condition field, summing the values of the records of the same type, and then returning the summation result;
wherein, the process of establishing the accelerated record comprises the following steps: and summarizing the values of the records one by one according to the insertion time of the records in the container operation record table until the accelerated records are summarized or all the records are summarized, establishing an accelerated record containing a summarized result in the container operation record table according to the query time, and returning the summarized result.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the inventory counting method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, causes the processor to carry out the inventory statistics method according to any one of claims 1 to 6.
CN202010269860.0A 2020-04-08 2020-04-08 Inventory counting method and device, computer equipment and storage medium Active CN111461617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010269860.0A CN111461617B (en) 2020-04-08 2020-04-08 Inventory counting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010269860.0A CN111461617B (en) 2020-04-08 2020-04-08 Inventory counting method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111461617A CN111461617A (en) 2020-07-28
CN111461617B true CN111461617B (en) 2023-01-06

Family

ID=71683620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010269860.0A Active CN111461617B (en) 2020-04-08 2020-04-08 Inventory counting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111461617B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112101703B (en) * 2020-07-29 2023-02-28 浪潮通用软件有限公司 Metadata-based predicted available inventory statistical method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA1188814A (en) * 1981-11-13 1985-06-11 Morris Epstein Warehousing system and method
US6182053B1 (en) * 1996-03-26 2001-01-30 Recovery Sales Corporation Method and apparatus for managing inventory
JP2002145418A (en) * 2000-11-13 2002-05-22 Jsr Corp Automatic inventory reserving method and storage medium storing automatic inventory reserving program
KR101867091B1 (en) * 2014-01-29 2018-06-14 닛폰 파렛트 렌탈 가부시키가이샤 Distribution container management system, distribution container management method, and distribution container management program
US20190057101A1 (en) * 2017-08-21 2019-02-21 Salesforce.Com, Inc. Efficient deletion of archive records after expiration of a tenant-defined retention period
CN107527182A (en) * 2017-09-29 2017-12-29 广州百兴网络科技有限公司 Go out warehousing control method
WO2019152114A2 (en) * 2018-01-31 2019-08-08 Walmart Apollo, Llc Smart container inventory management system
US11348673B2 (en) * 2018-06-08 2022-05-31 Carefusion 303, Inc. System and method for distributed medication management

Also Published As

Publication number Publication date
CN111461617A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
EP1695282B1 (en) Data processing system and method
CN1601541B (en) Self-maintaining real-time data aggregations method and data processing device
CN101216821B (en) Data acquisition system storage management method
CN107577787B (en) Method and system for storing associated data information
CN105989163A (en) Data real-time processing method and system
CN102521347B (en) Pattern matching intermediate result management method based on priority
CN106202280A (en) A kind of information processing method and server
CN111461617B (en) Inventory counting method and device, computer equipment and storage medium
CN104346458A (en) Data storage method and device
CN114416703A (en) Method, device, equipment and medium for automatically monitoring data integrity
CN108415990B (en) Data quality monitoring method and device, computer equipment and storage medium
CN105045535B (en) A kind of method and system being automatically deleted stale data
CN113672619B (en) Method for segmenting data according to hash rule to make data more uniform
CN110704433B (en) Brin index construction method of columnar storage data, data retrieval method and device
CN113537887A (en) Inventory checking method and device based on virtual inventory
CN111459946B (en) Data table rapid summarizing method and device, computer equipment and storage medium
CN108073624B (en) Service data processing system and method
CN110222078B (en) Data processing method and device
CN113469584B (en) Risk management method and device for business service operation
CN114781961A (en) Data monitoring method, device, equipment and storage medium based on aggregation model
CN114722045A (en) Time series data storage method and device
CN110288287B (en) Method and system for sorting stored goods
CN117851478B (en) Data statistics method, device, electronic equipment and storage medium
CN111782657B (en) Data processing method and device
CN109189743A (en) A kind of the super node identification filter method and system of the low consumption of resources towards the real-time diagram data of big flow

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