Summary of the invention
The disclosure provides a kind of resource allocation methods, device, equipment and storage medium, to optimize existing competitive resource
The method of salary distribution improves competitive resource distributional equity.
In a first aspect, the embodiment of the present disclosure provides a kind of resource allocation methods, comprising:
Obtain the resource acquisition request of user;
Resource is distributed according to corresponding to the user, matched resource to be allocated is requested in determining and resource acquisition;
If resource to be allocated is competitive resource, according to resource to be allocated under the request time that resource acquisition is requested
Allocation of parameters and the allocated allocation of parameters of reality under request time can be used, judges whether to distribute money to be allocated to user
Source;Allocation of parameters includes: quantity allotted and/or allocation proportion;
If so, resource to be allocated is supplied to user.
In above scheme, optionally, competitive resource includes: first kind resource, and first kind resource has scheduled distribution
Total amount;
If resource to be allocated is competitive resource, according to resource to be allocated under the request time that resource acquisition is requested
Allocation of parameters and the allocated allocation of parameters of reality under request time can be used, judges whether to distribute money to be allocated to user
Source, comprising:
If resource to be allocated is first kind resource, according to the request time that resource acquisition is requested, determine that the first kind provides
Available quantity allotted of the source under request time;
If the reality quantity allotted of first kind resource can be less than with quantity allotted, it is determined that user's distribution first kind
Resource, and update the reality of first kind resource quantity allotted.
In above scheme, optionally, according to the request time that resource acquisition is requested, determine first kind resource in request
Between under available quantity allotted, comprising:
Inquiry customer flow distribution map corresponding with observation duration, obtains from the starting point of duration is observed to the use of request time
Family flow obtains user's total flow in the case where observing duration as cumulative flow in real time;
According to it is preset with the associated real-time time section of request time under available distribution total amount, in real time cumulative flow with
And user's total flow, determine available quantity allotted of the first kind resource under request time, the siding-to-siding block length in real-time time section
Match with the siding-to-siding block length of observation duration.
In above scheme, optionally, according to preset available point under the associated real-time time section of request time
With total amount, cumulative flow and user's total flow, determine available point of first kind resource under the request time in real time
With quantity, comprising:
According to formula: Expect (t)=L* (Area (t)/Sum) determines that first kind resource is available at request time t
Quantity allotted Expect (t);
Wherein, L is the preset available distribution total amount under the associated real-time time section request time t, and Area (t) is
Cumulative flow in real time;Sum is user's total flow.
In above scheme, optionally, in inquiry customer flow distribution map corresponding with observation duration, obtain from when observation
Long starting point to request time customer flow as cumulative flow in real time, and obtain user's total flow in the case where observing duration it
Before, further includes:
According to the chronomere of setting, the numerical value of request time is adjusted, wherein chronomere is customer flow point
The minimum unit of Butut.
In above scheme, it includes at least two in the second class resource that optionally, competitive resource, which includes: the second class resource,
Classification, wherein there is the ratio of the total user of number of users Zhan of the second class resource of setting categorical measure in setting time section
Example has upper limit value;
If resource to be allocated is competitive resource, according to resource to be allocated under the request time that resource acquisition is requested
Allocation of parameters and the allocated allocation of parameters of reality under request time can be used, judges whether to distribute money to be allocated to user
Source, comprising:
If resource to be allocated is the second class resource, the second class resource for including in resource has been distributed according to user
Categorical measure determines the expection categorical measure of the second class resource corresponding to the user;
According to the tool in the request time of resource acquisition request, expected categorical measure and preset different time intervals
There is the ratio of the total user of number of users Zhan of the second class resource of different classes of quantity, determines current expected with expected classification number
The prospective users number of second class resource of amount;
If actual user's number of the current second class resource with expected categorical measure is less than prospective users number,
True directional user distributes the second class resource of new category.
In above scheme, optionally, according to the categorical measure for having distributed the second class resource for including in resource of user,
Determine the expection categorical measure of the second class resource corresponding to the user, comprising:
According to the categorical measure for having distributed the second class resource for including in resource of user and the resource acquisition machine of user
Meeting quantity determines at least two expected categorical measures of the second class resource corresponding to the user;
If actual user's number of the current second class resource with expected categorical measure is less than prospective users number,
True directional user distributes the second class resource of new category, comprising:
If actual user's number of the second class resources currently at least two expected categorical measures is respectively less than and extremely
The corresponding prospective users number of few two expected categorical measures, then according to Selection Strategy is set, at least two of the condition that meets
It is expected that choosing the expected categorical measure of target in categorical measure;
Second class resource of true directional user's distribution and the expected matched new category of categorical measure of target.
In above scheme, optionally, according to the request time of resource acquisition request, expected categorical measure and preset
Different time intervals in the second class resource with different classes of quantity the total user of number of users Zhan ratio, determination work as
Preceding expection has the prospective users number of the second class resource of expected categorical measure, comprising:
According to the tool in the request time of resource acquisition request, expected categorical measure and preset different time intervals
There are the ratio of the total user of number of users Zhan of the second class resource of different classes of quantity, the real-time time where the acquisition request time
In section, have the ratio of the total user of number of users Zhan of the second class resource of expected categorical measure as object reference ratio;
According to object reference ratio and request time, determine the second class resource of expected categorical measure under request time
The total user of number of users Zhan ratio as real-time scale;
According to real-time scale and active user corresponding with request time sum, prospective users number is determined.
In above scheme, optionally, according to object reference ratio and request time, expected categorical measure is determined
The ratio of number of users Zhan total user of the second class resource under request time is as real-time scale, comprising:
Inquiry customer flow distribution map corresponding with observation duration, obtains from the starting point of duration is observed to the use of request time
Family flow obtains user's total flow in the case where inquiring duration as cumulative flow in real time;
According to object reference ratio, cumulative flow and user's total flow, determine real-time scale in real time.
In above scheme, optionally, according to the request time of resource acquisition request, expected categorical measure and preset
Different time intervals in the second class resource with different classes of quantity the total user of number of users Zhan ratio, determination work as
Preceding expection has the prospective users number of the second class resource of expected categorical measure, comprising:
Obtain real-time time section d corresponding with the request time t that resource acquisition is requested;
There is inhomogeneity according in expected categorical measure i, real-time time section d and preset different time intervals
The ratio of the total user of number of users Zhan of second class resource of other quantity, obtaining has expected class in the d of real-time time section
The ratio CardsRate (d, i) of the total user of number of users Zhan of the second class resource of other quantity i, and in real-time time section d
Previous historical time section d-1 in the second class resource with expected categorical measure i the total user of number of users Zhan ratio
Example CardsRate (d-1, i);
Inquiry customer flow distribution map corresponding with observation duration obtains the starting point from observation duration to request time t's
Customer flow obtains user's total flow Sum in the case where observing duration as cumulative flow Area (t) in real time;
According to following formula, the prospective users number A of the current expected second class resource with expected categorical measure is determined;
A=UserCount (d) * CardsRate (d, i)-userCount (d-1) * [CardsRate (d, i)-
CardsRate(d-1,i)]*[1-Area(t)/Sum];
Wherein, UserCount (d) is user number corresponding with real-time time section d, and userCount (d-1) is and reality
When time interval d the corresponding user number of previous historical time section d-1.
In above scheme, optionally, resource, determining and resource acquisition request are being distributed according to corresponding to the user
After the resource to be allocated matched, further includes:
If resource to be allocated is non-competing resource, resource to be allocated is directly supplied to user.
In above scheme, optionally, non-competing resource includes: third class resource or the 4th class resource;
Wherein, third class resource is the resource that user could obtain after getting first kind resource;4th class resource is
The distribution resource of user.
In above scheme, optionally, resource is distributed according to corresponding to the user, determination is matched with resource acquisition request
Resource to be allocated, including it is at least one of following:
If it is determined that corresponding to the user distributed does not include first kind resource in resource, it is determined that requested with resource acquisition
Matched resource to be allocated is first kind resource, and first kind resource has scheduled distribution total amount;
If it is determined that corresponding to the user distributed in resource includes first kind resource and does not include third class resource, then really
It is third class resource that matched resource to be allocated is requested in fixed and resource acquisition, and third class resource is that user is getting first kind money
The resource that could be obtained behind source;
If it is determined that corresponding to the user distributed in resource includes first kind resource and third class resource, and distribute
The categorical measure for the second class resource for including in resource is less than classification total quantity corresponding with the second class resource, it is determined that resource obtains
Taking the matched resource to be allocated of request is the second class resource, includes at least two classifications in the second class resource, wherein in setting
Between the ratio of the total user of number of users Zhan of the second class resource with setting categorical measure in section there is upper limit value;
If it is determined that corresponding to the user distributed in resource includes first kind resource and third class resource, and distribute
The categorical measure for the second class resource for including in resource is equal to classification total quantity corresponding with the second class resource, it is determined that resource obtains
Taking the matched resource to be allocated of request is the 4th class resource, and the 4th class resource is the distribution resource of user.
In above scheme, optionally, according to resource allocation policy corresponding with resource to be allocated, judge whether to
Family is distributed after resource to be allocated, further includes:
If it is not, the resource to be allocated then distributed not successfully according to this, redefines new resource to be allocated;
If returning and executing resource to be allocated is competitive resource, the request requested according to resource to be allocated in resource acquisition
Available allocation of parameters under time and the allocated allocation of parameters of the reality under request time judge whether to distribute to user
The operation of resource to be allocated, or if resource to be allocated is non-competing resource, resource to be allocated is directly supplied to user
Operation, until success to user distribute a resource.
In above scheme, optionally, the resource to be allocated distributed not successfully according to this is redefined new to be allocated
Resource, comprising:
If this resource to be allocated distributed not successfully is first kind resource, and corresponding to the user has been distributed in resource
Including the second class resource categorical measure be less than classification total quantity corresponding with the second class resource, then redefine it is new to point
It is the second class resource with resource;
If this resource to be allocated distributed not successfully is first kind resource, and corresponding to the user has been distributed in resource
Including the second class resource categorical measure be equal to classification total quantity corresponding with the second class resource, then redefine it is new to point
It is the 4th class resource with resource;
If this resource to be allocated distributed not successfully is the second class resource, redefining new resource to be allocated is
4th class resource.
Second aspect, the embodiment of the present disclosure additionally provide a kind of resource allocation device, comprising:
Request module, the resource acquisition for obtaining user are requested;
Resource determination module, for having distributed resource according to corresponding to the user, determination is requested matched with resource acquisition
Resource to be allocated;
First resource judgment module, if being competitive resource for resource to be allocated, according to resource to be allocated in resource
Available allocation of parameters under the request time of acquisition request and the allocated allocation of parameters of the reality under request time, judgement
Whether to user resource to be allocated is distributed;Allocation of parameters includes: quantity allotted and/or allocation proportion;
First resource provides module, for if so, resource to be allocated is supplied to user.
In above scheme, optionally, competitive resource includes: first kind resource, and first kind resource has scheduled distribution
Total amount;
First resource judgment module includes:
Quantity determines submodule, if being first kind resource for resource to be allocated, according to asking for resource acquisition request
Seeking time determines available quantity allotted of the first kind resource under request time;
First distribution sub module, if the reality quantity allotted for first kind resource can be less than with quantity allotted,
True directional user distributes first kind resource, and updates the reality of first kind resource quantity allotted.
In above scheme, optionally, quantity determines that submodule includes:
Flow diagram query unit is obtained for inquiring customer flow distribution map corresponding with duration is observed from observation duration
Starting point to request time customer flow as cumulative flow in real time, and obtain user's total flow in the case where observing duration;
Quantity determination unit, for total according to the available distribution under the preset associated real-time time section with request time
Amount, cumulative flow and user's total flow, determine available quantity allotted of the first kind resource under request time, when real-time in real time
Between section siding-to-siding block length and observe duration siding-to-siding block length match.
In above scheme, optionally, quantity determination unit includes:
Quantity determines subelement, and for according to formula: Expect (t)=L* (Area (t)/Sum) determines first kind resource
Available quantity allotted Expect (t) at request time t;
Wherein, L is the preset available distribution total amount under the associated real-time time section request time t, and Area (t) is
Cumulative flow in real time;Sum is user's total flow.
In above scheme, optionally, further includes:
Numerical value adjustment unit is adjusted the numerical value of request time for the chronomere according to setting, wherein when
Between unit be customer flow distribution map minimum unit.
In above scheme, it includes at least two in the second class resource that optionally, competitive resource, which includes: the second class resource,
Classification, wherein there is the ratio of the total user of number of users Zhan of the second class resource of setting categorical measure in setting time section
Example has upper limit value;
First resource judgment module includes:
Quantity determines submodule, if being the second class resource for resource to be allocated, according to the distribution resource of user
In include the second class resource categorical measure, determine the expection categorical measure of the second class resource corresponding to the user;
Number determines submodule, request time for being requested according to resource acquisition, expected categorical measure and preset
The ratio of the total user of number of users Zhan of the second class resource with different classes of quantity in different time intervals determines current
It is expected that having the prospective users number of the second class resource of expected categorical measure;
Second distribution sub module, if for currently having actual user's number of the second class resource of expected categorical measure
Less than prospective users number, it is determined that distribute the second class resource of new category to user.
In above scheme, optionally, quantity determines that submodule includes:
Quantity determination unit, for the categorical measure for having distributed the second class resource for including in resource according to user, with
And the resource acquisition chance quantity of user, determine at least two expected categorical measures of the second class resource corresponding to the user;
Second distribution sub module includes:
Categorical measure selection unit, if the reality for the second class resource currently at least two expected categorical measures
Border user number is respectively less than prospective users number corresponding at least two expected categorical measures, then according to setting Selection Strategy,
The expected categorical measure of target is chosen at least two expected categorical measures of the condition that meets;
Resource determination unit, the second class for true directional user distribution and the expected matched new category of categorical measure of target
Resource.
In above scheme, optionally, number determines that submodule includes:
With reference to ratio acquisition unit, request time for being requested according to resource acquisition, expected categorical measure and default
Different time intervals in the second class resource with different classes of quantity the total user of number of users Zhan ratio, acquisition asks
In real-time time section where seeking time, there is the ratio of the total user of number of users Zhan of the second class resource of expected categorical measure
Example is used as object reference ratio;
Real-time scale acquiring unit, for determining expected categorical measure according to object reference ratio and request time
The ratio of number of users Zhan total user of the second class resource under request time is as real-time scale;
It is expected that number determination unit, for total according to real-time scale and active user corresponding with request time, really
Determine prospective users number.
In above scheme, optionally, real-time scale acquiring unit includes:
Flow diagram inquires subelement, for inquiring customer flow distribution map corresponding with duration is observed, obtains from when observation
The customer flow of long starting point to request time is used as cumulative flow in real time, and obtains user's total flow in the case where inquiring duration;
Ratio-dependent subelement, for according to object reference ratio, cumulative flow and user's total flow, to be determined real in real time
When ratio.
In above scheme, optionally, number determines that submodule includes:
Time interval acquiring unit, for obtaining real-time time section corresponding with the request time t of resource acquisition request
d;
Ratio acquisition unit, for according to expected categorical measure i, real-time time section d and preset different time area
The ratio of the total user of number of users Zhan of interior the second class resource with different classes of quantity obtains in real-time time section
The ratio CardsRate (d, i) of the total user of number of users Zhan of the second class resource with expected categorical measure i in d, and
The number of users of the second class resource with expected categorical measure i in the previous historical time section d-1 of real-time time section d
Measure the ratio CardsRate (d-1, i) of the total user of Zhan;
Flow acquiring unit is obtained for inquiring customer flow distribution map corresponding with duration is observed from observation duration
The customer flow of starting point to request time t are used as cumulative flow Area (t) in real time, and the user obtained in the case where observing duration always flows
Measure Sum;
User number determination unit, for determining current expected second with expected categorical measure according to following formula
The prospective users number A of class resource;
A=UserCount (d) * CardsRate (d, i)-userCount (d-1) * [CardsRate (d, i)-
CardsRate(d-1,i)]*[1-Area(t)/Sum];
Wherein, UserCount (d) is user number corresponding with real-time time section d, and userCount (d-1) is and reality
When time interval d the corresponding user number of previous historical time section d-1.
In above scheme, optionally, further includes:
Secondary resource provides module, if being non-competing resource for resource to be allocated, directly proposes resource to be allocated
Supply user.
In above scheme, optionally, non-competing resource includes: third class resource or the 4th class resource;
Wherein, third class resource is the resource that user could obtain after getting first kind resource;4th class resource is
The distribution resource of user.
In above scheme, optionally, resource determination module includes at least one of following:
The first kind determines submodule, for if it is determined that corresponding to the user distributed in resource does not include first kind money
Source, it is determined that requesting matched resource to be allocated with resource acquisition is first kind resource, and first kind resource has scheduled distribution
Total amount;
Third class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource and
It does not include third class resource, it is determined that requesting matched resource to be allocated with resource acquisition is third class resource, third class resource
The resource that could be obtained after getting first kind resource for user;
Second class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource with
And third class resource, and the categorical measure for having distributed the second class resource for including in resource is less than class corresponding with the second class resource
Other total quantity, it is determined that it is the second class resource that matched resource to be allocated is requested in resource acquisition, includes at least in the second class resource
Two classifications, wherein there is the total user of number of users Zhan of the second class resource of setting categorical measure in setting time section
Ratio have upper limit value;
4th class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource with
And third class resource, and the categorical measure for having distributed the second class resource for including in resource is equal to class corresponding with the second class resource
Other total quantity, it is determined that it is the 4th class resource that matched resource to be allocated is requested in resource acquisition, the 4th class resource be user
Distribute resource.
In above scheme, optionally, further includes:
Resource redefines module, for if it is not, the resource to be allocated then distributed not successfully according to this, redefines new
Resource to be allocated;
Secondary resource judgment module, if executing resource to be allocated for competitive resource, according to money to be allocated for returning
Available allocation of parameters of the source under the request time that resource acquisition is requested and the allocated distribution of the reality under request time
Parameter judges whether the operation that resource to be allocated is distributed to user, or if resource to be allocated is non-competing resource, directly
Resource to be allocated is supplied to the operation of user, until success distributes a resource to user.
In above scheme, optionally, resource redefines module and includes:
First determines submodule, if the resource to be allocated distributed not successfully for this is first kind resource, and with
The corresponding categorical measure for having distributed the second class resource for including in resource in family is less than classification sum corresponding with the second class resource
Amount, then redefining new resource to be allocated is the second class resource;
Second determines submodule, if the resource to be allocated distributed not successfully for this is first kind resource, and with
The corresponding categorical measure for having distributed the second class resource for including in resource in family is equal to classification sum corresponding with the second class resource
Amount, then redefining new resource to be allocated is the 4th class resource;
Third determines submodule, if being the second class resource for this resource to be allocated distributed not successfully, again
Determine that new resource to be allocated is the 4th class resource.
The third aspect, the embodiment of the present disclosure additionally provide a kind of equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more programs are executed by one or more processors, so that one or more processors realize such as this public affairs
Open resource allocation methods described in embodiment.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computer
Program realizes the resource allocation methods as described in the embodiment of the present disclosure when program is executed by processor.
The embodiment of the present disclosure by having distributed resource according to corresponding to the user, it is determining with resource acquisition request it is matched to
Distribute resource;If resource to be allocated is competitive resource, according to the available distribution under the request time of resource acquisition request
Parameter and the allocated allocation of parameters of reality under request time judge whether to distribute resource to be allocated to user;If so,
Resource to be allocated is then supplied to user, prior art competitive resource distributional equity is solved and versatility is low, user
Experience difference problem, can according to user distributed resource and resource acquisition request request time under allocation of parameters to
User distributes competitive resource, increases reference factor when distribution competitive resource, optimizes the distribution side of existing competitive resource
Formula improves competitive resource distributional equity, improves user experience.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just
Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
Fig. 1 is a kind of flow chart for resource allocation methods that the embodiment of the present disclosure provides, and the present embodiment is applicable to carry out
The case where resource allocation, this method can be executed by resource allocation device, which can use the side of software and/or hardware
Formula realizes that the device can be configured at computer equipment, for example, in server, with the client software installed in user terminal
It is used cooperatively.As shown in Figure 1, this method may include steps of:
Step 101, the resource acquisition request for obtaining user.
Wherein, resource acquisition request is the information or instruction for request resource of user's input.Optionally, resource
It can be network storage space, electronics card, ideal money or virtual game equipment etc..
In a specific example, the network storage of (for example, 100G) can be sized to the fixed offer of registration user
The acquisition permission in space.User can be requested by sending corresponding resource acquisition, to the corresponding network of server request
Memory space (for example, network storage space of the available 10G of first resource acquisition request), with on-line storage user file.
Further, when user is to the server application network storage space of fixed size, user be can also continue to the clothes
Business device sends resource acquisition request, at this point, user needs and other users are competed to obtain new network storage space, for example,
Server increases the competition memory space of 50 10G newly daily, is competed by multi-user and obtains above-mentioned competition memory space.
In another specific example, an Above-the-line can be held, user can be requested by input resource acquisition,
With to server request resource.When activity cut-off, the case where equipment according to user's acquisition electronics card or virtual game, give
Give user's reward.For example, being provided with 14 different classes of electronics cards altogether, aprowl, user can be provided by input
Source acquisition request obtains electronics card.When activity cut-off, to the user for collecting neat 14 electronics cards, award.
In another specific example, the virtual game equipment of limited edition or the virtual goods of setting total amount can be issued
Coin.Virtual game equipment or ideal money need user to execute certain operation (for example, completing the task dispatching issued on line)
Triggering sends resource acquisition request competition and obtains afterwards.
Step 102 has distributed resource according to corresponding to the user, and matched money to be allocated is requested in determining and resource acquisition
Source.
Wherein, the resource acquisition request based on user, user is corresponding has distributed resource for inquiry.According to corresponding to the user
Resource has been distributed, it is determining to request matched resource to be allocated with resource acquisition.For example, the electronic card that inquiry user has collected
Board, the electronics card collected according to user determine the electronics card for needing to distribute to user.
If step 103, resource to be allocated are competitive resource, the request requested according to resource to be allocated in resource acquisition
Available allocation of parameters under time and the allocated allocation of parameters of the reality under request time judge whether to distribute to user
Resource to be allocated;Allocation of parameters includes: quantity allotted and/or allocation proportion.
Wherein, competitive resource can be under the entire resource acquisition period (for example, one month or 2 months etc.) control
The resource of resource acquisition progress processed, for example, competitive resource is only in the set time period in the Above-the-line for setting duration at one
It can distribute outward, and then the active process of entire Above-the-line can be controlled by the competitive resource).
In other words, competitive resource can be user and not can guarantee in first resource acquisition request and can centainly get
Resource.
Resource is being distributed according to corresponding to the user, it is competition that matched resource to be allocated is requested in determining and resource acquisition
After resource, available allocation of parameters according to resource to be allocated under the request time that resource acquisition is requested is needed and in request
Between under the allocated allocation of parameters of reality, judge whether to user distribute competitive resource.
Can with allocation of parameters can according to user flow distribution setting resource to be allocated available quantity allotted.It is real
The allocated allocation of parameters in border is the corresponding reality of resource to be allocated under request time quantity allotted.If in request
Between under the corresponding available quantity allotted of resource to be allocated be less than reality quantity allotted, it is determined that distribute money to be allocated to user
Source, and update the reality of resource to be allocated quantity allotted.
It can be the resource to be allocated with different classes of quantity in preset different time intervals with allocation of parameters
The total user of number of users Zhan ratio.Practical allocated allocation of parameters is the current money to be allocated with expected categorical measure
Actual user's number in source.According to the user of the resource to be allocated with different classes of quantity in preset different time intervals
The prospective users number of the currently expected resource to be allocated with expected categorical measure of the ratio-dependent of the total user of quantity Zhan.If
Actual user's number of the current resource to be allocated with expected categorical measure is less than prospective users number, it is determined that user point
Resource to be allocated with new category.
Optionally, by the quantity of predetermined competitive resource, the total number of persons that can obtain the competitive resource, example be can control
Such as, the user number of reward is obtained in control activity.Optionally, pass through available competing of user in limitation current time section
The quantity of resource is striven, resource acquisition progress can be controlled under the entire resource acquisition period, for example, control active process.
Non-competing resource is other resources other than competitive resource in the resource that activity provides.In basis and user
It is corresponding to have distributed resource, it is determining request with resource acquisition matched resource to be allocated to be non-competing resource after, can directly by
The unconditional resource allocation that obtains is to user.
Step 104, if so, resource to be allocated is supplied to user.
Wherein, it the available allocation of parameters according to resource to be allocated under the request time that resource acquisition is requested and is requesting
Reality allocated allocation of parameters under time provides resource to be allocated after judgement can distribute resource to be allocated to user
It is corresponding to update that user is corresponding to have distributed resource to user.
In an optional embodiment of the present embodiment, if judgement cannot distribute resource to be allocated to user,
The resource to be allocated distributed not successfully according to this redefines new resource to be allocated, if it is to be allocated then to return to execution
Resource is competitive resource, then according to resource allocation policy corresponding with resource to be allocated, judges whether to distribute to user to be allocated
The operation of resource, until success distributes a resource to user.
In an optional embodiment of the present embodiment, if judgement cannot distribute resource to be allocated to user,
Any resource can be distributed to the user to the response message of user feedback resource allocation failure, and no longer.
In a specific example, the resource acquisition of user request is the acquisition request of network storage space, then can be with
Firstly the need of the size according to the network storage space for being user distribution, determine that the network currently for user distribution is deposited
Whether storage space is the competitive resource (that is, competition memory space of setting capacity) for needing to be at war with other users, if
It is that then the available quantity allotted according to above-mentioned competition memory space under the request time that resource acquisition is requested is (for example, 50
The competition memory space of 10G), and the allocated quantity allotted of reality under the request time, judge whether to user
The competition memory space of the setting capacity is distributed, if so, the competition memory space is directly supplied to user.
In a specific example, the resource acquisition request of user is the acquisition request of ideal money, then can be first
Need according to be already allocated to the user ideal money quantity, determinations currently be the user distribute ideal money whether be
The competitive resource (that is, competition ideal money of setting quantity) for needing to be at war with other users, if so, according to above-mentioned
Available quantity allotted (for example, 10000 ideal moneys) of the ideal money under the request time that resource acquisition is requested is competed, with
And the allocated quantity allotted of reality under the request time, judge whether that the competition that the setting quantity is distributed to user is empty
Quasi- currency, if so, the competition ideal money of the setting quantity is directly supplied to user.
The technical solution of the present embodiment, by having distributed resource according to corresponding to the user, determining and resource acquisition is requested
Matched resource to be allocated;If resource to be allocated is competitive resource, asked according to resource to be allocated what resource acquisition was requested
Available allocation of parameters under seeking time and the allocated allocation of parameters of the reality under request time judge whether to user point
With resource to be allocated;If so, resource to be allocated is supplied to user, solves prior art competitive resource distributional equity
And versatility is low, the problem of poor user experience, can distribute resource and in the request of resource acquisition request according to user
Allocation of parameters under time distributes competitive resource to user, increases reference factor when distribution competitive resource, optimizes existing
Competitive resource the method for salary distribution, improve competitive resource distributional equity, improve user experience.
Fig. 2 is a kind of flow chart for resource allocation methods that the embodiment of the present disclosure provides, and the present embodiment can be with above-mentioned one
Each optinal plan combines in a or multiple embodiments, and in the present embodiment, competitive resource can be with are as follows: first kind resource, the
A kind of resource has scheduled distribution total amount;
And if resource to be allocated is competitive resource, according to resource to be allocated in the request that resource acquisition is requested
Between under available allocation of parameters and the allocated allocation of parameters of reality under request time, judge whether to user distribute to
Resource is distributed, it can be with are as follows:
If resource to be allocated is first kind resource, according to the request time that resource acquisition is requested, determine that the first kind provides
Available quantity allotted of the source under request time;If the reality quantity allotted of first kind resource can be less than with quantity allotted,
Then true directional user distributes first kind resource, and updates the reality of first kind resource quantity allotted.
As shown in Fig. 2, this method may include steps of:
Step 201, the resource acquisition request for obtaining user.
Step 202 has distributed resource according to corresponding to the user, and matched money to be allocated is requested in determining and resource acquisition
Source.
If step 203, resource to be allocated are first kind resource, according to the request time that resource acquisition is requested, determine
Available quantity allotted of the first kind resource under request time.
Wherein, competitive resource may include: first kind resource, and first kind resource has scheduled distribution total amount.User thinks
Obtain movable reward, it is necessary to obtain first kind resource.Optionally, an each user only available first kind resource.
By the quantity of predetermined first kind resource, total user number of reward is obtained in control activity.In a specific example,
It must once hold in the truck activity of first kind resource, set the distribution total amount of first kind resource as 1,000,000, be also equivalent to
Provided with the total user number that can finally collect neat card.
Optionally, the request time requested according to resource acquisition determines available point of first kind resource under request time
It may include: the distribution total amount according to first kind resource, and allocative efficiency phase corresponding with the first kind resource with quantity
(for example, 7 days), averagely determine the first kind resource within the allocative efficiency phase setting time unit (for example, the second, minute or
Hour) in available quantity allotted.
In a simply example, if the distribution total amount of first kind resource is 24, the allocative efficiency phase is 1 day, then may be used
Pass through a hour so that determination is every, can all release a first kind resource, and then can ask according to what the resource acquisition was requested more
Seeking time determines available quantity allotted corresponding with the first kind resource.
Optionally, the request time requested according to resource acquisition determines available point of first kind resource under request time
With quantity, it may include: inquiry customer flow distribution map corresponding with observation duration, obtain from the starting point of observation duration to request
The customer flow of time obtains user's total flow in the case where observing duration as cumulative flow in real time;According to it is preset with ask
Available distribution total amount under the associated real-time time section of seeking time, cumulative flow and user's total flow, determine first in real time
Available quantity allotted of the class resource under request time, the siding-to-siding block length and the siding-to-siding block length phase of observation duration in real-time time section
Matching.
Wherein, customer flow distribution map is the flow point that the movable user number of participation detected according to service interface is drawn
Butut.A length of preset duration (for example, one day), can be arranged according to business demand when observation.Fig. 3 mentions for the embodiment of the present disclosure
One kind of confession customer flow distribution map corresponding with observation duration.As shown in figure 3, observation when it is a length of since 0 point to 24 points
86400 seconds.The starting point for observing duration is the 1st second.The horizontal axis of customer flow distribution map is the time.The longitudinal axis of customer flow distribution map
To participate in movable user number.Obtain the customer flow from the starting point of observation duration to request time, i.e., from the 1st second to asking
Seeking time is corresponding to participate in movable user number addition, as real-time cumulative flow.The user obtained in the case where observing duration is total
Flow is added the 1st second to the 86400th second corresponding movable user number of participation, as user's total flow.
Optionally, tired in real time according to the preset available distribution total amount under the associated real-time time section of request time
Add flow and user's total flow, determine available quantity allotted of the first kind resource under request time, comprising: according to formula:
Expect (t)=L* (Area (t)/Sum) determines available quantity allotted Expect (t) of the first kind resource at request time t;
Wherein, L is the preset available distribution total amount under the associated real-time time section request time t, and Area (t) is cumulative in real time
Flow;Sum is user's total flow.
Wherein, before activity starts, predetermined first kind resource under each real-time time section during activity can
With distribution total amount.The siding-to-siding block length in real-time time section and the siding-to-siding block length of observation duration match.For example, activity is 3 days.It sees
When survey it is a length of since 0 point to 86400 seconds of 24 points.3 real-time time sections will be divided into the activity time according to observation duration:
1st day, the 2nd day and the 3rd day.Corresponding available distribution total amount is 50 to first kind resource on day 1.First kind resource is the 2nd
Its corresponding available distribution total amount is 100.Corresponding available distribution total amount is 150 to first kind resource on day 3.It is obtained according to resource
The request time of request is taken, the preset available distribution total amount under the associated real-time time section of request time is obtained.For example,
Request time is 28800 seconds of activity the 2nd day, then the preset available distribution under the associated real-time time section of request time
Total amount L is first kind resource corresponding available distribution total amount 100 on day 2.
Optionally, it in inquiry and the corresponding customer flow distribution map of observation duration, obtains from the starting point of duration is observed to asking
The customer flow of seeking time obtains before the user's total flow observed under duration as cumulative flow in real time, further includes: root
According to the chronomere of setting, the numerical value of request time is adjusted, wherein chronomere is the minimum of customer flow distribution map
Unit.
Wherein, the numerical value of the request time of acquisition may be with the minimum unit of customer flow distribution map not in an order of magnitude
On.For example, the request time obtained is the numerical value of Millisecond, and the minimum unit of customer flow distribution map is the second.When will request
Between numerical value unit be adjusted to the chronomere of customer flow distribution map, convenient for determining.
If step 204, the reality quantity allotted that first kind resource can be less than with quantity allotted, it is determined that divide to user
With first kind resource, and update the reality of first kind resource quantity allotted.
Wherein, quantity allotted is the currently allocated first kind resource quantity to user to the reality of first kind resource,
It can all be updated when distributing a first kind resource every time, for example, when distributing a first kind resource every time, the first kind
Quantity allotted can all add 1 to the reality of resource.
It determines after obtaining available quantity allotted of the first kind resource under request time, obtains first under request time
The reality of class resource quantity allotted, the size of the reality of quantity allotted and first kind resource quantity allotted can be used by comparing.Such as
Available quantity allotted of the fruit first kind resource under request time is less than the reality quantity allotted of first kind resource, it is determined that
User distributes first kind resource, and updates the reality of first kind resource quantity allotted;If first kind resource is in request time
Under available quantity allotted be equal to the reality quantity allotted of first kind resource, it is determined that not to user's distribution first kind resource.
Step 205, if so, resource to be allocated is supplied to user.
The technical solution of the present embodiment, by may include that there is the first kind of scheduled distribution total amount to provide in competitive resource
When source, according to the request time that resource acquisition is requested, available quantity allotted of the first kind resource under request time is determined;If
The reality quantity allotted of first kind resource can be less than with quantity allotted, it is determined that user's distribution first kind resource, and update
The reality of first kind resource quantity allotted can be based on customer flow dynamic adjustresources quantity allotted, guarantee user fairness
Ground is at war with, and improves user experience.
Fig. 4 is a kind of flow chart for resource allocation methods that the embodiment of the present disclosure provides, and the present embodiment can be with above-mentioned one
Each optinal plan combines in a or multiple embodiments, and in the present embodiment, competitive resource can be with are as follows: the second class resource, the
It include at least two classifications in two class resources, wherein there is the second class resource of setting categorical measure in setting time section
The total user of number of users Zhan ratio have upper limit value;
And if resource to be allocated is competitive resource, according to resource to be allocated in the request that resource acquisition is requested
Between under available allocation of parameters and the allocated allocation of parameters of reality under request time, judge whether to user distribute institute
Resource to be allocated is stated, it can be with are as follows:
If resource to be allocated is the second class resource, the second class resource for including in resource has been distributed according to user
Categorical measure determines the expection categorical measure of the second class resource corresponding to the user;According to resource acquisition request request time,
It is expected that the number of users of the second class resource with different classes of quantity in categorical measure and preset different time intervals
The ratio of the total user of Zhan determines the prospective users number of the current expected second class resource with expected categorical measure;If worked as
Actual user's number of the preceding second class resource with expected categorical measure is less than prospective users number, it is determined that distributes to user
Second class resource of new category.
As shown in figure 4, this method may include steps of:
Step 401, the resource acquisition request for obtaining user.
Step 402 has distributed resource according to corresponding to the user, and matched money to be allocated is requested in determining and resource acquisition
Source.
If step 403, resource to be allocated are the second class resource, include in resource second has been distributed according to user
The categorical measure of class resource determines the expection categorical measure of the second class resource corresponding to the user.
Wherein, competitive resource may include: the second class resource.It include at least two classifications in second class resource, wherein
The ratio of the total user of number of users Zhan of the second class resource with setting categorical measure in setting time section has upper limit value.
Upper limit value is according to the preset numerical value of active process.For example, can be 12 different classes of electronics cards in the second class resource.
The ratio of the total user of number of users Zhan of electronics card with setting categorical measure in setting time section has upper limit value.
For example, activity the 1st day, allow 40% participating user to hold 5 different classes of electronics cards, 10% user is allowed to hold
10 different classes of electronics cards.
If resource to be allocated is the second class resource, the second class resource for including in resource has been distributed according to user
Categorical measure determines the expection categorical measure of the second class resource corresponding to the user.For example, including in the resource of distribution of user
The second class resource categorical measure be 5, it is determined that the expection categorical measure of the second class resource corresponding to the user be 6.
Step 404, request time, expected categorical measure and preset different time area according to resource acquisition request
The ratio of the total user of number of users Zhan of interior the second class resource with different classes of quantity determines current expected in advance
The prospective users number of second class resource of phase categorical measure.
Wherein, the number of users Zhan for presetting the second class resource with different classes of quantity in different time intervals is always used
The ratio at family.According to the tool in the request time of resource acquisition request, expected categorical measure and preset different time intervals
There is the ratio of the total user of number of users Zhan of the second class resource of different classes of quantity, when obtaining corresponding with request time real-time
Between the second class resource with expected categorical measure under section the total user of number of users Zhan ratio and current total number of users,
Determine the prospective users number of the current expected second class resource with expected categorical measure.For example, corresponding with request time
The ratio of the total user of number of users Zhan of the 2nd day second class resource with expected categorical measure 6 is 50%, current total user
Number is 100000, it is determined that obtaining the current prospective users number for being expected the second class resource with expected categorical measure 6 is
50000。
Fig. 5 is the variation rule of the ratio of the total user of number of users Zhan for one kind the second class resource that the embodiment of the present disclosure provides
The schematic diagram of rule.As unit of day, x-axis indicates the ratio of the total user of number of users Zhan of corresponding second class resource daily
CardsRate (d, i), y-axis indicate that corresponding participation activity number UserCount (d), any time area formula are daily
UserCount(d)*CardsRate(d,i).Assuming that d=1, i=6, then area 1 indicates to have 6 users effectively blocked on the 1st day
Number, area 1+ area 2+ area 3 indicate to have 6 numbers of users effectively blocked on the 2nd day.It was transitioned into from the 1st day the 2nd day, increases face
Product 2+ area 3.Area 3 can gradually be incremented by with number growth, so variation is smoother.Area 2 be as ratio adjusts,
The moment of ratio variation follows variation.
Optionally, according to the request time of resource acquisition request, expected categorical measure and preset different time intervals
The ratio of the total user of number of users Zhan of interior the second class resource with different classes of quantity determines current expected with expection
The prospective users number of second class resource of categorical measure, comprising:
Obtain real-time time section d corresponding with the request time t that resource acquisition is requested;According to expected categorical measure i, reality
When time interval d and the second class resource with different classes of quantity in preset different time intervals number of users
The ratio of the total user of Zhan obtains the number of users of the second class resource with expected categorical measure i in the d of real-time time section
The ratio CardsRate (d, i) of the total user of Zhan, and having in the previous historical time section d-1 of real-time time section d
It is expected that the ratio CardsRate (d-1, i) of the total user of number of users Zhan of the second class resource of categorical measure i;Inquiry and observation
The corresponding customer flow distribution map of duration obtains and tires out from the customer flow of starting point to the request time t of observation duration as real-time
Add flow Area (t), and obtains user's total flow Sum in the case where observing duration;According to following formula, determine that current expection has
The prospective users number A of second class resource of the expected categorical measure;
A=UserCount (d) * CardsRate (d, i)-userCount (d-1) * [CardsRate (d, i)-
CardsRate(d-1,i)]*[1-Area(t)/Sum];
Wherein, UserCount (d) is user number corresponding with real-time time section d, and userCount (d-1) is and reality
When time interval d the corresponding user number of previous historical time section d-1.
UserCount (d) is from the user number in the starting point to request time t of real-time time section d.userCount
It (d-1) is the corresponding user number of previous historical time section d-1.
It is expected with if actual user's number of step 405, the current second class resource with expected categorical measure is less than
Family number, it is determined that the second class resource of new category is distributed to user.
Wherein it is determined that being obtained after obtaining the prospective users number of the currently expected second class resource with expected categorical measure
Actual user's number of the current second class resource with expected categorical measure under request time is taken, it is relatively more current with pre-
Actual user's number of second class resource of phase categorical measure and the size of prospective users number.If current have expected classification
Actual user's number of second class resource of quantity is less than prospective users number, it is determined that the second class of new category is distributed to user
Resource;If available quantity allotted of the first kind resource under request time is equal to the reality quantity allotted of first kind resource,
Then determine the second class resource for not distributing new category to user.
Step 406, if so, resource to be allocated is supplied to user.
The technical solution of the present embodiment, by when competitive resource may include the second class resource, wherein in setting time
In section with setting categorical measure the second class resource the total user of number of users Zhan ratio have upper limit value, then according to
The categorical measure for having distributed the second class resource for including in resource at family, determines the expection class of the second class resource corresponding to the user
Other quantity;And determine the prospective users number of the current expected second class resource with expected categorical measure;If currently had
It is expected that actual user's number of the second class resource of categorical measure is less than prospective users number, it is determined that distribute new category to user
The second class resource, can be based on predesignated subscriber's ratio and active user total number of persons dynamic adjustresources quantity allotted, Ke Yiyou
Effect control active process.
Fig. 6 is a kind of flow chart for resource allocation methods that the embodiment of the present disclosure provides, and the present embodiment can be with above-mentioned one
Each optinal plan combines in a or multiple embodiments, in the present embodiment, includes according to having distributed in resource for user
The categorical measure of second class resource determines the expection categorical measure of the second class resource corresponding to the user, can be with are as follows: according to user
The categorical measure for having distributed the second class resource for including in resource and user resource acquisition chance quantity, determine and use
The expected categorical measure of at least two of the corresponding second class resource in family;If the current second class resource with expected categorical measure
Actual user's number be less than prospective users number, it is determined that user distribute new category the second class resource, comprising: such as
Fruit currently has actual user's number of the second class resource of at least two expected categorical measures respectively less than expected at least two
The corresponding prospective users number of categorical measure, then according to setting Selection Strategy, at least two expected classification numbers of the condition that meets
The expected categorical measure of target is chosen in amount;Second class of true directional user's distribution and the expected matched new category of categorical measure of target
Resource.
And according in the request time, expected categorical measure and preset different time intervals of resource acquisition request
The second class resource with different classes of quantity the total user of number of users Zhan ratio, determining current expected has expected class
The prospective users number of second class resource of other quantity, can be with are as follows: according to the request time of resource acquisition request, expected classification number
The total user's of number of users Zhan of amount and the second class resource with different classes of quantity in preset different time intervals
Ratio in the real-time time section where the acquisition request time, has the number of users of the second class resource of expected categorical measure
The ratio of the total user of Zhan is as object reference ratio;According to object reference ratio and request time, expected categorical measure is determined
Number of users Zhan total user of the second class resource under request time ratio as real-time scale;According to real-time scale, with
And active user sum corresponding with request time, determine prospective users number.
As shown in fig. 6, this method may include steps of:
Step 501, the resource acquisition request for obtaining user.
Step 502 has distributed resource according to corresponding to the user, and matched money to be allocated is requested in determining and resource acquisition
Source.
If step 503, resource to be allocated are the second class resource, the second class for including in resource has been distributed according to user
The categorical measure of resource and the resource acquisition chance quantity of user, determine at least the two of the second class resource corresponding to the user
A expected categorical measure.
Wherein, resource acquisition chance quantity is the number for the resource acquisition chance that preset user possesses in current time section
Amount.For example, can preset user has 2 resource acquisition chances during activity daily.Above-mentioned resource acquisition chance number
Amount can be packaged in the resource acquisition request of user's transmission, so that server is requested according to the resource acquisition, determined and used
The expected categorical measure of at least two of the corresponding second class resource in family.
If resource to be allocated is the second class resource, according to the class for having distributed the second class resource for including in resource of user
Other quantity and the resource acquisition chance quantity of user determine at least two expected classes of the second class resource corresponding to the user
Other quantity.For example, the categorical measure for having distributed the second class resource for including in resource of user is 5, the resource acquisition machine of user
Meeting quantity is 2, determines two expected categorical measures of the second class resource corresponding to the user: 6 and 7.
Step 504, request time, expected categorical measure and preset different time area according to resource acquisition request
The ratio of the total user of number of users Zhan of interior the second class resource with different classes of quantity, where the acquisition request time
In real-time time section, there is the ratio of the total user of number of users Zhan of the second class resource of expected categorical measure to join as target
Examine ratio.
Wherein, according to the request time of resource acquisition request, expected categorical measure, in preset different time intervals
In the ratio of the total user of number of users Zhan of the second class resource with different classes of quantity, inquire and where the acquisition request time
Real-time time section in, there is the ratio of the total user of number of users Zhan of the second class resource of expected categorical measure, as mesh
Mark refers to ratio.It is determined respectively, obtains at least two and be expected the corresponding object reference ratio of categorical measure.
Step 505, according to object reference ratio and request time, determine that the second class resource of expected categorical measure is being asked
The ratio of the total user of number of users Zhan under seeking time is as real-time scale.
Wherein, the corresponding relationship of the time interval in object reference ratio and real-time time section is pre-established.For example, root
Object reference ratio is divided equally according to the time interval in real-time time section, by object reference ratio and real-time time section
Ratio be used as refer to ratio increasing value.Current ratio increasing value is equal to the product with reference to ratio increasing value and request time.
By the corresponding object reference ratio in previous historical time section in the corresponding real-time time section of request time and current ratio
Increasing value is added, and the ratio of number of users Zhan total user of the second class resource of expected categorical measure under request time can be obtained
Example, as real-time scale.It is determined respectively, obtains at least two and be expected the corresponding real-time scale of categorical measure.
For example, real-time time section is 86400 seconds to 24 points since 0 point, object reference ratio is 10%.Time zone
Between be 1 second, request time be 1000 seconds, then current ratio increasing value be equal to reference to ratio increasing value 10%/86400 and request
Time 1000 seconds products 1/864.The corresponding object reference ratio in previous historical time section is 5%, then is expected categorical measure
The ratio of number of users Zhan total user of the second class resource under request time be equal to 5%+1/864.
Step 506, according to real-time scale and active user corresponding with request time sum, determine prospective users people
Number.
Wherein, the product of active user sum corresponding with request time and real-time scale is prospective users number.Point
It is not determined, obtains at least two and be expected the corresponding prospective users number of categorical measure.
If actual user's number of step 507, current the second class resource at least two expected categorical measures is equal
Meeting condition then according to setting Selection Strategy less than prospective users number corresponding at least two expection categorical measures
The expected categorical measure of target is chosen at least two expected categorical measures.
Wherein, at least two are respectively compared and is expected the corresponding prospective users number of categorical measure and currently at least two
It is expected that the size of actual user's number of the second class resource of categorical measure.If currently having at least two expected categorical measures
Actual user's number of the second class resource be respectively less than prospective users number corresponding at least two expected categorical measures, then press
According to setting Selection Strategy, the expected categorical measure of target is chosen at least two expected categorical measures of the condition that meets.Setting choosing
Take strategy can be to randomly select one at least two expected categorical measures, as the expected categorical measure of target.Setting choosing
Taking strategy can also be one minimum value of one maximum value of selection in the expected categorical measure or selection etc., the present embodiment
To this and it is not limited.
If only one in actual user's number of the second class resource currently at least two expected categorical measures
Less than prospective users number corresponding at least two expection categorical measures, then the prospective users people being less than actual user's number
The corresponding expected categorical measure of number is chosen for the expected categorical measure of target;If currently having at least two expected categorical measures
Actual user's number of the second class resource be all larger than and be equal to prospective users number corresponding at least two expected categorical measures,
It then determines not to the second class resource of user's distribution and the expected matched new category of categorical measure of target.
Step 508, the second class resource of true directional user distribution and the expected matched new category of categorical measure of target.
Wherein it is determined that the second class resource of user's distribution and the expected matched new category of categorical measure of target.For example, with
The categorical measure for having distributed the second class resource for including in resource at family is 5, and the expected categorical measure of the target of selection is 7, then really
Directional user distributes the second class resource of 2 new categories.
Step 509, if so, resource to be allocated is supplied to user.
The technical solution of the present embodiment passes through the resource acquisition chance quantity according to preset user, determining and user couple
The expected categorical measure of at least two of the second class resource answered;Respectively according to the request time of resource acquisition request, expected classification
The total user of number of users Zhan of the second class resource with different classes of quantity in quantity and preset different time intervals
Ratio, determine the ratio of number of users Zhan total user of the second class resource of expected categorical measure under request time as real
When ratio;And according to real-time scale and active user corresponding with request time sum, prospective users number is determined;Working as
Actual user's number of the preceding second class resource at least two expected categorical measures is respectively less than and at least two expected classifications
The corresponding prospective users number of quantity, then according to setting Selection Strategy, at least two expected categorical measures of the condition that meets
Choose the expected categorical measure of target;True directional user's distribution and the second class of the expected matched new category of categorical measure of target provide
Source, can resource acquisition chance quantity, active user total number of persons and predesignated subscriber's ratio dynamic adjustresources based on user
Quantity allotted can effectively control active process.
Fig. 7 is a kind of flow chart for resource allocation methods that the embodiment of the present disclosure provides, and the present embodiment can be with above-mentioned one
Each optinal plan combines in a or multiple embodiments.As shown in fig. 7, this method may include steps of:
Step 601, the resource acquisition request for obtaining user.
Step 602 has distributed resource according to corresponding to the user, and matched money to be allocated is requested in determining and resource acquisition
Source.
Step 603, the resource type for judging resource to be allocated execute S604 if resource to be allocated is competitive resource;
If resource to be allocated is non-competing resource, S605 is executed.
Step 604, according to available allocation of parameters of the resource to be allocated under the request time that resource acquisition is requested and
The allocated allocation of parameters of reality under request time judges whether to distribute resource to be allocated to user, if so, executing S606;
Otherwise, S607 is executed.
Resource to be allocated is directly supplied to user by step 605.
Resource to be allocated is supplied to user by step 606.
Step 607, the resource to be allocated distributed not successfully according to this, redefine new resource to be allocated, and return is held
Row S603.
Wherein, resource is being distributed according to corresponding to the user, matched resource to be allocated is requested in determining and resource acquisition
Later, further includes: if resource to be allocated is non-competing resource, resource to be allocated is directly supplied to user.
Optionally, non-competing resource includes: third class resource or the 4th class resource;Wherein, third class resource is user
The resource that could be obtained after getting first kind resource;4th class resource is the distribution resource of user.
Wherein, if user has obtained first kind resource, third class resource allocation can be given to the user;If user
First kind resource has not been obtained, then refusal gives third class resource allocation to the user.Optionally, the 4th class resource is having divided for user
With the resource in resource other than first kind resource.
Optionally, resource having been distributed according to corresponding to the user, matched resource to be allocated is requested in determining and resource acquisition,
Including at least one of following:
If it is determined that corresponding to the user distributed does not include first kind resource in resource, it is determined that requested with resource acquisition
Matched resource to be allocated is first kind resource, and first kind resource has scheduled distribution total amount.
If it is determined that corresponding to the user distributed in resource includes first kind resource and does not include third class resource, then really
It is third class resource that matched resource to be allocated is requested in fixed and resource acquisition, and third class resource is that user is getting first kind money
The resource that could be obtained behind source.
If it is determined that corresponding to the user distributed in resource includes first kind resource and third class resource, and distribute
The categorical measure for the second class resource for including in resource is less than classification total quantity corresponding with the second class resource, it is determined that resource obtains
Taking the matched resource to be allocated of request is the second class resource, includes at least two classifications in the second class resource, wherein in setting
Between the ratio of the total user of number of users Zhan of the second class resource with setting categorical measure in section there is upper limit value.
If it is determined that corresponding to the user distributed in resource includes first kind resource and third class resource, and distribute
The categorical measure for the second class resource for including in resource is equal to classification total quantity corresponding with the second class resource, it is determined that resource obtains
Taking the matched resource to be allocated of request is the 4th class resource, and the 4th class resource is the distribution resource of user.
Wherein, first kind resource, the second class resource, third class resource and the 4th class resource are to be arranged according to activity need
Resource.For example, truck activity in, one shares 14 different classes of electronics cards, will wherein one be chosen to be the first kind
Resource, one is chosen to be third class resource, remaining 12 are the second class resource.4th class resource is the electronic card that user has obtained
Card in board other than first kind resource.
Optionally, the resource to be allocated distributed not successfully according to this redefines new resource to be allocated, comprising: such as
This resource to be allocated for distributing not successfully of fruit is first kind resource, and corresponding to the user has distributed include in resource second
The categorical measure of class resource is less than classification total quantity corresponding with the second class resource, then redefining new resource to be allocated is the
Two class resources;If this resource to be allocated distributed not successfully is first kind resource, and corresponding to the user has distributed resource
In include the second class resource categorical measure be equal to classification total quantity corresponding with the second class resource, then redefine it is new to
Distribution resource is the 4th class resource;If this resource to be allocated distributed not successfully is the second class resource, redefine new
Resource to be allocated be the 4th class resource.
The technical solution of the present embodiment, by the resource to be allocated distributed not successfully according to this, redefine it is new to
Resource is distributed, resource to be allocated is executed if returned as competitive resource, is asked according to resource to be allocated what resource acquisition was requested
Available allocation of parameters under seeking time and the allocated allocation of parameters of the reality under request time judge whether to user point
Operation with resource to be allocated, or if resource to be allocated is non-competing resource, resource to be allocated is directly supplied to use
The operation at family, until success distributes a resource to user, it can be according to scheduled resource category and resource allocation policy, dynamic
Adjustresources distribution type and quantity.
Fig. 8 is a kind of structural schematic diagram for resource allocation device that the embodiment of the present disclosure provides, and the present embodiment is applicable to
The case where carrying out resource allocation.The device can realize that the device can be configured at calculating by the way of software and/or hardware
Machine equipment.As shown in figure 8, the apparatus may include:
Request module 701, resource determination module 702, first resource judgment module 703 and first resource provide module
704。
Wherein, request module 701, the resource acquisition for obtaining user are requested;Resource determination module 702, is used for
Resource is distributed according to corresponding to the user, matched resource to be allocated is requested in determining and resource acquisition;First resource judges mould
Block 703, if being competitive resource for resource to be allocated, according to resource to be allocated under the request time that resource acquisition is requested
Available allocation of parameters and the allocated allocation of parameters of reality under request time, judge whether to user distribute it is to be allocated
Resource;Allocation of parameters includes: quantity allotted and/or allocation proportion;First resource provides module 704, is used for if so, will be wait divide
User is supplied to resource.
The technical solution of the present embodiment, by having distributed resource according to corresponding to the user, determining and resource acquisition is requested
Matched resource to be allocated;If resource to be allocated is competitive resource, asked according to resource to be allocated what resource acquisition was requested
Available allocation of parameters under seeking time and the allocated allocation of parameters of the reality under request time judge whether to user point
With resource to be allocated;If so, resource to be allocated is supplied to user, solves prior art competitive resource distributional equity
And versatility is low, the problem of poor user experience, can distribute resource and in the request of resource acquisition request according to user
Allocation of parameters under time distributes competitive resource to user, increases reference factor when distribution competitive resource, optimizes existing
Competitive resource the method for salary distribution, improve competitive resource distributional equity, improve user experience.
Optionally, based on the above technical solution, competitive resource includes: first kind resource, and first kind resource has
Scheduled distribution total amount;
First resource judgment module 703 includes:
Quantity determines submodule, if being first kind resource for resource to be allocated, according to asking for resource acquisition request
Seeking time determines available quantity allotted of the first kind resource under request time;
First distribution sub module, if the reality quantity allotted for first kind resource can be less than with quantity allotted,
True directional user distributes first kind resource, and updates the reality of first kind resource quantity allotted.
Optionally, based on the above technical solution, quantity determines that submodule includes:
Flow diagram query unit is obtained for inquiring customer flow distribution map corresponding with duration is observed from observation duration
Starting point to request time customer flow as cumulative flow in real time, and obtain user's total flow in the case where observing duration;
Quantity determination unit, for total according to the available distribution under the preset associated real-time time section with request time
Amount, cumulative flow and user's total flow, determine available quantity allotted of the first kind resource under request time, when real-time in real time
Between section siding-to-siding block length and observe duration siding-to-siding block length match.
Optionally, based on the above technical solution, quantity determination unit includes:
Quantity determines subelement, and for according to formula: Expect (t)=L* (Area (t)/Sum) determines first kind resource
Available quantity allotted Expect (t) at request time t;
Wherein, L is the preset available distribution total amount under the associated real-time time section request time t, and Area (t) is
Cumulative flow in real time;Sum is user's total flow.
Optionally, based on the above technical solution, further includes:
Numerical value adjustment unit is adjusted the numerical value of request time for the chronomere according to setting, wherein when
Between unit be customer flow distribution map minimum unit.
Optionally, based on the above technical solution, competitive resource includes: the second class resource, is wrapped in the second class resource
Include at least two classifications, wherein there is the number of users of the second class resource of setting categorical measure to account in setting time section
The ratio of total user has upper limit value;
First resource judgment module 703 includes:
Quantity determines submodule, if being the second class resource for resource to be allocated, according to the distribution resource of user
In include the second class resource categorical measure, determine the expection categorical measure of the second class resource corresponding to the user;
Number determines submodule, request time for being requested according to resource acquisition, expected categorical measure and preset
The ratio of the total user of number of users Zhan of the second class resource with different classes of quantity in different time intervals determines current
It is expected that having the prospective users number of the second class resource of expected categorical measure;
Second distribution sub module, if for currently having actual user's number of the second class resource of expected categorical measure
Less than prospective users number, it is determined that distribute the second class resource of new category to user.
Optionally, based on the above technical solution, quantity determines that submodule includes:
Quantity determination unit, for the categorical measure for having distributed the second class resource for including in resource according to user, with
And the resource acquisition chance quantity of user, determine at least two expected categorical measures of the second class resource corresponding to the user;
Second distribution sub module includes:
Categorical measure selection unit, if the reality for the second class resource currently at least two expected categorical measures
Border user number is respectively less than prospective users number corresponding at least two expected categorical measures, then according to setting Selection Strategy,
The expected categorical measure of target is chosen at least two expected categorical measures of the condition that meets;
Resource determination unit, the second class for true directional user distribution and the expected matched new category of categorical measure of target
Resource.
Optionally, based on the above technical solution, number determines that submodule includes:
With reference to ratio acquisition unit, request time for being requested according to resource acquisition, expected categorical measure and default
Different time intervals in the second class resource with different classes of quantity the total user of number of users Zhan ratio, acquisition asks
In real-time time section where seeking time, there is the ratio of the total user of number of users Zhan of the second class resource of expected categorical measure
Example is used as object reference ratio;
Real-time scale acquiring unit, for determining expected categorical measure according to object reference ratio and request time
The ratio of number of users Zhan total user of the second class resource under request time is as real-time scale;
It is expected that number determination unit, for total according to real-time scale and active user corresponding with request time, really
Determine prospective users number.
Optionally, based on the above technical solution, real-time scale acquiring unit includes:
Flow diagram inquires subelement, for inquiring customer flow distribution map corresponding with duration is observed, obtains from when observation
The customer flow of long starting point to request time is used as cumulative flow in real time, and obtains user's total flow in the case where inquiring duration;
Ratio-dependent subelement, for according to object reference ratio, cumulative flow and user's total flow, to be determined real in real time
When ratio.
Optionally, based on the above technical solution, number determines that submodule includes:
Time interval acquiring unit, for obtaining real-time time section corresponding with the request time t of resource acquisition request
d;
Ratio acquisition unit, for according to expected categorical measure i, real-time time section d and preset different time area
The ratio of the total user of number of users Zhan of interior the second class resource with different classes of quantity obtains in real-time time section
The ratio CardsRate (d, i) of the total user of number of users Zhan of the second class resource with expected categorical measure i in d, and
The number of users of the second class resource with expected categorical measure i in the previous historical time section d-1 of real-time time section d
Measure the ratio CardsRate (d-1, i) of the total user of Zhan;
Flow acquiring unit is obtained for inquiring customer flow distribution map corresponding with duration is observed from observation duration
The customer flow of starting point to request time t are used as cumulative flow Area (t) in real time, and the user obtained in the case where observing duration always flows
Measure Sum;
User number determination unit, for determining current expected second with expected categorical measure according to following formula
The prospective users number A of class resource;
A=UserCount (d) * CardsRate (d, i)-userCount (d-1) * [CardsRate (d, i)-
CardsRate(d-1,i)]*[1-Area(t)/Sum];
Wherein, UserCount (d) is user number corresponding with real-time time section d, and userCount (d-1) is and reality
When time interval d the corresponding user number of previous historical time section d-1.
Optionally, based on the above technical solution, further includes:
Secondary resource provides module, if being non-competing resource for resource to be allocated, directly proposes resource to be allocated
Supply user.
Optionally, based on the above technical solution, non-competing resource includes: third class resource or the 4th class money
Source;
Wherein, third class resource is the resource that user could obtain after getting first kind resource;4th class resource is
The distribution resource of user.
Optionally, based on the above technical solution, resource determination module includes at least one of following:
The first kind determines submodule, for if it is determined that corresponding to the user distributed in resource does not include first kind money
Source, it is determined that requesting matched resource to be allocated with resource acquisition is first kind resource, and first kind resource has scheduled distribution
Total amount;
Third class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource and
It does not include third class resource, it is determined that requesting matched resource to be allocated with resource acquisition is third class resource, third class resource
The resource that could be obtained after getting first kind resource for user;
Second class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource with
And third class resource, and the categorical measure for having distributed the second class resource for including in resource is less than class corresponding with the second class resource
Other total quantity, it is determined that it is the second class resource that matched resource to be allocated is requested in resource acquisition, includes at least in the second class resource
Two classifications, wherein there is the total user of number of users Zhan of the second class resource of setting categorical measure in setting time section
Ratio have upper limit value;
4th class determines submodule, for if it is determined that it is corresponding to the user distributed in resource include first kind resource with
And third class resource, and the categorical measure for having distributed the second class resource for including in resource is equal to class corresponding with the second class resource
Other total quantity, it is determined that it is the 4th class resource that matched resource to be allocated is requested in resource acquisition, the 4th class resource be user
Distribute resource.
Optionally, based on the above technical solution, further includes:
Resource redefines module, for if it is not, the resource to be allocated then distributed not successfully according to this, redefines new
Resource to be allocated;
Secondary resource judgment module, if executing resource to be allocated for competitive resource, according to money to be allocated for returning
Available allocation of parameters of the source under the request time that resource acquisition is requested and the allocated distribution of the reality under request time
Parameter judges whether the operation that resource to be allocated is distributed to user, or if resource to be allocated is non-competing resource, directly
Resource to be allocated is supplied to the operation of user, until success distributes a resource to user.
Optionally, based on the above technical solution, resource redefines module and includes:
First determines submodule, if the resource to be allocated distributed not successfully for this is first kind resource, and with
The corresponding categorical measure for having distributed the second class resource for including in resource in family is less than classification sum corresponding with the second class resource
Amount, then redefining new resource to be allocated is the second class resource;
Second determines submodule, if the resource to be allocated distributed not successfully for this is first kind resource, and with
The corresponding categorical measure for having distributed the second class resource for including in resource in family is equal to classification sum corresponding with the second class resource
Amount, then redefining new resource to be allocated is the 4th class resource;
Third determines submodule, if being the second class resource for this resource to be allocated distributed not successfully, again
Determine that new resource to be allocated is the 4th class resource.
Resource provided by disclosure any embodiment point can be performed in resource allocation device provided by the embodiment of the present disclosure
Method of completing the square has the corresponding functional module of execution method and beneficial effect.
Fig. 9 is a kind of structural schematic diagram for equipment that the embodiment of the present disclosure provides.Fig. 9, which is shown, to be suitable for being used to realizing this public affairs
Open the block diagram of the example devices 812 of embodiment.The equipment 812 that Fig. 9 is shown is only an example, should not be to disclosure reality
The function and use scope for applying example bring any restrictions.
As shown in figure 9, equipment 812 is showed in the form of universal computing device.The component of equipment 812 may include but unlimited
In one or more processor or processing unit 816, system storage 828, different system components (including system is connected
Memory 828 and processing unit 816) bus 818.
Bus 818 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Equipment 812 typically comprises a variety of computer system readable media.These media can be it is any can be by equipment
The usable medium of 812 access, including volatile and non-volatile media, moveable and immovable medium.
System storage 828 may include the computer system readable media of form of volatile memory, such as deposit at random
Access to memory (RAM) 830 and/or cache memory 832.Equipment 812 may further include other removable/not removable
Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 834 can be used for read and write can not
Mobile, non-volatile magnetic media (Fig. 9 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 9, Ke Yiti
For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light
The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver
It can be connected by one or more data media interfaces with bus 818.Memory 828 may include that at least one program produces
Product, the program product have one group of (for example, at least one) program module, and it is each that these program modules are configured to perform the disclosure
The function of embodiment.
Program/utility 840 with one group of (at least one) program module 842, can store in such as memory
In 828, such program module 842 includes --- but being not limited to --- operating system, one or more application program, other
It may include the realization of network environment in program module and program data, each of these examples or certain combination.Journey
Sequence module 842 usually executes function and/or method in disclosure described embodiment.
Equipment 812 can also be logical with one or more external equipments 814 (such as keyboard, sensing equipment, display 824 etc.)
Letter, can also be enabled a user to one or more equipment interact with the equipment 812 communicate, and/or with make the equipment 812
Any equipment (such as network interface card, modem etc.) that can be communicated with one or more of the other calculating equipment communicates.This
Kind communication can be carried out by input/output (I/O) interface 822.Also, equipment 812 can also by network adapter 820 with
One or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.Such as
Shown in figure, network adapter 820 is communicated by bus 818 with other modules of equipment 812.It should be understood that although not showing in Fig. 9
Out, other hardware and/or software module can be used with bonding apparatus 812, including but not limited to: microcode, device driver, superfluous
Remaining processing unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 816 by the program that is stored in system storage 828 of operation, thereby executing various function application with
And data processing, such as realize resource allocation methods provided by the embodiment of the present disclosure.That is, the resource acquisition for obtaining user is asked
It asks;Resource is distributed according to corresponding to the user, matched resource to be allocated is requested in determining and resource acquisition;If money to be allocated
Source is competitive resource, then the available allocation of parameters according to resource to be allocated under the request time that resource acquisition is requested and is asking
The allocated allocation of parameters of reality under seeking time judges whether to distribute resource to be allocated to user;If so, by money to be allocated
Source is supplied to user;Allocation of parameters includes: quantity allotted and/or allocation proportion.
The embodiment of the present disclosure additionally provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
The resource allocation methods as provided by the embodiment of the present disclosure are realized when sequence is executed by processor, this method can specifically include: obtain
Take the resource acquisition request at family;Resource is distributed according to corresponding to the user, determining and resource acquisition request is matched wait divide
With resource;If resource to be allocated is competitive resource, according to resource to be allocated under the request time that resource acquisition is requested
Allocation of parameters and the allocated allocation of parameters of reality under request time can be used, judges whether to distribute money to be allocated to user
Source;If so, resource to be allocated is supplied to user;Allocation of parameters includes: quantity allotted and/or allocation proportion.
The computer storage medium of the embodiment of the present disclosure, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (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 this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the disclosure operation computer
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Ruby, Go further include conventional procedural programming language-such as " C " language or similar programming language.Program
Code can be executed fully on the user computer, partly be executed on the user computer, as an independent software
Packet executes, part executes on the remote computer or completely in remote computer or server on the user computer for part
Upper execution.In situations involving remote computers, remote computer can pass through the network of any kind --- including local
Net (LAN) or wide area network (WAN)-are connected to subscriber computer, or, it may be connected to outer computer (such as using because of spy
Service provider is netted to connect by internet).
Note that above are only the preferred embodiment and institute's application technology principle of the disclosure.It will be appreciated by those skilled in the art that
The present disclosure is not limited to specific embodiments described here, be able to carry out for a person skilled in the art it is various it is apparent variation,
The protection scope readjusted and substituted without departing from the disclosure.Therefore, although being carried out by above embodiments to the disclosure
It is described in further detail, but the disclosure is not limited only to above embodiments, in the case where not departing from disclosure design, also
It may include more other equivalent embodiments, and the scope of the present disclosure is determined by the scope of the appended claims.