CN118154099A - Inventory control method and system under high concurrency condition - Google Patents

Inventory control method and system under high concurrency condition Download PDF

Info

Publication number
CN118154099A
CN118154099A CN202410421429.1A CN202410421429A CN118154099A CN 118154099 A CN118154099 A CN 118154099A CN 202410421429 A CN202410421429 A CN 202410421429A CN 118154099 A CN118154099 A CN 118154099A
Authority
CN
China
Prior art keywords
inventory
data
inventory control
high concurrency
existing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410421429.1A
Other languages
Chinese (zh)
Inventor
高占川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHANJET INFORMATION TECHNOLOGY CO LTD
Original Assignee
CHANJET 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 CHANJET INFORMATION TECHNOLOGY CO LTD filed Critical CHANJET INFORMATION TECHNOLOGY CO LTD
Priority to CN202410421429.1A priority Critical patent/CN118154099A/en
Publication of CN118154099A publication Critical patent/CN118154099A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides an inventory control method and a system thereof under the high concurrency condition, wherein the method comprises the steps of (1) storing inventory variation into inventory and generating a row of data on a table; (2) Adding an available quantity attribute field, and decomposing the data generated in the step (1) into a plurality of lines of data to generate new variable running water; (3) And arranging the variable running water into the existing scale according to a preset rule. The invention updates the existing quantity, cancels row-level locks, inserts the flow operation, and does not affect the smooth operation of the business; the whole task is normally stored in the existing amount and the available amount, and different services such as various allocation, warehousing and checking are normally stored, meanwhile, the processing of the stock is added, the flow cache is increased, the batch timing processing is updated, and the updating is not blocked.

Description

Inventory control method and system under high concurrency condition
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an inventory control method and system under the condition of high concurrency.
Background
In a software application system, with the appearance of a multi-user concurrent scene, in order to achieve the same multi-user operation or related data modification, the problem of mutual blocking can occur to influence the execution efficiency, and meanwhile, the database deadlock phenomenon can occur.
The update of the available amount in the same dimension can hold the update, the data is locked, the data is released after the whole transaction is submitted, and if other people need to update the available amount at the moment, the blocking waiting for other transactions can not be normally submitted conventionally. Another problem is to determine if the inventory and availability are out of range based on updated results, and if the availability is completely sufficient, queuing is required. In reality, mutual blockage often occurs, and the concurrent increase is caused, so that a large amount of blockage influences performance and experience.
Disclosure of Invention
The invention provides a method for controlling inventory under high concurrency, which is characterized in that the method comprises the following steps of
(1) Storing the inventory variation into inventory and generating a row of data on a table;
(2) Adding an available quantity attribute field, and decomposing the data generated in the step (1) into a plurality of lines of data to generate new variable running water;
(3) And arranging the variable running water into the existing scale according to a preset rule.
Further, the inventory variation amount in the step (1) is stored in a field to generate a column of data and two values of two fields with the existing quantity in parallel, and the two values are one row of data with the same dimension.
Further, the step (3) comprises
(3.1) Presetting the cache size of an inventory flow table;
(3.2) presetting an execution switch and setting execution timeliness.
Further, the preset inventory flow table cache size includes
The insert flow table determines whether the total number of lines reaches a maximum value of the cache setting,
And if the maximum value is reached, initiating an asynchronous task to sort the flow table data before the current time stamp into the existing quantity structure data and update the existing quantity structure data.
Further, the executing switch and setting the executing time comprise
Presetting a timing execution switch, wherein the timing interval is 1 hour, and finishing water flowing to the existing quantity once every 1 hour;
setting execution timeliness, executing once every 24 hours, and executing/restarting the service once at fixed point of a timing task.
Further, in the inventory control operation process, a log is recorded and generated in real time and stored.
According to a second aspect of the embodiments of the present application, there is further provided a system of inventory control methods in case of high concurrency, the improvement comprising a processor and a computer program stored in said memory and running on said processor, said processor implementing a method of inventory control in case of high concurrency as claimed in any one of said claims 1 to 6 when processing said computer program.
The beneficial effects are that:
when the invention updates the different occupied amounts, the storage is not on the same row, the updating is not affected, and the business is smoothly carried out.
The invention updates the existing quantity, cancels row-level locks, inserts the flow operation, and does not affect the smooth operation of the business; the whole task is normally stored in the existing amount and the available amount, and different services such as various allocation, warehousing and checking are normally stored, meanwhile, the processing of the stock is added, the flow cache is increased, the batch timing processing is updated, and the updating is not blocked.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the scope of the application, as claimed.
Drawings
FIG. 1 is a flow chart of a method of inventory control in a high concurrency scenario, according to the present invention;
it should be understood that the drawings are not necessarily to scale, presenting a somewhat simplified representation of various features illustrative of the basic principles of the disclosure. The particular design features of the invention as disclosed herein, including, for example, particular dimensions, orientations, locations, and shapes, will be determined in part by the particular intended application and use environment.
In the drawings, like numerals refer to the same or equivalent parts of the invention throughout the several views of the drawings.
Detailed Description
Reference will now be made in detail to various embodiments of the invention, examples of which are illustrated in the accompanying drawings and described below. While the invention will be described in conjunction with the exemplary embodiments thereof, it will be understood that the present description is not intended to limit the invention to those exemplary embodiments. On the other hand, the present invention is intended to cover not only the exemplary embodiments of the present invention, but also various alternatives, modifications, equivalents and other embodiments, which may be included within the spirit and scope of the invention as defined by the appended claims.
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The specific structures and functions described in the exemplary embodiments of the present invention are for illustrative purposes only. Embodiments of the inventive concept according to the present invention may be embodied in various forms and it should be understood that they should not be construed as limited to the exemplary embodiments described in the exemplary embodiments, but include all modifications, equivalents, or alternatives falling within the spirit and scope of the invention.
Throughout the specification, the terminology used herein is for the purpose of describing various exemplary embodiments only and is not intended to be limiting. It will be further understood that the terms "comprises," "comprising," "includes," "including" and the like, when used in this exemplary embodiment, specify the presence of stated features, steps, operations, or elements, but do not preclude the presence or addition of one or more other features, steps, operations, or elements.
The invention updates the existing quantity, cancels row-level locks, inserts the flow operation, and does not affect the smooth operation of the business; the whole task is normally stored in the existing amount and the available amount, and different services such as various allocation, warehousing and checking are normally stored, meanwhile, the processing of the stock is added, the flow cache is increased, the batch timing processing is updated, and the updating is not blocked.
The invention provides a stock control method under the high concurrency condition, which comprises the following steps of
(1) Storing the inventory variation into inventory and generating a list of data on the fields;
the inventory variation in the step (1) is stored in a field to generate a column of data and two values of two fields with the existing quantity in parallel, and the two values are one row of data with the same dimension.
The inventory variation has a plurality of dimensions, and different occupation amounts such as order occupation, sales occupation, warehouse-out occupation, in-transit of incoming goods and the like are stored in one row of the inventory. Different quantity occupation exists on the same latitude, and the inventory variation is updated under the condition that the same dimension exists;
(2) Adding available quantity attribute fields, and decomposing one column of data generated in the step (1) into a plurality of rows of one field data to generate new variable running water;
(3) And arranging the variable running water into the existing scale according to a preset rule.
The step (3) comprises
(3.1) Presetting the cache size of an inventory flow table;
Any change of the existing quantity is updated and inserted into the stock flow list cache in real time, after the stock flow list cache is inserted into the flow water meter, whether the total line number reaches the maximum value set by the cache is judged, if the total line number reaches the maximum value, an asynchronous task is initiated to sort flow list data before the current time stamp into existing quantity structure data, and the existing quantity data is updated.
(3.2) Presetting an execution switch and setting execution timeliness.
Executing a switch to preset the execution time at a timing interval of 1 hour, and finishing water flowing to the existing quantity once every 1 hour;
setting the execution timeliness can be executed once every 24 hours, and the fixed-point execution/restarting service of the timing task is executed once.
In the inventory control operation process, real-time records are generated and stored;
in the whole running process of the inventory control method, the execution parameters and the execution results of each stage and the log marks of the upper and lower paths are recorded. The passing date can find and find out the problem in time when the abnormality occurs.
Examples
1. The invention increases the available quantity attribute field, splits one row of multi-field data into a plurality of rows of one field data. For example:
A row of multi-field data:
Inventory 001, warehouse 01, stock 100, purchase, warehouse entry, sales, stock 10;
multiple rows of one field data:
inventory 001, warehouse 01, availability attribute-stock, quantity 100;
inventory 001, warehouse 01, availability attribute-purchase warehouse entry pending amount, quantity 35;
inventory 001, warehouse 01, availability attribute-sales stay, quantity 10;
2. Presetting the cache size of an inventory flow table, presetting an execution switch and setting execution timeliness;
Existing scale:
inventory 001, warehouse 01, availability attribute-stock, quantity 100;
And (3) flow water recording:
2023-10-01 purchase inventory audit 001 warehouse 01 quantity 5;
2023-10-02 purchase inventory audit 001 warehouse 01 quantity 15;
2023-10-02 sell out of order audit inventory 001 warehouse 01 quantity 1;
2023-10-02 purchase inventory audit 001 warehouse 01 quantity 10;
2023-10-05 sell out of order audit inventory 001 warehouse 01 quantity 3;
......
timing for 1 hour to begin to sort data;
Existing scale:
Inventory 001, warehouse 01, availability attribute-stock, quantity 126;
The running water record was emptied.
In an exemplary embodiment, based on the inventory control method under the high concurrency condition provided by the embodiment of the present application, the embodiment of the present application further provides an inventory control system under the high concurrency condition, which includes and a processor coupled to the memory, the processor being configured to execute the inventory control method under the high concurrency condition in any one of the embodiments of the present application based on the instructions stored in the memory.
The "purchase-warehouse entry amount", "sales-standby amount", "stock-in amount", and the like mentioned in the example all belong to the inventory variation amount.
It should be noted that, the inventory control method and system provided in the foregoing embodiments belong to the same concept as the inventory control method embodiment in the case of high concurrency, and detailed implementation processes of the inventory control method and system are detailed in the method embodiment and are not repeated here.
The embodiments of the application described above may be implemented in various hardware, software code or a combination of both. For example, embodiments of the present application may also represent program code executing the above-described method in a data signal processor. The application may also relate to various functions performed by a computer processor, a digital signal processor, a microprocessor, or a field programmable gate array. The processor described above may be configured in accordance with the present application to perform specific tasks by executing machine readable software code or firmware code that defines the specific methods disclosed herein. The software code or firmware code may be developed to represent different programming languages and different formats or forms. Different target platform compiled software code may also be represented. However, the different code patterns, types and languages of software code and other types of configuration code that perform tasks according to the application do not depart from the spirit and scope of the application.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and their practical application to enable others skilled in the art to make or utilize the invention in various exemplary embodiments and with various alternatives and modifications. It is intended that the scope of the invention be defined by the claims appended hereto and their equivalents.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present invention, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the invention, and are also considered to be within the scope of the invention.

