CN109697591A - Method for inventory control, device, storage medium and server - Google Patents

Method for inventory control, device, storage medium and server Download PDF

Info

Publication number
CN109697591A
CN109697591A CN201811545002.3A CN201811545002A CN109697591A CN 109697591 A CN109697591 A CN 109697591A CN 201811545002 A CN201811545002 A CN 201811545002A CN 109697591 A CN109697591 A CN 109697591A
Authority
CN
China
Prior art keywords
stock
server
distribution server
inventory
request
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.)
Withdrawn
Application number
CN201811545002.3A
Other languages
Chinese (zh)
Inventor
陆进飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201811545002.3A priority Critical patent/CN109697591A/en
Publication of CN109697591A publication Critical patent/CN109697591A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

This disclosure relates to a kind of method for inventory control, device, storage medium and server, to reduce the excessive problem of director server pressure under the conditions of high concurrent in the related technology.The method for inventory control is applied to director server, the director server is connect with multiple the distribution servers respectively, it include: that the quantity in stock for distributing to the distribution server is determined according to the stock request when receiving the stock request that any the distribution server is sent;The message for responding the stock request is sent to the distribution server, the message includes quantity in stock instruction information, it is used to indicate the quantity in stock that the director server distributes to the distribution server, the distribution server is used for user's issuing stores and reduces the quantity in stock of the distribution server.

Description

Method for inventory control, device, storage medium and server
Technical field
This disclosure relates to technical field of data processing, and in particular, to a kind of method for inventory control, device, storage medium And server.
Background technique
With the rapid development of Internet, shopping online has become a part in people's life, various e-commerce Website also often release purchase by group, the commercial promotions activity such as the second kills, such activity have the characteristics that one it is common be exactly e-commerce The amount of access of website is increased sharply, and the case where people thousands of or even up to ten thousand rush to purchase a commodity occurs.
In the related technology, when e-commerce website carries out above-mentioned commercial promotions activity, user asks for commodity stocks A director server can be all forwarded to by asking, and directly reduce inventory from director server, in this case, the pressure of director server compared with Greatly, the requirement of high concurrent is not achieved, to will lead to the performance decline of e-commerce website, influences the normal purchase of user, uses Family experience is poor.
Summary of the invention
Purpose of this disclosure is to provide a kind of method for inventory control, device, storage medium and servers, to reduce related skill In art under the conditions of high concurrent director server pressure.
To achieve the goals above, in a first aspect, the disclosure provides a kind of method for inventory control, it is applied to director server, The director server is connect with multiple the distribution servers respectively, comprising:
When receiving the stock request that any the distribution server is sent, distributed to according to stock request determination The quantity in stock of the distribution server;
The message for responding the stock request is sent to the distribution server, the message includes quantity in stock instruction Information, is used to indicate the quantity in stock that the director server distributes to the distribution server, and the distribution server is used for To user's issuing stores and reduce the quantity in stock of the distribution server.
Optionally, the stock request includes inventory's depletion rate of the distribution server, described according to the inventory Request determines the quantity in stock for distributing to the distribution server, comprising:
According to inventory's depletion rate, the current quantity in stock of the director server and the multiple the distribution server Number determines the quantity in stock for distributing to the distribution server.
Optionally, described according to inventory's depletion rate, the current quantity in stock of the director server and the multiple The number of the distribution server determines the quantity in stock for distributing to the distribution server, comprising:
According to following formula, the quantity in stock for distributing to the distribution server is determined:
Wherein, x is the current quantity in stock of the director server, and a is inventory's depletion rate of the distribution server, and N is With the number of the multiple the distribution server, y is the quantity in stock for being sent to the distribution server.
Optionally, described when receiving the stock request that any the distribution server is sent, it is asked according to the inventory Seek the quantity in stock for determining and distributing to the distribution server, comprising:
When receiving the stock request that any the distribution server is sent, determine that the quantity in stock of the director server is It is no lower than presetting total quantity in stock;
The director server quantity in stock not less than it is described preset total quantity in stock when, according to the stock request determine point The quantity in stock of the distribution server described in dispensing.
Second aspect, the disclosure also provide a kind of method for inventory control, are applied to the distribution server, comprising:
Stock request is sent to director server, to request the director server distribution quantity in stock;
The message for being used to respond the stock request that the director server is sent is received, the message includes that quantity in stock refers to Show information, is used to indicate the quantity in stock that the director server distributes to the distribution server.
Optionally, further includes:
Detect inventory's depletion rate of the distribution server;
When inventory's depletion rate is lower than default depletion rate, Xiang Suoshu director server sends inventory and returns to message, It includes returning to quantity in stock to indicate information that the inventory, which returns to message, is used to indicate the distribution server and returns to total service The quantity in stock of device.
Optionally, further includes:
The user for requesting inventory to the distribution server that terminal is sent is received to request;
The inventory requested for responding the user is sent to the terminal, and reduces the inventory of the distribution server Amount.
It is optionally, described that the inventory requested for responding the user is sent to the terminal, comprising:
When determining that the quantity in stock of the distribution server is not zero, the transmission of Xiang Suoshu terminal is asked for responding the user The inventory asked;
The method also includes:
When the quantity in stock of the distribution server is zero, user request is transmitted to the director server, so that The director server sends the inventory requested for responding the user to the terminal.
The third aspect, the disclosure also provide a kind of inventory control device, are applied to director server, the director server difference It is connect with multiple the distribution servers, comprising:
Determining module, for when receiving the stock request that any the distribution server is sent, according to the inventory Request determines the quantity in stock for distributing to the distribution server;
Sending module, for sending the message for responding the stock request, the message to the distribution server Information is indicated including quantity in stock, is used to indicate the quantity in stock that the director server distributes to the distribution server, it is described The distribution server is used for user's issuing stores and reduces the quantity in stock of the distribution server.
Optionally, the stock request includes inventory's depletion rate of the distribution server, and the determining module is used for According to the number of inventory's depletion rate, the current quantity in stock of the director server and the multiple the distribution server, really Surely the quantity in stock of the distribution server is distributed to.
Optionally, the determining module is used to determine the quantity in stock for distributing to the distribution server according to following formula:
Wherein, x is the current quantity in stock of the director server, and a is inventory's depletion rate of the distribution server, and N is With the number of the multiple the distribution server, y is the quantity in stock for being sent to the distribution server.
Optionally, the determining module is used for:
When receiving the stock request that any the distribution server is sent, determine that the quantity in stock of the director server is It is no lower than presetting total quantity in stock;
The director server quantity in stock not less than it is described preset total quantity in stock when, according to the stock request determine point The quantity in stock of the distribution server described in dispensing.
Fourth aspect, the disclosure also provide a kind of inventory control device, are applied to the distribution server, comprising:
Sending module, for sending stock request to director server, to request the director server distribution quantity in stock;It receives Module, the message for being used to respond the stock request sent for receiving the director server, the message includes quantity in stock It indicates information, is used to indicate the quantity in stock that the director server distributes to the distribution server.
Optionally, described device further include:
Detection module, for detecting inventory's depletion rate of the distribution server;
Return module returns to message for sending inventory to the director server, and it includes returning that the inventory, which returns to message, Quantity in stock indicates information, is used to indicate the quantity in stock that the distribution server returns to the director server.
Optionally, described device further include:
Receive request module, for receive terminal transmission for the distribution server request inventory user ask It asks;
Inventory's sending module for sending the inventory requested for responding the user to the terminal, and is reduced described The quantity in stock of the distribution server.
Optionally, inventory's sending module is used for:
When determining that the quantity in stock of the distribution server is not zero, the transmission of Xiang Suoshu terminal is asked for responding the user The inventory asked;
Described device further include:
Forwarding module, for user request being transmitted to described when the quantity in stock of the distribution server is zero Director server, so that the director server sends the inventory requested for responding the user to the terminal.
5th aspect, the disclosure also provide a kind of computer readable storage medium, are stored thereon with computer program, the journey The step of any one the method in first aspect and second aspect is realized when sequence is executed by processor.
6th aspect, the disclosure also provide a kind of server, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize any one institute in first aspect The step of stating method.
7th aspect, the disclosure also provide a kind of server, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize any one institute in second aspect The step of stating method.
Through the above technical solutions, director server is connect with multiple the distribution servers respectively, distribution clothes can received When the stock request that business device is sent, the quantity in stock for distributing to the distribution server is determined according to the stock request, is then taken to distribution Business device sends the message for responding the stock request, which includes quantity in stock instruction information, is used to indicate total clothes Business device distributes to the quantity in stock of the distribution server, and in this case, the distribution server, can when receiving user's request Directly to reduce quantity in stock from the inventory of the distribution server local, compared to the prior art in, all users request is all total Server reduces the scheme of inventory, and the method for inventory control that the disclosure provides can slow down director server under the conditions of high concurrent Pressure, accelerates the speed that inventory is sent to user, and user experience is good.
Other feature and advantage of the disclosure will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is and to constitute part of specification for providing further understanding of the disclosure, with following tool Body embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 (a) is storage controlling schematic diagram of a scenario in the related technology;
Fig. 1 (b) is the storage controlling schematic diagram of a scenario shown according to one exemplary embodiment of the disclosure;
Fig. 2 is the flow chart according to the method for inventory control shown in one exemplary embodiment of the disclosure;
Fig. 3 is the flow chart according to the method for inventory control shown in disclosure another exemplary embodiment;
Fig. 4 is the block diagram according to the inventory control device shown in one exemplary embodiment of the disclosure;
Fig. 5 is the block diagram according to the inventory control device shown in disclosure another exemplary embodiment;
Fig. 6 is the block diagram according to the server shown in one exemplary embodiment of the disclosure;
Fig. 7 is the block diagram according to the server shown in disclosure another exemplary embodiment.
Specific embodiment
It is described in detail below in conjunction with specific embodiment of the attached drawing to the disclosure.It should be understood that this place is retouched The specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
Fig. 1 (a) is please referred to, in the related technology, after the distribution server receives user's request, all users are requested to forward To director server, quantity in stock directly is reduced from director server, the number of request of process 1 is equal to the number of request of process 2, director server Pressure is larger, is unable to satisfy the requirement of high concurrent.
Therefore, in order to solve the above problem present in the relevant technologies, Fig. 1 (b) is please referred to, in the embodiment of the present disclosure, always Quantity in stock is distributed to each the distribution server by server, and the distribution server is directly serviced from distribution after receiving user's request For inventory's button of device local by quantity in stock, the number of request that process 2 includes is the stock request that the distribution server is sent to director server Number is that user's number of request far smaller than in process 1 can satisfy to largely reduce the pressure of director server High concurrent condition, accelerates the speed that inventory is sent to user, and user experience is good.
The method for inventory control of embodiment of the present disclosure offer is provided.
Fig. 2 be according to a kind of flow chart of method for inventory control shown in one exemplary embodiment of the disclosure, referring to Fig. 2, The method for inventory control should have in director server, director server mode as shown in Fig. 1 (b) respectively with multiple the distribution servers Connection, the method for inventory control the following steps are included:
Step S201, when receiving the stock request that any the distribution server is sent, according to the stock request Determine the quantity in stock for distributing to the distribution server.
Step S202 sends the message for responding the stock request to institute's the distribution server, and the message includes library Storage indicates information, is used to indicate the quantity in stock that the director server distributes to the distribution server, the distribution clothes Business device is used for user's issuing stores and reduces the quantity in stock of the distribution server.
Wherein, stock request is that the distribution server is used to request inventory to director server, may include the distribution server Inventory's depletion rate, etc., the embodiment of the present disclosure is not construed as limiting the particular content of stock request.
It, correspondingly, in step s 201, can be with if stock request includes inventory's depletion rate of the distribution server Be according to the number of inventory's depletion rate, the current quantity in stock of the director server and the multiple the distribution server, Determine the quantity in stock for distributing to the distribution server.
In a kind of possible implementation of the embodiment of the present disclosure, inventory's depletion rate can exist according to the distribution server The quantity of user's request and the duration calculation of the historical time section received in historical time section obtains, and is also possible to basis The duration calculation of quantity in stock and the historical time section that the distribution server is consumed in historical time section obtains, etc., and the disclosure is real Example is applied to be not construed as limiting the calculation of inventory's depletion rate.
It should be understood that in original allocation inventory, since inventory's depletion rate of the distribution server is zero, It, can be according to the current quantity in stock of director server and multiple when director server is to distribution sub-server distribution beginning inventory The number of the distribution server determines the quantity in stock for distributing to the distribution server.
In the embodiment of the present disclosure, according to inventory's depletion rate, the director server current quantity in stock and institute The number of multiple the distribution servers is stated, when the quantity in stock of the distribution server is distributed in determination, it is possible to:
Inventory's depletion rate of the distribution server is faster, and the quantity in stock for distributing to the distribution server is more, meanwhile, it is total to take The current quantity in stock of business device is more, and the quantity in stock for being assigned to each the distribution server is more, and the number of the distribution server is more, The quantity in stock for being assigned to each the distribution server is fewer.
It should be understood that the embodiment of the present disclosure for according to inventory's depletion rate, the director server it is current The number of quantity in stock and the multiple the distribution server determines the concrete mode for distributing to the quantity in stock of the distribution server It is not construed as limiting, possible mode is illustrated below.
In the embodiments of the present disclosure, according to inventory's depletion rate, the current quantity in stock of the director server and institute The number of multiple the distribution servers is stated, determines that the quantity in stock for distributing to the distribution server can be according to following formula, really Surely it is sent to the quantity in stock of the distribution server:
Wherein, x is the current quantity in stock of the director server, and a is inventory's depletion rate of the distribution server, and N is With the number of the multiple the distribution server, y is the quantity in stock for being issued to the distribution server.
For example, the current quantity in stock always serviced is 1000, inventory's depletion rate of a distribution server is consumption per second 10 inventories, the number of the distribution server is 5, then can determine the inventory for being assigned to the distribution server by above-mentioned formula Amount is 200.
It should be understood that director server distribute to the distribution server quantity in stock should for positive integer, if according to The quantity in stock for distributing to the distribution server that upper formula determines is not positive integer, determines a positive integer then can round up For the quantity in stock for distributing to the distribution server, or it can determine that a positive integer is to distribute to distribution service in a manner of other Quantity in stock of device, etc., the embodiment of the present disclosure are not construed as limiting this.
By above mode, inventory's depletion rate of the distribution server, the current quantity in stock of director server can be combined And the number of the distribution server, it determines the quantity in stock for being assigned to the distribution server, can be improved the flexibility of inventory allocation, protect Demonstrate,prove the accuracy of inventory allocation.
In the embodiments of the present disclosure, in step s 201, it can also be and receiving any the distribution server transmission Stock request when, determine whether the quantity in stock of the director server is lower than and preset total quantity in stock, then in the director server Quantity in stock not less than it is described preset total quantity in stock when, determined according to the stock request and distribute to the library of the distribution server Storage.
Presetting total quantity in stock can be user's sets itself, be also possible to true according to initial total quantity in stock of director server Fixed, for example, can directly determine and preset total inventory is 200, alternatively, presetting total quantity in stock when initial total quantity in stock is 1000 It can also be determined according to the initial total quantity in stock and preset ratio coefficient of director server, wherein preset ratio coefficient can be User's sets itself, for example, initial total quantity in stock is 1000, it is 20% that user, which set preset ratio coefficient, then presetting always Quantity in stock is just 200, etc., and the embodiment of the present disclosure is not construed as limiting for presetting the concrete mode of total quantity in stock.
For example, user, which sets, presets total quantity in stock as 200, then in the stock request for receiving the distribution server and receiving When, it is first determined whether the quantity in stock of director server is lower than 200 (presetting total quantity in stock), if the quantity in stock of director server at this time It is 300, i.e., not less than total quantity in stock is preset, then director server just distributes to the distribution server according to stock request determination Quantity in stock.
But if the quantity in stock of director server is lower than presetting total quantity in stock at this time, in other words, director server it is current Quantity in stock is very low, then director server can stop sending inventory to the distribution server, to guarantee the normal allocation of inventory.
Based on the same inventive concept, referring to Fig. 3, the embodiment of the present disclosure also provides a kind of method for inventory control, is applied to divide Send out server, comprising the following steps:
Step S301 sends stock request to director server, to request the director server distribution quantity in stock.
Step S302 receives the message for being used to respond the stock request that the director server is sent, the message package Quantity in stock instruction information is included, the quantity in stock that the director server distributes to the distribution server is used to indicate.
By above-mentioned method for inventory control, the distribution server can receive the quantity in stock of director server distribution, compared to existing Have in technology, all quantitys in stock are stored in the scheme of director server, the method for inventory control that the disclosure provides can it is high simultaneously Slow down the pressure of director server under the conditions of hair, accelerate the speed that inventory is sent to user, user experience is good.
In a kind of possible mode, the distribution server can also detect inventory's depletion rate of the distribution server, Then when inventory's depletion rate is lower than default depletion rate, Xiang Suoshu director server sends inventory and returns to message, described It includes returning to quantity in stock to indicate information that inventory, which returns to message, is used to indicate the distribution server and returns to the director server Quantity in stock.
Inventory's depletion rate characterizes the quantity for user's request that the distribution server receives, the library of the distribution server Deposit that depletion rate is faster, then the user's request for showing that the distribution server receives is more, conversely, the inventory of the distribution server disappears Consumption speed is slower, then the user's request for showing that the distribution server receives is fewer.
If inventory's depletion rate is lower than default depletion rate, show user's request that the distribution server receives compared with It is few, or it is not received by user's request whithin a period of time, then can send inventory to director server returns to message, it will The quantity in stock of the distribution server returns to director server, and in this case, director server can reallocate the quantity in stock of return Other faster the distribution servers of inventory's depletion rate are given, to guarantee that the inventory of each the distribution server is sufficient.
It should be understood that the quantity in stock of the distribution server, which is returned to director server, can be the library of the distribution server Storage all returns to director server, and correspondingly, inventory returns to the return quantity in stock instruction information that message includes and is used to indicate this The quantity in stock that the distribution server returns to director server is the complete inventory amount of the distribution server.Alternatively, can also be distribution Part quantity in stock is returned to director server by server, and correspondingly, inventory returns to the return quantity in stock instruction information that message includes Being used to indicate the distribution server and returning to the quantity in stock of director server is the part quantity in stock, etc. of the distribution server, this The specific quantity in stock that open embodiment returns to director server for the distribution server is not construed as limiting.
If quantity in stock is all returned to director server by the distribution server, director server can reallocate less inventory It measures and gives the distribution server, to avoid the distribution server when receiving user's request later, no quantity in stock distributes to use Family.It can be in addition, quantity in stock part is returned to director server by the distribution server and return quantity in stock part according to preset ratio Back to director server, for example, returning to director server, etc. for the 70% of the current quantity in stock of the distribution server, the disclosure is implemented Example is not construed as limiting this.
By above mode, when inventory's depletion rate of the distribution server is lower, library can be sent to director server Return message is deposited, the quantity in stock of the distribution server is returned into director server, realizes and the inventory of the distribution server is recycled, The quantity in stock of return is reallocated so as to director server and gives other faster the distribution servers of inventory's depletion rate, to guarantee each The quantity in stock of a the distribution server is sufficient.
In a kind of possible mode, the distribution server can also receive terminal transmission for the distribution server The user's request for requesting inventory, then sends the inventory requested for responding the user to the terminal, and reduces described point Send out the quantity in stock of server.
It in other words,, can be from the distribution service when the distribution server receives user's request in the embodiment of the present disclosure The inventory for responding user request is sent in device local inventory, and reduces the quantity in stock of the distribution server, to avoid When receiving user's request, quantity in stock directly is reduced from total service, can slow down the pressure of director server.Also, distribute Server can also distribute inventory to user by way of memory, so as to accelerate for inventory to be distributed to the speed of user, User experience is good.
Further, the inventory that Xiang Suoshu terminal sends for responding user's request, which can be, is determining the distribution clothes When the quantity in stock of business device is not zero, Xiang Suoshu terminal sends the inventory for responding user's request, and takes in the distribution It is engaged in quantity in stock when being zero of device, user request is transmitted to the director server, so that the director server is to the end End sends the inventory for responding user's request.
In other words, in the embodiment of the present disclosure, to the terminal send for respond inventory that the user requests it Before, can first determine whether the quantity in stock of the distribution server is zero, if the quantity in stock of the distribution server is not zero, to The terminal sends the inventory for responding user's request.
But if the quantity in stock of the distribution server is zero, user's request is transmitted to director server, by always servicing Device is to the inventory requested for responding the user is sent, and correspondingly, reducing quantity in stock is also the library for directly reducing director server Storage.
Below by complete embodiment to the interactive process of director server and the distribution server in the embodiment of the present disclosure It is illustrated.
The distribution server sends stock request to director server, to request director server to distribute quantity in stock.
Director server after the stock request for receiving the distribution server transmission, according to the current quantity in stock of director server and The distribution server number determines and distributes to the beginning inventory of the distribution server, and according to the beginning inventory from director server Inventory in distribution quantity in stock to the distribution server.
The distribution server receives the message for being used to respond stock request that director server is sent, and is then receiving terminal transmission For being requested to the user of the distribution server request inventory when, the inventory requested for responding user is sent to terminal, and is detained Subtract the quantity in stock of the distribution server.
When the quantity in stock of the distribution server local is lower than default quantity in stock, the distribution server is sent newly to director server Stock request may include inventory's depletion rate of the distribution server in the stock request.
Director server receives the new stock request of the distribution server transmission, and the inventory obtained in the stock request disappears Speed is consumed, then determines whether the quantity in stock of director server is lower than and presets total quantity in stock, be not less than in the quantity in stock of director server When presetting total quantity in stock, according to inventory's depletion rate, the current quantity in stock of director server and the number of the distribution server, determine The quantity in stock of the distribution server is distributed to, and distributes quantity in stock from the inventory of director server according to the quantity in stock and gives distribution service Device.
Meanwhile the distribution server real-time detection itself inventory's depletion rate, when inventory's depletion rate is lower than default consumption speed When spending, inventory is sent to director server and returns to message, itself inventory is returned into director server.Director server receives distribution After the inventory that server is sent returns to message, the inventory for the return quantity in stock instruction information instruction for including by inventory return message Amount is distributed to other the distribution servers, and the quantity in stock to guarantee other the distribution servers is sufficient.
But when the quantity in stock for determining director server is lower than total quantity in stock is preset, director server stops servicing to distribution Device distributes quantity in stock, then the user received is requested to forward by the distribution server when the inventory of the distribution server reaches zero To director server, so that director server sends the inventory requested for responding user to terminal.
Based on the same inventive concept, referring to Fig. 4, the embodiment of the present disclosure also provides a kind of inventory control device 400, is applied to Director server, the director server are connect with multiple the distribution servers respectively, which includes:
Determining module 401, for when receiving the stock request that any the distribution server is sent, according to the library It deposits request and determines the quantity in stock for distributing to the distribution server;
Sending module 402, it is described to disappear for sending the message for responding the stock request to the distribution server Breath includes that quantity in stock indicates information, is used to indicate the quantity in stock that the director server distributes to the distribution server, institute State the quantity in stock that the distribution server is used for user's issuing stores and reduces the distribution server.
Optionally, the stock request includes inventory's depletion rate of the distribution server, and the determining module 401 is used According to the current quantity in stock of inventory's depletion rate, the director server and the number of the multiple the distribution server, Determine the quantity in stock for distributing to the distribution server.
Optionally, the determining module 301 is used to determine the inventory for distributing to the distribution server according to following formula Amount:
Wherein, x is the current quantity in stock of the director server, and a is inventory's depletion rate of the distribution server, and N is With the number of the multiple the distribution server, y is the quantity in stock for being sent to the distribution server.
Optionally, the determining module 401 is used for:
When receiving the stock request that any the distribution server is sent, determine that the quantity in stock of the director server is It is no lower than presetting total quantity in stock;
The director server quantity in stock not less than it is described preset total quantity in stock when, according to the stock request determine point The quantity in stock of the distribution server described in dispensing.
Based on the same inventive concept, referring to Fig. 5, the disclosure also provides a kind of inventory control device 500, is applied to distribution clothes Business device, comprising:
Sending module 501, for sending stock request to director server, to request the director server distribution quantity in stock;
Receiving module 502, the message for being used to respond the stock request sent for receiving the director server are described Message includes quantity in stock instruction information, is used to indicate the quantity in stock that the director server distributes to the distribution server.
Optionally, described device 500 further include:
Detection module, for detecting inventory's depletion rate of the distribution server;
Return module returns to message for sending inventory to the director server, and it includes returning that the inventory, which returns to message, Quantity in stock indicates information, is used to indicate the quantity in stock that the distribution server returns to the director server.
Optionally, described device 500 further include:
Receive request module, for receive terminal transmission for the distribution server request inventory user ask It asks;
Inventory's sending module for sending the inventory requested for responding the user to the terminal, and is reduced described The quantity in stock of the distribution server.
Optionally, inventory's sending module is used for:
When determining that the quantity in stock of the distribution server is not zero, the transmission of Xiang Suoshu terminal is asked for responding the user The inventory asked;
Described device 500 further include:
Forwarding module, for user request being transmitted to described when the quantity in stock of the distribution server is zero Director server, so that the director server sends the inventory requested for responding the user to the terminal.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Based on the same inventive concept, the embodiment of the present disclosure also provides a kind of server, comprising:
Memory is stored thereon with computer program;
Processor, it is any of the above-described applied to total clothes to realize for executing the computer program in the memory The step of method for inventory control of business device.
In one exemplary embodiment, the block diagram of the server can be as shown in Figure 6.Referring to Fig. 6, server 600 is wrapped Include processor 622, quantity can be one or more and memory 632, can be executed by processor 622 for storing Computer program.The computer program stored in memory 632 may include it is one or more each correspond to one The module of group instruction.In addition, processor 622, which can be configured as, executes the computer program, to execute above-mentioned be applied to always The method for inventory control of server.
In addition, server 600 can also include power supply module 626 and communication component 650, which can be by It is configured to the power management of execute server 600, which can be configured as the communication for realizing server 600, example Such as, wired or wireless communication.In addition, the server 600 can also include input/output (I/O) interface 658.Server 600 can To operate based on the operating system for being stored in memory 632, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
Based on the same inventive concept, the embodiment of the present disclosure also provides a kind of server, comprising:
Memory is stored thereon with computer program;
Processor, it is any of the above-described applied to distribution to realize for executing the computer program in the memory The step of method for inventory control of server.
In one exemplary embodiment, the block diagram of the server can with it is as shown in Figure 7.Referring to Fig. 7, server 700 Including processor 722, quantity can be one or more and memory 732, can be executed by processor 722 for storing Computer program.The computer program stored in memory 732 may include it is one or more each correspond to The module of one group of instruction.In addition, processor 722, which can be configured as, executes the computer program, to execute above-mentioned be applied to The method for inventory control of the distribution server.
In addition, server 700 can also include power supply module 726 and communication component 750, which can be by It is configured to the power management of execute server 700, which can be configured as the communication for realizing server 700, example Such as, wired or wireless communication.In addition, the server 700 can also include input/output (I/O) interface 758.Server 700 can To operate based on the operating system for being stored in memory 732, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
Based on the same inventive concept, the embodiment of the present disclosure additionally provides a kind of computer-readable storage including program instruction The step of medium, which realizes above-mentioned any method for inventory control when being executed by processor.
The preferred embodiment of the disclosure is described in detail in conjunction with attached drawing above, still, the disclosure is not limited to above-mentioned reality The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure Monotropic type, these simple variants belong to the protection scope of the disclosure.
It is further to note that specific technical features described in the above specific embodiments, in not lance In the case where shield, can be combined in any appropriate way, in order to avoid unnecessary repetition, the disclosure to it is various can No further explanation will be given for the combination of energy.
In addition, any combination can also be carried out between a variety of different embodiments of the disclosure, as long as it is without prejudice to originally Disclosed thought equally should be considered as disclosure disclosure of that.

Claims (13)

1. a kind of method for inventory control, which is characterized in that be applied to director server, the director server takes with multiple distributions respectively Business device connection, comprising:
When receiving the stock request that any the distribution server is sent, determined according to the stock request described in distributing to The quantity in stock of the distribution server;
The message for responding the stock request is sent to the distribution server, the message includes quantity in stock instruction letter Breath, is used to indicate the quantity in stock that the director server distributes to the distribution server, the distribution server be used for User's issuing stores and the quantity in stock for reducing the distribution server.
2. the method according to claim 1, wherein the stock request includes the inventory of the distribution server Depletion rate, it is described that the quantity in stock for distributing to the distribution server is determined according to the stock request, comprising:
According to of inventory's depletion rate, the current quantity in stock of the director server and the multiple the distribution server Number determines the quantity in stock for distributing to the distribution server.
3. according to the method described in claim 2, it is characterized in that, described according to inventory's depletion rate, total service The current quantity in stock of device and the number of the multiple the distribution server determine the quantity in stock for distributing to the distribution server, Include:
According to following formula, the quantity in stock for distributing to the distribution server is determined:
Wherein, x be the director server current quantity in stock, a be the distribution server inventory's depletion rate, N for institute The number of multiple the distribution servers is stated, y is the quantity in stock for being sent to the distribution server.
4. method according to claim 1 to 3, which is characterized in that described to receive any the distribution server When the stock request of transmission, the quantity in stock for distributing to the distribution server is determined according to the stock request, comprising:
When receiving the stock request that any the distribution server is sent, determine whether the quantity in stock of the director server is low In presetting total quantity in stock;
The director server quantity in stock not less than it is described preset total quantity in stock when, according to the stock request determination distribute to The quantity in stock of the distribution server.
5. a kind of method for inventory control, which is characterized in that be applied to the distribution server, comprising:
Stock request is sent to director server, to request the director server distribution quantity in stock;
The message for being used to respond the stock request that the director server is sent is received, the message includes quantity in stock instruction letter Breath, is used to indicate the quantity in stock that the director server distributes to the distribution server.
6. according to the method described in claim 5, it is characterized by further comprising:
Detect inventory's depletion rate of the distribution server;
When inventory's depletion rate is lower than default depletion rate, Xiang Suoshu director server sends inventory and returns to message, described It includes returning to quantity in stock to indicate information that inventory, which returns to message, is used to indicate the distribution server and returns to the director server Quantity in stock.
7. method according to claim 5 or 6, which is characterized in that further include:
The user for requesting inventory to the distribution server that terminal is sent is received to request;
The inventory requested for responding the user is sent to the terminal, and reduces the quantity in stock of the distribution server.
8. the method according to the description of claim 7 is characterized in that described send to the terminal is asked for responding the user The inventory asked, comprising:
When determining that the quantity in stock of the distribution server is not zero, Xiang Suoshu terminal is sent for responding user's request Inventory;
The method also includes:
When the quantity in stock of the distribution server is zero, user request is transmitted to the director server, so that described Director server sends the inventory requested for responding the user to the terminal.
9. a kind of inventory control device, which is characterized in that be applied to director server, the director server takes with multiple distributions respectively Business device connection, comprising:
Determining module, for when receiving the stock request that any the distribution server is sent, according to the stock request Determine the quantity in stock for distributing to the distribution server;
Sending module, for sending the message for responding the stock request to the distribution server, the message includes Quantity in stock indicates information, is used to indicate the quantity in stock that the director server distributes to the distribution server, the distribution Server is used for user's issuing stores and reduces the quantity in stock of the distribution server.
10. a kind of inventory control device, which is characterized in that be applied to the distribution server, comprising:
Sending module, for sending stock request to director server, to request the director server distribution quantity in stock;
Receiving module, the message for being used to respond the stock request sent for receiving the director server, the message package Quantity in stock instruction information is included, the quantity in stock that the director server distributes to the distribution server is used to indicate.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The step of any one of claim 1-8 the method is realized when execution.
12. a kind of server characterized by comprising
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 1-4 The step of method.
13. a kind of server characterized by comprising
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 5-8 The step of method.
CN201811545002.3A 2018-12-17 2018-12-17 Method for inventory control, device, storage medium and server Withdrawn CN109697591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811545002.3A CN109697591A (en) 2018-12-17 2018-12-17 Method for inventory control, device, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811545002.3A CN109697591A (en) 2018-12-17 2018-12-17 Method for inventory control, device, storage medium and server

