CN110378660A - Stock processing method, apparatus, electronic equipment and computer readable storage medium - Google Patents

Stock processing method, apparatus, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110378660A
CN110378660A CN201910696251.0A CN201910696251A CN110378660A CN 110378660 A CN110378660 A CN 110378660A CN 201910696251 A CN201910696251 A CN 201910696251A CN 110378660 A CN110378660 A CN 110378660A
Authority
CN
China
Prior art keywords
surplus
inventory
article
preset threshold
true
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910696251.0A
Other languages
Chinese (zh)
Inventor
丁杰
崔卫兵
孙康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910696251.0A priority Critical patent/CN110378660A/en
Publication of CN110378660A publication Critical patent/CN110378660A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders

Landscapes

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

Abstract

A kind of stock processing method, apparatus of the disclosure, electronic equipment and computer readable storage medium.Wherein method includes: to detect the backlog total of article;If the backlog total is deposited less than preset threshold, using first inventory's surplus of article described in database maintenance, the first inventory surplus is the inventory's surplus for the article that the backlog total is less than the preset threshold;If the backlog total is greater than or equal to the preset threshold, safeguard that second inventory's surplus of the article, the second inventory surplus are the inventory's surplus for the article that the backlog total is greater than or equal to the preset threshold using centralised storage device.The embodiment of the present disclosure adds the mode of database to safeguard inventory's surplus of article by using centralised storage device, it is safeguarded when article inventory total amount is more using centralised storage device, it is safeguarded when article inventory total amount is less using database, the pressure of database had not only been alleviated in this way, but also improved the performance of maintaining inventories.

Description

