CN109213598A - A kind of resource allocation methods, device and computer readable storage medium - Google Patents
A kind of resource allocation methods, device and computer readable storage medium Download PDFInfo
- Publication number
- CN109213598A CN109213598A CN201810982920.6A CN201810982920A CN109213598A CN 109213598 A CN109213598 A CN 109213598A CN 201810982920 A CN201810982920 A CN 201810982920A CN 109213598 A CN109213598 A CN 109213598A
- Authority
- CN
- China
- Prior art keywords
- discount coupon
- coupon
- processor
- queue
- resource allocation
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
Abstract
This application involves a kind of resource allocation methods, device and computer readable storage mediums, the described method comprises the following steps: when receiving discount coupon and getting request, obtaining the discount coupon and get the activity mark and user identifier carried in request;Determining discount coupon queue corresponding with the activity mark;It is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue;The discount coupon of the target is deleted from the discount coupon queue;The initiator for getting request to the discount coupon sends the targeted coupon.The problems such as user is no longer to directly read the discount coupon stored in database, but coupon information is directly read from queue when getting discount coupon, this can be to avoid slow discount coupon and existing speed, low efficiency be read from database.
Description
Technical field
This application involves technical field of data processing more particularly to a kind of resource allocation methods, device and computer-readable
Storage medium.
Background technique
Discount coupon is (such as to buy articles on credit or enjoy the excellent of certain discount to the rebate coupon of certain special rights of bearer of this note
Favour).With the development of economy, discount coupon slowly just becomes a kind of important marketing methods, due to the conducting vigorous propaganda of businessman, excellent
A series of reasons such as favour certificate discount true allow discount coupon to be received in daily life consumption by the majority of consumers, more
More frequently to appear in consumption activity.
Most commonly used early stage discount coupon is exactly paper coupons, is mainly existed by either staff in trade company shop
Roadside distributes a kind of resulting paper coupons.Later, along with the arrival of Internet era, there are electronic coupons, electricity
Sub- discount coupon we need in online downloading, acquisition of the printing either in the form of short message.
When discount coupon is provided, in order to improve marketing effectiveness, it will usually setting timing node provide discount coupon with
It is got for user, arrives first and first obtain, such a large number of users can access coupon system in synchronization, lead to coupon system
TPS (Transaction Per Second, the transactions of execution per second are also generally referred to as throughput of system) can very
Height, and in order to avoid multiple users get same discount coupon simultaneously, existing mode would generally carry out locking behaviour to database
Make, this greatly reduces the handling capacity of entire website.
Summary of the invention
In order to solve the above-mentioned technical problem or it at least is partially solved above-mentioned technical problem, this application provides a kind of moneys
Source distribution method, device and computer readable storage medium.
In view of this, in a first aspect, the described method comprises the following steps this application provides a kind of resource allocation methods:
When receiving discount coupon and getting request, obtains the discount coupon and get the activity mark carried in request and user
Mark;
Determining discount coupon queue corresponding with the activity mark;
It is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue;
The discount coupon of the target is deleted from the discount coupon queue;
The initiator for getting request to the discount coupon sends the targeted coupon.
Optionally, the discount coupon queue is one, determination discount coupon queue corresponding with the activity mark, packet
It includes: according to the corresponding relationship of default activity mark and discount coupon queue, searching discount coupon queue corresponding with the activity mark
Storage location;
Alternatively, the discount coupon queue is multiple, determination discount coupon queue corresponding with the activity mark, packet
It includes: according to the corresponding relationship of default activity mark and queue key, searching target key corresponding with the activity mark;Search institute
State the storage location of the corresponding discount coupon queue of target key.
Optionally, described is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue,
Include:
Whether the remaining total amount for judging discount coupon in the discount coupon queue is zero;
When the remaining total amount of discount coupon in the discount coupon queue is not zero, institute will be located at according to the principle of first in first out
The discount coupon for stating discount coupon queue head is determined as the targeted coupon.
It is optionally, described to send the targeted coupon and user identifier, comprising:
Generate the notification message comprising the targeted coupon and user identifier;
The notification message is sent to the messaging systems based on rabbitMq, so that the messaging systems root
The targeted coupon is sent to the initiator that the discount coupon gets request according to the user identifier.
Optionally, the method also includes:
Detect whether that the confirmation of getting for receiving initiator's transmission that the discount coupon gets request responds;
When receive get confirmation response after, determine the database where the targeted coupon;
In the database, the state of the targeted coupon is set as having got, and it is excellent to record the target
The corresponding relationship of favour certificate and the user identifier.
Second aspect, this application provides a kind of resource allocation methods, the described method comprises the following steps:
When receiving discount coupon creation operation, obtains activity corresponding with discount coupon creation operation and identify;
It generates discount coupon corresponding with the activity mark and stores into database;
Creation discount coupon queue corresponding with the activity mark;
The discount coupon stored in database is stored in the discount coupon queue.
Optionally, creation discount coupon queue corresponding with the activity mark, comprising:
Judge whether the quantity of the discount coupon found is greater than preset threshold;
When the quantity of the discount coupon found is less than or equal to preset threshold, one is generated based on the preferential of redis cluster
Certificate queue;
When the quantity of the discount coupon found is greater than preset threshold, multiple discount coupon teams based on redis cluster are generated
Column, and multiple discount coupon queues of generation are stored into the different nodes to redis cluster.
Optionally, the method also includes:
The corresponding relationship of the activity mark and discount coupon queue key value is recorded, each activity mark is unique one corresponding
Discount coupon queue key value.
The third aspect, this application provides a kind of resource allocation terminals, comprising: memory, processor and is stored in described
It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor
Now the step of resource allocation methods as described in any item such as first aspect.
Fourth aspect, this application provides a kind of resource allocation terminals, comprising: memory, processor and is stored in described
It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor
Now the step of resource allocation methods as described in any item such as second aspect.
5th aspect, this application provides a kind of server, the server include: at least one processor, memory,
At least one network interface and user interface;
At least one described processor, memory, at least one network interface and user interface are coupled by bus system
Together;
The processor is used to execute such as any one of first aspect by the program or instruction of calling the memory to store
The step of described resource allocation methods.
6th aspect, this application provides a kind of server, the server include: at least one processor, memory,
At least one network interface and user interface;
At least one described processor, memory, at least one network interface and user interface are coupled by bus system
Together;
The processor is used to execute such as any one of second aspect by the program or instruction of calling the memory to store
The step of described resource allocation methods.
7th aspect, this application provides a kind of computer readable storage mediums, which is characterized in that described computer-readable
It is stored with resource allocator on storage medium, is realized when the resource allocator is executed by processor as first aspect is any
The step of resource allocation methods described in item.
Eighth aspect, this application provides a kind of computer readable storage mediums, which is characterized in that described computer-readable
It is stored with resource allocator on storage medium, is realized when the resource allocator is executed by processor as first aspect is any
The step of resource allocation methods described in item.
Above-mentioned technical proposal provided by the embodiments of the present application has the advantages that compared with prior art
Discount coupon is not only put into database when creating discount coupon by this method provided by the embodiments of the present application
In, allow user directly to read discount coupon from database, but simultaneously outside database, and establish one and database independence
Queue, and by discount coupon storage into the queue, such user it is subsequent rob discount coupon when, it is only necessary in discount coupon queue
In be allocated, without being read to database, thus can be improved response quautity that system handles discount coupon,
Response speed and response efficiency improve the effect of discount coupon granting.
This method provided by the embodiments of the present application, user are no longer to directly read in database to deposit when getting discount coupon
The discount coupon of storage, but coupon information is directly read from queue, this can to avoid reading discount coupon from database and
The problems such as existing speed is slow, low efficiency.In addition, being directly deleted, can thus keeping away after the discount coupon in queue is read
Exempt from the case where same discount coupon is robbed by multiple users, improves the accuracy for robbing discount coupon.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art
Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of resource allocation methods provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another resource allocation methods provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another resource allocation methods provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of resource allocation terminal provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of resource allotting server provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the application, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
The server of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use is used
In indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself is simultaneously
There is no specific meaning.Therefore, " module " can be used mixedly with " component ".
Server can be implemented in a variety of manners.For example, terminal described in the present invention may include such as desktop
The equipment with data calculating, processing capacity of brain, laptop, ipad or service host etc..
The embodiment of the present application provides a kind of resource allocation methods, as shown in Figure 1, this method may comprise steps of:
S101 obtains activity corresponding with discount coupon creation operation and identifies when receiving discount coupon creation operation.
The step in operation, primarily directed to the personnel for having system operatio permission, such as: the businessman of online shopping mall, or
System maintenance personnel of person online shopping mall etc..
Discount coupon creation operation can be the clicking operation to a particular control in the page, such as: in some work
In the dynamic page, " creation discount coupon " is clicked, alternatively, it is also possible to be other inputs operation, such as: fill in a discount coupon generation table
Lattice are information relevant to the discount coupon that this is generated in table, after the completion of filling in, can see as and receive discount coupon creation
Operation.
When carrying out discount coupon granting, businessman usually carries out discount coupon granting both for certain specific activity, such as:
Some electric business sections of on-line mall tissue etc., in addition discount coupon can also be provided for certain specific commodity or user.
But no matter which kind of situation, for a user, discount coupon be all targetedly, so for the ease of to discount coupon into
Row is distinguished and management, and in the embodiment of the present application, described each discount coupon can have a specific corresponding activity mark, this
In activity mark can be businessman's self-defining it is some activity mark, such as: " double 11 ", " Butterflies Festival ", " goddess's section " or
" bachelor's section " etc., is also possible to the number or letter of some not specific meanings.
When being directed in the loose-leaf of " articles for children ", the field of discount coupon is created by click " creation discount coupon "
Scape, the step, can be by the corresponding marks (such as: articles for children) of loose-leaf as activity mark when acquisition activity identifies
Know;In addition, filled in work can be read directly from table when the scene for creating discount coupon for the mode filled up a form
Dynamic mark.
For the ease of follow-up data processing, in the embodiment of the present application, activity mark can be indicated with number or letter,
Such as: a indicates articles for children promotion, and b indicates the promotion of Ms's articles, and c indicates the promotion of man's articles, certainly, more in Comparison of Gardening Activities
In the case where, it free organization number or the quantity of letter can also be identified according to actual needs as activity.
S102 generates discount coupon corresponding with the activity mark and stores into database.
In order to facilitate management, operator can pre-define out activity mark and database corresponding relationship, such one
Denier generates discount coupon and can store discount coupon into database.In a particular application, database can be multiple mutually only
Vertical database, or multiple subregions in a database will guarantee that an activity is identified in any way
One independent data space.
In the embodiment of the present application, database refers to the raw data base of discount coupon, once the discount coupon storage generated is arrived
In database, these information will uniquely retain, but for the ease of data management, and the discount coupon in database can increase attribute letter
Breath, such as: the state whether got and the information of receiptor of discount coupon etc..
This storage information in the database is generally not easy to storing in database in the case of high concurrency
Information is handled, such as: when multiple people pass through database simultaneously and rob discount coupon, it may appear that multiple people get same discount coupon
The case where, and in order to which more people rob a discount coupon simultaneously, usually the permission of user's reading database is configured, it is different in this way
People be read out data in different subregions and realize that different user read data are mutually indepedent, but system in this way is handled up
Amount just will be greatly reduced, and there is also the read subregion of user and do not have discount coupon, and another user of same time is read
Subregion has discount coupon, inequitable problem occurs.
For this purpose, in the embodiment of the present application, referring to step S103, proposing one kind based on database, but be not direct
The method operated in the database.
S103, creation discount coupon queue corresponding with the activity mark.
In the embodiment of the present application, discount coupon queue is a list data structure of self contained data base storage, this number
There is the mechanism of data first in first out according to structure, such as: the queue based on redis cluster.
The discount coupon stored in database is stored in the discount coupon queue by S104.
Usual discount coupon queue is independent and database purchase, can be directly read in database to avoid user in this way
Data there are the problem of.So in this step, needing to read out the discount coupon in database, and stores and arrive discount coupon
In queue.
In practical applications, since discount coupon is usually character string, so, it stores by discount coupon into discount coupon queue
When, directly discount coupon itself can be deposited into discount coupon queue.In the application other embodiments, when there is other data to need
When distributing, and data committed memory is larger, then can also store the mark of data or other identification ids to discount coupon
In queue.
Discount coupon is not only put into database when creating discount coupon by this method provided by the embodiments of the present application
In, allow user directly to read discount coupon from database, but simultaneously outside database, and establish one and database independence
Queue, and by discount coupon storage into the queue, such user it is subsequent rob discount coupon when, it is only necessary in discount coupon queue
In be allocated, without being read to database, thus can be improved response quautity that system handles discount coupon,
Response speed and response efficiency improve the effect of discount coupon granting.
In another embodiment of the application, it is contemplated that the quantity of a movable discount coupon may be very big, in order to improve place
Speed is managed, as shown in Fig. 2, this method may comprise steps of:
S201 obtains activity corresponding with discount coupon creation operation and identifies when receiving discount coupon creation operation.
S202 generates discount coupon corresponding with the activity mark and stores into database.
S203, judges whether the quantity of the discount coupon found is greater than preset threshold.
As the user group that internet online shopping mall is faced is increasing, trading volume be also it is increasing, especially
Some popular activities, the quantity of discount coupon is usually from million ranks even ten million rank, in the biggish situation of the order of magnitude, if
All one discount coupon queues of access per family, as one can imagine, the process for robbing discount coupon will be very slow.For this purpose, in the application
In embodiment, for the lesser discount coupon of the order of magnitude, a queue, step S204 as described below can be only created, and works as quantity
The biggish discount coupon of grade, can create multiple queues simultaneously, and by this multiple queue separate storage, referring to step S205, this
Sample can shunt user, by user's water conservancy diversion to multiple queues, so that the handling capacity that a queue is faced reduces, into
And efficiency is significantly improved.
In a particular application, the various aspects such as the intensity of discount coupon can be robbed according to the processing capacity of server, user
Cause usually determines the threshold value of discount coupon, such as: preset threshold is 10,000.
S204 generates one based on redis cluster when the quantity of the discount coupon found is less than or equal to preset threshold
Discount coupon queue.
After generating a discount coupon queue, subsequent all participation movable users are only carried out in this queue
Reading data.
S205 is generated multiple based on the preferential of redis cluster when the quantity of the discount coupon found is greater than preset threshold
Certificate queue, and multiple discount coupon queues of generation are stored into the different nodes to redis cluster.
In the embodiment of the present application, multiple discount coupon queues are distributed storage, can thus be shunted to user,
By user's water conservancy diversion to multiple queues, so that the handling capacity that a queue is faced reduces, so that efficiency can significantly improve.
The discount coupon stored in database is stored in the discount coupon queue by S206.
No matter the creation method of that discount coupon queue, and creation discount coupon quantity how many, in this step,
Discount coupon is all stored into the discount coupon queue of all generations.
On the basis of embodiment shown in Fig. 2, after creating discount coupon queue, for the ease of subsequent user referring to promotion
When movable, corresponding discount coupon can be accurately found, this method may also comprise the following steps::
S207, records the corresponding relationship of the activity mark and discount coupon queue key value, and each activity mark is unique corresponding
One discount coupon queue key value.
In this way, can quickly and accurately find discount coupon according to activity mark when receiving the operation for robbing discount coupon
Queue facilitates and subsequent finds discount coupon.
In earlier figures 1 and embodiment illustrated in fig. 2, the creation process of discount coupon is described, this is the basis that discount coupon is implemented,
Namely preparation robs the process of discount coupon in conjunction with user, to money provided by the embodiments of the present application after the completion of discount coupon creation
Source distribution method is further described.
The embodiment of the present application provides a kind of resource allocation methods, as shown in figure 3, this method may comprise steps of:
S301 obtains the discount coupon and gets the activity mark carried in request when receiving discount coupon and getting request
And user identifier.
When carrying out discount coupon granting, businessman usually carries out discount coupon granting both for certain specific activity, such as:
Some electric business sections of on-line mall tissue etc., in addition discount coupon can also be provided for certain specific commodity or user.
Once the discount coupon got is exactly and is somebody's turn to do in this way, user, which is directed to discount coupon according to activity, gets link
Movable activity mark is corresponding.
S302, determining discount coupon queue corresponding with the activity mark.
In the embodiment of the present application, it when activity mark and discount coupon queue are all one, is directly assured that and institute
It states activity and identifies corresponding discount coupon queue, and when it is multiple that activity, which is identified as multiple or discount coupon queue, it is also necessary to first
Then the corresponding relationship for getting discount coupon queue and activity mark can just be found and activity mark pair according to the corresponding relationship
The discount coupon queue answered.
S303 is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue.
In the embodiment of the present application, according to the principle of first in, first out from discount coupon queue selection target discount coupon, usually
Select queuing memory storage time earliest discount coupon as targeted coupon.
S304 deletes the discount coupon of the target from the discount coupon queue.
In order to avoid different user gets same discount coupon, in this step, once a certain discount coupon is assigned, that
Allocated discount coupon is deleted from discount coupon queue directly, other users is avoided to select the discount coupon herein.
S305, the initiator for getting request to the discount coupon send the targeted coupon.
After user, which sends discount coupon, gets request, pass through above mentioned step S3 01 to S303, so that it may be assigned to for user
Discount coupon, and then need the relevant information of discount coupon being sent to user, so that user receives feedback.
In the embodiment of the present application, above mentioned step S3 04 and step S305 can be carried out simultaneously.It is not limited in this community
It is fixed.
This method provided by the embodiments of the present application, user are no longer to directly read in database to deposit when getting discount coupon
The discount coupon of storage, but coupon information is directly read from queue, this can to avoid reading discount coupon from database and
The problems such as existing speed is slow, low efficiency.In addition, being directly deleted, can thus keeping away after the discount coupon in queue is read
Exempt from the case where same discount coupon is robbed by multiple users, improves the accuracy for robbing discount coupon.
In the application one embodiment, when the discount coupon queue is one, this method be may comprise steps of:
S401 obtains the discount coupon and gets the activity mark carried in request when receiving discount coupon and getting request
And user identifier.
S402 is searched corresponding with the movable mark according to the corresponding relationship of default activity mark and discount coupon queue
The storage location of discount coupon queue;
S403 is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue.
S404 deletes the discount coupon of the target from the discount coupon queue.
S405, the initiator for getting request to the discount coupon send the targeted coupon.
In the application one embodiment, when the discount coupon queue is multiple, this method be may comprise steps of:
S501 obtains the discount coupon and gets the activity mark carried in request when receiving discount coupon and getting request
And user identifier.
S502 searches target corresponding with the activity mark according to the corresponding relationship of default activity mark and queue key
key;
S503 searches the storage location of the corresponding discount coupon queue of the target key
S504 is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue.
S505 deletes the discount coupon of the target from the discount coupon queue.
S506, the initiator for getting request to the discount coupon send the targeted coupon.
In the application one embodiment, above mentioned step S3 03 be may comprise steps of:
S3031 judges whether the remaining total amount of discount coupon in the discount coupon queue is zero;
When the remaining total amount of discount coupon in the discount coupon queue is not zero, step S3032 is executed, otherwise, terminates stream
Journey.
The discount coupon for being located at the discount coupon queue head is determined as the mesh according to the principle of first in first out by S3032
Mark discount coupon.
In another embodiment of the application, above mentioned step S3 05 be may comprise steps of:
S3051 generates the notification message comprising the targeted coupon and user identifier;
The notification message is sent to the messaging systems based on rabbitMq by S3052.
The effect of messaging systems is exactly to send message to user, in specific execute, can be marked according to the user
Know to the initiator that the discount coupon gets request and sends the targeted coupon.
In the embodiment of the present application, this method may also comprise the following steps::
S01 detects whether that the confirmation of getting for receiving initiator's transmission that the discount coupon gets request responds;
S02, when receive get confirmation response after, determine the database where the targeted coupon;
The state of the targeted coupon is set as having got by S03 in the database, and records the mesh
Mark the corresponding relationship of discount coupon and the user identifier.
This method provided by the embodiments of the present application, to user send coupon information after, once user determine get it is excellent
Favour certificate, then showing that the discount coupon has been confirmed by the user, and then can be in the database to the assigned situation of the discount coupon
It is recorded, carries out verification or other confirmation situations in order to subsequent.
The embodiment of the present application also provides a kind of resource allocation terminals, as shown in figure 4, the resource allocation terminal includes: to deposit
Reservoir, processor and it is stored in the computer program that can be run on the memory and on the processor, the computer
The step of resource allocation methods as described in earlier figures 1- Fig. 2 are realized when program is executed by the processor.
The embodiment of the present application also provides a kind of resource allocation terminals, as shown in figure 4, the resource allocation terminal includes: to deposit
Reservoir, processor and it is stored in the computer program that can be run on the memory and on the processor, the computer
Program realizes the step of resource allocation methods as described in Figure 3 when being executed by the processor.
Fig. 5 is the structural schematic diagram for the server that another embodiment of the present invention provides.Server 500 shown in fig. 5 wraps
It includes: at least one processor 501, memory 502, at least one network interface 504 and other users interface 503.Server 500
In various components be coupled by bus system 505.It is understood that bus system 505 is for realizing between these components
Connection communication.Bus system 505 further includes that power bus, control bus and status signal are total in addition to including data/address bus
Line.But for the sake of clear explanation, various buses are all designated as bus system 505 in Fig. 5.
Wherein, user interface 503 may include display, keyboard or pointing device (for example, mouse, trace ball
(trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 502 in the embodiment of the present invention can be volatile memory or nonvolatile memory,
It or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (Read-
OnlyMemory, ROM), programmable read only memory (ProgrammableROM, PROM), Erasable Programmable Read Only Memory EPROM
(ErasablePROM, EPROM), electrically erasable programmable read-only memory (ElectricallyEPROM, EEPROM) dodge
It deposits.Volatile memory can be random access memory (RandomAccessMemory, RAM), and it is slow to be used as external high speed
It deposits.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random access memory
(StaticRAM, SRAM), dynamic random access memory (DynamicRAM, DRAM), Synchronous Dynamic Random Access Memory
(SynchronousDRAM, SDRAM), double data speed synchronous dynamic RAM (DoubleDataRate
SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links
Dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct rambus random access memory
(DirectRambusRAM, DRRAM).Memory 502 described herein is intended to include but is not limited to these to be suitble to any other
The memory of type.
In some embodiments, memory 502 stores following element, and unit or data structure can be performed, or
Their subset of person or their superset: operating system 5021 and application program 5022.
Wherein, operating system 5021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 5022 includes various application programs, such as media
Player (MediaPlayer), browser (Browser) etc., for realizing various applied business.Realize embodiment of the present invention side
The program of method may be embodied in application program 5022.
In embodiments of the present invention, by the program or instruction of calling memory 502 to store, specifically, can be application
The program or instruction stored in program 5022, processor 501 are used to execute method and step provided by each method embodiment, such as
It include: to obtain the discount coupon when receiving discount coupon and getting request and get the activity mark carried in request and user's mark
Know;Determining discount coupon queue corresponding with the activity mark;It is the user identifier distribution one in the discount coupon queue
A corresponding targeted coupon;The discount coupon of the target is deleted from the discount coupon queue;It is got to the discount coupon
The initiator of request sends the targeted coupon.
The method that the embodiments of the present invention disclose can be applied in processor 501, or be realized by processor 501.
Processor 501 may be a kind of IC chip, the processing capacity with signal.During realization, the above method it is each
Step can be completed by the integrated logic circuit of the hardware in processor 501 or the instruction of software form.Above-mentioned processing
Device 501 can be general processor, digital signal processor (DigitalSignalProcessor, DSP), specific integrated circuit
(ApplicationSpecific IntegratedCircuit, ASIC), ready-made programmable gate array
(FieldProgrammableGateArray, FPGA) either other programmable logic device, discrete gate or transistor logic
Device, discrete hardware components.It may be implemented or execute disclosed each method, step and the logical box in the embodiment of the present invention
Figure.General processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with the present invention
The step of method disclosed in embodiment, can be embodied directly in hardware decoding processor and execute completion, or use decoding processor
In hardware and software unit combination execute completion.Software unit can be located at random access memory, and flash memory, read-only memory can
In the storage medium of this fields such as program read-only memory or electrically erasable programmable memory, register maturation.The storage
Medium is located at memory 502, and processor 501 reads the information in memory 502, and the step of the above method is completed in conjunction with its hardware
Suddenly.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application
SpecificIntegratedCircuits, ASIC), digital signal processor (DigitalSignalProcessing, DSP),
Digital signal processing appts (DSPDevice, DSPD), programmable logic device (ProgrammableLogicDevice, PLD),
Field programmable gate array (Field-ProgrammableGateArray, FPGA), general processor, controller, microcontroller
In device, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, the techniques described herein can be realized by executing the unit of function described herein.Software generation
Code is storable in memory and is executed by processor.Memory can in the processor or portion realizes outside the processor.
The embodiment of the present application also provides a kind of servers, as shown in figure 5, the server includes: at least one processing
Device, memory, at least one network interface and user interface;
At least one described processor, memory, at least one network interface and user interface are coupled by bus system
Together;
The program or instruction that the processor is stored by the calling memory, for executing following method: working as reception
When creating operation to discount coupon, obtains activity corresponding with discount coupon creation operation and identify;It generates and is identified with the activity
Corresponding discount coupon is simultaneously stored into database;Creation discount coupon queue corresponding with the activity mark;It will be deposited in database
The discount coupon of storage is stored in the discount coupon queue.
The embodiment of the present application also provides a kind of computer readable storage medium, deposited on the computer readable storage medium
Resource allocator is contained, the resource allocator realizes resource allocation methods as described in Figure 1 when being executed by processor
Step.
The embodiment of the present application also provides a kind of computer readable storage medium, deposited on the computer readable storage medium
Resource allocator is contained, the resource allocator realizes resource allocation methods as described in Figure 3 when being executed by processor
Step.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when invention.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device or
For system embodiment, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method
The part of embodiment illustrates.Apparatus and system embodiment described above is only schematical, wherein the conduct
The unit of separate part description may or may not be physically separated, component shown as a unit can be or
Person may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can root
According to actual need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill
Personnel can understand and implement without creative efforts.
It is understood that the present invention can be used in numerous general or special purpose computing system environments or configuration.Such as: it is a
People's computer, server computer, handheld device or portable device, multicomputer system, are based on micro process at laptop device
The system of device, set top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including to take up an official post
The distributed computing environment etc. of what system or equipment.
The present invention can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The present invention can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage equipment.
It should be noted that, in this document, the relational terms of such as " first " and " second " or the like are used merely to one
A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to
Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting
Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in the process, method, article or apparatus that includes the element.
The above is only a specific embodiment of the invention, is made skilled artisans appreciate that or realizing this hair
It is bright.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and applied principle and features of novelty phase one herein
The widest scope of cause.
Claims (10)
1. a kind of resource allocation methods, which is characterized in that the described method comprises the following steps:
When receiving discount coupon and getting request, obtains the discount coupon and get the activity mark carried in request and user's mark
Know;
Determining discount coupon queue corresponding with the activity mark;
It is that the user identifier distributes a corresponding targeted coupon in the discount coupon queue;
The discount coupon of the target is deleted from the discount coupon queue;
The initiator for getting request to the discount coupon sends the targeted coupon.
2. resource allocation methods according to claim 1, which is characterized in that the method also includes:
Detect whether that the confirmation of getting for receiving initiator's transmission that the discount coupon gets request responds;
When receive get confirmation response after, determine the database where the targeted coupon;
In the database, the state of the targeted coupon is set as having got, and records the targeted coupon
With the corresponding relationship of the user identifier.
3. a kind of resource allocation methods, which is characterized in that the described method comprises the following steps:
When receiving discount coupon creation operation, obtains activity corresponding with discount coupon creation operation and identify;
It generates discount coupon corresponding with the activity mark and stores into database;
Creation discount coupon queue corresponding with the activity mark;
The discount coupon stored in database is stored in the discount coupon queue.
4. resource allocation methods according to claim 3, which is characterized in that the creation is corresponding with the movable mark
Discount coupon queue, comprising:
Judge whether the quantity of the discount coupon found is greater than preset threshold;
When the quantity of the discount coupon found is less than or equal to preset threshold, a discount coupon team based on redis cluster is generated
Column;
When the quantity of the discount coupon found is greater than preset threshold, multiple discount coupon queues based on redis cluster are generated, and
And multiple discount coupon queues of generation are stored into the different nodes to redis cluster.
5. a kind of resource allocation terminal characterized by comprising memory, processor and be stored on the memory and can
The computer program run on the processor realizes such as claim when the computer program is executed by the processor
The step of resource allocation methods described in any one of 1 to 2.
6. a kind of resource allocation terminal characterized by comprising memory, processor and be stored on the memory and can
The computer program run on the processor realizes such as claim when the computer program is executed by the processor
The step of resource allocation methods described in any one of 3 to 4.
7. a kind of server, which is characterized in that the server includes: at least one processor, memory, at least one network
Interface and user interface;
At least one described processor, memory, at least one network interface and user interface are coupled in one by bus system
It rises;
The processor is used to execute as any in claim 1 to 2 by the program or instruction of calling the memory to store
The step of resource allocation methods described in item.
8. a kind of server, which is characterized in that the server includes: at least one processor, memory, at least one network
Interface and user interface;
At least one described processor, memory, at least one network interface and user interface are coupled in one by bus system
It rises;
The processor is used to execute as any in claim 3 to 4 by the program or instruction of calling the memory to store
The step of resource allocation methods described in item.
9. a kind of computer readable storage medium, which is characterized in that be stored with resource point on the computer readable storage medium
The resource allocation as described in any one of claims 1 to 2 is realized with program, when the resource allocator is executed by processor
The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with resource point on the computer readable storage medium
The resource allocation as described in any one of claim 3 to 4 is realized with program, when the resource allocator is executed by processor
The step of method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810727321 | 2018-07-03 | ||
CN201810727321X | 2018-07-03 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109213598A true CN109213598A (en) | 2019-01-15 |
CN109213598B CN109213598B (en) | 2022-08-02 |
Family
ID=64989228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810982920.6A Active CN109213598B (en) | 2018-07-03 | 2018-08-27 | Resource allocation method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109213598B (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059127A (en) * | 2019-04-25 | 2019-07-26 | 北京字节跳动网络技术有限公司 | A kind of processing method and processing system of means of payment information |
CN110163658A (en) * | 2019-04-17 | 2019-08-23 | 深圳左邻永佳科技有限公司 | Virtual resource data processing method, device, computer equipment and storage medium |
CN110188975A (en) * | 2019-04-02 | 2019-08-30 | 阿里巴巴集团控股有限公司 | A kind of resource acquiring method and device |
CN110322280A (en) * | 2019-06-05 | 2019-10-11 | 上海易点时空网络有限公司 | The discount coupon second based on fair competition kills system and method |
CN111460034A (en) * | 2020-03-25 | 2020-07-28 | 聚好看科技股份有限公司 | Database bidirectional synchronization method, synchronization unit and system |
CN111768217A (en) * | 2019-04-02 | 2020-10-13 | 华为技术有限公司 | Coupon processing method, server, terminal and system |
CN112215637A (en) * | 2020-09-21 | 2021-01-12 | 建信金融科技有限责任公司 | Virtual asset processing method and device, electronic equipment and storage medium |
CN112270492A (en) * | 2020-11-12 | 2021-01-26 | 北京百家科技集团有限公司 | Resource allocation method, device, computer equipment and storage medium |
CN112418928A (en) * | 2020-11-19 | 2021-02-26 | 建信金融科技有限责任公司 | Method, device and equipment for determining coupon codes and storage medium |
CN112418944A (en) * | 2020-11-25 | 2021-02-26 | 上海亿保健康管理有限公司 | Coupon transfer method and device, electronic equipment and storage medium |
CN112734453A (en) * | 2019-10-28 | 2021-04-30 | 腾讯科技(深圳)有限公司 | Electronic ticket collecting method, electronic ticket issuing method, electronic ticket collecting device, electronic ticket issuing device, electronic ticket equipment and storage medium |
CN112926068A (en) * | 2021-02-25 | 2021-06-08 | 平安普惠企业管理有限公司 | Authority management method, management server, service server and readable storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000060516A2 (en) * | 1999-04-01 | 2000-10-12 | Walker Digital, Llc | Method and system for the presentation and redemption of reward offers |
WO2001003048A1 (en) * | 1999-07-06 | 2001-01-11 | Eventsmarket Pty Ltd | A transaction system |
US20110270666A1 (en) * | 2010-04-30 | 2011-11-03 | Welsh Thomas R | System and Method for Providing Financial Incentives and Discentives Based on a Consumer Activity |
CN104954468A (en) * | 2015-06-18 | 2015-09-30 | 小米科技有限责任公司 | Resource allocation method and resource allocation device |
CN105447715A (en) * | 2015-11-03 | 2016-03-30 | 北京京东尚科信息技术有限公司 | Method and apparatus for anti-theft electronic coupon sweeping by cooperating with third party |
WO2016142828A1 (en) * | 2015-03-06 | 2016-09-15 | The Quopn Company Private Limited | System and method for facilitating redemption of a plurality of coupons at a single instance |
CN106487872A (en) * | 2015-08-24 | 2017-03-08 | 阿里巴巴集团控股有限公司 | The offer method and device of reward voucher, the distribution of virtual resource and get method |
CN107169803A (en) * | 2017-05-27 | 2017-09-15 | 上海非码网络科技有限公司 | A kind of method, system and device, server for generating reward voucher in advance |
WO2017170173A1 (en) * | 2016-03-30 | 2017-10-05 | 株式会社リクルートホールディングス | Coupon distribution system |
CN107302488A (en) * | 2016-04-14 | 2017-10-27 | 阿里巴巴集团控股有限公司 | Distribution method, system and the server of virtual objects |
CN108460621A (en) * | 2018-01-30 | 2018-08-28 | 北京小米移动软件有限公司 | The providing method and device of discount coupon |
-
2018
- 2018-08-27 CN CN201810982920.6A patent/CN109213598B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000060516A2 (en) * | 1999-04-01 | 2000-10-12 | Walker Digital, Llc | Method and system for the presentation and redemption of reward offers |
WO2001003048A1 (en) * | 1999-07-06 | 2001-01-11 | Eventsmarket Pty Ltd | A transaction system |
US20110270666A1 (en) * | 2010-04-30 | 2011-11-03 | Welsh Thomas R | System and Method for Providing Financial Incentives and Discentives Based on a Consumer Activity |
WO2016142828A1 (en) * | 2015-03-06 | 2016-09-15 | The Quopn Company Private Limited | System and method for facilitating redemption of a plurality of coupons at a single instance |
CN104954468A (en) * | 2015-06-18 | 2015-09-30 | 小米科技有限责任公司 | Resource allocation method and resource allocation device |
CN106487872A (en) * | 2015-08-24 | 2017-03-08 | 阿里巴巴集团控股有限公司 | The offer method and device of reward voucher, the distribution of virtual resource and get method |
CN105447715A (en) * | 2015-11-03 | 2016-03-30 | 北京京东尚科信息技术有限公司 | Method and apparatus for anti-theft electronic coupon sweeping by cooperating with third party |
WO2017170173A1 (en) * | 2016-03-30 | 2017-10-05 | 株式会社リクルートホールディングス | Coupon distribution system |
CN107302488A (en) * | 2016-04-14 | 2017-10-27 | 阿里巴巴集团控股有限公司 | Distribution method, system and the server of virtual objects |
CN107169803A (en) * | 2017-05-27 | 2017-09-15 | 上海非码网络科技有限公司 | A kind of method, system and device, server for generating reward voucher in advance |
CN108460621A (en) * | 2018-01-30 | 2018-08-28 | 北京小米移动软件有限公司 | The providing method and device of discount coupon |
Non-Patent Citations (2)
Title |
---|
MOHSEN AHMADI ET AL: "《Preserving privacy in location based mobile coupon systems using anonymous authentication scheme》", 《2016 13TH INTERNATIONAL IRANIAN SOCIETY OF CRYPTOLOGY CONFERENCE ON INFORMATION SECURITY AND CRYPTOLOGY (ISCISC)》 * |
叶欢: "《云环境下商品秒杀系统的研究与实现》", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 * |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110188975A (en) * | 2019-04-02 | 2019-08-30 | 阿里巴巴集团控股有限公司 | A kind of resource acquiring method and device |
CN111768217A (en) * | 2019-04-02 | 2020-10-13 | 华为技术有限公司 | Coupon processing method, server, terminal and system |
CN110163658A (en) * | 2019-04-17 | 2019-08-23 | 深圳左邻永佳科技有限公司 | Virtual resource data processing method, device, computer equipment and storage medium |
CN110059127A (en) * | 2019-04-25 | 2019-07-26 | 北京字节跳动网络技术有限公司 | A kind of processing method and processing system of means of payment information |
CN110059127B (en) * | 2019-04-25 | 2022-03-22 | 北京字节跳动网络技术有限公司 | Payment tool information processing method and system |
CN110322280A (en) * | 2019-06-05 | 2019-10-11 | 上海易点时空网络有限公司 | The discount coupon second based on fair competition kills system and method |
CN112734453A (en) * | 2019-10-28 | 2021-04-30 | 腾讯科技(深圳)有限公司 | Electronic ticket collecting method, electronic ticket issuing method, electronic ticket collecting device, electronic ticket issuing device, electronic ticket equipment and storage medium |
CN112734453B (en) * | 2019-10-28 | 2024-02-02 | 腾讯科技(深圳)有限公司 | Electronic coupon pickup method, electronic coupon issuing device, electronic coupon pickup apparatus, electronic coupon issuing apparatus, and storage medium |
CN111460034A (en) * | 2020-03-25 | 2020-07-28 | 聚好看科技股份有限公司 | Database bidirectional synchronization method, synchronization unit and system |
CN111460034B (en) * | 2020-03-25 | 2024-02-23 | 聚好看科技股份有限公司 | Bidirectional database synchronization method, synchronization unit and system |
CN112215637A (en) * | 2020-09-21 | 2021-01-12 | 建信金融科技有限责任公司 | Virtual asset processing method and device, electronic equipment and storage medium |
CN112270492A (en) * | 2020-11-12 | 2021-01-26 | 北京百家科技集团有限公司 | Resource allocation method, device, computer equipment and storage medium |
CN112418928A (en) * | 2020-11-19 | 2021-02-26 | 建信金融科技有限责任公司 | Method, device and equipment for determining coupon codes and storage medium |
CN112418944A (en) * | 2020-11-25 | 2021-02-26 | 上海亿保健康管理有限公司 | Coupon transfer method and device, electronic equipment and storage medium |
CN112926068A (en) * | 2021-02-25 | 2021-06-08 | 平安普惠企业管理有限公司 | Authority management method, management server, service server and readable storage medium |
CN112926068B (en) * | 2021-02-25 | 2023-10-20 | 陕西合友网络科技有限公司 | Rights management method, management server, business server and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109213598B (en) | 2022-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109213598A (en) | A kind of resource allocation methods, device and computer readable storage medium | |
KR102010781B1 (en) | System and method for investing and distributing virtual money | |
JP6731783B2 (en) | Tamper detection system and tamper detection method | |
US9020949B2 (en) | Method and system for centralized issue tracking | |
CN108737325A (en) | A kind of multi-tenant data partition method, apparatus and system | |
CN109471795A (en) | It is grouped test method, device, computer equipment and storage medium | |
CN109617646A (en) | Message forwarding method, device, computer equipment and computer readable storage medium | |
CN110852870A (en) | Virtual resource transfer method, device, equipment and readable storage medium | |
WO2020051312A1 (en) | Blockchain timeclock system | |
CN109617647A (en) | Message forwarding method, device, computer equipment and computer readable storage medium | |
CN101287018A (en) | Integrated data-handling method and device based on multi-system user | |
CN104850955A (en) | Method and system for user information intelligent management based on network environment | |
CN109271449A (en) | A kind of distributed storage inquiry system file-based and querying method | |
WO2020042764A1 (en) | Amount settlement system and method | |
CN105446990A (en) | Service data processing method and equipment | |
CN102789620A (en) | Method and system for processing financial data | |
CN111782262A (en) | Data dynamic publishing method, device, system, equipment and storage medium | |
CN110119430A (en) | A kind of intelligence contract administration method, server and computer readable storage medium | |
KR102210617B1 (en) | System and method for investing and distributing virtual money | |
CN109543076A (en) | User's managing detailed catalogue generation method and device, electronic equipment, storage medium | |
US20120198018A1 (en) | Securely publishing data to network service | |
CN114070847A (en) | Current limiting method, device, equipment and storage medium of server | |
CN109815278A (en) | A kind of method for exhibiting data and its equipment, storage medium, electronic equipment | |
KR102255877B1 (en) | System for investing and distributing virtual money | |
KR102228320B1 (en) | System for investing and distributing virtual money |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220713 Address after: 518000 room 706, block C, building 1, Section 1, Chuangzhi Yuncheng, Liuxian Avenue, Xili community, Xili street, Nanshan District, Shenzhen City, Guangdong Province Applicant after: Shenzhen Jilian Information Technology Co.,Ltd. Address before: 518000 10 building, A District, Dazu innovation building, 9018 Nanshan District high tech Zone, Shenzhen, Guangdong. Applicant before: NUBIA TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |