CN112862293A - Resource allocation method, device, storage medium and electronic equipment - Google Patents

Resource allocation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112862293A
CN112862293A CN202110139282.3A CN202110139282A CN112862293A CN 112862293 A CN112862293 A CN 112862293A CN 202110139282 A CN202110139282 A CN 202110139282A CN 112862293 A CN112862293 A CN 112862293A
Authority
CN
China
Prior art keywords
resource
user
allocated
amount
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110139282.3A
Other languages
Chinese (zh)
Inventor
刘超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanhai Information Technology Shanghai Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202110139282.3A priority Critical patent/CN112862293A/en
Publication of CN112862293A publication Critical patent/CN112862293A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0239Online discounts or incentives

Abstract

The embodiment of the specification sets the total resource amount and the specified amount of a first resource by a first user, divides the first resource into the specified amount of resources to be allocated by a server, adds the resources to be allocated into a resource pool, generates address information corresponding to the resource pool and returns the address information to the first user, the first user distributes the address information to second users, the second users send distribution requests to the server based on the received address information, the server distributes the resources to be allocated in the resource pool to the second users, and then the second users are allowed to use the resources to be allocated aiming at the objects specified by the first users, the second users are not allowed to use the resources to be allocated aiming at the objects not specified by the first users, and the resource allocation mode can be diversified.

Description

Resource allocation method, device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource allocation method, an apparatus, a storage medium, and an electronic device.
Background
With the development of internet technology, distributable resources are more and more diverse. For example, in instant messaging software, money may be allocated to the user in the form of a red envelope.
However, for the e-commerce field, various coupons are also a distributable resource, and the distribution mode of the coupons is single at present.
Therefore, how to diversify the way of allocating resources is an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present disclosure provide a resource allocation method, a resource allocation apparatus, a storage medium, and an electronic device, so as to partially solve the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
a resource allocation method provided in this specification includes:
acquiring the total resource amount and the specified amount of first resources sent by a first user;
according to the total resource amount and the designated amount, dividing the first resource into the designated amount of resources to be allocated, and adding the resources to be allocated into a resource pool;
generating address information corresponding to the resource pool, and returning the address information to the first user;
receiving a distribution request carrying the address information sent by the first user;
distributing the address information to each second user according to the identifier of each second user carried in the distribution request;
and for each second user, when an allocation request sent by the second user based on the address information is received, allocating at least one resource to be allocated in the resource pool to the second user, wherein the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user.
Optionally, the obtaining of the total resource amount of the first resource sent by the first user specifically includes:
acquiring a second resource sent by a first user;
and determining the total resource amount of the acquired first resource corresponding to the second resource according to the acquired resource amount of the second resource and a preset resource amount conversion relation between the first resource and the second resource.
Optionally, the dividing the first resource into the specified number of resources to be allocated specifically includes:
according to the total resource amount and the designated amount, determining the average resource amount of the designated amount of resources to be allocated after the first resources are divided into the designated amount of resources to be allocated;
according to the average resource amount and a preset floating threshold value, randomly dividing the first resource into the specified amount of resources to be allocated; wherein an absolute value of a difference between the resource amount of each resource to be allocated and the average resource amount does not exceed the floating threshold.
Optionally, allocating at least one resource to be allocated in the resource pool to the second user specifically includes:
and judging whether the second user meets the pickup condition or not according to the pickup condition preset by the first user, and if so, allocating at least one resource to be allocated to the second user.
Optionally, the method further comprises:
when a use request which is sent by the second user and uses the resources to be allocated is received, whether an object which is carried in the use request and is aimed at the resources to be allocated is an object appointed by the first user is judged, if yes, the second user is allowed to use the resources to be allocated aiming at the object, and if not, the second user is not allowed to use the resources to be allocated aiming at the object.
Optionally, before allowing the second user to use the resource to be allocated for the usage object, the method further includes:
determining that the amount of resources required to be consumed by the object is greater than the amount of resources of the resources to be allocated.
Optionally, allocating at least one resource to be allocated in the resource pool to the second user specifically includes:
determining the time period for getting the resources to be allocated according to a preset first time length and the time when the total resource amount is obtained;
when an allocation request sent by the second user based on the address information is received in the pickup time period, allocating at least one resource to be allocated to the second user;
the method further comprises the following steps:
if the current time exceeds the pickup time period, determining the sum of the resource amount of the unallocated resources to be allocated as the residual resource amount;
determining a second resource corresponding to the first resource of the residual resource amount according to a preset resource amount conversion relation between the first resource and the second resource, and taking the second resource as the residual second resource;
and returning the residual second resources to the first user.
Optionally, before allowing the second user to use the resource to be allocated for the object, the method further includes:
determining the use time period of the resource to be allocated to the second user according to the preset second time length and the time of allocating the resource to be allocated to the second user;
determining that a use request which is sent by the second user and uses the resources to be allocated is received in the use time period;
the method further comprises the following steps:
for each second user, if the current time exceeds the use time period of the resources to be allocated to the second user, determining the resource quantity of the unused resources to be allocated of the second user as the unused resource quantity;
determining a second resource corresponding to the first resource of the unused resource amount as an unused second resource according to a preset resource amount conversion relation between the first resource and the second resource;
returning the unused second resource to the first user.
Optionally, the first resource is a coupon;
the resource amount of the first resource is the amount of the coupon;
the object is a commodity.
The present specification provides a resource allocation apparatus, including:
the acquisition module is used for acquiring the total resource amount and the specified amount of the first resource sent by the first user;
the dividing module is used for dividing the first resource into the specified quantity of resources to be allocated according to the total resource quantity and the specified quantity, and adding the resources to be allocated into a resource pool;
the generating module is used for generating address information corresponding to the resource pool and returning the address information to the first user;
a receiving module, configured to receive a distribution request carrying the address information sent by the first user;
the distribution module is used for distributing the address information to the second users according to the identification of the second users carried in the distribution request;
and the allocation module is used for allocating at least one resource to be allocated in the resource pool to each second user when receiving an allocation request sent by the second user based on the address information, wherein the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the resource allocation method described above.
The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the resource allocation method.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
in this embodiment of the present specification, a first user sets a total resource amount and a specified amount of a first resource, a server divides the first resource into the specified amount of resources to be allocated, adds the resources to be allocated to a resource pool, generates address information corresponding to the resource pool and returns the address information to the first user, the first user distributes the address information to each second user, the second user sends an allocation request to the server based on the received address information, the server allocates the resources to be allocated in the resource pool to the second user, and subsequently, the second user is allowed to use the resources to be allocated for an object specified by the first user, the second user is not allowed to use the resources to be allocated for an object not specified by the first user, and a manner of allocating the resources can be further diversified.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
fig. 1 is a schematic diagram of a method for allocating resources according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a resource allocation apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a method for allocating resources according to an embodiment of the present disclosure, including:
s100: the first terminal receives the total resource quantity and the designated quantity of the first resource set by the first user and sends the total resource quantity and the designated quantity to the server.
In an embodiment of the present specification, the first terminal is a terminal used by the first user. The first terminal can display a setting interface so that the first user can set the total resource quantity and the designated quantity of the first resource, and the total resource quantity and the designated quantity of the first resource set by the first user are sent to the server. The first resource described in this specification may be a coupon, and the total resource amount of the first resource is the total amount of the coupon.
Specifically, the first terminal may display a setting interface through an applet in an instant messaging Application (APP) for the first user to set a total resource amount and a specified amount of the first resource.
In addition, after the first user sets the total resource amount and the designated amount of the first resource, the first terminal can also judge whether the total resource amount and the designated amount of the first resource set by the first user meet preset constraint conditions, if so, the total resource amount and the designated amount of the first resource set by the first user are sent to the server, otherwise, the total resource amount and the designated amount of the first resource set by the first user are refused to be sent to the server, and the first user is prompted to reset the total resource amount and the designated amount of the first resource.
The constraint condition may be set according to actual needs, for example, when the first resource is a coupon, the constraint condition may be preset as: the total amount of the coupons is 1-200 yuan, and the designated number is 1-100.
S102: and acquiring the total resource amount and the specified amount of the first resource sent by the first user.
S104: and dividing the first resource into the specified number of resources to be allocated according to the total resource amount and the specified number, and adding the resources to be allocated into a resource pool.
In this embodiment of the present specification, after receiving the total resource amount and the specified amount of the first resource sent by the first terminal, the server may randomly divide the first resource into the specified amount of resources to be allocated, that is, the resource amount of each resource to be allocated is randomly divided from the total resource amount, and the sum of the resource amounts of all the resources to be allocated is equal to the total resource amount.
Specifically, the server may determine, according to the total resource amount and the specified amount, an average resource amount of the specified amount of resources to be allocated after the first resource is divided into the specified amount of resources to be allocated, and then randomly divide the first resource into the specified amount of resources to be allocated according to the average resource amount and a preset floating threshold, where an absolute value of a difference between the resource amount of each resource to be allocated and the average resource amount does not exceed the floating threshold.
For example, if the total amount of the coupons set by the first user is 200 yuan and the specified number is 100, the server determines that after the coupons with the total amount of 200 yuan are divided into 100 coupons, the average amount of each coupon is 2 yuan, and if the floating threshold is 0.5 yuan, the coupons with the total amount of 200 yuan are randomly divided into 100 coupons with the amount of 2 ± 0.5 yuan.
Specifically, the preset floating threshold may be determined according to a preset percentage, and specifically, the floating threshold may be determined according to a product of the average resource amount and the preset percentage. For example, if the predetermined percentage in the above example may be 25%, then the floating threshold may be determined to be 0.5 dollars since the average amount is 2 dollars.
After the server divides the first resource into the specified number of resources to be allocated, all the resources to be allocated may be added to the resource pool, specifically, the resource pool may be a resource pool created for the first user, or may be a common resource pool, and if all the resources to be allocated are added to the common resource pool, the corresponding relationship between each resource to be allocated and the first user needs to be recorded.
S106: and generating address information corresponding to the resource pool, and returning the address information to the first user.
After the server adds the Resource to be allocated to the Resource pool, address information corresponding to the Resource pool may be generated, where the address information may be a Universal Resource Locator (URL) or a link in another form.
And after the address information is generated, returning the address information to the first terminal used by the first user.
S108: and the first terminal receives the address information returned by the server and determines each second user selected by the first user according to the operation of the first user.
S110: and the first terminal generates a distribution request carrying the address information and the identifier of the second user aiming at each second user, and sends the distribution request to the server.
S112: and the server receives a distribution request carrying the address information sent by the first user.
S114: and the server distributes the address information to the second users according to the identification of the second users carried in the distribution request.
After the first terminal receives the address information returned by the server, the first user can distribute the address information to each second user. Specifically, the first user may select the identifier of the second user that the first user wants to distribute through the address book of the instant messaging APP, and of course, the first user may also select the identifier of the user group, and if the identifier of the user group is selected, all users in the user group are the second user.
And the first terminal generates a distribution request carrying the address information and the identification of the second user according to the identification of each second user selected by the first user, and sends the distribution request to the server, so that the server distributes the address information to the second user through the instant messaging APP according to the identification of the second user carried in the distribution request.
S116: and the second terminal receives and displays the address information, generates an allocation request when receiving the operation of the second user on the displayed address information, and sends the allocation request to the server.
In this embodiment, the second terminal is a terminal used by the second user, and after receiving the address information sent by the server, the second terminal may be displayed to the second user, and the second user may click the address information, so that the second terminal generates the allocation request and sends the allocation request to the server.
S118: and for each second user, when the server receives an allocation request sent by the second user based on the address information, allocating at least one resource to be allocated in the resource pool to the second user, wherein the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user.
When a server receives an allocation request sent by a second user based on the address information, a resource pool corresponding to the address information can be determined according to the address information carried in the allocation request, and then at least one resource to be allocated in the resource pool is allocated to the second user.
Specifically, before allocating at least one resource to be allocated in the resource pool to the second user, the server may first determine whether the second user meets the pickup condition according to a pickup condition preset by the first user, if so, allocate the at least one resource to be allocated in the resource pool to the second user, and otherwise, refuse to allocate the resource to be allocated in the resource pool to the second user. The pickup condition set by the first user may also be set in the setting interface described in step S100.
It should be noted that, in this embodiment of the present disclosure, the resource to be allocated, which is allocated to the second user by the server, is actually split from the first resource sent by the first user, and therefore, the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user. That is, subsequently, when the server receives a usage request sent by the second user for using the resource to be allocated, it is determined whether an object to which the resource to be allocated carried in the usage request is directed is an object specified by the first user, if so, the second user is allowed to use the resource to be allocated for the object, and if not, the second user is not allowed to use the resource to be allocated for the object.
That is, in step S100, the first user may set a specified object in the setting interface in addition to the total resource amount, the specified amount, and the pickup condition of the first resource. In step S106, when the server generates the address information corresponding to the resource pool, a picture link including an image of the specified object may be generated according to the specified object, and the picture link points to the resource pool, so that when the picture link is subsequently distributed to a second user, the second user may intuitively know, according to the image included in the picture link, the object allowed to be used by the resource to be distributed.
For example, the first user sets the total amount of the coupon, the number of the coupon, the coupon pickup condition and the specified goods in the setting interface, and after the second user is assigned to the coupon, the coupon can only be used for purchasing the specified goods, but not used for purchasing other goods.
Because the prior art is generally limited to coupons with fixed limits when distributing the coupons, and the second user can only receive the coupons at a platform or a merchant, through the resource distribution method, the first user can set the total limit and the number of the coupons of the coupon, and send address information to each second user through the instant messaging APP, so that the second user can obtain the coupons with random limits through the address information, and the way of obtaining the coupons is more diversified.
Further, in step S102, when the server obtains the total resource amount of the first resource sent by the first user, the server may specifically obtain the second resource sent by the first user, and determine the total resource amount of the first resource corresponding to the obtained second resource according to the obtained resource amount of the second resource and a preset resource amount conversion relationship between the first resource and the second resource.
For example, the first resource is a coupon, the second resource is an amount, in step S100, the first user may directly input the total amount into the setting interface and send the total amount to the server through the first terminal, and the server determines the total amount of the coupon corresponding to the total amount input by the first user according to the total amount and the conversion relationship between the amount of the coupon and the amount of money. If the conversion relation between the amount and the coupon limit is 1:1, if the total amount input by the first user is 200 yuan, the total limit of the coupon determined by the server is also 200 yuan.
In addition, in step S118, when the server allocates the resource to be allocated in the resource pool to a certain second user, a pickup time period of the resource to be allocated may also be determined according to a preset first time length and a time when the total resource amount of the first resource is acquired, and when an allocation request sent by the second user based on the address information is received in the pickup time period, at least one resource to be allocated in the resource pool corresponding to the address information is allocated to the second user. And if the current time exceeds the receiving time period, determining the sum of the resource amount of the unallocated resources to be allocated as the residual resource amount, determining a second resource corresponding to the first resource of the residual resource amount as the residual second resource according to the preset resource amount conversion relation between the first resource and the second resource, and returning the residual second resource to the first user.
For example, assuming that the preset first time length is 24 hours, and the time for acquiring the total resource amount of the first resource is 16 points at 2 month and 1 day 2020, it may be determined that the pickup time period of each resource to be allocated, which is divided from the first resource, is 16 points at 2 month and 1 day 2020 to 16 points at 2 month and 2 day 2020, and if an allocation request sent by the second user is received in the pickup time period, the resource to be allocated is allocated to the second user, otherwise, the resource to be allocated is determined to be allocated to the second user. If the current time exceeds the receiving time period, determining the sum of the resource quantity of the resources to be allocated which are not received, namely the residual resource quantity. And if the remaining resource amount is the coupon with the 50 yuan amount and the conversion relation between the coupon amount and the money amount is 1:1, determining that the remaining second resource is the money amount of 50 yuan, and returning the money amount of 50 yuan to the first user.
Since the first resource is a coupon, in this specification embodiment, the lifetime of the coupon may also be set. Specifically, when judging whether the second user is allowed to use the resource to be allocated for a certain object, the server may determine a time period of use of the resource to be allocated, which is allocated to the second user, according to a preset second time length and a time at which the resource to be allocated is allocated to the second user; and judging whether a use request which is sent by the second user and uses the resources to be allocated is received in the use time period, if so, allowing the second user to use the resources to be allocated aiming at the object, otherwise, not allowing the second user to use the resources to be allocated aiming at the object. The second time period may also be set as desired, for example, to 48 hours.
In addition, for each second user, if the current time exceeds the usage time period of the resources to be allocated to the second user, determining the resource amount of the unused resources to be allocated of the second user as an unused resource amount, determining a second resource corresponding to the first resource of the unused resource amount according to a preset resource amount conversion relation between the first resource and the second resource as an unused second resource, and returning the unused second resource to the first user.
When the server determines whether to allow the second user to use the resource to be allocated for a certain object, the server may further determine whether the amount of the resource required to be consumed by the object is greater than the amount of the resource to be allocated for the second user, if so, the second user is allowed to use the resource to be allocated for the object, otherwise, the second user is not allowed to use the resource to be allocated for the object.
After the second user uses the resource to be allocated for the object specified by the first user, for example, after the second user purchases the commodity usage coupon specified by the first user, if a full refund request of the second user for the object is received, the resource to be allocated used by the second user is returned to the second user. It should be noted that the usage time period of the resource to be allocated returned to the second user is still unchanged.
For example, when the second user purchases a certain product specified by the first user using a coupon with the allocated amount limit of 2 units, and the product consumes 3 units in total, and receives a request for refunding the entire amount of the product from the second user, the second user is refunded with a coupon with the amount limit of 2 units in addition to the amount of 1 unit actually consumed by the second user, but the usage time period of the coupon with the amount limit of 2 units is not changed.
And if a part of refund requests of the second user for the object are received, determining the proportion of the resources to be allocated used by the second user according to the refund amount, determining the resources to be allocated actually used by the second user according to the proportion, finally converting the resources to be allocated actually used by the second user into the second resources according to the resource quantity conversion relation between the first resources and the second resources, and returning the second resources to the first user.
For example, the second user purchases a certain commodity specified by the first user by using a coupon with the allocated amount of 2 yuan, the commodity consumes 3 yuan totally, and if a part of refund requests of the second user for the commodity are received and the refund part is 1.5 yuan, the proportion of the resource to be allocated used by the second user is determined to be 50% according to the refund amount, so that the amount of the coupon actually used by the second user is determined to be 1 yuan according to the proportion, and the amount of the coupon actually used by the second user is converted into the amount of 1 yuan according to the resource amount conversion relationship between the amount of the coupon and the amount, and is returned to the first user.
Based on the same idea, the present specification further provides a corresponding apparatus, a storage medium, and an electronic device.
Fig. 2 is a schematic structural diagram of a resource allocation apparatus provided in an embodiment of the present specification, where the apparatus includes:
an obtaining module 201, configured to obtain a total resource amount and a specified amount of a first resource sent by a first user;
a dividing module 202, configured to divide the first resource into the specified number of resources to be allocated according to the total resource amount and the specified number, and add the resources to be allocated to a resource pool;
a generating module 203, configured to generate address information corresponding to the resource pool, and return the address information to the first user;
a receiving module 204, configured to receive a distribution request carrying the address information sent by the first user;
a distributing module 205, configured to distribute the address information to each second user according to an identifier of each second user carried in the distribution request;
an allocating module 206, configured to, for each second user, allocate, when receiving an allocation request sent by the second user based on the address information, at least one resource to be allocated in the resource pool to the second user, where the resource to be allocated only allows the second user to use the resource to be allocated for an object specified by the first user.
Optionally, the obtaining module 201 is specifically configured to obtain a second resource sent by a first user; and determining the total resource amount of the acquired first resource corresponding to the second resource according to the acquired resource amount of the second resource and a preset resource amount conversion relation between the first resource and the second resource.
Optionally, the dividing module 202 is specifically configured to, according to the total resource amount and the specified amount, determine an average resource amount of the specified amount of resources to be allocated after the first resource is divided into the specified amount of resources to be allocated; according to the average resource amount and a preset floating threshold value, randomly dividing the first resource into the specified amount of resources to be allocated; wherein an absolute value of a difference between the resource amount of each resource to be allocated and the average resource amount does not exceed the floating threshold.
Optionally, the allocating module 206 is specifically configured to determine whether the second user meets the pickup condition according to the pickup condition preset by the first user, and if so, allocate at least one resource to be allocated to the second user.
Optionally, the apparatus further comprises:
a processing module 207, configured to, when receiving a usage request sent by the second user and using a resource to be allocated, determine whether an object to which the resource to be allocated, carried in the usage request, is directed is an object specified by the first user, if yes, allow the second user to use the resource to be allocated for the object, and if not, disallow the second user to use the resource to be allocated for the object.
Optionally, the processing module 207 is further configured to determine that the amount of the resource required to be consumed by the object is greater than the amount of the resource to be allocated, before allowing the second user to use the resource to be allocated for the object.
Optionally, the allocating module 206 is specifically configured to determine, according to a preset first time length and a time when the total resource amount is obtained, a time period for getting the resource to be allocated; when an allocation request sent by the second user based on the address information is received in the pickup time period, allocating at least one resource to be allocated to the second user;
the device further comprises:
a returning module 208, configured to determine, if the current time exceeds the pickup time period, a sum of resource amounts of resources to be allocated that have not been allocated as a remaining resource amount; determining a second resource corresponding to the first resource of the residual resource amount according to a preset resource amount conversion relation between the first resource and the second resource, and taking the second resource as the residual second resource; and returning the residual second resources to the first user.
Optionally, the processing module 207 is further configured to, before allowing the second user to use the resource to be allocated for the object, determine a usage time period of the resource to be allocated to the second user according to a preset second time length and a time at which the resource to be allocated is allocated to the second user; determining that a use request which is sent by the second user and uses the resources to be allocated is received in the use time period;
the device further comprises:
a returning module 208, configured to determine, for each second user, a resource amount of an unused resource to be allocated of the second user as an unused resource amount if the current time exceeds the usage time period of the resource to be allocated to the second user; determining a second resource corresponding to the first resource of the unused resource amount as an unused second resource according to a preset resource amount conversion relation between the first resource and the second resource; returning the unused second resource to the first user.
Optionally, the first resource is a coupon;
the resource amount of the first resource is the amount of the coupon;
the object is a commodity.
The present specification also provides a computer readable storage medium storing a computer program which, when executed by a processor, is operable to perform the resource allocation method provided above.
Based on the resource allocation method provided above, the embodiment of the present specification further provides a schematic structural diagram of the electronic device shown in fig. 3. As shown in fig. 3, the drone includes, at the hardware level, a processor, an internal bus, a network interface, a memory, and a non-volatile memory, although it may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the resource allocation method.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (12)

