CN107871221A - For obtaining the method and apparatus that can sell stockpile number - Google Patents

For obtaining the method and apparatus that can sell stockpile number Download PDF

Info

Publication number
CN107871221A
CN107871221A CN201610860647.0A CN201610860647A CN107871221A CN 107871221 A CN107871221 A CN 107871221A CN 201610860647 A CN201610860647 A CN 201610860647A CN 107871221 A CN107871221 A CN 107871221A
Authority
CN
China
Prior art keywords
presell
information
stockpile number
time
response
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.)
Granted
Application number
CN201610860647.0A
Other languages
Chinese (zh)
Other versions
CN107871221B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610860647.0A priority Critical patent/CN107871221B/en
Publication of CN107871221A publication Critical patent/CN107871221A/en
Application granted granted Critical
Publication of CN107871221B publication Critical patent/CN107871221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q10/0875Itemisation or classification of parts, supplies or services, e.g. bill of materials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • 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
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

This application discloses for obtaining the method and apparatus that can sell stockpile number.Method includes:Receive the request of the stock of inquiry goods;Inquiry goods sells stockpile number;Judge whether the presell information of goods;If the presell information of goods be present, based at least one in presell information, the presell processing mark for selling stockpile number and corresponding presell information of inquiry, it is determined that stockpile number can be sold, wherein, presell processing mark includes start to process mark and terminates processing mark;Return to determination sells stockpile number, so as to by adding presell processing mark for each presell information, check processing mark in real time when receiving service request, and then determine whether to modification and can sell inventory, timed task mode is avoided due to Real-time inventory inaccuracy problem caused by delay acquisition stock, and reduces a large amount of cachings caused by timed task mode.

Description

For obtaining the method and apparatus that can sell stockpile number
Technical field
The application is related to field of computer technology, and in particular to field of audio processing, more particularly, to obtaining to sell The method and apparatus of stockpile number.
Background technology
In e-commerce platform, market reaction or certain market demand that can not be got ready the goods in time from manufacturer when test new commodity When measuring big much-sought-after item, it will usually take presell mode to be sold, that is, virtual presell stockpile number is set, allow user can be with Place an order in advance, then produced and got ready the goods according to lower one-state, delivery is completed in the presell delivery availability of promise. In order to ensure the controllability of presell, when setting presell, can typically set simultaneously presell beginning and ending time and can presell inventory Amount.The thing followed is how accurately to obtain presell stockpile number.
When creating a new commodity presell at present, presell information is generally respectively put into presell start to process queue (Start Queue, abbreviation SQ) and presell terminate to handle in queue (End Queue, abbreviation EQ) two buffer queues.Start pre- Start to process timed task is sold, a presell information is taken out from presell start to process queue SQ, judges that the presell time started is It is no to be more than present system time, if then illustrating that presell has started to, its presell quantity (Presell Number, abbreviation PN) is added To can sell on stockpile number (On sale number, abbreviation ON) as front end page displaying stockpile number, if not SQ is then placed into again, and wait is handled next time;When having single under user, then it pair can sell stock and reduce, be until 0 Only;Start presell to terminate to handle timed task, terminate to handle from presell and a presell information is taken out in queue EQ, judge presell knot Whether the beam time is not more than present system time, if it is illustrates that presell has terminated, is subtracted from that can sell in stockpile number ON Remaining presell quantity PN.
However, the method for current acquisition presell stockpile number, there are the following problems:Timed task mode, can not be accurate Control the presell time, it may appear that the presell time has started to but can not placed an order or presell has terminated situation about can also place an order, can only Timed task initiation culture is improved to reduce error time;A large amount of invalid cache request operations, a presell information are effectively located Sub-quantity is managed once, in order to reduce the invalid behaviour that caching is also improved while presell time error improves mission frequency Make, take substantial amounts of caching connection;Using queue mode, when thering is presell to change demand in pre- mid-sales, can not be replaced from queue Original presell information is changed, business demand is difficult to.
The content of the invention
The purpose of the application be to propose it is a kind of be used to obtain the method and apparatus that can sell stockpile number, more than solving The technical problem that background section is mentioned.
In a first aspect, being used to obtain the method that can sell stockpile number this application provides a kind of, methods described includes:Connect Receive the request of the stock of inquiry goods;That inquires about the goods sells stockpile number;Judge whether the pre- of the goods Sell information;If the presell information of the goods be present, stockpile number and correspondingly is sold based on the presell information, inquiry At least one of in the presell processing mark of the presell information, it is determined that stockpile number can be sold, wherein, the presell processing mark Knowledge includes start to process mark and terminates processing mark;Return to determination sells stockpile number.
In certain embodiments, it is described based on the presell information, inquiry sell stockpile number and it is corresponding described in At least one of in the presell processing mark of presell information, it is determined that can sell stockpile number includes:In response to the presell information The presell end time be more than present system time, judge whether presell time started in the presell information is more than current system Unite the time;It is not more than present system time in response to the presell time started in the presell information, judges the corresponding presell Identified in the presell processing mark of information with the presence or absence of start to process;Presell in response to the corresponding presell information handles mark In start to process mark be present, the stockpile number of selling of inquiry is defined as selling with the presell quantity sum in presell information Stockpile number is sold, and deletes start to process mark.
In certain embodiments, it is described based on the presell information, inquiry sell stockpile number and it is corresponding described in At least one of in the presell processing mark of presell information, it is determined that can sell stockpile number includes:In response to the presell information The presell end time be more than present system time, judge whether presell time started in the presell information is more than current system Unite the time;It is not more than present system time in response to the presell time started in the presell information, judges the corresponding presell Identified in the presell processing mark of information with the presence or absence of start to process;Presell in response to the corresponding presell information handles mark In be not present start to process identify, judge whether the presell end time of the presell information is more than present system time;Response It is not more than present system time in the presell end time, judges in the presell processing mark of the presell information with the presence or absence of end Processing mark;Terminate processing mark in response to existing in the presell processing mark of the corresponding presell information, by selling for inquiry Sell the difference that stockpile number subtracts remaining presell quantity to be defined as that stockpile number can be sold, and delete end processing mark.
In certain embodiments, it is described based on the presell information, inquiry sell stockpile number and it is corresponding described in At least one of in the presell processing mark of presell information, it is determined that can sell stockpile number includes following any one:In response to The presell end time of the presell information is more than present system time, judges that the presell time started in the presell information is It is no to be more than present system time;It is more than present system time in response to the presell time started in the presell information, will inquires about Stockpile number of selling be defined as that stockpile number can be sold;It is more than currently in response to the presell end time of the presell information System time, judges whether the presell time started in the presell information is more than present system time;In response to the presell The presell time started in information is not more than present system time, judges whether deposited in the presell processing mark of the presell information Identified in start to process;Identify, judge in response to start to process is not present in the presell processing mark of the corresponding presell information Whether the presell end time of the presell information is more than present system time;In response to the presell information presell at the end of Between be more than present system time, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;In response to the presell The presell end time of information is more than present system time, judges whether the presell time started in the presell information is more than and works as Preceding system time;It is not more than present system time in response to the presell time started in the presell information, judges the presell Identified in the presell processing mark of information with the presence or absence of start to process;Presell in response to the corresponding presell information handles mark In be not present start to process identify, judge whether the presell end time of the presell information is more than present system time;Response It is not more than present system time in the presell end time of the presell information, judges the presell processing of the corresponding presell information With the presence or absence of end processing mark in mark;In response to being not present in the presell processing mark of the corresponding presell information at end Reason mark, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;In response to the presell knot of the presell information The beam time is not more than present system time, and the stockpile number of selling of inquiry is defined as that stockpile number can be sold.
In certain embodiments, methods described also includes:If in the absence of the presell information of the goods, return to inquiry can Sell stockpile number.
In certain embodiments, methods described also includes:Receive the modification request to presell information;Repaiied described in inquiry is corresponding Whether the presell time started for changing the presell information of request is more than present system time;In response to the pre- of the corresponding modification request The presell time started for selling information is not more than present system time, and opening in the absence of the corresponding presell information for changing request Begin processing mark, and the presell quantity during modification is asked subtracts the difference that former presell quantity obtains and adjusts quantity as presell;Will The stockpile number of selling of inquiry is defined as that stockpile number can be sold with presell adjustment quantity sum, and is asked according to the modification Change presell information.
In certain embodiments, methods described also includes following any one:In response to the pre- of the corresponding modification request The presell time started for selling information is more than present system time, according to the modification request modification presell information;In response to corresponding The presell time started of the presell information of the modification request be not more than present system time, and exist in caching correspond to described in repair Change the start to process mark of the presell information of request, according to the modification request modification presell information.
Second aspect, it is used to obtain the device that can sell stockpile number this application provides a kind of, described device includes:Look into Request reception unit is ask, the request of the stock for receiving inquiry goods;Stockpile number query unit, for inquiring about the goods Sell stockpile number;Presell information judging unit, for judging whether the presell information of the goods;Stockpile number Determining unit, if for the presell information of the goods be present, based on the presell information, inquiry sell stockpile number with At least one of and in the presell processing mark of the corresponding presell information, it is determined that stockpile number can be sold, wherein, the presell Processing mark includes start to process mark and terminates processing mark;Quantification returning unit, for returning to selling for determination Stockpile number.
In certain embodiments, the stockpile number determining unit includes:Presell starts judgment sub-unit, in response to The presell end time of the presell information is more than present system time, judges that the presell time started in the presell information is It is no to be more than present system time;Start to identify judgment sub-unit, in response to the presell time started in the presell information No more than present system time, judge to identify with the presence or absence of start to process in the presell processing mark of the corresponding presell information; First stock's determination subelement, for start to process mark be present in the presell processing mark in response to the corresponding presell information Know, the stockpile number of selling of inquiry with the presell quantity sum in presell information is defined as that stockpile number can be sold, and delete Except start to process identifies.
In certain embodiments, the stockpile number determining unit includes:Presell starts judgment sub-unit, in response to The presell end time of the presell information is more than present system time, judges that the presell time started in the presell information is It is no to be more than present system time;Start to identify judgment sub-unit, in response to the presell time started in the presell information No more than present system time, judge to identify with the presence or absence of start to process in the presell processing mark of the corresponding presell information; Presell terminates judgment sub-unit, for start to process mark to be not present in the presell processing mark in response to the corresponding presell information Know, judge whether the presell end time of the presell information is more than present system time;End of identification judgment sub-unit, is used for It is not more than present system time in response to the presell end time, judges to whether there is in the presell processing mark of the presell information Terminate processing mark;Second stock's determination subelement, for being deposited in the presell processing mark in response to the corresponding presell information Terminating processing mark, the stockpile number of selling of inquiry is subtracted the difference of remaining presell quantity and is defined as that inventory can be sold Amount, and delete end processing mark.
In certain embodiments, the stockpile number determining unit includes following any one:Presell starts to judge sub- list Member, it is more than present system time for the presell end time in response to the presell information, judges in the presell information Whether the presell time started is more than present system time;And the 3rd stock's determination subelement, for believing in response to the presell The presell time started in breath is more than present system time, and the stockpile number of selling of inquiry is defined as that inventory can be sold Amount;Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, sentences Whether the presell time started in the presell information of breaking is more than present system time;Start to identify judgment sub-unit, for ringing The presell time started in presell information described in Ying Yu is not more than present system time, judges the presell processing of the presell information Identified in mark with the presence or absence of start to process;Presell terminates judgment sub-unit, in response to the pre- of the corresponding presell information Sell and start to process mark is not present in processing mark, judge whether the presell end time of the presell information is more than current system Time;And the 4th stock's determination subelement, it is more than current system for the presell end time in response to the presell information Time, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;Presell starts judgment sub-unit, in response to The presell end time of the presell information is more than present system time, judges that the presell time started in the presell information is It is no to be more than present system time;Start to identify judgment sub-unit, in response to the presell time started in the presell information No more than present system time, judge to identify with the presence or absence of start to process in the presell processing mark of the presell information;Presell Terminate judgment sub-unit, identify, judge in response to start to process is not present in the presell processing mark of the corresponding presell information Whether the presell end time of the presell information is more than present system time;End of identification judgment sub-unit, in response to The presell end time of the presell information is not more than present system time, judges the presell processing mark of the corresponding presell information With the presence or absence of end processing mark in knowledge;5th stock's determination subelement, for the presell in response to the corresponding presell information It is not present in processing mark and terminates processing mark, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;6th Stock's determination subelement, it is not more than present system time for the presell end time in response to the presell information, will inquires about Stockpile number of selling be defined as that stockpile number can be sold.
In certain embodiments, described device also includes:Quantity returning unit is inquired about, if in the absence of the goods Presell information, return to inquiry sells stockpile number.
In certain embodiments, described device also includes:Request reception unit is changed, presell information is repaiied for receiving Change request;Presell starts a query at unit, and whether the presell time started for the presell information asked for inquiring about the corresponding modification More than present system time;Quantity determining unit is adjusted, the presell for the presell information in response to the corresponding modification request Time started is not more than present system time, and the start to process mark of the presell information in the absence of the corresponding modification request, Presell quantity during modification is asked subtracts the difference that former presell quantity obtains and adjusts quantity as presell;First information amendment Member, for the stockpile number of selling of inquiry with presell adjustment quantity sum to be defined as that stockpile number can be sold, and according to institute State modification request modification presell information.
In certain embodiments, described device also includes following any one:Second information change unit, in response to The presell time started of the presell information of the corresponding modification request is more than present system time, according to the modification request modification Presell information;3rd information changes unit, the presell time started for the presell information in response to the corresponding modification request The start to process mark of the presell information of the corresponding modification request no more than present system time, and in caching be present, according to The modification request modification presell information.
What the application provided is used to obtain the method and apparatus that can sell stockpile number, and the stock of goods is inquired about by receiving Request, afterwards inquiry whether there is presell information, in response to presell information be present, based on the presell information, inquire about can At least one in the presell processing mark of stockpile number and the corresponding presell information is sold, it is determined that inventory can be sold Amount, finally return to determination sells stockpile number, so as to by adding presell processing mark for each presell information, connect Processing mark is checked when receiving service request in real time, and then determines whether to modification to sell inventory, avoids timed task Mode is reduced caused by timed task mode due to Real-time inventory inaccuracy problem caused by delay acquisition stock A large amount of cachings.
Further, in certain embodiments, when thering is presell to change demand in pre- mid-sales, can replace original pre- Information is sold, so as to realize this business demand of modification presell information.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is shown can be using the application for obtaining the method that can sell stockpile number or can be sold for obtaining The exemplary system architecture of the embodiment of the device of stockpile number.
Fig. 2 is the schematic flow for being used to obtain the one embodiment for the method that can sell stockpile number according to the application Figure.
Fig. 3 is the schematic stream for being used to obtain another embodiment of the method that can sell stockpile number according to the application Cheng Tu;
Fig. 4 is the structural representation for being used to obtain the one embodiment for the device that can sell stockpile number according to the application Figure;
Fig. 5 is adapted for the structural representation for realizing the terminal device of the embodiment of the present application or the computer system of server Figure.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for obtaining the method that can sell stockpile number or can be sold for obtaining The exemplary system architecture 100 of the embodiment of the device of stockpile number.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105, 106.Network 104 between terminal device 101,102,103 and server 105,106 provide communication link medium.Net Network 104 can include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User 110 can be interacted with using terminal equipment 101,102,103 by network 104 with server 105,106, to connect Receive or send message etc..Various telecommunication customer end applications can be installed, such as shopping class should on terminal device 101,102,103 With, web browser applications, searching class application, JICQ, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments for having display screen, including but not limited to intelligent hand Machine, tablet personal computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) player, pocket computer on knee and desktop computer etc. Deng.
Server 105,106 can be to provide the server of various services, such as to showing on terminal device 101,102,103 The shopping class application shown provides the background server supported.Background server can asking to the stock of the inquiry goods received The data such as ask to carry out the processing such as analyzing, and result (such as can sell inventory data) is fed back into terminal device.
It should be noted that the embodiment of the present application provided be used for obtain the method that can sell stockpile number typically by taking Business device 105,106 is performed, and correspondingly, the device that stockpile number can be sold for obtaining is generally positioned in server 105,106.
It should be understood that the quantity mesh of the terminal device, network and server in Fig. 1 is only schematical.According to realization Need, can have any amount purpose terminal device, network and server.
With continued reference to Fig. 2, the implementation for being used to obtain the method that can sell stockpile number according to the application is shown The flow 200 of example.It is described to be used to obtain the method that sell stockpile number, comprise the following steps:
Step 201, the request of the stock of inquiry goods is received.
In the present embodiment, the method operation electronic equipment (example thereon of stockpile number can be sold for obtaining by running Server as shown in Figure 1) can be from the request of terminal device or the stock of other electronic equipments reception inquiry goods.
Terminal device or other electronic equipments can send inquiry goods based on the use of user or the calling of data to trigger The request of the stock of thing.For example, when user refreshes the sales page of goods, it can trigger to electronic equipment and send inquiry goods Stock request.
Step 202, that inquires about goods sells stockpile number.
In the present embodiment, after the request for receiving the stock of inquiry goods in step 201, running can for acquisition The electronic equipment of the method operation of sale stockpile number thereon can obtain from the storage device of Local or Remote or caching Stockpile number can be sold.
In the present embodiment, run can be sold for obtaining the method operation electronic equipment thereon of stockpile number in order to It is determined that can currently sell stockpile number whether need to modify (such as when presell starts or presell at the end of, stock can be sold Quantity needs to modify), it is necessary to first inquire about goods it is current sell stockpile number.
It should be appreciated that stockpile number of selling here is a caching counter, the calculation formula of its value is:It can sell (presell starts deletion start to process and identified to pre- stockpile number=spot stocks quantity (actual quantity in warehouse)+presell quantity During selling end deletion end processing mark)-preemption stockpile number (order preemption and activity preemption)-locking stockpile number.Can The value of stockpile number is sold if greater than 0, then it represents that it is in stockit is available, otherwise to be out of stock.
Step 203, the presell information of goods is judged whether.
In the present embodiment, can be with by whether the presell information of goods be present to determine the need for pair to sell stock Quantity is modified.Here presell information, the numbering, presell quantity, presell time started of presell goods can at least be included With the presell end time.
Step 204, if the presell information of goods be present, based on presell information, inquiry sell stockpile number and At least one of in the presell processing mark of corresponding presell information, it is determined that stockpile number can be sold;
In the present embodiment, if the presell information of goods be present, demonstrate the need for being based further on pre- in presell information Stockpile number and correspondingly is sold in the sell goods numbering of thing, presell quantity, presell time started, presell end time, inquiry The factors such as the presell processing mark of presell information determine to integrate.When it is determined that stockpile number can be sold, it can be opened according to presell Begin or presell terminates the caused modification that can sell inventory to determine that inventory can be sold.
Here presell processing mark, can include start to process and identify and terminate processing mark.Here presell processing Mark, it is that the increased processing associated with presell information identifies when creating presell, storage device or caching can be stored in In database, the application is not construed as limiting to this.Alternatively, in order to improve the calling speed of data, it can will include presell and handle The data storage of the incidence relation of mark and presell information is in cache database.Further, in order to ensure system greatly simultaneously The service of stability and high efficiency is provided in the case of hair, the database of the concentration caching based on distributed deployment can be used, such as can So that the incidence relation of start to process mark and presell information is stored in redis cache databases.
In some optional implementations of the present embodiment, it is above-mentioned based on presell information, inquiry sell inventory At least one of in the presell processing mark of amount and corresponding presell information, it is determined that can sell stockpile number can include:Response It is more than present system time in the presell end time of presell information, judges whether the presell time started in presell information is more than Present system time;It is not more than present system time in response to the presell time started in presell information, judges corresponding presell letter Identified in the presell processing mark of breath with the presence or absence of start to process;In response to existing in the presell processing mark of corresponding presell information Start to process is identified, and the stockpile number of selling of inquiry with the presell quantity sum in presell information is defined as that stock can be sold Quantity, and delete start to process mark.
In this implementation, when the presell information that goods be present and the presell end time of presell information are more than current system During the system time, show to there is currently the presell of goods, it is necessary to which further determining that whether current presell state can be brought can sell The change of stockpile number.
When it is determined that the presell time started in presell information is not more than present system time, show that current presell has been opened Begin, if the modification that can sell stockpile number caused by presell starts afterwards completes that start to process mark can be deleted, therefore If start to process mark be present, show to have not occurred for the modification for selling stockpile number that presell starts, can basis Existing start to process is identified can sell the modification of stockpile number:Stockpile number and presell information are sold into inquiry In presell quantity sum be defined as that stockpile number can be sold, and delete start to process mark.
In some optional implementations of the present embodiment, it is above-mentioned based on presell information, inquiry sell inventory At least one of in the presell processing mark of amount and corresponding presell information, it is determined that can sell stockpile number can include:Response It is more than present system time in the presell end time of presell information, judges whether the presell time started in presell information is more than Present system time;It is not more than present system time in response to the presell time started in presell information, judges corresponding presell letter Identified in the presell processing mark of breath with the presence or absence of start to process;In response to not deposited in the presell processing mark of corresponding presell information Identified in start to process, judge whether the presell end time of presell information is more than present system time;Terminate in response to presell Time is not more than present system time, judges in the presell processing mark of presell information with the presence or absence of end processing mark;Response Exist in the presell processing mark of corresponding presell information and terminate processing mark, the stockpile number of selling of inquiry is subtracted into residue The difference of presell quantity is defined as that stockpile number can be sold, and deletes end processing mark.
In this implementation, when the presell information that goods be present and the presell end time of presell information are more than current system During the system time, show to there is currently the presell of goods, it is necessary to which further determining that whether current presell state can be brought can sell The change of stockpile number.
It can judge whether presell terminates according to the presell end time in presell information first:When the presell end time During no more than present system time, show that presell terminates.At the end of presell, further the end in caching it can handle Identify whether to exist to judge to sell whether stockpile number has modified for what presell terminated.When judging, due to If the modification for selling stockpile number for terminating to carry out for presell completes that end processing mark can be deleted, therefore terminates when existing During processing mark, show not completing also for the modification for selling stockpile number that presell terminates, can now carry out selling The modification of stockpile number:The stockpile number of selling of inquiry is subtracted the difference of remaining presell quantity and is defined as that inventory can be sold Amount, and delete end processing mark.
Here remaining presell quantity, generally when presell starts and has lower single, presell quantity can be successively decreased, so as to Remaining presell quantity is obtained, calculation formula is:Single quantity under during remaining presell quantity=presell quantity-presell.
In some optional implementations of the present embodiment, it is above-mentioned based on presell information, inquiry sell inventory At least one of in the presell processing mark of amount and corresponding presell information, it is determined that can sell stockpile number can include:Response It is more than present system time in the presell end time of presell information, judges whether the presell time started in presell information is more than Present system time;It is more than present system time in response to the presell time started in presell information, storehouse is sold into inquiry Quantity is deposited to be defined as that stockpile number can be sold.
In this implementation, when the presell information that goods be present and the presell end time of presell information are more than current system During the system time, show to there is currently the presell of goods, it is necessary to which further determining that whether current presell state can be brought can sell The change of stockpile number.
When the presell time started in presell information being more than present system time, show that presell not yet starts, now without Need to change can sell stockpile number, and the stockpile number of selling of inquiry directly is sold into stockpile number as what is determined.
In some optional implementations of the present embodiment, it is above-mentioned based on presell information, inquiry sell inventory At least one of in the presell processing mark of amount and corresponding presell information, it is determined that can sell stockpile number can include:Response It is more than present system time in the presell end time of presell information, judges whether the presell time started in presell information is more than Present system time;It is not more than present system time in response to the presell time started in presell information, judges presell information Identified in presell processing mark with the presence or absence of start to process;Opened in response to being not present in the presell processing mark of corresponding presell information Begin processing mark, judges whether the presell end time of presell information is more than present system time;In response to the pre- of presell information Selling the end time is more than present system time, and the stockpile number of selling of inquiry is defined as that stockpile number can be sold.
In this implementation, when the presell information that goods be present and the presell end time of presell information are more than current system During the system time, show to there is currently the presell of goods, it is necessary to which further determining that whether current presell state can be brought can sell The change of stockpile number.
When the presell time started being not more than present system time, show that presell has begun to, now need to judge by pre- Sell whether the modification for selling stockpile number for starting to bring has been completed, in the presell processing of corresponding presell information identifies not When start to process mark be present, show that modification has been completed, can be true if the now presell end time is more than present system time Determine presell not terminate, without the modification for selling stockpile number terminate for presell, therefore can be directly by inquiry Stockpile number can be sold and sell stockpile number as what is determined.
In some optional implementations of the present embodiment, based on presell information, inquiry sell stockpile number and At least one of in the presell processing mark of corresponding presell information, it is determined that can sell stockpile number can include:In response to presell The presell end time of information is more than present system time, judges whether the presell time started in presell information is more than current system Unite the time;It is not more than present system time in response to the presell time started in presell information, at the presell for judging presell information Identified in reason mark with the presence or absence of start to process;In response to start to process is not present in the presell processing mark of corresponding presell information Mark, judges whether the presell end time of presell information is more than present system time;Presell in response to presell information terminates Time is not more than present system time, judges in the presell processing mark of corresponding presell information with the presence or absence of end processing mark; Terminate processing mark in response to being not present in the presell processing mark of corresponding presell information, by inquiry to sell stockpile number true Stockpile number can be sold by being set to.
In this implementation, when the presell information that goods be present and the presell end time of presell information are more than current system During the system time, show to there is currently the presell of goods, it is necessary to which further determining that whether current presell state can be brought can sell The change of stockpile number.
When the presell time started being not more than present system time, show that presell has begun to, now need to judge by pre- Sell whether the modification for selling stockpile number for starting to bring has been completed, in the presell processing of corresponding presell information identifies not When start to process mark be present, show that modification has been completed, when the now presell end time being not more than present system time, show Presell terminates, it is necessary to further judge whether completed for the modification for selling stockpile number that presell terminates.Due to pin If the modification for selling stockpile number terminated to presell completes that end processing mark can be deleted, therefore works as and terminate processing mark not In the presence of, show that modification has been completed, now the stockpile number of selling of inquiry directly can be sold into stock as what is determined Quantity.
Herein, it should be noted that whether be more than present system time in the execution presell time started, judge that presell is believed After being identified in the presell processing mark of breath with the presence or absence of start to process, judge whether the presell end time of presell information is more than The present system time and determination inquired for the second time in present system time is believed after there is currently goods information in response to presell The presell end time of breath is more than the present system time inquired for the first time in present system time and compared, and has occurred and that and changes Become, therefore the presell end time is possible to be more than the present system time inquired for the first time, and no more than current system for the second time Unite the time, namely when inquiring present system time for the second time, presell is possible to terminate.
In some optional implementations of the present embodiment, it is above-mentioned based on presell information, inquiry sell inventory At least one of in the presell processing mark of amount and corresponding presell information, it is determined that can sell stockpile number can include:Response It is not more than present system time in the presell end time of presell information, the stockpile number of selling of inquiry is defined as selling Stockpile number.
In this implementation, when the presell information that goods be present and the presell end time of presell information is no more than current During system time, show to there is currently no the presell of goods, now inquiry directly can be sold into stockpile number as really Fixed sells stockpile number.
Step 205, return to determination sells stockpile number.
In the present embodiment, stockpile number is sold based on what is obtained in above-mentioned steps 204, goods can be inquired about to sending Stock request equipment return can sell stockpile number.
In some optional implementations of the present embodiment, above-mentioned be used to obtaining the method that can sell stockpile number can be with Including:If in the absence of the presell information of goods, return to inquiry sells stockpile number.
In some optional implementations of the present embodiment, the presell processing mark of corresponding presell information is also based on, Presell information is modified, namely the above-mentioned method that stockpile number can be sold for obtaining can also include:
Step 206, the modification request to presell information is received;
Step 207, whether the presell time started of the presell information of the corresponding modification request of inquiry is more than present system time;
Step 208, it is not more than present system time in response to the presell time started of the corresponding presell information for changing request, And the start to process mark of the presell information in the absence of corresponding modification request, the presell quantity changed in asking is subtracted into former presell The difference that quantity obtains adjusts quantity as presell;
Step 209, the stockpile number of selling of inquiry with presell adjustment quantity sum is defined as that stockpile number can be sold, And modification presell information is asked according to modification.
In this implementation, when the presell time started being not more than present system time, show that presell has begun to, this Shi Ruo identifies in the absence of start to process, shows to have completed for the modification for selling stockpile number that presell starts.If now Modification request is received, should change can sell stockpile number and change presell quantity.Wherein, modification can sell stockpile number can With including:Presell quantity during modification is asked subtracts the difference that former presell quantity obtains and adjusts quantity as presell;Will inquiry Stockpile number and presell adjustment quantity sum of selling be defined as that stockpile number can be sold.Modification presell quantity can include: Modification presell information is asked according to modification.
It should be appreciated that with presell adjustment quantity sum it is defined as that stockpile number can be sold original can be sold into stockpile number When, if adjustment quantity is less than 0, caching counter can not add negative value, can first try to achieve the absolute value of adjustment quantity, use afterwards Original can sell the absolute value that stockpile number subtracts adjustment quantity, you can sell stockpile number after being updated.
In some optional implementations of the present embodiment, it is contemplated that sell repairing for stockpile number for what presell started Change and not yet occur, directly the presell quantity in database can be modified, namely it is above-mentioned according to the application be used for obtain The method of stockpile number, which can be sold, can also include following any one:In response to the presell of the presell information of corresponding modification request Time started is more than present system time, and modification presell information is asked according to modification;Presell in response to corresponding modification request is believed The presell time started of breath is not more than present system time, and the beginning of the presell information of corresponding modification request in caching be present Reason mark, modification presell information is asked according to modification.
In this implementation, it is more than present system time when the presell time started of the presell information of corresponding modification request When, show that presell not yet starts, modification presell information is directly now asked according to modification.When the presell of corresponding modification request The presell time started of information is not more than present system time, and the beginning of the presell information of corresponding modification request in caching be present During processing mark, although showing that presell starts, the presell quantity in presell information is not included in can sell in stock yet, therefore also The modification of the presell quantity caused by stock is reduced does not occur, modification presell information is directly now asked according to modification.
Fig. 3 is refer to, Fig. 3 is shown can sell the method for stockpile number again according to the embodiment of the present application for obtaining The indicative flowchart of one specific embodiment.
As shown in figure 3, the method 300 of stockpile number can be sold for obtaining to be included:
In step 301, presell information is created;
In step 302, presell processing mark, including start to process mark (Presell are increased in Redis cachings Start, abbreviation PS) and terminate to handle mark (Presell End, abbreviation PE);
In step 303, the request of the stock of inquiry goods is received, performs step 304 afterwards;
In step 304, whether inquiry has presell, is more than when the presell end time that presell information and presell information be present During present system time, it is determined that there is presell, step 305 is performed, when in the absence of presell information or presell information being present but presell is believed When the presell end time of breath is not more than present system time, it is determined that without presell, step 311 is performed;
In step 305, the presell processing mark PS and PE of corresponding presell information is inquired about from Redis cachings, is held afterwards Row step 306;
Within step 306, whether the presell time started in presell information more than present system time judges presell Whether start, if the presell time started is not more than present system time, judges that presell starts, step 307 is performed, if presell is opened Time beginning is more than present system time, then judges that presell does not start, perform step 311;
In step 307, judge that start to process mark PS whether there is, if so, then explanation is sold for what presell started Sell stockpile number not yet to change, perform step 308, if it is not, the modification for selling stockpile number that then explanation starts for presell It has been completed that, perform step 309;
In step 308, the modification for selling stockpile number started for presell is completed, is specifically included:In inquiry Stockpile number ON can be sold, using ON plus presell quantity PN as renewal after ON, and by ON be revised as update after ON, it Start to process mark PS is deleted afterwards, is shown to have completed for the modification for selling stockpile number that presell starts, is performed step afterwards Rapid 313;
In a step 309, whether the presell end time in presell information more than present system time judges presell Whether terminate, if the presell end time is not more than present system time, judges that presell terminates, step 310 is performed, if presell knot The beam time is more than present system time, then judges that presell does not terminate, perform step 311;
In the step 310, judge that terminating processing mark PE whether there is, if so, then explanation is sold for what presell terminated Sell stockpile number not yet to change, perform step 312, if it is not, the modification for selling stockpile number that then explanation terminates for presell It has been completed that, perform step 311;
In step 311, inquiry can sell stockpile number ON, perform step 313 afterwards;
In step 312, the modification for selling stockpile number terminated for presell is completed, is specifically included:Inquiry can sell Sell stockpile number ON, using ON subtract remaining presell quantity PN as renewal after ON, and by ON be revised as renewal after ON, Delete afterwards and terminate processing mark PS, show to have completed for the modification for selling stockpile number that presell terminates, perform afterwards Step 313;
In step 313, return can sell stockpile number, perform step 314 afterwards;
In a step 314, inquiry commodity stocks is terminated.
In step 315, the modification request of presell information is received, performs step 316 afterwards;
In step 316, presell processing mark PS is inquired about, performs step 317 afterwards;
In step 317, whether presell time started in presell information more than present system time judges presell Whether start, if the presell time started is not more than present system time, presell starts, and step 318 is performed, if presell starts Between be more than present system time, then presell does not start, perform step 319;
In step 318, judge that start to process mark PS whether there is, if in the presence of, step 319 is performed, if being not present, Then perform step 320;
In step 319, modification presell information is asked according to modification;
In step 320, amended presell quantity is subtracted into the presell quantity before modification, obtains presell adjustment quantity Num, step 321 is performed afterwards
In step 321, inquiry can sell stockpile number ON, using ON plus num's and as the ON after updating, and by ON The ON being revised as after renewal, modification presell information is asked according to modification, performs step 322 afterwards;
In step 322, modification presell information is terminated.
What the above embodiments of the present application provided is used to obtain the method that can sell stockpile number, and goods is inquired about by receiving The request of stock, inquiry afterwards whether there is presell information, in response to presell information be present, based on the presell information, inquiry The presell processing mark for selling stockpile number and the corresponding presell information at least one of, it is determined that stock can be sold Quantity, finally return to determination sells stockpile number, so as to be identified by adding presell processing for each presell information, Processing mark is checked when receiving service request in real time, and then determines whether to modification to sell stockpile number, avoids timing Task state reduces timed task mode institute band due to Real-time inventory inaccuracy problem caused by delay acquisition stock The a large amount of cachings come.In certain embodiments, when thering is presell to change demand in pre- mid-sales, can replace original pre- Information is sold, so as to realize this business demand of modification presell information.
, can for acquisition this application provides one kind as the realization to method shown in above-mentioned each figure with further reference to Fig. 4 One embodiment of the device of stockpile number is sold, the device embodiment is corresponding with the embodiment of the method shown in Fig. 1 to Fig. 3, The device specifically can apply in various electronic equipments.
As shown in figure 4, the device 400 of stockpile number can be sold and can include by being configured to obtain:Inquiry request receives single Member 410, stockpile number query unit 420, presell information judging unit 430, stockpile number determining unit 440 and stockpile number return Receipt member 450.
Wherein, inquiry request receiving unit 410, it is configured to receive the request of the stock of inquiry goods;Stockpile number is looked into Unit 420 is ask, be configured to inquiry goods sells stockpile number;Presell information judging unit 430, being configured to judgement is The no presell information that goods be present;Stockpile number determining unit 440, if the presell information that goods be present is configured to, based on pre- At least one in information, the presell processing mark for selling stockpile number and corresponding presell information of inquiry is sold, it is determined that can Stockpile number is sold, wherein, presell processing mark can include start to process and identify and terminate processing mark;Quantification returns Unit 450, be configured to return determination sells stockpile number.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:Presell starts to sentence Disconnected subelement 441, is configured to be more than present system time in response to the presell end time of presell information, judges presell information In the presell time started whether be more than present system time;Start to identify judgment sub-unit 442, be configured in response to presell The presell time started in information is not more than present system time, judges whether deposited in the presell processing mark of corresponding presell information Identified in start to process;First stock's determination subelement 443, it is configured to handle mark in response to the presell of corresponding presell information In start to process mark be present, the stockpile number of selling of inquiry is defined as selling with the presell quantity sum in presell information Stockpile number is sold, and deletes start to process mark.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:Presell starts to sentence Disconnected subelement 441, is configured to be more than present system time in response to the presell end time of presell information, judges presell information In the presell time started whether be more than present system time;Start to identify judgment sub-unit 442, be configured in response to presell The presell time started in information is not more than present system time, judges whether deposited in the presell processing mark of corresponding presell information Identified in start to process;Presell terminates judgment sub-unit 444, is configured to handle mark in response to the presell of corresponding presell information In be not present start to process identify, judge whether the presell end time of presell information is more than present system time;End of identification Judgment sub-unit 445, it is configured to be not more than present system time in response to the presell end time, judges the presell of presell information With the presence or absence of end processing mark in processing mark;Second stock's determination subelement 446, it is configured in response to corresponding presell letter Exist in the presell processing mark of breath and terminate processing mark, by the difference sold stockpile number and subtract remaining presell quantity of inquiry It is defined as that stockpile number can be sold, and deletes end processing mark.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:Presell starts to sentence Disconnected subelement 441, is configured to be more than present system time in response to the presell end time of presell information, judges presell information In the presell time started whether be more than present system time;And the 3rd stock's determination subelement 447, be configured in response to The presell time started in presell information is more than present system time, and the stockpile number of selling of inquiry is defined as that storehouse can be sold Deposit quantity.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:Presell starts to sentence Disconnected subelement 441, is configured to be more than present system time in response to the presell end time of presell information, judges presell information In the presell time started whether be more than present system time;Start to identify judgment sub-unit 442, be configured in response to presell The presell time started in information is not more than present system time, judges to whether there is in the presell processing mark of presell information and opens Begin processing mark;Presell terminates judgment sub-unit 444, is configured in the presell processing mark in response to corresponding presell information not Start to process mark be present, judge whether the presell end time of presell information is more than present system time;And the 4th stock Determination subelement 448, be configured to be more than present system time in response to the presell end time of presell information, by inquiry can Sale stockpile number is defined as that stockpile number can be sold.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:Presell starts to sentence Disconnected subelement 441, is configured to be more than present system time in response to the presell end time of presell information, judges presell information In the presell time started whether be more than present system time;Start to identify judgment sub-unit 442, be configured in response to presell The presell time started in information is not more than present system time, judges to whether there is in the presell processing mark of presell information and opens Begin processing mark;Presell terminates judgment sub-unit 443, starts in response to being not present in the presell processing mark of corresponding presell information Processing mark, judges whether the presell end time of presell information is more than present system time;End of identification judgment sub-unit 444, it is configured to be not more than present system time in response to the presell end time of presell information, judges corresponding presell information With the presence or absence of end processing mark in presell processing mark;5th stock's determination subelement 449, it is configured in response to corresponding pre- Sell to be not present in the presell processing mark of information and terminate processing mark, the stockpile number of selling of inquiry is defined as that storehouse can be sold Deposit quantity.
In some optional implementations of the present embodiment, stockpile number determining unit 440 can include:6th stock is true Stator unit (not shown), it is configured to be not more than present system time in response to the presell end time of presell information, The stockpile number of selling of inquiry is defined as that stockpile number can be sold.
In some optional implementations of the present embodiment, device can also include:Quantity returning unit is inquired about, configuration is used If in the presell information (not shown) in the absence of goods, return to inquiry sells stockpile number.
In some optional implementations of the present embodiment, device can also include:Request reception unit 460 is changed, is matched somebody with somebody Put for receiving the modification request to presell information;Presell starts a query at unit 470, is configured to inquire about corresponding modification request Whether the presell time started of presell information is more than present system time;Adjust quantity determining unit 480, be configured in response to The presell time started of the presell information of corresponding modification request is not more than present system time, and in the absence of corresponding modification request The start to process mark of presell information, the presell quantity changed in asking is subtracted into difference that former presell quantity obtains as presell Adjust quantity;The first information changes unit 490, is configured to inquiry selling stockpile number and presell adjustment quantity sum It is defined as that stockpile number can be sold, and modification presell information is asked according to modification.
In some optional implementations of the present embodiment, device can also include following any one:Second information is repaiied Change unit (not shown), be configured to be more than currently in response to the presell time started of the presell information of corresponding modification request System time, modification presell information is asked according to modification;3rd information change unit (not shown), be configured in response to The presell time started of the presell information of corresponding modification request is not more than present system time, and please in the presence of corresponding modification in caching The start to process mark for the presell information asked, modification presell information is asked according to modification.
In above-described embodiment of the application, first stock's determination subelement, second stock's determination subelement, the 3rd stock Determination subelement, the 4th stock's determination subelement, the 5th stock's determination subelement, the 6th stock's determination subelement only represent six Obtain selling the unit of stockpile number based on different fixed conditions really, it will be appreciated by those skilled in the art that therein first, Second, third, fourth, fifth the 6th does not form particular determination to stock's determination subelement.
Similarly, in above-described embodiment of the application, first information modification unit, the second information modification unit, the 3rd letter Breath modification unit only represents six units for changing presell information under different conditions, it will be appreciated by those skilled in the art that Therein first, second or third does not form the particular determination to information modification unit.
It should be appreciated that all units described in device 400 with reference to each step phase in figure 2 and the method for Fig. 3 descriptions It is corresponding.Thus, the operation and feature described above with respect to the method that stockpile number can be sold for obtaining is equally applicable to device 400 and the unit that wherein includes, it will not be repeated here.Corresponding units in device 400 can be with terminal device and/or server In unit cooperate to realize the scheme of the embodiment of the present application.
Below with reference to Fig. 5, it illustrates suitable for for realizing the calculating of the terminal device of the embodiment of the present application or server The structural representation of machine system 500.
As shown in figure 5, computer system 500 includes CPU (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into program in random access storage device (RAM) 503 from storage part 508 and Perform various appropriate actions and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interfaces 505 are connected to lower component:Importation 506 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 508 including hard disk etc.; And the communications portion 509 of the NIC including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net performs communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 510, in order to read from it Computer program be mounted into as needed storage part 508.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being tangibly embodied in machine readable Computer program on medium, the computer program include the program code for being used for the method shown in execution flow chart.At this In the embodiment of sample, the computer program can be downloaded and installed by communications portion 509 from network, and/or from removable Medium 511 is unloaded to be mounted.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for the module, program segment or code include one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, Ke Yiyong Function as defined in execution or the special hardware based system of operation are realized, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in module involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described module can also be set within a processor, for example, can be described as:A kind of processor bag Include and ask request reception unit, stockpile number query unit, presell information judging unit, stockpile number determining unit and stockpile number Returning unit.Wherein, the title of these units does not form the restriction to the unit in itself under certain conditions, for example, inquiry Request reception unit is also described as " unit for receiving the request of the stock of inquiry goods ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating Machine storage medium can be the nonvolatile computer storage media included in device described in above-described embodiment;Can also be Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited One or more program is contained, when one or more of programs are performed by an equipment so that the equipment:Receive Inquire about the request of the stock of goods;Inquiry goods sells stockpile number;Judge whether the presell information of goods;If deposit In the presell information of goods, the presell processing for selling stockpile number and corresponding presell information based on presell information, inquiry At least one of in mark, it is determined that stockpile number can be sold, wherein, presell processing mark is included at start to process mark and end Reason mark;Return to determination sells stockpile number.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature The other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical scheme that the technical characteristic of energy is replaced mutually and formed.

Claims (14)

1. a kind of be used to obtain the method that can sell stockpile number, it is characterised in that methods described includes:
Receive the request of the stock of inquiry goods;
That inquires about the goods sells stockpile number;
Judge whether the presell information of the goods;
If the presell information of the goods be present, stockpile number and corresponding institute are sold based on the presell information, inquiry At least one in the presell processing mark of presell information is stated, it is determined that stockpile number can be sold, wherein, the presell processing mark Identified including start to process and terminate processing mark;
Return to determination sells stockpile number.
2. according to the method for claim 1, it is characterised in that it is described based on the presell information, inquiry sell storehouse At least one in the presell processing mark of quantity and the corresponding presell information is deposited, it is determined that can sell stockpile number includes:
It is more than present system time in response to the presell end time of the presell information, judges the presell in the presell information Whether the time started is more than present system time;
It is not more than present system time in response to the presell time started in the presell information, judges the corresponding presell information Presell processing mark in the presence or absence of start to process identify;
In response to start to process mark be present in the presell processing mark of the corresponding presell information, stock is sold into inquiry Quantity with the presell quantity sum in presell information is defined as that stockpile number can be sold, and deletes start to process mark.
3. according to the method for claim 1, it is characterised in that it is described based on the presell information, inquiry sell storehouse At least one in the presell processing mark of quantity and the corresponding presell information is deposited, it is determined that can sell stockpile number includes:
It is more than present system time in response to the presell end time of the presell information, judges the presell in the presell information Whether the time started is more than present system time;
It is not more than present system time in response to the presell time started in the presell information, judges the corresponding presell information Presell processing mark in the presence or absence of start to process identify;
Identified in response to start to process is not present in the presell processing mark of the corresponding presell information, judge the presell information The presell end time whether be more than present system time;
Be not more than present system time in response to the presell end time, judge the presell information presell processing mark in whether Identified in the presence of processing is terminated;
Terminate processing mark in response to existing in the presell processing mark of the corresponding presell information, stock is sold into inquiry The difference that quantity subtracts remaining presell quantity is defined as that stockpile number can be sold, and deletes end processing mark.
4. according to the method for claim 1, it is characterised in that it is described based on the presell information, inquiry sell storehouse Deposit in the presell processing mark of quantity and the corresponding presell information at least one of, it is determined that can sell stockpile number include with Lower any one:
It is more than present system time in response to the presell end time of the presell information, judges the presell in the presell information Whether the time started is more than present system time;When being more than current system in response to the presell time started in the presell information Between, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;
It is more than present system time in response to the presell end time of the presell information, judges the presell in the presell information Whether the time started is more than present system time;It is not more than current system in response to the presell time started in the presell information Time, judge to identify with the presence or absence of start to process in the presell processing mark of the presell information;In response to the corresponding presell Start to process is not present in the presell processing mark of information to identify, judges whether the presell end time of the presell information is more than Present system time;It is more than present system time in response to the presell end time of the presell information, by selling for inquiry Stockpile number is defined as that stockpile number can be sold;
It is more than present system time in response to the presell end time of the presell information, judges the presell in the presell information Whether the time started is more than present system time;It is not more than current system in response to the presell time started in the presell information Time, judge to identify with the presence or absence of start to process in the presell processing mark of the presell information;In response to the corresponding presell Start to process is not present in the presell processing mark of information to identify, judges whether the presell end time of the presell information is more than Present system time;It is not more than present system time in response to the presell end time of the presell information, judges described in correspondence With the presence or absence of end processing mark in the presell processing mark of presell information;Presell in response to the corresponding presell information is handled It is not present in mark and terminates processing mark, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;
It is not more than present system time in response to the presell end time of the presell information, stockpile number is sold into inquiry It is defined as that stockpile number can be sold.
5. according to the method described in claim 1-4 any one, it is characterised in that methods described also includes:
If in the absence of the presell information of the goods, return to inquiry sells stockpile number.
6. according to the method described in claim 1-4 any one, it is characterised in that methods described also includes:
Receive the modification request to presell information;
Whether the presell time started of the presell information of the corresponding modification request of inquiry is more than present system time;
It is not more than present system time in response to the presell time started of the presell information of the corresponding modification request, and is not present The start to process mark of the presell information of the corresponding modification request, former presell quantity is subtracted by the presell quantity changed in asking Obtained difference adjusts quantity as presell;
The stockpile number of selling of inquiry with presell adjustment quantity sum is defined as that stockpile number can be sold, and repaiied according to described Change request modification presell information.
7. according to the method for claim 6, it is characterised in that methods described also includes following any one:
It is more than present system time in response to the presell time started of the presell information of the corresponding modification request, is repaiied according to described Change request modification presell information;
It is not more than present system time in response to the presell time started of the presell information of the corresponding modification request, and in caching Identified in the presence of the start to process of the presell information of the corresponding modification request, according to the modification request modification presell information.
8. a kind of be used to obtain the device that can sell stockpile number, it is characterised in that described device includes:
Inquiry request receiving unit, the request of the stock for receiving inquiry goods;
Stockpile number query unit, stockpile number is sold for inquire about the goods;
Presell information judging unit, for judging whether the presell information of the goods;
Stockpile number determining unit, if for the presell information of the goods be present, based on the presell information, inquiry sell At least one in the presell processing mark of stockpile number and the corresponding presell information is sold, it is determined that stockpile number can be sold, Wherein, the presell processing mark includes start to process mark and terminates processing mark;
Quantification returning unit, stockpile number is sold for what return determined.
9. device according to claim 8, it is characterised in that the stockpile number determining unit includes:
Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, Judge whether the presell time started in the presell information is more than present system time;
Start to identify judgment sub-unit, during for being not more than current system in response to the presell time started in the presell information Between, judge to identify with the presence or absence of start to process in the presell processing mark of the corresponding presell information;
First stock's determination subelement, for start to process be present in the presell processing mark in response to the corresponding presell information Mark, the stockpile number of selling of inquiry with the presell quantity sum in presell information is defined as that stockpile number can be sold, and Delete start to process mark.
10. device according to claim 8, it is characterised in that the stockpile number determining unit includes:
Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, Judge whether the presell time started in the presell information is more than present system time;
Start to identify judgment sub-unit, during for being not more than current system in response to the presell time started in the presell information Between, judge to identify with the presence or absence of start to process in the presell processing mark of the corresponding presell information;
Presell terminates judgment sub-unit, for beginning to be not present in the presell processing mark in response to the corresponding presell information Reason mark, judges whether the presell end time of the presell information is more than present system time;
End of identification judgment sub-unit, for being not more than present system time in response to the presell end time, judge the presell With the presence or absence of end processing mark in the presell processing mark of information;
Second stock's determination subelement, for end processing be present in the presell processing mark in response to the corresponding presell information Mark, the stockpile number of selling of inquiry is subtracted the difference of remaining presell quantity and is defined as that stockpile number can be sold, and delete knot Beam processing mark.
11. device according to claim 8, it is characterised in that the stockpile number determining unit includes following any one :
Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, Judge whether the presell time started in the presell information is more than present system time;And the 3rd stock's determination subelement, For being more than present system time in response to the presell time started in the presell information, stockpile number is sold into inquiry It is defined as that stockpile number can be sold;
Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, Judge whether the presell time started in the presell information is more than present system time;Start to identify judgment sub-unit, be used for It is not more than present system time in response to the presell time started in the presell information, at the presell for judging the presell information Identified in reason mark with the presence or absence of start to process;Presell terminates judgment sub-unit, in response to the corresponding presell information Start to process is not present in presell processing mark to identify, judges whether the presell end time of the presell information is more than current system Unite the time;And the 4th stock's determination subelement, for being more than current system in response to the presell end time of the presell information Unite the time, the stockpile number of selling of inquiry is defined as that stockpile number can be sold;
Presell starts judgment sub-unit, is more than present system time for the presell end time in response to the presell information, Judge whether the presell time started in the presell information is more than present system time;Start to identify judgment sub-unit, be used for It is not more than present system time in response to the presell time started in the presell information, at the presell for judging the presell information Identified in reason mark with the presence or absence of start to process;Presell terminates judgment sub-unit, in response to the presell of the corresponding presell information Start to process is not present in processing mark to identify, when judging whether the presell end time of the presell information is more than current system Between;End of identification judgment sub-unit, it is not more than present system time for the presell end time in response to the presell information, Judge to whether there is in the presell processing mark of the corresponding presell information and terminate processing mark;5th stock's determination subelement, Terminate processing mark for being not present in the presell processing mark in response to the corresponding presell information, storehouse is sold into inquiry Quantity is deposited to be defined as that stockpile number can be sold;
6th stock's determination subelement, during for being not more than current system in response to the presell end time of the presell information Between, the stockpile number of selling of inquiry is defined as that stockpile number can be sold.
12. according to the device described in claim 8-11 any one, it is characterised in that described device also includes:
Quantity returning unit is inquired about, if for the presell information in the absence of the goods, return to inquiry sells stockpile number.
13. according to the device described in claim 8-11 any one, it is characterised in that described device also includes:
Request reception unit is changed, for receiving the modification request to presell information;
Presell starts a query at unit, for inquiring about whether the presell time started of presell information of the corresponding modification request is more than Present system time;
Quantity determining unit is adjusted, the presell time started for the presell information in response to the corresponding modification request is not more than Present system time, and the start to process mark of the presell information in the absence of the corresponding modification request, during modification is asked Presell quantity subtracts the difference that former presell quantity obtains and adjusts quantity as presell;
The first information changes unit, for the stockpile number of selling of inquiry to be defined as selling with presell adjustment quantity sum Stockpile number, and according to the modification request modification presell information.
14. device according to claim 13, it is characterised in that described device also includes following any one:
Second information changes unit, and the presell time started for the presell information in response to the corresponding modification request, which is more than, works as Preceding system time, according to the modification request modification presell information;
3rd information changes unit, and the presell time started for the presell information in response to the corresponding modification request is not more than Present system time, and the start to process mark of the presell information of the corresponding modification request in caching be present, repaiied according to described Change request modification presell information.
CN201610860647.0A 2016-09-28 2016-09-28 Method and device for acquiring amount of marketable inventory Active CN107871221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610860647.0A CN107871221B (en) 2016-09-28 2016-09-28 Method and device for acquiring amount of marketable inventory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610860647.0A CN107871221B (en) 2016-09-28 2016-09-28 Method and device for acquiring amount of marketable inventory

Publications (2)

Publication Number Publication Date
CN107871221A true CN107871221A (en) 2018-04-03
CN107871221B CN107871221B (en) 2022-07-05

Family

ID=61761348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610860647.0A Active CN107871221B (en) 2016-09-28 2016-09-28 Method and device for acquiring amount of marketable inventory

Country Status (1)

Country Link
CN (1) CN107871221B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872100A (en) * 2018-12-28 2019-06-11 航天信息股份有限公司 A kind of product oil inventory change management method and system
CN110310060A (en) * 2019-05-27 2019-10-08 阿里巴巴集团控股有限公司 Inventory management method and device based on fragment
CN110532227A (en) * 2019-08-23 2019-12-03 广东浪潮大数据研究有限公司 Operation quantity querying method and device
CN110599277A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Inventory deduction method and device
CN111461599A (en) * 2020-03-30 2020-07-28 京东数字科技控股有限公司 Mode state switching method and device, storage medium and electronic device
CN112749199A (en) * 2021-01-25 2021-05-04 上海伯俊软件科技有限公司 Inventory management method
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464457A (en) * 2002-06-06 2003-12-31 英业达股份有限公司 Method and system for online real time shipment control
US8527373B1 (en) * 2008-03-21 2013-09-03 Amazon Technologies, Inc. Fulfillment of orders
CN104883670A (en) * 2015-04-23 2015-09-02 叶宁 Internet system and data transmission method
CN105096015A (en) * 2014-04-23 2015-11-25 阿里巴巴集团控股有限公司 Information processing method and system of commodity object
CN105468690A (en) * 2015-11-17 2016-04-06 中国建设银行股份有限公司 Inventory data processing method and device
CN105809393A (en) * 2016-03-01 2016-07-27 成都市泰象网络科技有限公司 System and method for automatically synchronizing e-commerce platform with company's inventory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464457A (en) * 2002-06-06 2003-12-31 英业达股份有限公司 Method and system for online real time shipment control
US8527373B1 (en) * 2008-03-21 2013-09-03 Amazon Technologies, Inc. Fulfillment of orders
CN105096015A (en) * 2014-04-23 2015-11-25 阿里巴巴集团控股有限公司 Information processing method and system of commodity object
CN104883670A (en) * 2015-04-23 2015-09-02 叶宁 Internet system and data transmission method
CN105468690A (en) * 2015-11-17 2016-04-06 中国建设银行股份有限公司 Inventory data processing method and device
CN105809393A (en) * 2016-03-01 2016-07-27 成都市泰象网络科技有限公司 System and method for automatically synchronizing e-commerce platform with company's inventory

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599277A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Inventory deduction method and device
CN109872100A (en) * 2018-12-28 2019-06-11 航天信息股份有限公司 A kind of product oil inventory change management method and system
CN110310060A (en) * 2019-05-27 2019-10-08 阿里巴巴集团控股有限公司 Inventory management method and device based on fragment
CN110310060B (en) * 2019-05-27 2023-10-24 创新先进技术有限公司 Inventory management method and device based on fragments
CN110532227A (en) * 2019-08-23 2019-12-03 广东浪潮大数据研究有限公司 Operation quantity querying method and device
CN111461599A (en) * 2020-03-30 2020-07-28 京东数字科技控股有限公司 Mode state switching method and device, storage medium and electronic device
CN111461599B (en) * 2020-03-30 2024-04-09 京东科技控股股份有限公司 Mode state switching method and device, storage medium and electronic device
CN112749199A (en) * 2021-01-25 2021-05-04 上海伯俊软件科技有限公司 Inventory management method
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium
CN113159680B (en) * 2021-04-19 2023-11-03 北京京东振世信息技术有限公司 Inventory preemption method, apparatus, electronic device, and computer-readable medium

Also Published As

Publication number Publication date
CN107871221B (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN107871221A (en) For obtaining the method and apparatus that can sell stockpile number
US7505983B2 (en) Extending data flows
CN106844372B (en) Logistics information query method and device
CN110019330B (en) Information output method and device
US9009602B2 (en) Assisted browser navigation
CN107291779B (en) Cache data management method and device
CN104579909B (en) Method and equipment for classifying user information and acquiring user grouping information
CN107679897A (en) A kind of security risk control method and device
US20130339488A1 (en) Enterprise services framework for mobile devices
CN107291769A (en) The method and apparatus for handling concurrent order
US20010034735A1 (en) System and method for supporting user registration, and recording medium which records the same
CN107844927A (en) The method and apparatus for improving storage outbound efficiency
CN1894711B (en) In identification database for storing the method for data strip object suggested position
CN109688050B (en) Instant messaging control method and system
CN108038169B (en) Page display method and device
CN116151718A (en) Overseas warehouse management system, method, equipment and storage medium
CN107632989B (en) Method and device for selecting commodity objects, determining models and determining use heat
CN103164217B (en) Independent data entity for back-end system
CN108334522A (en) The method for determining customs's coding, and determine the method and system of type information
US20030028443A1 (en) Online transactions ledger
CN112686711A (en) Rule engine matching method and system
US20150019367A1 (en) Generating a Product with an Invoice Simulation Product Builder
CN111160916A (en) Risk transaction identification method and device
CN114756556B (en) Method, device, electronic equipment and computer readable medium for processing account data
JP2001297185A (en) Evaluation device for supply chain management

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