Stock processing method, apparatus, electronic equipment and computer readable storage medium
Technical field
This disclosure relates to technical field of information processing, it can more particularly to a kind of stock processing method, apparatus and computer Read storage medium.
Background technique
In internet industry, background system is frequently necessary to be used for the stored database of repository in face of high concurrent pressure System may receive the number request even more with ten thousand notes in a short time.
However, existing inventory Information Management System is in face of in the situation that business is complicated, data volume is big, concurrency is big Under, maintaining inventories pressure is big, degraded performance.
Summary of the invention
The Summary is provided so that with brief form introduction design, these designs will be in specific implementation below Mode part is described in detail.The Summary is not intended to identify the key feature of claimed technical solution or must Feature is wanted, is intended to be used to limit the range of the technical solution of required protection.
The technical issues of disclosure solves is to provide a kind of stock processing method, at least to be partially solved in the prior art The technical issues of maintaining inventories pressure is big, degraded performance.In addition, also providing a kind of stock processing device, stock processing hardware dress It sets, computer readable storage medium and stock processing terminal.
To achieve the goals above, according to one aspect of the disclosure, the following technical schemes are provided:
A kind of stock processing method, comprising:
Detect the backlog total of article;
If the backlog total is deposited less than preset threshold, remaining using the first inventory of article described in database maintenance Amount, the first inventory surplus are the inventory's surplus for the article that the backlog total is less than the preset threshold;
If the backlog total is greater than or equal to the preset threshold, the article is safeguarded using centralised storage device Second inventory's surplus, the second inventory surplus are the article that the backlog total is greater than or equal to the preset threshold Inventory's surplus.
To achieve the goals above, according to one aspect of the disclosure, the following technical schemes are provided:
A kind of stock processing device, comprising:
Surplus detection module, for detecting the backlog total of article;
Database maintenance module, if depositing for the backlog total less than preset threshold, using described in database maintenance First inventory's surplus of article, the first inventory surplus are the article that the backlog total is less than the preset threshold Inventory's surplus;
Memory maintenance module, if being greater than or equal to the preset threshold for the backlog total, using centralization Second inventory's surplus of article described in memory maintenance, the second inventory surplus are that the backlog total is greater than or equal to Inventory's surplus of the article of the preset threshold.
To achieve the goals above, according to one aspect of the disclosure, the following technical schemes are provided:
A kind of electronic equipment, comprising:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that the processor realizes any of the above-described when executing The stock processing method.
To achieve the goals above, according to one aspect of the disclosure, the following technical schemes are provided:
A kind of computer readable storage medium, for storing non-transitory computer-readable instruction, when the non-transitory When computer-readable instruction is executed by computer, so that the computer executes stock processing method described in any of the above embodiments.
To achieve the goals above, according to the another aspect of the disclosure, and also the following technical schemes are provided:
A kind of stock processing terminal, including any of the above-described stock processing device.
The embodiment of the present disclosure adds the mode of database to safeguard inventory's surplus of article by using centralised storage device, It is safeguarded when article inventory total amount is more using centralised storage device, is tieed up when article inventory total amount is less using database Shield, had not only alleviated the pressure of database, but also improve the performance of maintaining inventories under high concurrent, heavy traffic condition in this way.
Above description is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, and It can be implemented in accordance with the contents of the specification, and to allow the above and other objects, features and advantages of the disclosure can be brighter Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
In conjunction with attached drawing and refer to following specific embodiments, the above and other feature, advantage of each embodiment of the disclosure and Aspect will be apparent.In attached drawing, the same or similar appended drawing reference indicates the same or similar element.It should manage Solution attached drawing is schematically that original part and element are not necessarily drawn to scale.
Fig. 1 is the flow diagram according to the stock processing method of an embodiment of the present disclosure;
Fig. 2 is the structural schematic diagram according to the stock processing device of an embodiment of the present disclosure;
Fig. 3 is the structural schematic diagram according to the electronic equipment of an embodiment of the present disclosure.
Specific embodiment
Embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the certain of the disclosure in attached drawing Embodiment, it should be understood that, the disclosure can be realized by various forms, and should not be construed as being limited to this In the embodiment that illustrates, providing these embodiments on the contrary is in order to more thorough and be fully understood by the disclosure.It should be understood that It is that being given for example only property of the accompanying drawings and embodiments effect of the disclosure is not intended to limit the protection scope of the disclosure.
It should be appreciated that each step recorded in disclosed method embodiment can execute in a different order, And/or parallel execution.In addition, method implementation may include additional step and/or omit the step of execution is shown.This public affairs The range opened is not limited in this respect.
Terms used herein " comprising " and its deformation are that opening includes, i.e., " including but not limited to ".Term "based" It is " being based at least partially on ".Term " one embodiment " expression " at least one embodiment ";Term " another embodiment " indicates " at least one other embodiment ";Term " some embodiments " expression " at least some embodiments ".The correlation of other terms is fixed Justice provides in will be described below.
Embodiment one
The technical issues of in order to solve big maintaining inventories pressure in the prior art, degraded performance, the embodiment of the present disclosure provides A kind of stock processing method.As shown in Figure 1, the stock processing method mainly includes the following steps S11 to step S13.
Step S11: the backlog total of article is detected.
Wherein, article can be commodity, prize, gift token, red packet etc..
Step S12: if the backlog total is deposited less than preset threshold, using the first library of article described in database maintenance Surplus is deposited, the first inventory surplus is the inventory's surplus for the article that the backlog total is less than the preset threshold.
Wherein, preset threshold customized can be arranged.
Wherein, database can be relevant database, such as MySQL database, or non-relational database, Such as NoSQL database.
Wherein, in order to distinguish inventory's surpluses of different meaning herein, inventory's surplus of database maintenance is defined For first inventory's surplus, inventory's surplus that centralised storage device is safeguarded is defined as second inventory's surplus.
Step S13: if the backlog total is greater than or equal to the preset threshold, institute is safeguarded using centralised storage device Second inventory's surplus of article is stated, the second inventory surplus is that the backlog total is greater than or equal to the preset threshold Article inventory's surplus.
The present embodiment adds the mode of database to safeguard inventory's surplus of article by using centralised storage device, in article It is safeguarded when backlog total is more using centralised storage device, is safeguarded when article inventory total amount is less using database, by In in the case where article inventory total amount is more, distribution of goods flow is larger and is easy to appear concurrent situation, at this time using collection Chinese style memory safeguards inventory's surplus, and only when article inventory total amount is less, inventory's residue is safeguarded using database Amount, had not only alleviated the pressure of database, but also improve the performance of maintaining inventories under high concurrent, heavy traffic condition in this way.
In an alternative embodiment, the method also includes:
Step S14: the first inventory surplus is counted using the timing of the first timed task and second inventory is remaining Amount.
Step S15: determine whether the first inventory surplus and the second inventory surplus are consistent.
Specifically, will periodically count first inventory to distinguish the timed task of herein presented different function Surplus and the corresponding timed task of the second inventory surplus are defined as the first timed task.
Step S16: when inconsistent, updating the first inventory surplus or the second inventory surplus, so that The first inventory surplus is consistent with the second inventory surplus.
In an alternative embodiment, the method also includes:
Step S17: surplus with second inventory if the first inventory surplus is greater than the second inventory surplus Surplus updates the first inventory surplus.
For example, first inventory's surplus is 1,000,000, second inventory's surplus is 800,000, then first inventory is remaining Amount is updated to 200,000.Alternatively, the first difference of the first inventory surplus and the second inventory surplus is calculated, according to institute It states the first difference and updates the first inventory surplus.For example, first inventory's surplus is 1,000,000, second inventory's surplus is 800000, then the first inventory surplus differs 200,000 with the second inventory surplus, then by the first inventory surplus 200,000 are subtracted, is updated to 800,000.
Alternatively,
Step S18: surplus with first inventory if the first inventory surplus is less than the second inventory surplus Surplus updates the second inventory surplus.
For example, first inventory's surplus is 1,200,000, second inventory's surplus is 1,800,000, then second inventory is remaining Amount is updated to 1,200,000.Alternatively, calculating first library if the first inventory surplus is less than the second inventory surplus It is remaining to update second inventory according to second difference for the second difference for depositing surplus Yu the second inventory surplus Amount.For example, first inventory's surplus is 1,200,000, second inventory's surplus is 1,800,000, then the second inventory surplus and institute Second inventory's surplus difference 600,000 is stated, then the second inventory surplus is subtracted 600,000, is updated to 1,200,000.
In addition, if the first inventory surplus is equal to the second inventory surplus, it is without any processing.
Above-described embodiment ties up centralised storage device in order to guarantee the accuracy of inventory's surplus, using the first timed task The article inventory surplus of shield and the article inventory surplus of database maintenance are calibrated, can be with real-time ensuring inventory's surplus Accuracy.
In an alternative embodiment, the method also includes:
Step S19: the inventory for calculating the article in the database in real time using the second timed task is really remaining Amount.
Step S110: determine whether the true surplus of the inventory and the first inventory surplus are consistent.
Specifically, will be calculated in real time in the database to distinguish the timed task of herein presented different function The corresponding timed task of the true surplus of inventory of the article be defined as the second timed task.
Step S111: when inconsistent, the first inventory surplus is updated according to the true surplus of the inventory.
In an alternative embodiment, the execution frequency of first timed task is greater than second timed task Execute frequency.
Specifically, in view of calculating data volume is larger in real time and the true surplus of inventory and first inventory's surplus occurs not The probability of unanimous circumstances is extremely low, therefore the execution frequency of the second timed task is lower, the execution frequency of the first timed task compared with It is high.
In an alternative embodiment, step S18 is specifically included:
Step S181: using the distribution quantity of article described in the second timed task real-time statistics;
Step S182: the library of the article in the database is determined according to the backlog total and the distribution quantity Deposit true surplus.
Wherein, distribution quantity is the quantity of article reduction from database.
Specifically, the backlog total, which is subtracted the distribution quantity, can be obtained the article in the database The true surplus of inventory.
In an alternative embodiment, the method also includes:
Step S112: true with the inventory if the true surplus of the inventory is less than the first inventory surplus Surplus updates the first inventory surplus.
For example, the true surplus of inventory is 860,000, first inventory's surplus is 900,000, then by the first inventory surplus It is updated to 860,000.Alternatively, calculating the inventory if the true surplus of the inventory is less than the first inventory surplus and really remaining The third difference of surplus and the first inventory surplus updates the first inventory surplus according to the third difference.Example Such as, the true surplus of inventory is 860,000, and first inventory's surplus is 900,000, then the first inventory surplus and the inventory are true Real surplus difference 40,000, then subtract 40,000 for the first inventory surplus, be updated to 860,000.
In addition, if the true surplus of the inventory is greater than or equal to the first inventory surplus, it is without any processing.
In the above-described embodiments, in fact it could happen that the inventory itself of database and centralized memory maintenance goes wrong, nothing Not right by how to calibrate, it is possible that the situation that hair is super, in order to avoid there is this possibility, above-described embodiment is using real-time The inventory's surplus for calculating the true surplus of inventory of the article of database maintenance and the article of database maintenance compares school Standard, to guarantee that inventory's surplus of database maintenance is accurate.
In an alternative embodiment, the method also includes:
Step S114: if the centralised storage device occurs exception when safeguarding second inventory's surplus of the article, Then by earnestly switching second inventory's surplus being switched to maintaining inventories using article described in database maintenance.
Wherein, abnormal includes power-off, shake, failure etc..
Centralised storage device there may come a time when to will appear shake during safeguarding second inventory's surplus of the article, Such case occurs in order to prevent, and the present embodiment is by introducing earnestly switch, when centralised storage device goes wrong, heat The article for closing and can directly switching inventory's surplus more than or equal to the preset threshold is cut by database maintenance, in this way may be used To be further ensured that the accuracy of data and the stability of business.
Those skilled in the art will be understood that on the basis of above-mentioned each embodiment, can also carry out obvious variant (example Such as, cited mode is combined) or equivalent replacement.
Hereinbefore, although describing each step in stock processing embodiment of the method, ability according to above-mentioned sequence Field technique personnel it should be clear that the step in the embodiment of the present disclosure not necessarily executes in the order described above, can also with inverted order, simultaneously Other sequences such as row, intersection execute, moreover, those skilled in the art can also add other on the basis of above-mentioned steps The mode of step, these obvious variants or equivalent replacement should also be included within the protection scope of the disclosure, and details are not described herein.
It is below embodiment of the present disclosure, embodiment of the present disclosure can be used for executing embodiments of the present disclosure realization The step of, for ease of description, part relevant to the embodiment of the present disclosure is illustrated only, it is disclosed by specific technical details, it asks Referring to embodiments of the present disclosure.
Embodiment two
The technical issues of in order to solve big maintaining inventories pressure in the prior art, degraded performance, the embodiment of the present disclosure provides A kind of stock processing device.The device can execute the step in stock processing embodiment of the method described in above-described embodiment one, The device can be only fitted in server.As shown in Fig. 2, the device mainly includes: surplus detection module 21, database maintenance Module 22 and memory maintenance module 23;Wherein,
Total amount detection module 21 is used to detect the backlog total of article;
If database maintenance module 22 is deposited for the backlog total less than preset threshold, using described in database maintenance First inventory's surplus of article, the first inventory surplus are the article that the backlog total is less than the preset threshold Inventory's surplus;
If memory maintenance module 23 is greater than or equal to the preset threshold for the backlog total, using centralization Second inventory's surplus of article described in memory maintenance, the second inventory surplus are that the backlog total is greater than or equal to Inventory's surplus of the article of the preset threshold.
Further, described device further include: timing statistical module 24 and the first comparison module 25;Wherein,
Timing statistical module 24 is used to count the first inventory surplus and described the using the timing of the first timed task Two inventory's surpluses;
First comparison module 25 is used for determining whether the first inventory surplus and the second inventory surplus are consistent, When inconsistent, the first inventory surplus or the second inventory surplus are updated, so that first inventory is remaining It measures consistent with the second inventory surplus.
Further, described device further include: real-time computing module 26 and the second comparison module 27;Wherein,
Real-time computing module 26 is used to calculate the library of the article in the database in real time using the second timed task Deposit true surplus;
Second comparison module 27 is used for determining whether the true surplus of the inventory and the first inventory surplus are consistent, When inconsistent, the first inventory surplus is updated according to the true surplus of the inventory.
Further, the execution frequency of first timed task is greater than the execution frequency of second timed task.
Further, the execution frequency of first timed task is greater than the execution frequency of second timed task.
Further, the real-time computing module 26 is specifically used for: using article described in the second timed task real-time statistics Distribution quantity;Determine that the inventory of the article in the database is true according to the backlog total and the distribution quantity Surplus.
Further, first comparison module 25 is also used to: if the first inventory surplus is greater than second library Surplus is deposited, then updates the first inventory surplus with the second inventory surplus;Alternatively, if first inventory is remaining Amount is less than the second inventory surplus, then updates the second inventory surplus with the first inventory surplus.
Further, second comparison module 27 is also used to: if the true surplus of the inventory is less than first library Surplus is deposited, then updates the first inventory surplus with the true surplus of the inventory.
Further, described device further include: switching module 28;Wherein,
If switching module 28 occurs for the centralised storage device when safeguarding second inventory's surplus of the article It is abnormal, then by earnestly switching second inventory's surplus being switched to maintaining inventories using article described in database maintenance.
The detailed descriptions such as the technical effect of working principle, realization in relation to stock processing Installation practice can refer to aforementioned Related description in stock processing embodiment of the method, details are not described herein.
Embodiment three
Below with reference to Fig. 3, it illustrates the structural representations for the electronic equipment 300 for being suitable for being used to realize the embodiment of the present disclosure Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electricity shown in Fig. 3 Sub- equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment 300 may include processing unit (such as central processing unit, graphics processor etc.) 301, random access can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 306 Program in memory (RAM) 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic equipment Various programs and data needed for 300 operations.Processing unit 301, ROM 302 and RAM 303 pass through the phase each other of bus 304 Even.Input/output (I/O) interface 305 is also connected to bus 304.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 306 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 307 of dynamic device etc.;Storage device 306 including such as tape, hard disk etc.;And communication device 309.Communication device 309, which can permit electronic equipment 300, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 3 shows tool There is the electronic equipment 300 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
Particularly, 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 comprising being carried on non-transient computer can The computer program on medium is read, which includes the program code for method shown in execution flow chart.At this In the embodiment of sample, which can be downloaded and installed from network by communication device 309, or be filled from storage It sets 306 to be mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, the disclosure is executed The above-mentioned function of being limited in the method for embodiment.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
In some embodiments, client, server can use such as HTTP (HyperText Transfer Protocol, hypertext transfer protocol) etc the network protocols of any currently known or following research and development communicated, and can To be interconnected with the digital data communications (for example, communication network) of arbitrary form or medium.The example of communication network includes local area network (" LAN "), wide area network (" WAN "), Internet (for example, internet) and ad-hoc network are (for example, the end-to-end net of ad hoc Network) and any currently known or following research and development network.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment: detecting the backlog total of article;If the backlog total is deposited less than preset threshold, Then using first inventory's surplus of article described in database maintenance, the first inventory surplus is that the backlog total is less than Inventory's surplus of the article of the preset threshold;If inventory's surplus is greater than or equal to the preset threshold, use Centralised storage device safeguards that second inventory's surplus of the article, the second inventory surplus are that the backlog total is greater than Or inventory's surplus of the article equal to the preset threshold.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include but is not limited to object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Function described herein can be executed at least partly by one or more hardware logic components.Example Such as, without limitation, the hardware logic component for the exemplary type that can be used include: field programmable gate array (FPGA), specially With integrated circuit (ASIC), Application Specific Standard Product (ASSP), system on chip (SOC), complex programmable logic equipment (CPLD) etc. Deng.
In the context of the disclosure, machine readable media can be tangible medium, may include or is stored for The program that instruction execution system, device or equipment are used or is used in combination with instruction execution system, device or equipment.Machine can Reading medium can be machine-readable signal medium or machine-readable storage medium.Machine readable media can include but is not limited to electricity Son, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content any conjunction Suitable combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, portable meter Calculation machine disk, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM Or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage facilities or Any appropriate combination of above content.
According to one or more other embodiments of the present disclosure, a kind of stock processing method is provided, comprising:
Detect the backlog total of article;
If the backlog total is less than preset threshold, first inventory's surplus of article described in database maintenance is used, The first inventory surplus is the inventory's surplus for the article that the backlog total is less than the preset threshold;
If the backlog total is greater than or equal to the preset threshold, the article is safeguarded using centralised storage device Second inventory's surplus, the second inventory surplus are the article that the backlog total is greater than or equal to the preset threshold Inventory's surplus.
Further, the method also includes:
The first inventory surplus and the second inventory surplus are counted using the timing of the first timed task;
Determine whether the first inventory surplus and the second inventory surplus are consistent;
When inconsistent, the first inventory surplus or the second inventory surplus are updated, so that described first Inventory's surplus is consistent with the second inventory surplus.
Further, the method also includes:
Calculate the true surplus of inventory of the article in the database in real time using the second timed task;
Determine whether the true surplus of the inventory and the first inventory surplus are consistent;
When inconsistent, the first inventory surplus is updated according to the true surplus of the inventory.
Further, the execution frequency of first timed task is greater than the execution frequency of second timed task.
Further, the inventory for calculating the article in the database in real time using the second timed task is true Surplus, comprising:
Using the distribution quantity of article described in the second timed task real-time statistics;
Determine that the inventory of the article in the database really remains according to the backlog total and the distribution quantity Surplus.
Further, the method also includes:
If the first inventory surplus is greater than the second inventory surplus, updated with the second inventory surplus The first inventory surplus;Alternatively,
If the first inventory surplus is less than the second inventory surplus, updated with the first inventory surplus The second inventory surplus.
Further, the method also includes:
If the true surplus of inventory is less than the first inventory surplus, updated with the true surplus of the inventory The first inventory surplus.
Further, the method also includes:
If the centralised storage device occurs exception when safeguarding second inventory's surplus of the article, by fervent Maintaining inventories are switched to second inventory's surplus using article described in database maintenance by switch.
According to one or more other embodiments of the present disclosure, stock processing device is provided, comprising:
Surplus detection module, for detecting the backlog total of article;
Database maintenance module, if depositing for the backlog total less than preset threshold, using described in database maintenance First inventory's surplus of article, the first inventory surplus are the article that the backlog total is less than the preset threshold Inventory's surplus;
Memory maintenance module, if being greater than or equal to the preset threshold for the backlog total, using centralization Second inventory's surplus of article described in memory maintenance, the second inventory surplus are that the backlog total is greater than or equal to Inventory's surplus of the article of the preset threshold.
Further, described device further include:
Timing statistical module, for counting the first inventory surplus and described second using the timing of the first timed task Inventory's surplus;
First comparison module, for determining whether the first inventory surplus and the second inventory surplus are consistent, When inconsistent, the first inventory surplus or the second inventory surplus are updated, so that first inventory is remaining It measures consistent with the second inventory surplus.
Further, described device further include:
Real-time computing module, for calculating the inventory of the article in the database in real time using the second timed task True surplus;
Second comparison module, for determining whether the true surplus of the inventory and the first inventory surplus are consistent, When inconsistent, the first inventory surplus is updated according to the true surplus of the inventory.
Further, the execution frequency of first timed task is greater than the execution frequency of second timed task.
Further, the execution frequency of first timed task is greater than the execution frequency of second timed task.
Further, the real-time computing module is specifically used for: using article described in the second timed task real-time statistics Distribute quantity;Determine that the inventory of the article in the database really remains according to the backlog total and the distribution quantity Surplus.
Further, first comparison module is also used to: if the first inventory surplus is greater than second inventory Surplus then updates the first inventory surplus with the second inventory surplus;Alternatively, if the first inventory surplus Less than the second inventory surplus, then the second inventory surplus is updated with the first inventory surplus.
Further, second comparison module is also used to: if the true surplus of the inventory is less than first inventory Surplus then updates the first inventory surplus with the true surplus of the inventory.
Further, described device further include:
Switching module, if occurring for the centralised storage device when safeguarding second inventory's surplus of the article different Often, then by earnestly switching second inventory's surplus being switched to maintaining inventories using article described in database maintenance.
According to one or more other embodiments of the present disclosure, a kind of electronic equipment is provided, comprising:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that the processor realizes above-mentioned inventory when executing Processing method.
According to one or more other embodiments of the present disclosure, a kind of computer readable storage medium is provided, it is non-for storing Temporary computer-readable instruction, when the non-transitory computer-readable instruction is executed by computer, so that the calculating Machine executes above-mentioned stock processing method.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.
Although this is not construed as requiring these operations with institute in addition, depicting each operation using certain order The certain order that shows executes in sequential order to execute.Under certain environment, multitask and parallel processing may be advantageous 's.Similarly, although containing several specific implementation details in being discussed above, these are not construed as to this public affairs The limitation for the range opened.Certain features described in the context of individual embodiment can also be realized in combination single real It applies in example.On the contrary, the various features described in the context of single embodiment can also be individually or with any suitable The mode of sub-portfolio is realized in various embodiments.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary, Special characteristic described in face and movement are only to realize the exemplary forms of claims.

Claims (11)

1. a kind of stock processing method characterized by comprising
Detect the backlog total of article;
If the backlog total is less than preset threshold, the first inventory of database maintenance surplus is used, first inventory is surplus Surplus is the inventory's surplus for the article that the backlog total is less than the preset threshold;
If the backlog total is greater than or equal to preset threshold, second inventory's surplus, institute are safeguarded using centralised storage device State inventory's surplus that second inventory's surplus is the article that the backlog total is greater than or equal to the preset threshold.
2. the method according to claim 1, wherein the method also includes:
The first inventory surplus and the second inventory surplus are counted using the timing of the first timed task;
Determine whether the first inventory surplus and the second inventory surplus are consistent;
When inconsistent, the first inventory surplus or the second inventory surplus are updated, so that first inventory Surplus is consistent with the second inventory surplus.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Calculate the true surplus of inventory of the article in the database in real time using the second timed task;
Determine whether the true surplus of the inventory and the first inventory surplus are consistent;
When inconsistent, the first inventory surplus is updated according to the true surplus of the inventory.
4. according to the method described in claim 3, it is characterized in that, the execution frequency of first timed task is greater than described the The execution frequency of two timed tasks.
5. according to the method described in claim 3, it is characterized in that, described calculate the data using the second timed task in real time The true surplus of inventory of the article in library, comprising:
Using the distribution quantity of article described in the second timed task real-time statistics;
The true surplus of inventory of the article in the database is determined according to the backlog total and the distribution quantity.
6. according to the method described in claim 2, it is characterized in that, described update the first inventory surplus or described second Inventory's surplus includes:
If the first inventory surplus is greater than the second inventory surplus, described in the second inventory surplus update First inventory's surplus;Alternatively,
If the first inventory surplus is less than the second inventory surplus, described in the first inventory surplus update Second inventory's surplus.
7. according to the method described in claim 3, it is characterized in that, updating first library according to the true surplus of the inventory Depositing surplus includes:
If the true surplus of inventory is less than the first inventory surplus, described in the true surplus update of the inventory First inventory's surplus.
8. method according to claim 1-7, which is characterized in that the method also includes:
If the centralised storage device occurs exception when safeguarding second inventory's surplus of the article, by earnestly switching It is switched to second inventory's surplus using article described in database maintenance.
9. a kind of stock processing device characterized by comprising
Surplus detection module, for detecting the backlog total of article;
Database maintenance module, if depositing for the backlog total less than preset threshold, using article described in database maintenance First inventory's surplus, the first inventory surplus be the backlog total be less than the preset threshold article inventory Surplus;
Memory maintenance module uses centralised storage if being greater than or equal to the preset threshold for the backlog total Device safeguards that second inventory's surplus of the article, the second inventory surplus are described in the backlog total is greater than or equal to Inventory's surplus of the article of preset threshold.
10. a kind of electronic equipment, comprising:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that realizing according to claim 1-8 when the processor executes Described in any item stock processing methods.
11. a kind of computer readable storage medium, for storing non-transitory computer-readable instruction, when the non-transitory meter When calculation machine readable instruction is executed by computer, so that the computer perform claim requires the described in any item stock processings of 1-8 Method.
CN201910696251.0A 2019-07-30 2019-07-30 Stock processing method, apparatus, electronic equipment and computer readable storage medium Pending CN110378660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910696251.0A CN110378660A (en) 2019-07-30 2019-07-30 Stock processing method, apparatus, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910696251.0A CN110378660A (en) 2019-07-30 2019-07-30 Stock processing method, apparatus, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110378660A true CN110378660A (en) 2019-10-25

Family

ID=68257116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910696251.0A Pending CN110378660A (en) 2019-07-30 2019-07-30 Stock processing method, apparatus, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110378660A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535740A (en) * 2020-04-14 2021-10-22 北京京东振世信息技术有限公司 Inventory management method and device
CN113554199A (en) * 2020-04-23 2021-10-26 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113793081A (en) * 2020-06-28 2021-12-14 北京沃东天骏信息技术有限公司 Storage monitoring method and device, computer readable medium and electronic equipment
CN115100829A (en) * 2022-06-29 2022-09-23 上海积塔半导体有限公司 Chemical residual quantity monitoring system, monitoring method and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN109344153A (en) * 2018-08-22 2019-02-15 中国平安人寿保险股份有限公司 The processing method and terminal device of business datum
CN109949135A (en) * 2019-03-20 2019-06-28 江苏满运软件科技有限公司 High concurrent transaction request processing method, system, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN109344153A (en) * 2018-08-22 2019-02-15 中国平安人寿保险股份有限公司 The processing method and terminal device of business datum
CN109949135A (en) * 2019-03-20 2019-06-28 江苏满运软件科技有限公司 High concurrent transaction request processing method, system, equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535740A (en) * 2020-04-14 2021-10-22 北京京东振世信息技术有限公司 Inventory management method and device
CN113535740B (en) * 2020-04-14 2023-09-26 北京京东振世信息技术有限公司 Inventory management method and device
CN113554199A (en) * 2020-04-23 2021-10-26 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113554199B (en) * 2020-04-23 2024-04-23 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113793081A (en) * 2020-06-28 2021-12-14 北京沃东天骏信息技术有限公司 Storage monitoring method and device, computer readable medium and electronic equipment
CN115100829A (en) * 2022-06-29 2022-09-23 上海积塔半导体有限公司 Chemical residual quantity monitoring system, monitoring method and computer equipment

Similar Documents

Publication Publication Date Title
CN110378660A (en) Stock processing method, apparatus, electronic equipment and computer readable storage medium
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN110502222A (en) AAR method, apparatus, medium and the equipment in outgoing dependence inner base library
CN109447635A (en) Information storage means and device for block chain
CN110196889A (en) Data processing method, device, electronic equipment and storage medium
CN110019087A (en) Data processing method and its system
CN110362750A (en) Target user determines method, apparatus, electronic equipment and computer-readable medium
US8381233B2 (en) Extensibility model for stream-based operators and aggregates
CN111061922A (en) Data visualization processing method, system, terminal equipment and storage medium
CN110413742A (en) Duplicate checking method, apparatus, equipment and the storage medium of biographic information
CN108776692A (en) Method and apparatus for handling information
CN110515968A (en) Method and apparatus for output information
CN110223124A (en) Data processing method, device, electronic equipment and computer-readable medium
CN110390493A (en) Task management method, device, storage medium and electronic equipment
CN109598304A (en) Disaggregated model calibration method, device, equipment and readable medium
CN109828980A (en) Data cache method, device, terminal and storage medium
CN112581270A (en) Risk account identification method and device, electronic equipment and storage medium
CN109948960A (en) Remove storehouse outbound, storage method and device and electronic equipment and storage medium
CN110334650A (en) Object detecting method, device, electronic equipment and storage medium
CN116628049B (en) Information system maintenance management system and method based on big data
CN109462648A (en) A kind of user behavior tracking, device, equipment and storage medium
CN108446738A (en) A kind of clustering method, device and electronic equipment
CN110321242A (en) Data processing method and device
CN110782310B (en) Method, device and system for asynchronously acquiring user attribute information from third-party platform

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