1. A method for resource allocation, comprising:
acquiring the total resource amount and the specified amount of first resources sent by a first user;
according to the total resource amount and the designated amount, dividing the first resource into the designated amount of resources to be allocated, and adding the resources to be allocated into a resource pool;
generating address information corresponding to the resource pool, and returning the address information to the first user;
receiving a distribution request carrying the address information sent by the first user;
distributing the address information to each second user according to the identifier of each second user carried in the distribution request;
and for each second user, when an allocation request sent by the second user based on the address information is received, allocating at least one resource to be allocated in the resource pool to the second user, wherein the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user.
2. The method of claim 1, wherein obtaining the total resource amount of the first resource sent by the first user specifically comprises:
acquiring a second resource sent by a first user;
and determining the total resource amount of the acquired first resource corresponding to the second resource according to the acquired resource amount of the second resource and a preset resource amount conversion relation between the first resource and the second resource.
3. The method of claim 1, wherein the dividing the first resource into the specified number of resources to be allocated specifically comprises:
according to the total resource amount and the designated amount, determining the average resource amount of the designated amount of resources to be allocated after the first resources are divided into the designated amount of resources to be allocated;
according to the average resource amount and a preset floating threshold value, randomly dividing the first resource into the specified amount of resources to be allocated; wherein an absolute value of a difference between the resource amount of each resource to be allocated and the average resource amount does not exceed the floating threshold.
4. The method of claim 1, wherein allocating at least one resource to be allocated in the resource pool to the second user specifically comprises:
and judging whether the second user meets the pickup condition or not according to the pickup condition preset by the first user, and if so, allocating at least one resource to be allocated to the second user.
5. The method of claim 1, wherein the method further comprises:
when a use request which is sent by the second user and uses the resources to be allocated is received, whether an object which is carried in the use request and is aimed at the resources to be allocated is an object appointed by the first user is judged, if yes, the second user is allowed to use the resources to be allocated aiming at the object, and if not, the second user is not allowed to use the resources to be allocated aiming at the object.
6. The method of claim 5, wherein before allowing the second user to use the resource to be allocated for the usage object, the method further comprises:
determining that the amount of resources required to be consumed by the object is greater than the amount of resources of the resources to be allocated.
7. The method of claim 2, wherein allocating at least one resource to be allocated in the resource pool to the second user specifically comprises:
determining the time period for getting the resources to be allocated according to a preset first time length and the time when the total resource amount is obtained;
when an allocation request sent by the second user based on the address information is received in the pickup time period, allocating at least one resource to be allocated to the second user;
the method further comprises the following steps:
if the current time exceeds the pickup time period, determining the sum of the resource amount of the unallocated resources to be allocated as the residual resource amount;
determining a second resource corresponding to the first resource of the residual resource amount according to a preset resource amount conversion relation between the first resource and the second resource, and taking the second resource as the residual second resource;
and returning the residual second resources to the first user.
8. The method of claim 5, wherein before allowing the second user to use the resource to be allocated for the object, the method further comprises:
determining the use time period of the resource to be allocated to the second user according to the preset second time length and the time of allocating the resource to be allocated to the second user;
determining that a use request which is sent by the second user and uses the resources to be allocated is received in the use time period;
the method further comprises the following steps:
for each second user, if the current time exceeds the use time period of the resources to be allocated to the second user, determining the resource quantity of the unused resources to be allocated of the second user as the unused resource quantity;
determining a second resource corresponding to the first resource of the unused resource amount as an unused second resource according to a preset resource amount conversion relation between the first resource and the second resource;
returning the unused second resource to the first user.
9. The method of any of claims 1 to 8, wherein the first resource is a coupon;
the resource amount of the first resource is the amount of the coupon;
the object is a commodity.
10. A resource allocation apparatus, comprising:
the acquisition module is used for acquiring the total resource amount and the specified amount of the first resource sent by the first user;
the dividing module is used for dividing the first resource into the specified quantity of resources to be allocated according to the total resource quantity and the specified quantity, and adding the resources to be allocated into a resource pool;
the generating module is used for generating address information corresponding to the resource pool and returning the address information to the first user;
a receiving module, configured to receive a distribution request carrying the address information sent by the first user;
the distribution module is used for distributing the address information to the second users according to the identification of the second users carried in the distribution request;
and the allocation module is used for allocating at least one resource to be allocated in the resource pool to each second user when receiving an allocation request sent by the second user based on the address information, wherein the resource to be allocated only allows the second user to use the resource to be allocated for the object specified by the first user.
11. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when being executed by a processor, carries out the method of any of the preceding claims 1-9.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-9 when executing the program.
CN202110139282.3A 2021-02-01 2021-02-01 Resource allocation method, device, storage medium and electronic equipment Pending CN112862293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110139282.3A CN112862293A (en) 2021-02-01 2021-02-01 Resource allocation method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110139282.3A CN112862293A (en) 2021-02-01 2021-02-01 Resource allocation method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112862293A true CN112862293A (en) 2021-05-28

Family

ID=75987511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110139282.3A Pending CN112862293A (en) 2021-02-01 2021-02-01 Resource allocation method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112862293A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862205A (en) * 2022-05-10 2022-08-05 小米汽车科技有限公司 Resource allocation method, device, equipment and computer readable storage medium
CN114866547A (en) * 2022-04-20 2022-08-05 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium
CN114881546A (en) * 2022-07-08 2022-08-09 天聚地合(苏州)科技股份有限公司 Method and device for determining resource consumption

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866547A (en) * 2022-04-20 2022-08-05 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium
CN114866547B (en) * 2022-04-20 2023-09-29 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium
CN114862205A (en) * 2022-05-10 2022-08-05 小米汽车科技有限公司 Resource allocation method, device, equipment and computer readable storage medium
CN114881546A (en) * 2022-07-08 2022-08-09 天聚地合(苏州)科技股份有限公司 Method and device for determining resource consumption

Similar Documents

Publication Publication Date Title
CN112862293A (en) Resource allocation method, device, storage medium and electronic equipment
CN106899666B (en) Data processing method and device for service identification
CN110020912B (en) Page display method, device and equipment
CN107528885B (en) Service request processing method and device
CN111553699B (en) Resource scheduling method and device
CN109002357B (en) Resource allocation method and device and Internet of things system
CN108845876B (en) Service distribution method and device
CN108243032B (en) Method, device and equipment for acquiring service level information
CN107562496B (en) Method and device for page configuration and page display
CN107026897B (en) Data processing method, device and system
CN112181663A (en) Memory scheduling method and device and computer equipment
CN110675162A (en) Contract processing method, device and equipment
CN112839093A (en) Information display method and device, storage medium and electronic equipment
CN111402058B (en) Data processing method, device, equipment and medium
CN110276637B (en) Resource allocation method and device, and coupon allocation method and device
CN112764676B (en) Resource allocation system and method
CN108769152B (en) Service refresh policy registration method, service refresh request method, device and equipment
CN106548331B (en) Method and device for determining release sequence
CN112579292A (en) Resource allocation method and device
CN110008358B (en) Resource information display method and system, client and server
CN112306677A (en) Resource scheduling method and device
WO2020224256A1 (en) Identity confirmation
CN113344248A (en) Order allocation method, device, storage medium and electronic equipment
CN110570225A (en) Virtual cloud desktop use charging method, system, medium and electronic equipment
CN111221648A (en) Application sharing method, device and medium based on spread processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20220622

Address after: 200050 C201, 2nd floor, building 4, 492 Anhua Road, Changning District, Shanghai

Applicant after: HANHAI INFORMATION TECHNOLOGY SHANGHAI Co.,Ltd.

Address before: 100080 2106-030, 9 North Fourth Ring Road, Haidian District, Beijing.

Applicant before: BEIJING SANKUAI ONLINE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right