Publications (1)

Publication Number Publication Date
CN109697591A true CN109697591A (en) 2019-04-30

Family

ID=66231770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811545002.3A Withdrawn CN109697591A (en) 2018-12-17 2018-12-17 Method for inventory control, device, storage medium and server

Country Status (1)

Country Link
CN (1) CN109697591A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632074A (en) * 2020-12-24 2021-04-09 中国工商银行股份有限公司 Inventory allocation method and device for database, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
CN105913206A (en) * 2016-04-01 2016-08-31 广州唯品会网络技术有限公司 Distributed warehoused cargo scheduling system and method
CN107274026A (en) * 2017-06-22 2017-10-20 成都源禾丰创科技有限公司 A kind of micro- storehouse system of Quick delivery response
CN108537473A (en) * 2017-03-01 2018-09-14 更酷科技(上海)有限公司 Method, coffee vending machine and the server of automatic vending coffee
CN108596544A (en) * 2018-04-26 2018-09-28 北京车和家信息技术有限公司 inventory allocation method and device
WO2018210062A1 (en) * 2017-05-18 2018-11-22 北京京东尚科信息技术有限公司 Method and device for determining inventory of items by server system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103426072A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 Order processing system of high concurrency competitive inventory and processing method thereof
CN105913206A (en) * 2016-04-01 2016-08-31 广州唯品会网络技术有限公司 Distributed warehoused cargo scheduling system and method
CN108537473A (en) * 2017-03-01 2018-09-14 更酷科技(上海)有限公司 Method, coffee vending machine and the server of automatic vending coffee
WO2018210062A1 (en) * 2017-05-18 2018-11-22 北京京东尚科信息技术有限公司 Method and device for determining inventory of items by server system
CN107274026A (en) * 2017-06-22 2017-10-20 成都源禾丰创科技有限公司 A kind of micro- storehouse system of Quick delivery response
CN108596544A (en) * 2018-04-26 2018-09-28 北京车和家信息技术有限公司 inventory allocation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632074A (en) * 2020-12-24 2021-04-09 中国工商银行股份有限公司 Inventory allocation method and device for database, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN108667748B (en) Method, device, equipment and storage medium for controlling bandwidth
CN109451051B (en) Service request processing method and device, electronic equipment and storage medium
CN110365752A (en) Processing method, device, electronic equipment and the storage medium of business datum
JP6480642B2 (en) Stochastic bandwidth adjustment
CN104092650B (en) A kind of method and apparatus for distributing service request
CN109104336A (en) Service request processing method, device, computer equipment and storage medium
CN105159782A (en) Cloud host based method and apparatus for allocating resources to orders
CN108111554B (en) Control method and device for access queue
CN110138865B (en) Spatial crowdsourcing task allocation method, device, equipment and storage medium
CN103164266B (en) The Dynamic Resource Allocation for Multimedia of the transactions requests sent for initiating equipment to receiving device
CN109982159A (en) The method and terminal of online playing stream media
CN110545450B (en) Node distribution method, system, electronic equipment and storage medium
CN114155026A (en) Resource allocation method, device, server and storage medium
CN112686528B (en) Method, device, server and medium for distributing customer service resources
CN111107075A (en) Request response method and device, electronic equipment and computer-readable storage medium
CN108847981A (en) Distributed computer cloud computing processing method
CN111135586B (en) Game matching method, game matching device, storage medium and electronic equipment
CN102377662A (en) Routing cache negotiation method and system facing to bandwidth adaptation in video monitoring
WO2022110796A1 (en) Cloud service request responding method and apparatus, electronic device, and storage medium
CN109697591A (en) Method for inventory control, device, storage medium and server
US20180338246A1 (en) Devices, systems, and methods for resource allocation of shared spectrum
CN106506660B (en) A kind of online request processing method, server and system
CN113824689B (en) Edge computing network, data transmission method, device, equipment and storage medium
CN107277088B (en) High-concurrency service request processing system and method
US20110202592A1 (en) Use of Multiple Connections to Extend RADIUS Identifier Space

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190430