CN106557482B - Inventory system data updating method and device - Google Patents

Inventory system data updating method and device Download PDF

Info

Publication number
CN106557482B
CN106557482B CN201510622287.6A CN201510622287A CN106557482B CN 106557482 B CN106557482 B CN 106557482B CN 201510622287 A CN201510622287 A CN 201510622287A CN 106557482 B CN106557482 B CN 106557482B
Authority
CN
China
Prior art keywords
inventory
partitioned
deduction
database
balance
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
CN201510622287.6A
Other languages
Chinese (zh)
Other versions
CN106557482A (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.)
Alibaba Singapore Holdings Pte Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510622287.6A priority Critical patent/CN106557482B/en
Priority to PCT/CN2016/099058 priority patent/WO2017050179A1/en
Publication of CN106557482A publication Critical patent/CN106557482A/en
Application granted granted Critical
Publication of CN106557482B publication Critical patent/CN106557482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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/2315Optimistic concurrency control

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a method and a device for updating data of an inventory system. According to the scheme, the area input field and the area deduction field corresponding to the partitioned inventory database are set in the inventory table, when the inventory of the partitioned inventory database is increased or reduced, only the area input field or the area deduction field corresponding to the partitioned inventory database needs to be updated, even if inventory of a plurality of partitioned inventory databases is changed at the same time, only the area input field or the area deduction field corresponding to each partitioned inventory database needs to be updated respectively, the situation that the same field is updated at the same time is avoided, and therefore data synchronization conflict can be well avoided. And when the inventory of each partition inventory database is changed, the corresponding area input field or the area deduction field can be locally updated in the partition inventory database, and the inventory table is synchronized, so that the data updating response time is short, and the throughput and the availability of the system are improved.

Description