Claims (7)

1. A method of inventory control in high concurrency situations, the method comprising
(1) Storing the inventory variation into inventory and generating a row of data on a table;
(2) Adding an available quantity attribute field, and decomposing the data generated in the step (1) into a plurality of lines of data to generate new variable running water;
(3) And arranging the variable running water into the existing scale according to a preset rule.
2. The method of claim 1, wherein the step (1) of storing the inventory variation amount in the field generates a list of data and two values of two fields in parallel as an existing amount, which are one line of data in the same dimension.
3. The high concurrency case inventory control method of claim 1, wherein said step (3) includes
(3.1) Presetting the cache size of an inventory flow table;
(3.2) presetting an execution switch and setting execution timeliness.
4. The method for inventory control under high concurrency as claimed in claim 3, wherein said pre-set inventory flow table buffer size comprises
The insert flow table determines whether the total number of lines reaches a maximum value of the cache setting,
And if the maximum value is reached, initiating an asynchronous task to sort the flow table data before the current time stamp into the existing quantity structure data and update the existing quantity structure data.
5. A method of inventory control in the event of high concurrency as claimed in claim 3, wherein said switching and setting of execution time includes
Presetting a timing execution switch, wherein the timing interval is 1 hour, and finishing water flowing to the existing quantity once every 1 hour;
setting execution timeliness, executing once every 24 hours, and executing/restarting the service once at fixed point of a timing task.
6. The method for inventory control under high concurrency according to claim 1, wherein during the running of the inventory control, a log is generated and stored in real time.
7. A high concurrency inventory control system comprising a computer program running on said processor, said processor implementing a high concurrency inventory control method according to any one of claims 1 to 6 when processing said computer program.
CN202410421429.1A 2024-04-09 2024-04-09 Inventory control method and system under high concurrency condition Pending CN118154099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410421429.1A CN118154099A (en) 2024-04-09 2024-04-09 Inventory control method and system under high concurrency condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410421429.1A CN118154099A (en) 2024-04-09 2024-04-09 Inventory control method and system under high concurrency condition

Publications (1)

Publication Number Publication Date
CN118154099A true CN118154099A (en) 2024-06-07

Family

ID=91293087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410421429.1A Pending CN118154099A (en) 2024-04-09 2024-04-09 Inventory control method and system under high concurrency condition

Country Status (1)

Country Link
CN (1) CN118154099A (en)

Similar Documents

Publication Publication Date Title
US8224845B2 (en) Transaction prediction modeling method
US7058615B2 (en) Scheduling for data warehouse ETL processing and data mining execution
CN100375038C (en) Finally agent optimization method and system of source in reorder two-stage refering
US9466080B2 (en) Bulk order management
CA1322422C (en) Single-keyed indexed file for tp queue repository
US7810084B2 (en) Parallel generating of bundles of data objects
US7461065B2 (en) Method and system for utilizing shared numeric locks
US20050171930A1 (en) Dynamic Determination of Transaction Boundaries in Workflow Systems
EP3456360A1 (en) Device and method for tuning relational database
US20070276712A1 (en) Project size estimation tool
CN110209650A (en) The regular moving method of data, device, computer equipment and storage medium
US8666959B2 (en) Data access device, data access method and data access program
US20130275984A1 (en) Multiprocessing transaction recovery manager
US20100131937A1 (en) Optimization hints for a business process flow
CN110135967A (en) The processing method and system of collection data
CN113312259B (en) Interface testing method and device
US20070130031A1 (en) Systems and methods for automatically reassigning an order confirmation in response to an incoming order
US20090069919A1 (en) Intelligent mass production planning and routing system
CN118154099A (en) Inventory control method and system under high concurrency condition
US7734604B1 (en) Locking data in a database after an operation has begun
US20210182963A1 (en) System and Process for Option Trading
US7516144B2 (en) Method and system for re-population of data in a database
US7711730B2 (en) Method of returning data during insert statement processing
US7437355B2 (en) Method and system for parallel update of database
CN112632169B (en) Automatic financial data reporting method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination