CN110188139B - Stock number synchronization method and device, computer equipment and storage medium - Google Patents

Stock number synchronization method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110188139B
CN110188139B CN201910367774.0A CN201910367774A CN110188139B CN 110188139 B CN110188139 B CN 110188139B CN 201910367774 A CN201910367774 A CN 201910367774A CN 110188139 B CN110188139 B CN 110188139B
Authority
CN
China
Prior art keywords
inventory
total
stock
time
target object
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
CN201910367774.0A
Other languages
Chinese (zh)
Other versions
CN110188139A (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.)
SuningCom Co ltd
Original Assignee
SuningCom 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 SuningCom Co ltd filed Critical SuningCom Co ltd
Priority to CN201910367774.0A priority Critical patent/CN110188139B/en
Publication of CN110188139A publication Critical patent/CN110188139A/en
Application granted granted Critical
Publication of CN110188139B publication Critical patent/CN110188139B/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
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

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

Abstract

The invention relates to an inventory number synchronization method, an inventory number synchronization device, computer equipment and a storage medium. The method comprises the following steps: acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number; determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized; respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation; and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number. By adopting the method, the applicability can be improved, and the realization difficulty and the workload can be reduced when a service scene is newly added.

Description

Stock number synchronization method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for synchronizing the number of stocks, computer equipment and a storage medium.
Background
With the development of internet technology, electronic commerce is becoming more and more popular. In an e-commerce scenario, there is a scenario where a merchant's source of goods sells on multiple e-commerce platforms simultaneously. In inventory quantity management, the current solution is to divide the total inventory quantity into the inventory quantities of the respective sub-inventory modules in advance according to a plurality of platforms, but such operation requires division of the inventory in advance, which is not favorable for inventory turnover.
In order to ensure the maximization of the source sales, an inventory sharing mode is generally adopted. Therefore, each change of the inventory data of the total inventory module and the sub-inventory module is informed to all platforms to ensure the accuracy of the quantity of the goods sources.
Due to the fact that various scenes can cause inventory change, goods of an external e-commerce platform are sold, and goods of an internal merchant system are put in storage or damaged. For the accuracy of the inventory, the increase and decrease of the inventory quantity caused by each scene needs to be notified to each sales platform. However, in the face of rapid horizontal expansion of a merchant sales platform and management services with multiple surfaces being continuously refined inside, customized processing and modification for each service scene are large, new added service scenes also need to consider the interaction scene in time, and the realization difficulty and the workload are large.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for synchronizing the number of inventories, which can improve applicability and reduce implementation difficulty and workload when adding a new service scenario.
A method of synchronizing inventory numbers, the method comprising:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation;
and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
A method of synchronizing inventory numbers, the method comprising:
sending the inventory change service data of the target object to a second server or a terminal of the target object;
receiving the stock to-be-increased and decreased number returned by the second server or the terminal, wherein the stock to-be-increased and decreased number is determined according to the first total stock number of the target object and the stock change service data of each first server of the target object, and the first total stock number is the total stock number after the last stock number is synchronized;
and synchronizing the inventory number according to the to-be-increased and decreased inventory number.
An inventory number synchronization apparatus, the apparatus comprising:
the acquisition module is used for acquiring a first inventory variation amount of each first server of the target object in a target time interval, wherein the target time interval is a time interval from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
the first processing module is used for determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
the second processing module is used for respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation amount;
and the first sending module is used for sending the to-be-increased and decreased number of each stock to the corresponding first server respectively to synchronize the number of the current stock.
An inventory number synchronization apparatus, the apparatus comprising:
the second sending module is used for sending the inventory change business data of the target object to a second server or a terminal of the target object;
the receiving module is used for receiving the stock to-be-increased and decreased number returned by the second server or the terminal, the stock to-be-increased and decreased number is determined according to a first total stock number of the target object and stock change service data of each first server of the target object, and the first total stock number is the total stock number after the last stock number is synchronized;
and the synchronization module is used for synchronizing the inventory number according to the to-be-increased and decreased inventory number.
In one embodiment, the number of stock waiting to be increased or decreased is further determined according to a second stock variation amount obtained by the second server, and the second stock variation amount is a stock variation amount caused in stock management.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation;
and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
sending the inventory change business data of the target object to a second server of the target object;
receiving the inventory to-be-increased and decreased number returned by the second server, wherein the inventory to-be-increased and decreased number is determined according to a first total inventory number of the target object and inventory change business data of each first server of the target object, and the first total inventory number is the total inventory number after the last inventory number is synchronized;
and synchronizing the inventory number according to the to-be-increased and decreased inventory number.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation;
and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
sending the inventory change business data of the target object to a second server of the target object;
receiving the inventory to-be-increased and decreased number returned by the second server, wherein the inventory to-be-increased and decreased number is determined according to a first total inventory number of the target object and inventory change business data of each first server of the target object, and the first total inventory number is the total inventory number after the last inventory number is synchronized;
and synchronizing the inventory number according to the to-be-increased and decreased inventory number.
The stock number synchronization method, the device, the computer equipment and the storage medium are characterized in that a second server or a terminal acquires a first stock variation of each first server of a target object in a target time period, the target time period is a time period from the last stock number synchronization to the current stock number synchronization, a second total stock number is determined according to the first total stock number and each first stock variation, the first total stock number is the total stock number after the last stock number synchronization, the second total stock number is the total stock number when the stock numbers are synchronized, the stock number to be increased and decreased of each first server is respectively determined according to the first total stock number, the second total stock number and each first stock variation, the stock number to be increased and decreased of each stock is respectively sent to the corresponding first server, and each first server respectively carries out the current stock number synchronization according to the received stock number to be increased and decreased, by adopting the scheme, the inventory synchronization under different scenes can be universally realized, the method has better applicability to service expansion and change, and the realization difficulty and workload can be reduced when a service scene is newly added.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a method for synchronizing inventory counts;
FIG. 2 is a diagram illustrating an exemplary embodiment of a method for synchronizing inventory counts;
FIG. 3 is a flow diagram illustrating a method for synchronizing inventory counts in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating the first inventory variation acquisition step in one embodiment;
FIG. 5 is a flow chart illustrating a method for synchronizing inventory counts in another embodiment;
FIG. 6 is a flow chart illustrating a process of recording a sales order record scratch list and a list of available quantities to be sold in stock to be updated according to an embodiment;
FIG. 7 is a flow diagram illustrating the calculation of inventory synchronization and update of marketable quantity values among multiple platforms, according to one embodiment;
FIG. 8 is a block diagram showing the structure of an inventory number synchronizer in one embodiment;
FIG. 9 is a block diagram showing the structure of an inventory number synchronizing device in another embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device in one embodiment;
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The inventory number synchronization method provided by the invention can be applied to the application environment shown in fig. 1. Wherein each first server 102 communicates with a second server 104 via a network. Each of the first server 102 and the second server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
The inventory number synchronization method provided by the invention can also be applied to the application environment shown in fig. 2. Wherein each first server 202 communicates with the terminal 204 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and each first server 202 may be implemented by an independent server or a server cluster formed by a plurality of servers.
The inventory number synchronization method provided by the invention can be used for synchronizing the inventory number to a plurality of platform sales platforms by one merchant.
In one embodiment, as shown in fig. 3, there is provided an inventory number synchronization method, which is described by taking the application of the method to the second server in fig. 1 or the terminal in fig. 2 as an example, and includes the following steps:
step 302, acquiring a first inventory variation amount of each first server of a target object in a target time interval, wherein the target time interval is a time interval from the last time of synchronization of the inventory number to the current time of synchronization of the inventory number;
here, the target object may refer to a commodity, and the commodity category is not limited.
Here, the first server generally refers to a sales platform or an e-commerce platform, where a sales platform may be generally understood as a sales platform server and an e-commerce platform may be generally understood as an e-commerce platform server. Each first server of the target object is a platform for selling the target object, and the number of the first servers is not less than 2.
Here, the first inventory variation amount is generally an inventory variation amount generated by including a sales quantity, i.e., a sales service, but may also include inventory variation amounts generated by other service types of the first server, e.g., a return service. The first inventory change amount may be determined according to corresponding inventory change business data of the first server, where the inventory change business data generally refers to, but is not limited to, sales orders.
Specifically, the second server may receive the inventory change service data of the target object sent by each first server, and determine the first inventory change amount of each first server in the target time period according to the inventory change service data. Or the second server sends a first inventory fluctuation quantity acquisition request of the target object to the preprocessing server, and receives a first inventory fluctuation quantity of each first server of the target object in a target time period, which is returned by the preprocessing server, wherein the first inventory fluctuation quantity of each first server in the target time period is determined by the preprocessing server according to the inventory fluctuation service data of the target object of each first server.
Step 304, determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
here, the first total inventory number is the total inventory number after the last inventory number synchronization, that is, the total inventory number calculated when the last inventory number synchronization; the second total inventory number refers to the total inventory number calculated when the inventory numbers are synchronized.
Specifically, the second server may determine the second total stock number according to formula (1) below;
Figure GDA0003222807080000081
wherein, QtytIndicating a second total inventory number, QtylIndicates a first total inventory number, AciA first inventory fluctuation amount of the ith first server representing the target object in the target period, when the first inventory fluctuation amount is an inventory reduction amount, for example, sales amount, AciIs positive, when the first inventory variation is an inventory increase, AciN, n represents the total number of first servers of the target object.
Step 306, respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation amount;
here, the stock to-be-increased and decreased number refers to the number of stocks which needs to be increased and decreased on the basis of the first total stock number, each first server corresponds to one stock to-be-increased and decreased number, and if the first stock variation amounts of different servers are different, the stock to-be-increased and decreased numbers of different servers are also different.
Specifically, the second server may determine the stock to-be-increased or decreased number of the target object of each first server according to the following formula (2);
Diffi=Qtyt-Qtyl+Aci (2)
wherein DiffiThe number of stock to be increased or decreased of the ith first server representing the target object.
And 308, respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
When receiving the corresponding stock to-be-increased or decreased number, each first server can synchronize the stock number according to the received stock to-be-increased or decreased number.
Specifically, the second server sends the stock to-be-increased or decreased number of the ith first server to the ith first server, and each first server may determine the total stock number after the present stock number is synchronized according to the respective current stock number and the received stock to-be-increased or decreased number, where the current stock number is the stock number obtained by only considering the stock change service data of itself (without considering other first servers). For example, the current inventory number of the ith first server is obtained according to the first total inventory number and the inventory change service data of the target object of the ith first server in the target time period, the current inventory number may be updated each time the inventory change service data is generated, or the current inventory number may be synchronized at this time and determined according to the first total inventory number and the first inventory change amount of the ith first server.
In addition, after the present inventory number synchronization is completed, the value of the first total inventory number is generally updated to the value of the second total inventory number for the next inventory number synchronization.
In the above description, the second server is used as the execution subject of each step, but the terminal may be used as the execution subject of each step as needed.
In the stock number synchronization method, a second server or a terminal acquires a first stock variation amount of each first server of a target object in a target time period, the target time period is a time period from the last stock number synchronization to the current stock number synchronization, a second total stock number is determined according to the first total stock number and each first stock variation amount, the first total stock number is the total stock number after the last stock number synchronization, the second total stock number is the total stock number when the current stock number synchronization, stock increase and decrease numbers of each first server are respectively determined according to the first total stock number, the second total stock number and each first stock variation amount, the stock increase and decrease numbers of each first server are respectively sent to the corresponding first servers, and each first server respectively carries out the current stock number synchronization according to the received stock increase and decrease numbers, by adopting the scheme of the embodiment, the problem of inventory synchronization under different scenes can be solved universally, the method has better applicability to service expansion and change, the realization difficulty and workload can be reduced when a service scene is newly added, the method has better adaptability to rapid expansion and change of the service, and the IT system can better support the development of the service.
The inventory number synchronization method in one embodiment may further include the steps of: acquiring a second inventory variation of the target object in a target period, wherein the second inventory variation is an inventory variation caused in inventory management;
here, the inventory fluctuation amount may be an inventory decrement amount due to inventory loss such as a goods damage service and a goods expiration service, or may be an inventory increment amount generated by a merchant in stock.
The determining the second total inventory number according to the first total inventory number and each first inventory variation amount includes: and determining the total inventory variation amount according to the first inventory variation amount and the second inventory variation amount, and determining the second total inventory number according to the total inventory variation amount and the first total inventory number.
Specifically, the second total stock number may be determined according to the following formula (3);
Figure GDA0003222807080000101
in the above description, Au represents a second stock variation, and when the second stock variation is a stock reduction amount, Au is a positive number, and when the second stock variation is a stock increase amount, Au is a negative number.
In this embodiment, not only the stock increase and decrease scenario in the external business scenario but also the stock increase and decrease scenario in the business scenario inside the merchant are considered, so that the applicability of the scheme is further improved.
Considering that there is a certain delay for informing the merchant of the inventory change business data generated by the sales platform, the inventory number synchronization method in one embodiment may further include the steps of: and generating inventory supplement prompt information when the second total inventory number is lower than the preset safe total inventory number.
Here, the value of the number of secure total inventories is generally greater than 1. Here, the replenishment stock prompting information is used to prompt the merchant to replenish the stock of the target object in time.
Specifically, the number of the total safe inventory numbers may be 1, a plurality of total safe inventory numbers with different sizes may be set, and inventory replenishment prompt levels are determined according to the second total inventory number and the plurality of total safe inventory numbers, and different replenishment prompt levels correspond to different prompt modes, so that replenishment prompt may be performed differently. The different reminding modes can be mail reminding, short message reminding and telephone reminding, and can also be different in reminding frequency, for example, the reminding modes are the short message reminding, and can be reminding once a day, reminding three times a day and the like.
In the scheme of the embodiment, a certain safety stock is reserved as a reminder for reminding that the goods source is insufficient and the goods needs to be replenished in advance, so that the probability of no goods caused by concurrent selling of goods among platforms can be reduced.
In one embodiment, as shown in fig. 4, the obtaining of the first inventory variation amount of each first server of the target object in the target time period may include the following steps:
step 402, receiving the inventory change service data of each first server, and extracting the identification information of the inventory change object in the inventory change service data;
here, the inventory change business data may refer to sales orders. Here, the stock change target generally refers to a product in which stock change has occurred.
Step 404, storing the inventory change service data into a preset inventory change service data temporary storage table;
specifically, the inventory change business order identification information, the identification information of the inventory change object, the identification information of the first server, and the sales volume in the inventory change business data may be extracted and stored in a preset inventory change business data temporary storage table.
Step 406, storing the identification information of the inventory change object into an inventory number to-be-updated table;
specifically, before the identification information of the inventory change object is stored in the inventory number to-be-updated table, it may be detected whether the identification information of the inventory change object is stored in the inventory number to-be-updated table, and if the identification information of the inventory change object is not stored, the identification information of the inventory change object is stored in the inventory number to-be-updated table, otherwise, the identification information is not stored. The identification information of the inventory change object can be directly stored in the inventory number table to be updated without the duplication checking processing.
Step 408, when determining that the stock number of the target object is synchronous according to the stock number to-be-updated table, acquiring target stock change business data in a target time period from the stock change business data temporary storage table, wherein the target stock change business data is the stock change business data of the target object;
specifically, it may be detected whether the table of the stock number to be updated has the identification information of the target object at a set time corresponding to the target object, and if so, it is determined that the stock number of the target object is synchronized, and the target stock change service data in the target time period is obtained from the stock change service data temporary storage table. Wherein, the set time can be determined according to the synchronous period of the stock number of the target object. Or selecting identification information of an object from the inventory number to-be-updated table, if the identification information of the target object is selected, determining to synchronize the inventory number of the target object, and acquiring target inventory change business data in a target time period from the inventory change business data temporary storage table.
Step 410, determining a first inventory variation amount of each first server of the target object in the target time period according to the target inventory variation service data.
In addition, after the first servers are determined to complete the synchronization of the inventory number, the target inventory change service data in the inventory change service data temporary storage table is deleted, and the identification information of the target object in the inventory number to-be-updated table is deleted.
In this embodiment, an inventory change service data temporary storage table and an inventory number to-be-updated table are set, the inventory change service data is stored in a preset inventory change service data temporary storage table, and identification information of an inventory change object is stored in the inventory number to-be-updated table.
In one embodiment, the above obtaining the first inventory variation amount of each first server of the target object in the target time period may further include: recording first time, wherein the first time is the time of received first inventory change business data of the target object after the last inventory number of the target object is synchronized; and determining a second time according to the first time, wherein the second time is the starting time of the current inventory number synchronization of the target object.
Wherein the second time may be a set duration of time after the first time. Specifically, at the second time, the target inventory change service data in the target time period may be obtained from the inventory change service data temporary storage table, where the target inventory change service data is the inventory change service data of the target object, and the first inventory change amount of each first server of the target object in the target time period may be determined according to the target inventory change service data.
By adopting the scheme in the embodiment, useless synchronization of the inventory number caused by no inventory change business data of the target object can be avoided, and energy consumption can be saved.
In one embodiment, the determining the second time according to the first time may include: and determining the second time according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time and the quantity of the first servers.
Specifically, the second time may be determined according to the following formula (4) and formula (5);
t2=t1+kΔt (4)
k=ω1(t3-t1)+ω2n+ω3m (5)
wherein, t1、t2And t3The first time, the second time and the last inventory number synchronization time are respectively represented, the k time adjustment coefficient is obtained, the delta t is preset duration, and the size can be determined according to actual needs. n and m respectively represent the quantity of the first servers and the inventory reduction quantity, omega, corresponding to the first inventory change service data of the target object1、ω2And ω3The weight value is a preset weight value, and the size of the weight value can be determined according to the actual situation.
In the embodiment, the second time takes into account the influence of the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time, the number of the first servers, and other factors, so that the effectiveness of the inventory number synchronization can be improved.
In one embodiment, as shown in fig. 5, an inventory number synchronization method is provided, which is described by taking the method as an example applied to any one of the first servers in fig. 1 or fig. 2, and includes the following steps:
step 502, sending the inventory change service data of the target object to a second server or a terminal of the target object;
here, the second server is a merchant server, the terminal is a merchant terminal, and the merchant server or the merchant terminal includes the stock number synchronizing device of the present invention. The inventory number synchronizer may be a business module in an Enterprise Resource Planning System (ERP) of a merchant.
Specifically, the current first server sends the inventory change business data of the target object to a second server or a terminal of the target object. And the current first server is any one of the first servers of the target object.
Step 504, receiving the stock to-be-increased or decreased number returned by the second server or the terminal, where the stock to-be-increased or decreased number is determined according to a first total stock number of the target object and stock change service data of each first server of the target object, and the first total stock number is a total stock number after the last stock number is synchronized;
the stock to-be-increased or decreased number can be obtained by referring to the calculation method in the above embodiment, which is not described herein.
Step 506, the inventory number is synchronized according to the number to be increased or decreased of the inventory.
Specifically, when the current first server receives the inventory to-be-increased and decreased number returned by the second server or the terminal, the inventory to-be-increased and decreased number is subtracted from the current inventory number of the current first server, so that the total inventory number after the current inventory number is synchronized is obtained. Wherein the current stock count is as described in the above embodiments.
Although the stock to-be-increased and decreased numbers received by each first server may be different, the total stock numbers of each first server are the same when the synchronization of the stock numbers is completed.
By adopting the scheme of the embodiment, the problem of inventory synchronization under different scenes can be solved universally, the method has better applicability to service expansion and change, the realization difficulty and workload can be reduced when a service scene is newly added, the method has better adaptability to rapid expansion and change of the service, and the IT system can better support the development of the service.
In one embodiment, the above-mentioned stock to-be-increased/decreased number is further determined according to a second stock variation amount obtained by the second server, and the second stock variation amount is a stock variation amount caused in stock management.
By adopting the scheme of the embodiment, the applicability of the scheme can be further improved.
In order to facilitate understanding of the solution of the present invention, a specific example is described below, in which the sales volume is taken as the first inventory variation amount, the order is taken as the inventory variation business data, and the stock number synchronization method in the above embodiment is applied to the Enterprise Resource Planning (ERP) System (Enterprise management System), but these examples do not constitute a limitation to the solution of the present invention.
Recording a list of SKU (stock in and out metering unit) stock available quantity to be updated in a database, for example, sku.id 1069 represents mineral water, which has 100 bottles in total, and in the case that no sales occur, a merchant ERP (Enterprise Resource Planning System) has pushed 100 stocks to 3 sales platforms, where the merchant ERP is applied to the second server or the terminal, the 3 sales platforms serve as the three first servers, and the mineral water with sku.id 1069 represents the target object; when the sales platform 1 sells 1 piece of goods and the order is dropped back to the ERP of the merchant, the stock sales service processing module in the ERP of the merchant processes the order and simultaneously puts the sku.id related to the order into a stock available quantity to be updated table (which is equivalent to the stock quantity to be updated table); since the value of the merchant ERP saleable quantity is to be recorded, two values are also recorded in the database: the last available quantity of the product (corresponding to the first total inventory number), the available quantity calculated this time of the product (corresponding to the second total inventory number); when the program that calculates the amount available for sale reads that the SKU exists in the table, the amount available for sale in the inventory for that SKU is recalculated. The merchant ERP eventually concludes that the amount of the good available for sale has changed from 100 to 99.
TABLE 1 SKU inventory available quantity to be updated Table
SKU.id
1069
……
1901
In this scenario, since the change in the amount available for sale is triggered by the sale of platform 1, the available inventory of platform 1 (i.e., the current inventory count of platform 1) has become 99, the inventory change of the merchant ERP need not inform platform 1 any more, but platforms 2 and 3 still have 100 inventory, and inventory reduction needs to be informed. In addition to the inventory change brought by the sales platform, when the ERP of the merchant finds that the goods are damaged due to inventory checking, the saleable quantity is changed from 100 to 99, and the inventory change in this scene needs to be notified to all other sales platforms.
Therefore, inventory change of ERP of a merchant is indiscriminately informed to all platforms, and when inventory change of a sales order is informed to a corresponding platform, sales quantity corresponding to the platform is deducted. Finally, a calculation model for updating the inventory of each platform is proposed as follows:
Diffpti=Qtythis-time-erp-Qtylast-time-erp+SaleOrderperiod-pti (6)
wherein DiffptiA difference value (corresponding to the stock to be increased or decreased) indicating that the corresponding sales platform i needs to be updated Qtythis-time-erpIndicating that the ERP of the merchant calculates the value of the salable quantity of the commodity this time (corresponding to the second total inventory number mentioned above), Qty in this scenariothis-time-erp=99,Qtylast-time-erpRepresenting the value of the salable quantity (equivalent to the first total inventory quantity) which is calculated and recorded by the ERP of the merchant last time, and Q in the scenetylast-time-erp=100;SaleOrderperiod-ptiThe sales order number (i.e., the sales amount, which corresponds to the first inventory variation amount) generated by the sales platform i from the last calculation to the present calculation of the SKU is finally obtained as follows:
Diffpt1=0
Diffpt2=-1
Diffpt3=-1
after the calculation is completed, the calculation is updated Qtylast-time-erp=99。
Since sales may occur for multiple platforms, multiple sales orders may also occur for a single platform at calculated intervals, thus adding a table: the sales order record temporary table (corresponding to the stock change business data temporary table) has a table structure shown in table 2:
table 2 sales order record temporary storage table
Sales order number id SKU.id Sales platform id Number of sales
A001 1069 Platform 1 3
B003 1069 Platform 2 8
B004 1069 Platform 2 10
As is known, Qtylast-time-erp=99;
The 1069 sku.id entry into inventory available quantities to update table due to sales transactions.
TABLE 3 table for available quantity of stock to be updated
SKU.id
1072
.....
1069
1090
During the next calculation of the available sales quantity of the SKU, the sales orders of each platform received by the ERP of the merchant are recorded in a temporary storage table of the sales order records, wherein the three orders are A001, B003 and B004 respectively, and meanwhile, inventory checking also occurs, so that the goods are found to be damaged, and 5 available sales quantities need to be reduced.
When the stock quantity is updated and calculated to the SKU with the id of 1069, the change of the current saleable quantity is calculated, and other 1069 records in the update table are deleted after the calculation is finished; because the scene fuses the scenes that a plurality of platforms and the ERP of the merchant bring about inventory change, the inventory updating method is the Diffpti=Qtythis-time-erp-Qtylast-time-erp+SaleOrderperiod-ptiFinally, the synchronous inventory quantity required by each sales platform is obtained as follows:
enterprise ERP Platform 1 Platform 2 Platform 3
Qtylast-time-erp 99 99 99 99
SaleOrderperiod-pti ————— 3 18 0
Qtythis-time-erp 73 73 73 73
Diffpti ————— -23 -8 -26
When the current inventory change update is finished, Qty will be addedlast-time-erp=73。
And emptying the temporary storage table of the sales order record, and waiting for the next management service or sales service to trigger new inventory updating. Fig. 6 and 7 schematically illustrate the process flow of the stock synchronization. Specifically, as shown in fig. 6, the recording process of the sales order record temporary storage table and the list to be updated of the available quantity in stock may include the following steps:
step 602, a merchant EPR detects that an inventory change service occurs;
here, the inventory change service may be an inventory management service or an inventory sales service.
Step 604, detecting whether the inventory change service is an inventory sale service, if so, entering step 606, and if not, entering step 608;
step 606, recording the related information of the order into a sales order record temporary storage table;
step 608, the sku.id is entered into the stock available quantity to be updated table.
As shown in fig. 7, the calculation of the stock synchronization number and the update process of the saleable quantity value among the multiple platforms may include the following steps:
step 702, detecting whether the table of the available quantity of the inventory to be updated has data, if so, entering step 704, and if not, ending the process;
step 704, selecting a SKU for processing;
specifically, the identification information of a good is selected from a list of the number available for sale in stock to be updated.
Step 706, calculating the number available for sale;
here, the number available for sale this time corresponds to the second total stock number;
step 708, delete the SKU in the table of the available quantity to be updated;
step 710, capturing the sales order and the sales quantity under the SKU in a sales order record temporary storage table;
step 712, calculating the number of platforms to be synchronized according to the formula (6);
here, the number to be synchronized corresponds to the above-mentioned stock to-be-increased or decreased number;
and 714, synchronizing the available quantity of each platform, deleting the records of the SKU in the sales order record temporary storage table, and assigning the available quantity of the time to the available quantity of the last time.
According to the deduction of the composite scene, the model can calculate the corresponding different inventory change quantities of the multiple platforms through difference calculation according to different service scenes, does not need to carry out special processing on a single platform, and has universal processing capability. When the ERP of the merchant needs to rapidly expand other platforms, the inventory synchronization method is still applicable.
Meanwhile, due to the fact that the order generated by the sales platform informs the ERP of the merchant that a certain time delay exists, a certain safety stock can be reserved in a total stock module of the ERP of the merchant to remind that a service goods source is insufficient for replenishing goods in advance and the situation that goods are not available among the platforms due to concurrent selling is reduced.
It should be understood that although the various steps in the flow charts of fig. 3-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an inventory number synchronization apparatus including: an obtaining module 802, a first processing module 804, a second processing module 806, and a first sending module 808, wherein:
an obtaining module 802, configured to obtain a first inventory variation amount of each first server of a target object in a target time period, where the target time period is a time period from a last time of synchronization of an inventory number to a present time of synchronization of the inventory number;
a first processing module 804, configured to determine a second total inventory number according to a first total inventory number and each of the first inventory fluctuation amounts, where the first total inventory number is a total inventory number after the last synchronization of inventory numbers, and the second total inventory number is a total inventory number when the current synchronization of inventory numbers is performed;
a second processing module 806, configured to determine, according to the first total inventory number, the second total inventory number, and each first inventory variation, the number of to-be-increased or decreased inventories of each first server, respectively;
the first sending module 808 is configured to send each to-be-increased or decreased inventory number to the corresponding first server respectively to perform inventory number synchronization this time.
In one embodiment, the obtaining module 802 is further configured to obtain a second inventory variation amount of the target object in the target time period, where the second inventory variation amount is an inventory variation amount caused in inventory management; the first processing module 804 determines a total inventory variation amount according to each of the first inventory variation amount and the second inventory variation amount, and determines a second total inventory number according to the total inventory variation amount and the first total inventory number.
In one embodiment, the inventory number synchronizing device further includes a reminding module, and the reminding module is configured to generate an inventory replenishment reminding message when the second total inventory number is lower than a preset safe total inventory number.
In one embodiment, the obtaining module 802 may receive the inventory change service data of each first server, extract the identification information of the inventory change object in the inventory change service data, store the inventory change service data in a preset inventory change service data temporary storage table, store the identification information of the inventory change object in an inventory number to-be-updated table, obtain the target inventory change service data in the target time period from the inventory change service data temporary storage table when determining that the inventory number of the target object is synchronized according to the inventory number to-be-updated table, where the target inventory change service data is the inventory change service data of the target object, and determine the first inventory change amount of each first server of the target object in the target time period according to the target inventory change service data.
In one embodiment, the obtaining module 802 may further record a first time, where the first time is a time of the received first inventory change service data of the target object after the last synchronization of the inventory numbers of the target object, and determine a second time according to the first time, where the second time is a start time of the current synchronization of the inventory numbers of the target object.
In one embodiment, the obtaining module 802 may determine the second time according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last synchronization time of the inventory number, and the quantity of the first server.
In one embodiment, as shown in fig. 9, there is provided an inventory number synchronizing apparatus including: a second sending module 902, a receiving module 904, and a synchronization module 906, wherein:
a second sending module 902, configured to send the inventory change service data of the target object to a second server or a terminal of the target object;
a receiving module 904, configured to receive the stock to-be-increased or decreased number returned by the second server or the terminal, where the stock to-be-increased or decreased number is determined according to a first total stock number of the target object and stock change service data of each first server of the target object, and the first total stock number is a total stock number after the last stock number is synchronized;
and the synchronization module 906 is configured to synchronize the inventory number according to the to-be-increased and decreased inventory number.
For the specific limitation of the inventory number synchronization device, reference may be made to the above limitation of the inventory number synchronization method, which is not described herein again. The modules in the stock number synchronizer can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing relevant data of the inventory change business. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of synchronizing an inventory number.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of synchronizing an inventory number. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 10 and 11 are only block diagrams of some of the configurations relevant to the inventive arrangements and do not constitute a limitation on the computing devices to which the inventive arrangements may be applied, and that a particular computing device may include more or less components than those shown, or some of the components may be combined, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation;
and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a second inventory variation of the target object in a target period, wherein the second inventory variation is an inventory variation caused in inventory management;
when the processor executes the computer program to realize the step of determining the second total inventory number according to the first total inventory number and each first inventory fluctuation amount, the following steps are specifically realized: and determining the total inventory variation amount according to the first inventory variation amount and the second inventory variation amount, and determining the second total inventory number according to the total inventory variation amount and the first total inventory number.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and generating inventory supplement prompt information when the second total inventory number is lower than the preset safe total inventory number.
In one embodiment, when the processor executes the computer program to implement the above step of acquiring the first inventory variation amount of each first server of the target object in the target time period, the processor specifically implements the following steps: receiving the inventory change service data of each first server, and extracting the identification information of the inventory change object in the inventory change service data; storing the inventory change service data into a preset inventory change service data temporary storage table; storing the identification information of the inventory change object into an inventory number to-be-updated table; when the synchronization of the stock number of the target object is determined according to the stock number table to be updated, acquiring target stock change business data in a target time period from the stock change business data temporary storage table, wherein the target stock change business data is the stock change business data of the target object; and determining a first inventory variation amount of each first server of the target object in a target time period according to the target inventory variation business data.
In one embodiment, when the processor executes the computer program to implement the above step of acquiring the first inventory variation amount of each first server of the target object in the target time period, the processor further implements the following steps: recording first time, wherein the first time is the time of received first inventory change business data of the target object after the last inventory number of the target object is synchronized; and determining a second time according to the first time, wherein the second time is the starting time of the current inventory number synchronization of the target object.
In one embodiment, when the processor executes the computer program to implement the step of determining the second time according to the first time, the following steps are specifically implemented: and determining the second time according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time and the quantity of the first servers.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
sending the inventory change service data of the target object to a second server or a terminal of the target object;
receiving the stock to-be-increased and decreased number returned by the second server or the terminal, wherein the stock to-be-increased and decreased number is determined according to the first total stock number of the target object and the stock change service data of each first server of the target object, and the first total stock number is the total stock number after the last stock number is synchronized;
and synchronizing the inventory number according to the to-be-increased and decreased inventory number.
In one embodiment, the number of stock waiting to be increased or decreased is further determined according to a second stock variation amount obtained by the second server, and the second stock variation amount is a stock variation amount caused in stock management.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory variation, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
respectively determining the stock to-be-increased and decreased number of each first server according to the first total stock number, the second total stock number and each first stock variation;
and respectively sending the to-be-increased and decreased number of each stock to the corresponding first server to synchronize the stock number.
In one embodiment, the processor computer program when executed further performs the steps of: acquiring a second inventory variation of the target object in a target period, wherein the second inventory variation is an inventory variation caused in inventory management;
when the computer program is executed to implement the step of determining the second total inventory number according to the first total inventory number and each first inventory variation, the processor specifically implements the following steps: and determining the total inventory variation amount according to the first inventory variation amount and the second inventory variation amount, and determining the second total inventory number according to the total inventory variation amount and the first total inventory number.
In one embodiment, the processor computer program when executed further performs the steps of: and generating inventory supplement prompt information when the second total inventory number is lower than the preset safe total inventory number.
In one embodiment, when the computer program is executed to implement the step of obtaining the first inventory variation amount of each first server of the target object in the target time period, the processor specifically implements the following steps: receiving the inventory change service data of each first server, and extracting the identification information of the inventory change object in the inventory change service data; storing the inventory change service data into a preset inventory change service data temporary storage table; storing the identification information of the inventory change object into an inventory number to-be-updated table; when the synchronization of the stock number of the target object is determined according to the stock number table to be updated, acquiring target stock change business data in a target time period from the stock change business data temporary storage table, wherein the target stock change business data is the stock change business data of the target object; and determining a first inventory variation amount of each first server of the target object in a target time period according to the target inventory variation business data.
In one embodiment, when the computer program is executed to implement the step of obtaining the first inventory variation amount of each first server of the target object in the target time period, the processor further implements the following steps: recording first time, wherein the first time is the time of received first inventory change business data of the target object after the last inventory number of the target object is synchronized; and determining a second time according to the first time, wherein the second time is the starting time of the current inventory number synchronization of the target object.
In one embodiment, when the computer program is executed to implement the step of determining the second time according to the first time, the processor specifically implements the following steps: and determining the second time according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time and the quantity of the first servers.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
sending the inventory change service data of the target object to a second server or a terminal of the target object;
receiving the stock to-be-increased and decreased number returned by the second server or the terminal, wherein the stock to-be-increased and decreased number is determined according to the first total stock number of the target object and the stock change service data of each first server of the target object, and the first total stock number is the total stock number after the last stock number is synchronized;
and synchronizing the inventory number according to the to-be-increased and decreased inventory number.
In one embodiment, the number of stock waiting to be increased or decreased is further determined according to a second stock variation amount obtained by the second server, and the second stock variation amount is a stock variation amount caused in stock management.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (15)

1. A method for synchronizing a number of repositories, the method comprising:
acquiring a first inventory variation amount of each first server of a target object in a target time period, wherein the target time period is a time period from the last time of synchronizing the inventory number to the current time of synchronizing the inventory number;
determining a second total inventory number according to the first total inventory number and each first inventory fluctuation amount, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
according to Diffi=Qtyt-Qtyl+AciRespectively determining the stock to-be-increased or decreased number of the first servers, wherein DiffiThe stock to be increased or decreased of the ith first server representing the target object, QtytRepresenting said second total inventory number, QtylRepresenting said first total stock number, AciA first inventory variation amount of an ith first server representing the target object over the target time period;
respectively sending the to-be-increased and decreased number of each stock to a corresponding first server to synchronize the stock number;
the obtaining of the first inventory variation amount of each first server of the target object in the target time period includes:
recording first time, wherein the first time is the time of received first inventory change business data of the target object after the last inventory number of the target object is synchronized;
according to t2=t1+ k Δ t determines a second time, which is a start time of the present inventory number synchronization of the target object, wherein t1And t2Respectively representing a first time and a second time, k is a time adjustment coefficient, and delta t is a preset duration.
2. The method of claim 1, further comprising obtaining a second inventory variation of the target object over the target time period, the second inventory variation being an inventory variation caused in inventory management;
determining a second total inventory quantity according to the first total inventory quantity and each first inventory fluctuation quantity, comprising: determining a total inventory variation amount according to the first inventory variation amount and the second inventory variation amount, and determining a second total inventory number according to the total inventory variation amount and the first total inventory number.
3. The method according to claim 1, further comprising generating a replenishment inventory prompt message when the second total inventory number is lower than a preset safe total inventory number.
4. The method of claim 1, wherein obtaining the first inventory variation amount of each first server of the target object in the target time period comprises:
receiving inventory change service data of each first server, and extracting identification information of an inventory change object in the inventory change service data;
storing the inventory change service data into a preset inventory change service data temporary storage table;
storing the identification information of the inventory change object into an inventory number to-be-updated table;
when the synchronization of the stock number of the target object is determined according to the stock number table to be updated, acquiring target stock change business data in the target time period from the stock change business data temporary storage table, wherein the target stock change business data is the stock change business data of the target object;
and determining a first inventory variation amount of each first server of the target object in a target time period according to the target inventory variation service data.
5. The method of claim 1, wherein obtaining the first inventory variation amount of each first server of the target object in the target time period further comprises:
and determining the time adjustment coefficient according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time and the quantity of the first servers.
6. A method for synchronizing a number of repositories, the method comprising:
sending the inventory change service data of the target object to a second server or a terminal of the target object;
receiving the stock to-be-increased or decreased number returned by the second server or the terminal, wherein the stock to-be-increased or decreased number is based on Diffi=Qtyt-Qtyl+AciDetermination, wherein DiffiThe stock to be increased or decreased of the ith first server representing the target object, QtytIndicating a second total inventory number, QtylIndicates a first total inventory number, AciRepresenting a first inventory variation amount of an ith first server of a target object in a target time period, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
synchronizing the inventory number according to the to-be-increased and decreased inventory number;
wherein the starting time of the synchronization of the inventory number of the target object at this time is t2=t1+ k Δ t determination, t1Time, t, representing the first inventory change transaction data received for the target object after the last synchronization of inventory counts for the target object2And representing the starting time of the synchronization of the inventory number of the target object at this time, wherein k is a time adjustment coefficient, and delta t is a preset time length.
7. The inventory count synchronization method according to claim 6, wherein the inventory backlog is further determined according to a second inventory fluctuation amount obtained by the second server, the second inventory fluctuation amount being an inventory fluctuation amount caused in inventory management.
8. An inventory number synchronization apparatus, the apparatus comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a first inventory variation amount of each first server of a target object in a target time interval, and the target time interval is a time interval from the last time of synchronization of inventory numbers to the current time of synchronization of inventory numbers;
the first processing module is used for determining a second total inventory number according to the first total inventory number and each first inventory fluctuation amount, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
a second processing module for processing according to Diffi=Qtyt-Qtyl+AciRespectively determining the stock to-be-increased or decreased number of the first servers, wherein DiffiThe stock to be increased or decreased of the ith first server representing the target object, QtytRepresenting said second total inventory number, QtylRepresenting said first total stock number, AciA first inventory variation amount of an ith first server representing the target object over the target time period;
the first sending module is used for respectively sending the to-be-increased and decreased stock number to the corresponding first server to synchronize the stock number;
the acquisition module is also used for recording the first time and according to t2=t1+ k Δ t determines a second time, where the first time is the time of the first inventory change service data of the target object received after the last inventory number synchronization of the target object, and the second time is the start time of this inventory number synchronization of the target object, t Δ t1And t2Respectively representing a first time and a second time, k is a time adjustment coefficient, and delta t is a preset duration.
9. The apparatus of claim 8, wherein the obtaining module is further configured to obtain a second inventory variation of the target object in the target time period, and the second inventory variation is an inventory variation caused in inventory management;
the first processing module determines a total inventory variation amount according to the first inventory variation amount and the second inventory variation amount, and determines a second total inventory number according to the total inventory variation amount and the first total inventory number.
10. The apparatus of claim 8, further comprising a reminding module, wherein the reminding module is configured to generate a stock replenishment reminding message when the second total stock number is lower than a preset safe total stock number.
11. The apparatus of claim 8, wherein:
the acquisition module receives inventory change service data of each first server, extracts identification information of an inventory change object in the inventory change service data, stores the inventory change service data into a preset inventory change service data temporary storage table, stores the identification information of the inventory change object into an inventory number to-be-updated table, acquires target inventory change service data in a target time period from the inventory change service data temporary storage table when determining that the inventory number of the target object is synchronous according to the inventory number to-be-updated table, and determines a first inventory change amount of each first server of the target object in the target time period according to the target inventory change service data.
12. The apparatus of claim 8, wherein:
and the acquisition module determines the adjustment coefficient according to the first time, the inventory reduction amount corresponding to the first inventory change service data, the last inventory number synchronization time and the quantity of the first servers.
13. An inventory number synchronization apparatus, the apparatus comprising:
the second sending module is used for sending the inventory change business data of the target object to a second server or a terminal of the target object;
a receiving module, configured to receive the inventory to-be-increased/decreased number returned by the second server or the terminal, where the inventory to-be-increased/decreased number is based on Diffi=Qtyt-Qtyl+AciDetermination, wherein DiffiThe stock to be increased or decreased of the ith first server representing the target object, QtytIndicating a second total inventory number, QtylIndicates a first total inventory number, AciRepresenting a first inventory variation amount of an ith first server of a target object in a target time period, wherein the first total inventory number is the total inventory number after the last inventory number is synchronized, and the second total inventory number is the total inventory number when the current inventory number is synchronized;
the synchronization module is used for synchronizing the inventory number of the time according to the to-be-increased and decreased inventory number;
wherein the starting time of the synchronization of the inventory number of the target object at this time is t2=t1+ k Δ t determination, t1Time, t, representing the first inventory change transaction data received for the target object after the last synchronization of inventory counts for the target object2And representing the starting time of the synchronization of the inventory number of the target object at this time, wherein k is a time adjustment coefficient, and delta t is a preset time length.
14. 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 steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910367774.0A 2019-05-05 2019-05-05 Stock number synchronization method and device, computer equipment and storage medium Active CN110188139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910367774.0A CN110188139B (en) 2019-05-05 2019-05-05 Stock number synchronization method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910367774.0A CN110188139B (en) 2019-05-05 2019-05-05 Stock number synchronization method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110188139A CN110188139A (en) 2019-08-30
CN110188139B true CN110188139B (en) 2021-10-22

Family

ID=67715621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910367774.0A Active CN110188139B (en) 2019-05-05 2019-05-05 Stock number synchronization method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110188139B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113327073B (en) * 2019-12-30 2024-04-26 上海尊溢商务信息咨询有限公司 High-efficiency configurable e-commerce full inventory synchronization method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636933A (en) * 2015-02-11 2015-05-20 广州唯品会信息科技有限公司 Method and device for positioning oversell reasons of e-commerce website
CN104699712A (en) * 2013-12-09 2015-06-10 阿里巴巴集团控股有限公司 Method and device for updating stock record information in database
CN104881767A (en) * 2015-05-14 2015-09-02 努比亚技术有限公司 Method and system for inventory management based on multi-inventory system
CN104967650A (en) * 2015-02-06 2015-10-07 北京海涛国际旅行社有限公司 Third-party e-commerce platform unified releasing method
CN105956120A (en) * 2016-05-05 2016-09-21 北京票之家科技有限公司 Product inventory update method and device
CN106557482A (en) * 2015-09-25 2017-04-05 阿里巴巴集团控股有限公司 A kind of inventory system data-updating method and device
CN107730191A (en) * 2017-11-27 2018-02-23 中山路得斯空调有限公司 A kind of safe shared interconnection type inventory management system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699712A (en) * 2013-12-09 2015-06-10 阿里巴巴集团控股有限公司 Method and device for updating stock record information in database
CN104967650A (en) * 2015-02-06 2015-10-07 北京海涛国际旅行社有限公司 Third-party e-commerce platform unified releasing method
CN104636933A (en) * 2015-02-11 2015-05-20 广州唯品会信息科技有限公司 Method and device for positioning oversell reasons of e-commerce website
CN104881767A (en) * 2015-05-14 2015-09-02 努比亚技术有限公司 Method and system for inventory management based on multi-inventory system
CN106557482A (en) * 2015-09-25 2017-04-05 阿里巴巴集团控股有限公司 A kind of inventory system data-updating method and device
CN105956120A (en) * 2016-05-05 2016-09-21 北京票之家科技有限公司 Product inventory update method and device
CN107730191A (en) * 2017-11-27 2018-02-23 中山路得斯空调有限公司 A kind of safe shared interconnection type inventory management system

Also Published As

Publication number Publication date
CN110188139A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN111028009B (en) Processing method and device for retrievable business entity
CN113467824B (en) Data processing method, device, equipment and storage medium
US20140351122A1 (en) Electronic-money management device, electronic-money management method, electronic-money management program, and computer-readable recording medium containing said program
CN107871221B (en) Method and device for acquiring amount of marketable inventory
CN112381482A (en) Material management method and device, electronic equipment and storage medium
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN110609954A (en) Data acquisition method and device, computer equipment and storage medium
CN110838041B (en) Virtual resource activity processing method and device, computer equipment and storage medium
US8069086B2 (en) Systems and methods for time-dependent protection of available quantities
CN110188139B (en) Stock number synchronization method and device, computer equipment and storage medium
US20160300203A1 (en) Settlement system, server device, terminal device, recording medium, method and program
CN111178830B (en) Cost accounting method, cost accounting device, computer equipment and storage medium
CN109614263B (en) Disaster tolerance data processing method, device and system
JP2017156893A (en) Supply and demand adjusting device, supply and demand adjusting system, and supply and demand adjusting method
CN111061567B (en) Resource data processing method, device, computer readable storage medium and computer equipment
KR101898762B1 (en) Apparatus for distributing goods with considering demand uncertainty, method thereof, and computer recordable medium storing the method
CN109191217B (en) Method and device for predicting video advertisement putting times
CN115729687A (en) Task scheduling method and device, computer equipment and storage medium
WO2018180863A1 (en) System, method and program for managing message
CN112948501B (en) Data analysis method, device and system
CN114219247A (en) Processing method and device of equipment consumables, computer equipment and storage medium
CN109711809B (en) Merchant attribute setting method and device, computer equipment and storage medium
CN112465612A (en) Receipt information processing method and device, computer equipment and storage medium
JP2002073142A (en) Production schedule generating device and recording medium with recorded production schedule generating program of production schedule generating device
CN112348612A (en) Order generation 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