Inventory system data updating method and device
Technical Field
The invention relates to the technical field of databases, in particular to a method and a device for updating data of an inventory system.
Background
In order to increase the speed of processing regional data and improve user experience, a distributed inventory system is usually adopted, that is, a partitioned inventory database is established in a region where users are concentrated, the partitioned inventory databases are connected, and the partitioned inventory databases are used for storing and processing inventory data, so that local users can conveniently and quickly access the local databases. In the partitioned inventory database, the inventory data structure exists in the form of a table, called an inventory table, and for the convenience of synchronization, the partitioned inventory database shares the inventory table, and the inventory data in the inventory table exists in the form of fields including an input field for representing an inventory input value, a deduction field for representing an inventory deduction value, and an inventory balance field, wherein the inventory input means that an inventory provider inputs a new inventory value, which is equivalent to inventory input, and the inventory deduction means that an inventory consumer deducts inventory, which is equivalent to inventory output.
When the inventory system is in inventory input or reduction, the inventory data of each partition inventory database needs to be updated synchronously, specifically, when a transaction occurs in a certain place, an input field (when the inventory input occurs) or a reduction field (when the inventory reduction occurs) in the inventory table of the partition inventory database is modified, and the modification can synchronize the same field of the inventory tables of other partition inventory databases. However, transactions in various regions often occur simultaneously, and the same field of the inventory table in each partitioned inventory database changes concurrently, and this concurrency may result in data synchronization conflict, which may cause data errors in the inventory table, and affect real inventory data and transaction processing.
In order to avoid data synchronization conflicts, a single-point modification method is usually adopted, that is, only one inventory database is used to modify the inventory table, and then the modified inventory table is synchronized to each partition inventory database. However, in this way, the transaction information of each region needs to be sent to the inventory database for modifying the inventory table across regions and in a long distance, and then the inventory database for modifying the inventory table modifies the inventory table according to the priority sequence or the time sequence.
Disclosure of Invention
In order to solve the problem of data synchronization existing in the data updating of the inventory system in the related technology, the application provides a data updating method and device of the inventory system.
According to a first aspect of an embodiment of the present application, there is provided an inventory system data updating method, including:
setting an area input field and an area deduction field corresponding to the partitioned inventory database in an inventory table, wherein the area input field is used for recording inventory increase numerical values in the partitioned inventory database, and the area deduction field is used for recording inventory deduction numerical values in the partitioned inventory database;
when the inventory of the partitioned inventory database is increased, updating the area input field corresponding to the partitioned inventory database, and synchronizing the inventory tables of the partitioned inventory databases;
when inventory deduction occurs in the partitioned inventory database, judging whether inventory balance is larger than or equal to a value obtained when inventory deduction is performed again, wherein the inventory balance M is sigma (a1+ a2+ … … + an) - [ sigma ] (b1+ b2+ … … + bn), the inventory balance M is a1 to an area input field of each partitioned inventory database, the inventory balance b1 to bn are an area deduction field of each partitioned inventory database, and n is the number of the partitioned inventory databases;
and when the inventory balance is greater than or equal to the secondary inventory deduction value, updating the area deduction field corresponding to the partitioned inventory database, and synchronizing the inventory tables of the partitioned inventory databases.
Optionally, the inventory system data updating method further includes:
setting an inventory balance field in an inventory table, wherein the inventory balance field is used for recording the inventory balance;
when the inventory of the partitioned inventory database is increased, updating an area input field corresponding to the partitioned inventory database, and updating the inventory balance field; and the number of the first and second groups,
and when the inventory deduction of the partitioned inventory database occurs, updating the area deduction field corresponding to the partitioned inventory database, and updating the inventory balance field at the same time.
Optionally, when the inventory deduction occurs to the partitioned inventory database, it is determined whether the inventory balance field is greater than or equal to the current inventory deduction value.
Optionally, the inventory system data updating method further includes:
displaying an inventory shortage message when the inventory balance is less than the value subtracted from the secondary inventory balance.
Optionally, the inventory system data updating method uses circular synchronization to synchronize the inventory tables of the inventory databases of the respective partitions.
In accordance with a second aspect of the embodiments of the present application, there is provided an inventory system data updating apparatus, including:
the field setting unit is used for setting a region input field and a region deduction field corresponding to the region identification in an inventory table according to the region identification of each partition inventory database, wherein the region input field is used for recording inventory increase numerical values in the partition inventory database, and the region deduction field is used for recording inventory deduction numerical values in the partition inventory database;
the system comprises a first updating unit, a second updating unit and a control unit, wherein the first updating unit is used for updating an area input field corresponding to a partition inventory database and synchronizing inventory tables of all the partition inventory databases when the partition inventory database is subjected to inventory increase;
a surplus judgment unit, configured to, when an inventory deduction occurs in the partitioned inventory databases, judge whether an inventory balance is greater than or equal to a value of the secondary inventory deduction, where the inventory balance M ═ Σ (a1+ a2+ … … + an) - Σ (b1+ b2+ … … + bn), where a1 to an are area input fields of each partitioned inventory database, b1 to bn are area deduction fields of each partitioned inventory database, and n is the number of partitioned inventory databases;
and the second updating unit is used for updating the area deduction field corresponding to the partitioned inventory database and synchronizing the inventory table of each partitioned inventory database when the inventory balance is greater than or equal to the secondary inventory deduction value.
Optionally, the field setting unit is further configured to set an inventory balance field in an inventory table, where the inventory balance field is used to record the inventory balance;
the first updating unit is used for updating the area input field corresponding to the partitioned inventory database and updating the inventory balance field when the inventory of the partitioned inventory database is increased; and the number of the first and second groups,
and the second updating unit is used for updating the area deduction field corresponding to the partitioned inventory database and updating the inventory balance field when inventory deduction occurs to the partitioned inventory database.
Optionally, the inventory remaining judging unit is configured to judge whether the inventory balance field is greater than or equal to a value of the current inventory deduction when the inventory deduction occurs in the partitioned inventory database.
Optionally, the inventory system data updating apparatus further includes:
and the prompting unit is used for displaying the insufficient inventory message when the inventory balance is less than the numerical value subtracted from the secondary inventory balance.
Optionally, the first updating unit and the second updating unit synchronize the inventory tables of the respective partitioned inventory databases using circular synchronization.
According to the technical scheme, the area input field and the area deduction field corresponding to the partition inventory databases are arranged in the inventory table, when the inventory of a certain partition inventory database is increased, only the area input field corresponding to the partition inventory database needs to be updated, when the inventory of a certain partition inventory database is deducted, only the area deduction field corresponding to the partition inventory database needs to be updated, therefore, even if a plurality of partition inventory databases are changed in inventory, only the area input field or the area deduction field corresponding to each partition inventory database needs to be updated simultaneously, the situation that the same field is updated simultaneously can not occur, and data synchronization conflict is well avoided. And when the inventory of each subarea inventory database is changed, the corresponding area input field or the area deduction field can be updated locally, and then the inventory table is synchronized without other subarea inventory databases initiating remote inventory modification access, so that the data updating response time is short, and the system throughput, the availability and the user experience are improved.
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 application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an inventory system data updating method according to an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating another inventory system data updating method according to an exemplary embodiment of the present application.
Fig. 3 is a block diagram illustrating an inventory system data updating apparatus according to an exemplary embodiment of the present application.
Fig. 4 is a block diagram illustrating another inventory system data update apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but it will be appreciated by those skilled in the art that the present application may be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the embodiments.
Fig. 1 is a schematic flowchart of an inventory system data updating method according to an exemplary embodiment of the present application, where as shown in fig. 1, the method includes:
step S101, an area input field and an area deduction field corresponding to the partitioned inventory database are set in an inventory table, the area input field is used for recording inventory increase values in the partitioned inventory database, and the area deduction field is used for recording inventory deduction values in the partitioned inventory database.
The correspondence with the partitioned inventory database may be correspondence with a library identifier of the partitioned inventory database or correspondence with an area identifier of the partitioned inventory database, and accordingly, in the inventory table, the number of the area input fields and the number of the area deduction fields are respectively the same as the number of the partitioned inventory database. For example, the inventory table is provided with region input fields a1, a2, a3 … … an and region deduction fields b1, b2, b3 … … bn corresponding to the partitioned inventory databases W1, W2, W3 … … Wn. The same table structure is used for each partitioned inventory database, namely the inventory tables of the partitioned inventory databases are the same and can be updated synchronously in a linkage mode.
Step S102, when the inventory of the partitioned inventory database is increased, updating the area input field corresponding to the partitioned inventory database, and synchronizing the inventory tables of the partitioned inventory databases;
step S103, when the inventory deduction occurs in the partitioned inventory database, judging whether the inventory balance is greater than or equal to the value of the inventory deduction in the current time;
and step S104, when the inventory balance is greater than or equal to the secondary inventory deduction value, updating the area deduction field corresponding to the subarea inventory database, and synchronizing the inventory tables of the subarea inventory databases.
In an application environment, when the inventory of the partitioned inventory database is increased or decreased, a user modifies a corresponding area input field or an area decrease field to update the area input field or the area decrease field; in another application environment, after the area of the partitioned inventory database is transacted, the area input field or the area deduction field is automatically updated according to the transaction information, for example, the area deduction field is updated according to the sale amount if the transaction is sale and the inventory deduction, and the area input field is updated according to the purchase amount if the transaction is purchase and the inventory is increased.
When the inventory of the partitioned inventory database is increased, updating the area input field corresponding to the partitioned inventory database, namely adding the inventory increase value to the original value of the area input field, wherein the inventory table in the partitioned inventory database is changed, and synchronizing the inventory table of each partitioned inventory database according to the change, so that the area input field corresponding to the partitioned inventory database with the inventory increase in each partitioned inventory database is changed in the same way, and the synchronous updating is completed.
When the inventory deduction of the partitioned inventory database occurs, updating the region deduction field corresponding to the partitioned inventory database, namely subtracting the value of the inventory increase from the original value of the region input field. However, if the inventory balance is insufficient, the inventory deduction cannot be completed. Therefore, when inventory deduction occurs to the partitioned inventory databases, it is first determined whether the inventory balance is greater than or equal to the value of the secondary inventory deduction, where the inventory balance M is ═ Σ (a1+ a2+ … … + an) - ∑ (b1+ b2+ … … + bn), where a1 to an are the region input fields of the partitioned inventory databases, b1 to bn are the region deduction fields of the partitioned inventory databases, and n is the number of the partitioned inventory databases. If the inventory balance is larger than or equal to the current inventory deduction value, inventory deduction can be carried out, the area deduction field corresponding to the partitioned inventory database is updated, the inventory table in the partitioned inventory database changes at the moment, the inventory table of each partitioned inventory database is synchronized according to the change, therefore, the area deduction field corresponding to the partitioned inventory database with the inventory deduction in the inventory table of each partitioned inventory database is changed in the same way, and synchronous updating is completed. If the inventory balance is less than the value of the current inventory deduction, the inventory deduction cannot be carried out, namely the area deduction field corresponding to the partitioned inventory database is not updated, and in this case, an inventory shortage message can be displayed to remind a user that the inventory is insufficient at the moment and the inventory deduction cannot be finished.
Preferably, when the inventory of the partitioned inventory database is changed (increased or decreased), after the area input field or the area deduction field corresponding to the partitioned inventory database is updated, a circular synchronization mode is used for synchronizing the inventory tables of the partitioned inventory databases, because the circular synchronization is used for processing the synchronization of the inventory tables in the multi-master database when the partitioned inventory databases are used as the multi-master database during the synchronization in the present application, and compared with a general method for dividing the multiple databases into master slave synchronization, the method has higher performance and reliability.
It should be noted that there is no precedence relationship between the occurrence of the inventory input and the occurrence of the inventory deduction, so that the steps S102 and S103 (and S104) in the technical solution provided by the present application are not limited by the writing order, that is, step S102 may be executed first, step S103 and step S104 may be executed later, step S103 and step S104 may be executed first, step S102 may be executed later, or step S102 and step S103 may be executed simultaneously.
Fig. 2 is a schematic flow chart of another inventory system data updating method according to an exemplary embodiment of the present application, the method is based on the method shown in fig. 1, and as shown in fig. 2, the method includes:
step S201, setting an area input field and an area deduction field corresponding to the partitioned inventory database in an inventory table, and setting an inventory balance field in the inventory table, where the area input field is used to record an inventory increase value in the partitioned inventory database, the area deduction field is used to record an inventory deduction value in the partitioned inventory database, the inventory balance field is used to record the inventory balance, and the inventory balance M ═ Σ (a1+ a2+ … … + an) - ∑ (b1+ b2+ … … + bn), where a1 to an are area input fields of the partitioned inventory databases, b1 to bn are area deduction fields of the partitioned inventory databases, and n is the number of the partitioned inventory databases;
step S202, when the inventory of the partitioned inventory database is increased, and when the inventory of the partitioned inventory database is increased, updating an area input field corresponding to the partitioned inventory database, updating the inventory balance field, and synchronizing inventory tables of the partitioned inventory databases;
step S203, when the inventory deduction occurs in the partitioned inventory database, judging whether the inventory balance field is larger than or equal to the numerical value of the current inventory deduction;
and step S204, when the inventory balance is greater than or equal to the secondary inventory deduction value, updating the area deduction field corresponding to the partitioned inventory database, updating the inventory balance field at the same time, and synchronizing the inventory tables of the partitioned inventory databases.
And step S205, when the inventory balance is less than the value subtracted by the secondary inventory deduction, displaying an inventory shortage message.
When the inventory deduction of the partitioned inventory database occurs, in the above embodiment, when it is determined whether the inventory balance is greater than or equal to the value of the secondary inventory deduction, the inventory balance value is calculated, and when the inventory of the partitioned inventory database increases, the inventory balance value is not calculated and the inventory balance is not updated, which may cause an error in calculating the inventory balance value under the condition of inventory deduction due to a blank update of the inventory balance under the condition of inventory increase, so that the obtained inventory balance value has an error from the actual inventory balance value, and if the inventory balance value is calculated incorrectly, the system may be crashed due to the incorrect inventory deduction.
As in the embodiment shown in the figures, in this embodiment, the sequence between step S202 and step S203 (and step S204) is not limited by the writing sequence, that is, step S202 may be executed first, step S203 and step S204 may be executed later, step S203 and step S204 may be executed first, step S202 may be executed later, or step S202 and step S203 may be executed simultaneously.
Therefore, in this embodiment, in addition to the area input field and the area deduction field, an inventory balance field for recording the inventory balance is set in the inventory table. When the inventory of the partitioned inventory database is increased, updating an area input field corresponding to the partitioned inventory database, and updating the inventory balance field at the same time, namely calculating the inventory balance after the inventory is increased, and updating the inventory balance field to a calculation result; and when the inventory deduction occurs to the partitioned inventory database, updating the area deduction field corresponding to the partitioned inventory database, and updating the inventory balance field at the same time, namely calculating a new inventory balance value after the inventory deduction, and updating the inventory balance field to a calculation result. Thus, because the inventory balance field is updated in real time, when the inventory deduction occurs, the inventory balance field can be directly read without calculating the inventory balance, and whether the inventory balance field is larger than or equal to the current deduction value is judged.
According to the technical scheme provided by the embodiment of the application, the area input field and the area deduction field corresponding to the partition inventory database are set in the inventory table, when the inventory of the partition inventory database is increased or reduced, only the area input field or the area deduction field corresponding to the partition inventory database needs to be updated, therefore, even if inventory of a plurality of partition inventory databases is changed at the same time, only the area input field or the area deduction field corresponding to each partition inventory database needs to be updated respectively, the situation that the same field is updated at the same time is avoided, and data synchronization conflict can be well avoided. When the inventory of each partition inventory database is changed, the corresponding area input field or the corresponding area deduction field can be updated locally in the partition inventory database, and then the inventory table is synchronized, and other partition inventory databases do not need to be remotely accessed to update and modify, so that the data updating response time is short, and the improvement of the throughput, the availability and the user experience of the system is facilitated.
Through the above description of the method embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation manner in many cases. Based on such understanding, the technical solutions of the present application, which essentially or partially contribute to the prior art, may be embodied in the form of software products and stored in a storage medium, and include instructions for causing an intelligent device to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media that can store data and program codes, such as Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.
Fig. 3 is a block diagram illustrating an inventory system data updating apparatus according to an exemplary embodiment of the present application. As shown in fig. 3, the apparatus includes:
a field setting unit U301, configured to set, according to the area identifier of each partitioned inventory database, an area input field and an area deduction field corresponding to the area identifier in an inventory table, where the area input field is used to record an inventory increase value in the partitioned inventory database, and the area deduction field is used to record an inventory deduction value in the partitioned inventory database;
the first updating unit U302 is used for updating the area input field corresponding to the partitioned inventory database and synchronizing the inventory table of each partitioned inventory database when the inventory of the partitioned inventory database is increased;
the inventory residue judging unit U303 is used for judging whether the inventory balance is greater than or equal to the value of the current inventory residue subtraction when the inventory residue subtraction occurs in the partitioned inventory database;
and a second updating unit U304, configured to update the area deduction field corresponding to the partitioned inventory database and synchronize the inventory table of each partitioned inventory database when the inventory balance is greater than or equal to the secondary inventory deduction value.
The inventory balance M is Σ (a1+ a2+ … … + an) - Σ (b1+ b2+ … … + bn), where a1 to an are the region input fields of the partitioned inventory databases, b1 to bn are the region deduction fields of the partitioned inventory databases, and n is the number of the partitioned inventory databases.
Wherein, preferably, the first updating unit and the second updating unit synchronize the inventory tables of the respective partitioned inventory databases using ring synchronization.
Fig. 4 is a block diagram illustrating another inventory system data update apparatus according to an exemplary embodiment of the present application. As shown in fig. 4, the apparatus includes:
a field setting unit U401, configured to set, according to the area identifier of each partitioned inventory database, an area input field and an area deduction field corresponding to the area identifier in an inventory table, and set an inventory balance field in the inventory table, where the area input field is used to record a value of inventory increase in the partitioned inventory database, the area deduction field is used to record a value of inventory deduction in the partitioned inventory database, the inventory balance field is used to record the inventory balance, and the inventory balance M ∑ (a1+ a2+ … … + an) - ∑ (b1+ b2+ … … + bn), where a1 to an are the area input fields of each partitioned inventory database, b1 to bn are the area deduction fields of each partitioned inventory database, and n is the number of the partitioned inventory databases;
a first updating unit U402, configured to update an area input field corresponding to the partitioned inventory database, update the inventory balance field, and synchronize inventory tables of the partitioned inventory databases when inventory increase occurs in the partitioned inventory databases;
a stock balance judging unit U403, configured to, when stock deduction occurs in the partitioned stock database, judge whether the stock balance field is greater than or equal to a value of the current stock deduction;
a second updating unit U404, configured to update the area deduction field corresponding to the partitioned inventory database when inventory deduction occurs in the partitioned inventory database, update the inventory balance field at the same time, and synchronize inventory tables of each partitioned inventory database;
and the prompting unit U405 is used for displaying an inventory shortage message when the inventory balance is smaller than the value subtracted from the secondary inventory balance.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, in this document, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, or device that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, apparatus, or device. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, apparatus or device that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An inventory system data updating method is characterized by comprising the following steps:
setting an area input field and an area deduction field corresponding to the partitioned inventory database in an inventory table, wherein the area input field is used for recording inventory increase numerical values in the partitioned inventory database, and the area deduction field is used for recording inventory deduction numerical values in the partitioned inventory database;
when the inventory of the partitioned inventory database is increased, updating the area input field corresponding to the partitioned inventory database, and synchronizing the inventory tables of the partitioned inventory databases;
when the inventory deduction occurs in the partitioned inventory database, judging whether the inventory balance is greater than or equal to the numerical value of the inventory deduction of the current time;
and when the inventory balance is greater than or equal to the secondary inventory deduction value, updating the area deduction field corresponding to the partitioned inventory database, and synchronizing the inventory tables of the partitioned inventory databases.
2. The inventory system data update method as claimed in claim 1, wherein the inventory balance M ═ Σ (a1+ a2+ … … + an) - ∑ (b1+ b2+ … … + bn), where a1 to an are the zone input fields of the respective partitioned inventory databases, b1 to bn are the zone deduction fields of the respective partitioned inventory databases, and n is the number of the partitioned inventory databases.
3. The inventory system data update method according to claim 1 or 2, further comprising:
setting an inventory balance field in an inventory table, wherein the inventory balance field is used for recording the inventory balance;
when the inventory of the partitioned inventory database is increased, updating an area input field corresponding to the partitioned inventory database, and updating the inventory balance field; and the number of the first and second groups,
and when the inventory deduction of the partitioned inventory database occurs, updating the area deduction field corresponding to the partitioned inventory database, and updating the inventory balance field at the same time.
4. The inventory system data update method according to claim 1, further comprising:
displaying an inventory shortage message when the inventory balance is less than the value subtracted from the secondary inventory balance.
5. The inventory system data update method of claim 1, wherein the inventory tables of the respective partitioned inventory databases are synchronized using circular synchronization.
6. An inventory system data updating apparatus, comprising:
the field setting unit is used for setting a region input field and a region deduction field corresponding to the region identification in an inventory table according to the region identification of each partition inventory database, wherein the region input field is used for recording inventory increase numerical values in the partition inventory database, and the region deduction field is used for recording inventory deduction numerical values in the partition inventory database;
the system comprises a first updating unit, a second updating unit and a control unit, wherein the first updating unit is used for updating an area input field corresponding to a partition inventory database and synchronizing inventory tables of all the partition inventory databases when the partition inventory database is subjected to inventory increase;
the inventory residue judging unit is used for judging whether the inventory balance is greater than or equal to the numerical value of the inventory residue deduction of the current time when the inventory residue deduction occurs in the partitioned inventory database;
and the second updating unit is used for updating the area deduction field corresponding to the partitioned inventory database and synchronizing the inventory table of each partitioned inventory database when the inventory balance is greater than or equal to the secondary inventory deduction value.
7. The inventory system data update apparatus according to claim 6, wherein the inventory balance M ═ Σ (a1+ a2+ … … + an) - ∑ (b1+ b2+ … … + bn), where a1 to an are the zone input fields of the respective partitioned inventory databases, b1 to bn are the zone deduction fields of the respective partitioned inventory databases, and n is the number of the partitioned inventory databases.
8. The inventory system data update device according to claim 6 or 7,
the field setting unit is further configured to set an inventory balance field in an inventory table, where the inventory balance field is used to record the inventory balance;
the first updating unit is used for updating the area input field corresponding to the partitioned inventory database and updating the inventory balance field when the inventory of the partitioned inventory database is increased; and the number of the first and second groups,
and the second updating unit is used for updating the area deduction field corresponding to the partitioned inventory database and updating the inventory balance field when inventory deduction occurs to the partitioned inventory database.
9. The inventory system data update apparatus according to claim 6, further comprising:
and the prompting unit is used for displaying the insufficient inventory message when the inventory balance is less than the numerical value subtracted from the secondary inventory balance.
10. The inventory system data update apparatus according to claim 6, wherein the first update unit and the second update unit synchronize the inventory tables of the respective partitioned inventory databases using circular synchronization.
CN201510622287.6A 2015-09-25 2015-09-25 Inventory system data updating method and device Active CN106557482B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510622287.6A CN106557482B (en) 2015-09-25 2015-09-25 Inventory system data updating method and device
PCT/CN2016/099058 WO2017050179A1 (en) 2015-09-25 2016-09-14 Method and device for updating inventory system data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510622287.6A CN106557482B (en) 2015-09-25 2015-09-25 Inventory system data updating method and device

Publications (2)

Publication Number Publication Date
CN106557482A CN106557482A (en) 2017-04-05
CN106557482B true CN106557482B (en) 2020-09-25

Family

ID=58385698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510622287.6A Active CN106557482B (en) 2015-09-25 2015-09-25 Inventory system data updating method and device

Country Status (2)

Country Link
CN (1) CN106557482B (en)
WO (1) WO2017050179A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362581A (en) * 2018-04-04 2019-10-22 阿里巴巴集团控股有限公司 A kind of data processing method and device
CN109558415A (en) * 2018-11-20 2019-04-02 北京松鼠山科技有限公司 Knowledge base update method and device
CN110188139B (en) * 2019-05-05 2021-10-22 苏宁易购集团股份有限公司 Stock number synchronization method and device, computer equipment and storage medium
CN110263050B (en) * 2019-05-06 2023-10-27 创新先进技术有限公司 Data processing method, device, equipment and storage medium
CN110909978A (en) * 2019-10-15 2020-03-24 京东数字科技控股有限公司 Resource processing method, device, server and computer readable storage medium
CN111125104A (en) * 2019-12-20 2020-05-08 北京每日优鲜电子商务有限公司 Database table updating method and device, computer equipment and storage medium
CN113762827B (en) * 2020-07-30 2023-11-07 北京京东振世信息技术有限公司 Inventory difference hedging processing method and device
CN112764968B (en) * 2020-12-29 2024-02-13 杭州海康威视系统技术有限公司 Data processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2636726A1 (en) * 2007-07-03 2009-01-03 Maritz Inc. Instant zero inventory fulfillment redemption system and method
CN102054226A (en) * 2010-12-28 2011-05-11 用友软件股份有限公司 Inventory management method and system for line edge warehouse
CN102930410A (en) * 2011-08-09 2013-02-13 鸿富锦精密工业(深圳)有限公司 Warehouse inventory management system and management method
CN104077671A (en) * 2013-03-25 2014-10-01 腾讯科技(深圳)有限公司 Method and system for synchronizing stock information
CN104699712A (en) * 2013-12-09 2015-06-10 阿里巴巴集团控股有限公司 Method and device for updating stock record information in database

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4183400B2 (en) * 2001-06-27 2008-11-19 株式会社日立製作所 Database system, database management method and program
US7870226B2 (en) * 2006-03-24 2011-01-11 International Business Machines Corporation Method and system for an update synchronization of a domain information file
CN101441738A (en) * 2007-12-24 2009-05-27 北京奥腾讯达科技有限公司 Sectorization storage management system
CN102708529B (en) * 2012-05-16 2015-01-14 北京航空航天大学 Drug storage information managing system for pharmacy
CN103853748A (en) * 2012-11-29 2014-06-11 天津书生投资有限公司 Database synchronizing method
CN104794132B (en) * 2014-01-21 2018-08-24 阿里巴巴集团控股有限公司 Inventory information processing method and system
CN104598610B (en) * 2015-01-29 2017-12-12 无锡江南计算技术研究所 A kind of distributed data base data distribution uploads synchronous method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2636726A1 (en) * 2007-07-03 2009-01-03 Maritz Inc. Instant zero inventory fulfillment redemption system and method
CN102054226A (en) * 2010-12-28 2011-05-11 用友软件股份有限公司 Inventory management method and system for line edge warehouse
CN102930410A (en) * 2011-08-09 2013-02-13 鸿富锦精密工业(深圳)有限公司 Warehouse inventory management system and management method
CN104077671A (en) * 2013-03-25 2014-10-01 腾讯科技(深圳)有限公司 Method and system for synchronizing stock information
CN104699712A (en) * 2013-12-09 2015-06-10 阿里巴巴集团控股有限公司 Method and device for updating stock record information in database

Also Published As

Publication number Publication date
WO2017050179A1 (en) 2017-03-30
CN106557482A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN106557482B (en) Inventory system data updating method and device
CN104376017B (en) The method and system of data synchronization are carried out between database
US10671968B2 (en) Method and system of processing commodity object information
CN106899648B (en) Data processing method and equipment
JP2019511059A (en) Method and device for outputting risk information and constructing risk information
CN107092491B (en) Configuration loading method and system
CN106375360B (en) Graph data updating method, device and system
CN107369091B (en) Product recommendation method and device and financial product recommendation method
CN103186466A (en) Information interaction device and method based on automatic generation of associated test cases
CN105989059A (en) Data record checking method and device
CN106130972B (en) resource access control method and device
CN107153646B (en) Data processing method and equipment
CN106897342B (en) Data verification method and equipment
CN110321339A (en) A kind of data migration method, device, equipment and storage medium
CN107590207A (en) Method of data synchronization and device, electronic equipment
JP6975153B2 (en) Data storage service processing method and equipment
CN111880956A (en) Data synchronization method and device
WO2018150550A1 (en) Learning data management device and learning data management method
CN109361628A (en) Message assemble method, device, computer equipment and storage medium
CN104111957A (en) Method and system for synchronizing distributed transaction
CN104506636B (en) A kind of method of data synchronization and device
CN110244951B (en) Application publishing method and device
CN112631648A (en) Service configuration method and device, electronic equipment and storage medium
US20160292610A1 (en) Method and device for real time prediction of timely delivery of telecom service orders
CN106855821A (en) A kind of distributed transaction processing method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240306

Address after: # 04-08, Lai Zanda Building 1, 51 Belarusian Road, Singapore

Patentee after: Alibaba Singapore Holdings Ltd.

Country or region after: Singapore

Address before: Grand Cayman Islands

Patentee before: ALIBABA GROUP HOLDING Ltd.

Country or region before: Cayman Islands