CN114155026A - Resource allocation method, device, server and storage medium - Google Patents

Resource allocation method, device, server and storage medium Download PDF

Info

Publication number
CN114155026A
CN114155026A CN202111449165.3A CN202111449165A CN114155026A CN 114155026 A CN114155026 A CN 114155026A CN 202111449165 A CN202111449165 A CN 202111449165A CN 114155026 A CN114155026 A CN 114155026A
Authority
CN
China
Prior art keywords
allocated
resource
account
resource allocation
virtual
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
CN202111449165.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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111449165.3A priority Critical patent/CN114155026A/en
Publication of CN114155026A publication Critical patent/CN114155026A/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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0224Discounts or incentives, e.g. coupons or rebates based on user history

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure relates to a resource allocation method, a resource allocation device, a server and a storage medium, and relates to the technical field of internet. The method comprises the following steps: receiving a resource allocation request sent by a terminal, wherein the resource allocation request comprises an identification of an account to be allocated and an identification of an interactive task, and the resource allocation request is used for requesting to allocate virtual resources corresponding to the interactive task to the account to be allocated; determining resource use parameters corresponding to the account to be allocated in a historical sliding time window, wherein the resource use parameters are used for representing the condition that the account to be allocated uses virtual resources in the historical sliding time window; and when the resource use parameter meets a preset allocation condition, determining to allocate the virtual resource corresponding to the interaction task to the account to be allocated. In the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource, so that the virtual resource can be reasonably and effectively allocated, and the resource utilization rate is improved.

Description

Resource allocation method, device, server and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource allocation method, an apparatus, a server, and a storage medium.
Background
Currently, a anchor may create coupon distribution campaigns in a live broadcast, and the server may then allocate virtual resources to accounts in the chronological order of the requests it receives (e.g., coupons may be distributed to accounts). Specifically, if the receiving time corresponding to the first request (the request sent by the first account) is before the receiving time corresponding to the second request (the request sent by the second account), the server determines to preferentially allocate the virtual resources to the first account.
However, the first account and/or the second account may not use the virtual resource after receiving (or being allocated to) the virtual resource, for example, the first user account does not use the coupon after acquiring the coupon. Thus, the allocation of virtual resources is not reasonable, which results in resource waste.
Disclosure of Invention
The present disclosure provides a resource allocation method, device, server and storage medium, which solve the technical problem in the prior art that an account allocated to a virtual resource may not use the virtual resource, so that the allocation of the virtual resource is unreasonable, and resource waste is caused.
The technical scheme of the embodiment of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a resource allocation method is provided. The method can comprise the following steps: receiving a resource allocation request sent by a terminal, wherein the resource allocation request comprises an identification of an account to be allocated and an identification of an interactive task, and the resource allocation request is used for requesting to allocate virtual resources corresponding to the interactive task to the account to be allocated; determining resource use parameters corresponding to the account to be allocated in a historical sliding time window, wherein the resource use parameters are used for representing the condition that the account to be allocated uses virtual resources in the historical sliding time window; and when the resource use parameter meets a preset allocation condition, determining to allocate the virtual resource corresponding to the interaction task to the account to be allocated.
Optionally, the resource usage parameter includes a resource usage rate, where the resource usage rate is a ratio of resource usage times to resource allocation times, the resource usage times are times that the account to be allocated uses virtual resources in the historical sliding time window, the resource allocation times are times that the account to be allocated is allocated with virtual resources in the historical sliding time window, and the preset allocation condition includes a usage rate threshold or more; when the resource usage parameter meets the preset allocation condition, determining to allocate the virtual resource corresponding to the interactive task to the account to be allocated specifically includes: when the resource utilization rate is greater than or equal to the utilization rate threshold value, determining to allocate the virtual resource corresponding to the interactive task to the account to be allocated
Optionally, the resource allocation method further includes: when the resource utilization rate is smaller than the utilization rate threshold, determining whether a resource allocation success rate of the account to be allocated corresponding to the historical sliding time window is smaller than or equal to a success rate threshold, wherein the resource allocation success rate is a ratio of the resource allocation times to resource request times, and the resource request times are times of requesting to allocate virtual resources to the account to be allocated in the historical sliding time window; and when the resource allocation success rate is smaller than or equal to the success rate threshold, determining to allocate the virtual resources corresponding to the interactive task for the account to be allocated.
Optionally, the resource allocation method further includes: and when the resource allocation success rate is greater than the success rate threshold value or the account to be allocated is allocated with the virtual resource corresponding to the interactive task, determining that the virtual resource of the account to be allocated corresponding to the interactive task remains unchanged.
Optionally, the determining the resource usage parameter corresponding to the account to be allocated in the historical sliding time window specifically includes: determining a first number of first target tasks in a plurality of interactive tasks which belong to the same virtual space in the historical sliding time window, wherein the first target tasks are interactive tasks which use virtual resources and correspond to the account to be allocated; determining a second number of second target tasks in the plurality of interactive tasks belonging to the same virtual space in the historical sliding time window, wherein the second target tasks are the interactive tasks which are corresponding to the account to be allocated and used for allocating virtual resources; the resource usage parameter is determined based on the first number and the second number.
Optionally, the resource allocation method further includes: if the number of the currently received resource allocation requests is larger than or equal to the number threshold, determining a resource allocation response sent to the terminal, wherein the resource allocation response is used for notifying the terminal that the virtual resource allocation corresponding to the interaction fails; the resource allocation response is sent to the terminal.
Optionally, the determining that the account to be allocated is before the resource usage parameter corresponding to the historical sliding time window further includes; when the received resource allocation request meets a preset processing condition, adding the resource allocation request to a target queue; the determining of the resource usage parameter corresponding to the account to be allocated in the historical sliding time window specifically includes: and determining resource use parameters corresponding to the account to be allocated in the historical sliding time window according to the queue sequence of the resource allocation requests in the target queue.
Optionally, the resource allocation method further includes: and when the preset resource allocation time of the interactive task is reached every time, allocating virtual resources corresponding to the interactive task to the account to be allocated, wherein each interactive task corresponds to at least one preset resource allocation time.
According to a second aspect of the embodiments of the present disclosure, a resource allocation apparatus is provided. The resource allocation apparatus may include: a receiving module and a determining module; the receiving module is configured to receive a resource allocation request sent by a terminal, where the resource allocation request includes an identifier of an account to be allocated and an identifier of an interactive task, and the resource allocation request is used to request allocation of virtual resources corresponding to the interactive task for the account to be allocated; the determining module is configured to determine resource usage parameters corresponding to the account to be allocated in a historical sliding time window, wherein the resource usage parameters are used for representing the condition that the account to be allocated uses virtual resources in the historical sliding time window; the determining module is further configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource usage parameter meets a preset allocation condition.
Optionally, the resource usage parameter includes a resource usage rate, where the resource usage rate is a ratio of resource usage times to resource allocation times, the resource usage times are times that the account to be allocated uses virtual resources in the historical sliding time window, the resource allocation times are times that the account to be allocated is allocated with virtual resources in the historical sliding time window, and the preset allocation condition includes a usage rate threshold or more; the determining module is specifically configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource usage rate is greater than or equal to the usage rate threshold.
Optionally, the determining module is further configured to determine, when the resource usage rate is smaller than the usage rate threshold, whether a resource allocation success rate of the account to be allocated in the historical sliding time window is smaller than or equal to a success rate threshold, where the resource allocation success rate is a ratio of the resource allocation times to resource request times, and the resource request times are times of requesting allocation of virtual resources to the account to be allocated in the historical sliding time window; the determining module is further configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource allocation success rate is less than or equal to the success rate threshold.
Optionally, the determining module is further configured to determine that the virtual resources of the account to be allocated corresponding to the interactive task remain unchanged when the resource allocation success rate is greater than the success rate threshold, or the account to be allocated with the virtual resources corresponding to the interactive task has already been allocated.
Optionally, the determining module is specifically configured to determine, in the historical sliding time window and among multiple interactive tasks belonging to the same virtual space, a first number of first target tasks, where the first target tasks are interactive tasks using virtual resources corresponding to the account to be allocated; the determining module determines a second number of second target tasks from a plurality of interactive tasks within the historical sliding time window and belonging to the same virtual space, wherein the second target tasks are interactive tasks which are corresponding to the account to be allocated and used for allocating virtual resources; the determination module is further specifically configured to determine the resource usage based on the first quantity and the second quantity.
Optionally, the resource allocation apparatus further includes a sending module; the determining module is further configured to determine a resource allocation response sent to the terminal if the number of the currently received resource allocation requests is greater than or equal to a number threshold, where the resource allocation response is used to notify the terminal that the virtual resource allocation corresponding to the interactive task fails; the transmitting module is configured to transmit the resource allocation response to the terminal.
Optionally, the resource allocation apparatus further includes a processing module; the processing module is configured to add the resource allocation request to a target queue when the received resource allocation request meets a preset processing condition; the determining module is specifically configured to determine resource usage parameters corresponding to the account to be allocated in the historical sliding time window according to the queue order of the resource allocation requests in the target queue.
Optionally, the processing module is configured to allocate, to the account to be allocated, a virtual resource corresponding to the interactive task when the preset resource allocation time of the interactive task is reached each time, where each interactive task corresponds to at least one preset resource allocation time.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, which may include: a processor and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the above-described optional resource allocation methods of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having instructions stored thereon, which, when executed by a server, enable the server to perform any one of the above-mentioned optional resource allocation methods of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when run on a server, cause the server to perform the method of optionally allocating resources as in any one of the first aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
based on any one of the above aspects, in the present disclosure, the server may receive a resource allocation request sent by the terminal, and determine a resource usage parameter corresponding to the account to be allocated in the historical sliding time window. Because the resource usage rate is used for representing the condition that the account to be allocated uses the virtual resources in the historical sliding time window, when the resource usage parameter meets the preset allocation condition, it indicates that the resource usage parameter is higher, that is, the account to be allocated often uses the virtual resources. In this way, the server may determine to allocate the virtual resource corresponding to the interaction task to the account to be allocated. In the embodiment of the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource, so that the virtual resource can be reasonably and effectively allocated, and the resource utilization rate is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a schematic diagram of a resource allocation system provided by an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a resource allocation method provided by an embodiment of the present disclosure;
fig. 3 is a schematic flow chart illustrating a further resource allocation method provided by the embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a further resource allocation method provided by the embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a further resource allocation method provided by an embodiment of the present disclosure;
fig. 6 is a flowchart illustrating a further resource allocation method provided by an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating a further resource allocation method provided by an embodiment of the present disclosure;
fig. 8 is a flowchart illustrating a further resource allocation method provided by the embodiment of the present disclosure;
fig. 9 is a flowchart illustrating a further resource allocation method provided by an embodiment of the present disclosure;
fig. 10 is a flowchart illustrating a further resource allocation method provided by the embodiment of the present disclosure;
fig. 11 is a schematic structural diagram illustrating a resource allocation apparatus according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram illustrating a further resource allocation apparatus provided in an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and/or components.
The data to which the present disclosure relates may be data that is authorized by a user or sufficiently authorized by parties.
As described in the background, since the account allocated to the virtual resource may not be applicable to the virtual resource in the related art, that is, the allocation of the virtual resource is not reasonable, resource waste is caused. Based on this, the embodiments of the present disclosure provide a resource allocation method, where a server may determine to allocate virtual resources corresponding to an interactive task for an account (for example, the account to be allocated) that frequently uses the virtual resources, so as to allocate the virtual resources reasonably and effectively, and improve the resource utilization rate.
The resource allocation method, the resource allocation device, the server and the storage medium provided by the embodiment of the disclosure are applied to a scene of allocating virtual resources (or acquiring virtual resources). When the server receives a resource allocation request sent by the terminal, the virtual resource corresponding to the interactive task allocated to the account to be allocated can be determined according to the method provided by the embodiment of the disclosure.
The resource allocation method provided by the embodiment of the present disclosure is exemplarily described below with reference to the accompanying drawings:
fig. 1 is a schematic view of a resource allocation system according to an embodiment of the present disclosure, as shown in fig. 1, the resource allocation system may include a terminal 101 and a server 102, and the terminal 101 may establish a connection with the server 102 through a wired network or a wireless network.
The terminal 101 may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, and other devices that can install and use a content community application (e.g., a fast hand), and the specific form of the terminal 101 is not particularly limited in this disclosure. The system can be used for man-machine interaction with a user through one or more modes of a keyboard, a touch pad, a touch screen, a remote controller, voice interaction or handwriting equipment and the like.
Specifically, the terminal 101 may send a resource allocation request to the server 102, so that after receiving the resource allocation request sent by the terminal 101, the server 102 may determine whether to allocate virtual resources corresponding to the interactive task to the account to be allocated.
As shown in fig. 2, when the resource allocation method is applied to the server 102 described above, the resource allocation method may include S101-S103.
S101, the server receives a resource allocation request sent by the terminal.
The resource allocation request comprises an identification of an account to be allocated and an identification of an interactive task, and the resource allocation request is used for requesting allocation of virtual resources corresponding to the interactive task for the account to be allocated.
It should be understood that the terminal may send the resource allocation request to the server in response to a certain processing instruction, so that the server may receive the resource allocation request. Specifically, the processing instruction may be actively triggered by a user corresponding to the account to be identified, that is, the user actively sends the resource allocation request to the server based on the terminal.
It should be noted that the virtual resource in the embodiment of the present disclosure may be a virtual article (for example, a virtual coin, a rechargeable battery, a virtual character, or a game virtual equipment); the virtual item may also be a virtual fund (e.g., an electronic red envelope, an electronic voucher, electronic coupon, or the like); the virtual object may also be a multimedia resource (e.g., a movie, music, a document, a picture, etc.), and the specific form of the virtual resource is not limited in the embodiments of the present disclosure.
It can be understood that the interactive task is a task for allocating virtual resources, and specifically, virtual resources corresponding to the interactive task are allocated to different accounts. For example, assuming that the virtual resource is an electronic coupon, the interactive task is a task for distributing the electronic coupon, and may also be understood as an electronic coupon credit activity, and the electronic coupon credit activity (i.e., the interactive task) may be created by a director in a live broadcast of the electronic coupon.
S102, the server determines resource use parameters corresponding to the account to be allocated in the historical sliding time window.
And the resource use parameter is used for representing the condition that the account to be allocated uses the virtual resource in the historical sliding time window.
It should be understood that the historical sliding time window is a historical period of time prior to the current time. Specifically, the historical time may be a period of time closest to the current time, for example, approximately 6 hours; the historical time may also be any period of time prior to the current time (e.g., day 1-day 2 of the last 3 days).
It should be noted that the time length corresponding to the history sliding time window may be a hour (a > 0), b days (b > 0), or c weeks (c > 0), and the like, and the time length corresponding to the history sliding time window is not specifically limited in the embodiments of the present disclosure.
S103, when the resource use parameters meet preset allocation conditions, the server determines to allocate virtual resources corresponding to the interactive tasks to the account to be allocated.
It should be understood that the above description indicates that the account to be allocated uses the virtual resource within the historical sliding time window, and may also be understood as a case that the account to be allocated uses the virtual resource after acquiring (or being allocated to) the virtual resource. Specifically, when the resource usage parameter meets the preset allocation condition, it is indicated that the usage condition of the account to be allocated to the virtual resource is better. In the embodiment of the present disclosure, when the account to be allocated has a better usage condition for the virtual resource, the server may determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated. That is, the server may allocate the virtual resource corresponding to the interactive task to the account that frequently uses the virtual resource (e.g., the account to be allocated).
In an implementation manner of the embodiment of the present disclosure, after determining that the virtual resource corresponding to the interactive task is allocated to the account to be allocated, the server may send the virtual resource corresponding to the interactive task to the terminal, so that the terminal may receive (or acquire) the virtual resource corresponding to the interactive task, that is, the account to be allocated is allocated to the virtual resource corresponding to the interactive task.
Optionally, when the resource usage parameter does not satisfy the preset allocation condition, it indicates that the usage of the virtual resource by the account to be allocated is poor, and it may also be understood that the virtual resource is not frequently used by the account to be allocated. At this time, the server may determine to allocate the virtual resource corresponding to the interaction task to the other account, that is, not allocate the virtual resource to the account to be allocated.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: as known from S101 to S103, the server may receive a resource allocation request sent by the terminal, and determine a resource usage parameter corresponding to the account to be allocated in the history sliding time window. Because the resource usage parameter is used to represent the condition that the account to be allocated uses virtual resources within the historical sliding time window, when the resource usage parameter meets the preset allocation condition, it indicates that the resource usage parameter is higher, that is, the account to be allocated often uses virtual resources. In this way, the server may determine to allocate the virtual resource corresponding to the interaction task to the account to be allocated. In the embodiment of the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource, so that the virtual resource can be reasonably and effectively allocated, and the resource utilization rate is improved.
With reference to fig. 2, as shown in fig. 3, in an implementation manner of the embodiment of the present disclosure, the resource usage parameter includes a resource usage rate, where the resource usage rate is a ratio of resource usage times to resource allocation times, the resource usage times are times of using virtual resources by the account to be allocated in the historical sliding time window, the resource allocation times are times of allocating virtual resources to the account to be allocated in the historical sliding time window, and the preset allocation condition includes being greater than or equal to a usage rate threshold. When the resource usage parameter meets the preset allocation condition, the server determines to allocate the virtual resource corresponding to the interactive task to the account to be allocated, including S1031.
And S1031, when the resource utilization rate is greater than or equal to the utilization rate threshold value, the server determines to allocate virtual resources corresponding to the interactive tasks to the account to be allocated.
It should be understood that the resource usage being greater than or equal to the usage threshold indicates that the resource usage is high. When the resource utilization rate is high, it indicates that the account to be allocated has a better use condition for the virtual resources, i.e. the account to be allocated often uses the virtual resources. In the embodiment of the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: as known from S1031, the resource usage rate may specifically characterize the condition that a certain account (for example, an account to be allocated) uses virtual resources within the historical sliding time window. When the resource utilization rate is greater than or equal to the utilization rate threshold value, it indicates that the resource utilization rate is high, that is, the account to be allocated often uses virtual resources. In this way, the server may determine to allocate the virtual resource corresponding to the interaction task to the account to be allocated. In the embodiment of the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource, so that the virtual resource can be reasonably and effectively allocated, and the resource utilization rate is improved.
With reference to fig. 3, as shown in fig. 4, the resource allocation method provided by the embodiment of the present disclosure may further include S104-S105.
And S104, when the resource utilization rate is smaller than the utilization rate threshold, the server determines whether the resource allocation success rate of the account to be allocated corresponding to the historical sliding time window is smaller than or equal to the success rate threshold.
The resource allocation success rate is the ratio of the resource allocation times to the resource request times, and the resource request times are the times of requesting allocation of virtual resources to the account to be allocated in the historical sliding time window.
In combination with the description of the foregoing embodiment, it should be understood that the resource usage rate is a resource usage rate corresponding to the account to be allocated in the historical sliding time window. When the resource utilization rate is smaller than the utilization rate threshold, it indicates that the resource utilization rate is low, that is, the account to be allocated has poor use of the virtual resource, and the account to be allocated does not use the virtual resource frequently.
It can be understood that the above-mentioned virtual resources that are rarely used by the account to be allocated can be divided into the following two cases:
in the first case, the account to be allocated is allocated with a smaller number of virtual resources within the historical sliding time window (i.e., the number of resource allocations is smaller). When the resource allocation times are less, the number of times that the account to be allocated uses the virtual resource in the historical sliding time window may also be correspondingly reduced, that is, the account to be allocated may have no chance (or there is less chance) to use the virtual resource, so that the account to be allocated does not use the virtual resource frequently.
The second case is that the resource allocation times are more, that is, the account to be allocated is allocated with virtual resources many times, the account to be allocated has a large opportunity to use the virtual resources within the historical sliding time window, but the account to be allocated does not use (or rarely uses) the virtual resources, so that it can be obtained that the account to be allocated does not use the virtual resources frequently.
In the embodiment of the present disclosure, the server determines whether the resource allocation success rate is less than or equal to the success rate threshold, that is, determines whether the account to be allocated belongs to any of the two cases. Specifically, when the resource allocation success rate is less than or equal to the success rate threshold, it indicates that the account to be allocated belongs to the first condition; correspondingly, when the resource allocation success rate is greater than the success rate threshold, it indicates that the account to be allocated belongs to the second case.
In an implementation manner of the embodiment of the present disclosure, the number of resource requests may also be understood as the number of resource allocation requests corresponding to the account to be allocated, which are received by the server within the historical sliding time window.
And S105, when the resource allocation success rate is smaller than or equal to the success rate threshold, the server determines to allocate the virtual resources corresponding to the interactive tasks for the account to be allocated.
In conjunction with the description of the above embodiments, it should be understood that the success rate of resource allocation is less than or equal to the success rate threshold, which indicates that the account to be allocated belongs to the first case mentioned above, i.e., the account to be allocated may not have an opportunity (or has a smaller opportunity) to use the virtual resource. Therefore, the server can improve the opportunity that the account to be allocated uses the virtual resources, namely, the virtual resources corresponding to the interactive task are determined to be allocated to the account to be allocated. It can be understood that, in the case that the account to be allocated is allocated to the virtual resource corresponding to the interactive task, the account to be allocated has an opportunity to use the virtual resource corresponding to the interactive task.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: S104-S105 show that when the resource utilization rate is smaller than the utilization rate threshold value, the account to be identified is not frequently using the virtual resource; the server may determine whether the resource allocation success rate of the account to be allocated corresponding to the historical sliding time window is less than or equal to a success rate threshold, that is, determine whether the reason that the account to be allocated does not use the virtual resource frequently is that the account to be allocated uses the virtual resource less frequently, or whether the account to be allocated has a large opportunity to use the virtual resource, but the account to be allocated does not use the virtual resource. When the resource allocation success rate is less than or equal to the success rate threshold, that is, when it is determined that the account to be allocated has less chance of using virtual resources, the server may increase the chance of using virtual resources by the account to be allocated, that is, it is determined that virtual resources corresponding to the interactive tasks are allocated to the account to be allocated. The real needs can be conveniently and accurately determined, the account using the virtual resources (such as the account to be allocated) can be used, the virtual resources can be allocated to the account, and the resource waste is reduced.
With reference to fig. 4, as shown in fig. 5, the resource allocation method provided by the embodiment of the present disclosure further includes S106.
S106, when the success rate of resource allocation is larger than the success rate threshold value or the account to be allocated is allocated with the virtual resource corresponding to the interactive task, the server determines that the virtual resource of the account to be allocated corresponding to the interactive task is kept unchanged.
With reference to the description of the foregoing embodiment, it should be understood that the resource allocation success rate is greater than the success rate threshold, which indicates that the account to be allocated has a large opportunity to use virtual resources within the historical sliding time window, but the account to be allocated does not use (or rarely uses) virtual resources, so that the server may determine that the size of the virtual resources of the interactive task allocated to the account to be allocated is 0. Before S106, if the virtual resource of the account to be allocated corresponding to the interactive task is 0 (that is, the server does not allocate the virtual resource of the interactive task to the account to be allocated), it indicates that the virtual resource of the account to be allocated corresponding to the interactive task remains unchanged, that is, the virtual resource is still 0.
In one implementation of the disclosed embodiments, one account (e.g., an account to be allocated) can only be allocated virtual resources once under one task (e.g., an interactive task). Specifically, if the account to be allocated has been allocated with the virtual resource corresponding to the interactive task, the server may determine that the size of the virtual resource of the interactive task that is reallocated to the account to be allocated is 0, that is, the server determines that the virtual resource corresponding to the interactive task is no longer repeatedly allocated to the account to be allocated, and the virtual resource of the account corresponding to the interactive task remains unchanged.
Illustratively, with reference to the example in S101, when the success rate of resource allocation is greater than the success rate threshold, the server determines that the number of the electronic coupons corresponding to the account to be identified in the electronic coupon melon allocation activity is 0. When the account to be distributed is distributed with the electronic coupons in the electronic coupon distribution activity, the server determines that the electronic coupons in the electronic coupon distribution activity are not distributed to the account to be distributed repeatedly.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: as can be seen from S106, when the success rate of resource allocation is greater than the success rate threshold, it indicates that the account to be allocated has a large opportunity to use virtual resources, but the account to be allocated does not use (or rarely uses) virtual resources, so that the server may determine that the size of the virtual resources corresponding to the interactive task allocated to the account to be allocated is 0, and the virtual resources of the account to be allocated corresponding to the interactive task remain unchanged. When the account to be allocated is allocated with the virtual resources corresponding to the interactive task, because one account can be allocated with the virtual resources only once under one task, the server determines that the virtual resources corresponding to the interactive task are not repeatedly allocated to the account to be allocated any more, and the virtual resources of the account corresponding to the interactive task remain unchanged. In the embodiment of the disclosure, the server may determine which accounts have corresponding virtual resources under the interactive task unchanged, that is, virtual resources corresponding to the interactive task are not allocated to (or are no longer allocated to) the accounts, so that waste of the virtual resources can be reduced, and the resource utilization rate is improved.
With reference to fig. 2, as shown in fig. 6, in an implementation manner of the embodiment of the present disclosure, the determining resource usage parameters corresponding to the account to be allocated in the historical sliding time window specifically includes S1021 to S1023.
S1021, in a plurality of interactive tasks which belong to the same virtual space in a historical sliding time window, the server determines a first number of first target tasks.
And the first target task is an interactive task which uses virtual resources and corresponds to the account to be allocated.
In connection with the above description of the embodiments, it should be understood that one account (e.g., an account to be allocated) can be allocated virtual resources only once in one interactive task. Similarly, one account can only use one virtual resource in one interactive task, and the virtual resource is the virtual resource corresponding to the interactive task.
It will be appreciated that the first amount is used to characterize the account to be allocated within the historical sliding time window and the amount of virtual resources used in the virtual space.
Alternatively, the virtual space may be a live room of a main account.
S1022, in the plurality of interactive tasks which belong to the same virtual space in the historical sliding time window, the server determines a second number of second target tasks.
And the second target task is an interactive task for allocating virtual resources corresponding to the account to be allocated.
It should be appreciated that the second amount is used to characterize the account to be allocated within the historical sliding time window, and the amount of virtual resources allocated in the virtual space.
S1023, the server determines resource usage parameters based on the first number and the second number.
In an alternative implementation manner, the server may determine a ratio of the first number to the second number as the resource usage parameter.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: from S1021 to S1023, in a plurality of interactive tasks belonging to the same virtual space within the historical sliding time window, the server may determine a first number of first target tasks (i.e., interactive tasks using virtual resources corresponding to the account to be allocated) and a second number of second target tasks (i.e., interactive tasks allocating virtual resources corresponding to the account to be allocated); the server may then determine a resource usage parameter based on the first quantity and the second quantity. In the embodiment of the disclosure, the server may determine the resource usage parameter of the account to be allocated based on the number of virtual resources used by the account to be allocated and the number of virtual resources allocated to the account to be allocated, so that the determination efficiency of the resource usage parameter can be improved, and further the efficiency of resource allocation is improved.
With reference to fig. 2, as shown in fig. 7, the resource allocation method provided by the embodiment of the present disclosure further includes S107-S108.
S107, if the number of the currently received resource allocation requests is larger than or equal to the number threshold, the server determines a resource allocation response sent to the terminal.
And the resource allocation response is used for informing the terminal that the virtual resource allocation corresponding to the interactive task fails.
It should be understood that the number of the currently received resource allocation requests is greater than or equal to the number threshold, which indicates that the current network is congested, or it may be understood that the processing pressure of the server is high, at this time, the server may determine the resource allocation response, that is, determine that the virtual resource corresponding to the interactive task allocated to the account to be allocated is 0, or it may be understood that the server does not allocate the virtual resource corresponding to the interactive task to the account to be allocated.
Alternatively, the server may determine the number of currently received resource allocation requests based on a Query Per Second (QPS) to which the server currently corresponds.
In an implementation manner of the embodiment of the present disclosure, when the success rate of resource allocation is greater than a success rate threshold, or the account to be allocated is already allocated with the virtual resource corresponding to the interactive task, the server may also determine the resource allocation response sent to the terminal.
In another implementation manner of the embodiment of the present disclosure, the server may further determine whether the target task currently has a remaining virtual resource, and when the target task currently has no remaining virtual resource, the server determines the resource allocation response sent to the terminal.
In this disclosure, when the resource usage rate is greater than or equal to the usage rate threshold and the interactive task currently has remaining virtual resources, the server may determine to allocate virtual resources corresponding to the interactive task to the account to be allocated.
S108, the server sends a resource allocation response to the terminal.
It can be understood that the server sends the resource allocation response to the terminal, so that the terminal can receive the resource allocation response sent by the server, that is, it is determined that the virtual resource allocation corresponding to the interactive task fails, specifically, the server does not allocate the virtual resource corresponding to the interactive task to the account to be modified.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: it can be known from S107-S108 that, if the number of the currently received resource allocation requests is greater than or equal to the number threshold, it indicates that the current network is congested (or the processing pressure of the server is high), at this time, the server may determine a resource allocation response sent to the terminal, where the resource allocation response is used to notify the terminal that the virtual resource allocation corresponding to the interactive task fails, that is, the server may determine that the virtual resource corresponding to the interactive task allocated to the account to be allocated is 0. And the server may send the resource allocation response to the terminal, so that the terminal may receive the resource allocation response and determine that the virtual resource allocation corresponding to the interactive task fails, specifically, the server does not allocate the virtual resource corresponding to the interactive task to the account to be modified. Whether virtual resources are allocated to the account to be allocated can be accurately and reasonably determined, the processing pressure of the server can be reduced, and server resources are saved.
With reference to fig. 2, as shown in fig. 8, before determining the resource usage parameter corresponding to the historical sliding time window of the account to be allocated, the resource allocation method provided in the embodiment of the present disclosure may further include S109.
And S109, when the received resource allocation request meets the preset processing condition, the server adds the resource allocation request sent by the terminal to the target queue.
Specifically, after receiving the resource allocation request, the server may add the resource allocation request to the end position (i.e., tail) of the target queue. And the server may obtain and process the resource allocation request from a start position (i.e., a head) of the target queue, and then the server may determine whether to allocate a virtual resource corresponding to the interactive task to the account to be allocated.
Continuing with fig. 8, the determining resource usage parameters corresponding to the account to be allocated in the historical sliding time window may specifically include S1024.
And S1024, the server determines resource use parameters corresponding to the account to be allocated in the historical sliding time window according to the queue sequence of the resource allocation requests in the target queue.
It should be understood that the server may receive a plurality of resource allocation requests, and add the plurality of resource allocation requests to the target queue according to a chronological order, which is a queue order of the resource allocation requests in the target queue. Furthermore, the server may obtain and process the plurality of resource allocation requests from the target queue according to the queue order, so as to determine resource usage parameters corresponding to the account to be allocated in the historical sliding time window.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: as can be seen from S109 and S1024, when the received resource allocation request satisfies the preset processing condition, the server may add the resource allocation request sent by the terminal to the target queue; then, the server may determine resource usage parameters corresponding to the account to be allocated in the historical sliding time window according to a queue order of the resource allocation requests in the target queue (specifically, a time sequence of the plurality of resource allocation requests). In the present disclosure, the server may obtain and process the resource allocation request according to a certain sequence, so as to improve the processing efficiency of the resource allocation request, and further improve the efficiency of resource allocation.
With reference to fig. 2, as shown in fig. 9, the resource allocation method provided in the embodiment of the present disclosure may further include S110.
And S110, when the preset resource allocation time of the interactive task is reached each time, the server allocates virtual resources corresponding to the interactive task to the account to be allocated.
And each interactive task corresponds to at least one preset resource allocation time.
It should be understood that, when the server performs resource allocation in the embodiment of the present disclosure, a timing function may be provided, specifically, a virtual resource is allocated at a timing. Specifically, when the preset resource allocation time of one interactive task among the multiple interactive tasks is reached each time, the server may allocate the virtual resource corresponding to the interactive task to the account to be allocated. Moreover, for an interactive task, the interactive task may correspond to one preset resource allocation time, or may correspond to more than one preset resource allocation time (i.e. at least one preset resource allocation time). In this way, when each preset resource allocation time in the at least one preset resource allocation time is reached, the server may allocate virtual resources for the account to be allocated.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: as can be seen from S110, when the preset resource allocation time of the interactive task is reached, the server may allocate the virtual resource corresponding to the interactive task to the account to be allocated. In the embodiment of the disclosure, the server can allocate the virtual resources to the account to be allocated at regular time, and the rationality of resource allocation can be improved.
As shown in fig. 10, when the resource allocation method is based on the interactive process of the terminal and the server, the resource allocation method may include S201-S206.
S201, the terminal sends a resource allocation request to the server.
The resource allocation request comprises an identification of an account to be allocated and an identification of an interactive task, and the resource allocation request is used for requesting allocation of virtual resources corresponding to the interactive task for the account to be allocated.
S202, the server receives the resource allocation request sent by the terminal.
S203, the server determines that the resource use parameters corresponding to the historical sliding time window of the account to be allocated meet preset allocation conditions.
And S204, the server determines to allocate virtual resources corresponding to the interaction tasks for the account to be allocated.
S205, the server sends the virtual resources corresponding to the interaction tasks to the terminal.
S206, the terminal receives the virtual resources corresponding to the interactive tasks sent by the server.
At this point, the account to be allocated may acquire (or be allocated to) the virtual resource corresponding to the interaction task.
It should be understood that the explanation of S201-S206 can refer to the description in the above embodiments, and the description is omitted here.
The technical scheme provided by the embodiment can at least bring the following beneficial effects: S201-S206 show that the terminal sends a resource allocation request to the server, the server receives the resource allocation request, and determines that the resource usage parameters corresponding to the account to be allocated in the historical sliding time window meet the preset allocation conditions; when the resource usage parameter meets the preset allocation condition, it indicates that the resource usage parameter is higher, that is, the account to be allocated frequently uses virtual resources. Thus, the server can determine that the virtual resource corresponding to the interactive task is allocated to the account to be allocated, and send the virtual resource corresponding to the interactive task to the terminal. Further, the terminal may receive the virtual resource corresponding to the interactive task sent by the server, and the account to be allocated may acquire (or be allocated to) the virtual resource corresponding to the interactive task. In the embodiment of the disclosure, the server may determine to allocate the virtual resource corresponding to the interactive task to the account (for example, the account to be allocated) that frequently uses the virtual resource, so that the virtual resource can be reasonably and effectively allocated, and the resource utilization rate is improved. Furthermore, the account to be allocated can acquire (or be allocated to) the virtual resource corresponding to the interactive task, so that the acquisition efficiency of the virtual resource can be improved.
It is understood that, in practical implementation, the server according to the embodiments of the present disclosure may include one or more hardware structures and/or software modules for implementing the corresponding resource allocation method, and these hardware structures and/or software modules may constitute a resource allocation. Those of skill in the art will readily appreciate that the present disclosure can be implemented in hardware or a combination of hardware and computer software for implementing the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Based on such understanding, the embodiment of the present disclosure further provides a resource allocation apparatus, and fig. 11 illustrates a schematic structural diagram of the resource allocation apparatus provided in the embodiment of the present disclosure. As shown in fig. 11, the resource allocation apparatus 20 may include: a receiving module 201 and a determining module 202.
The receiving module 201 is configured to receive a resource allocation request sent by a terminal, where the resource allocation request includes an identifier of an account to be allocated and an identifier of an interactive task, and the resource allocation request is used to request that a virtual resource corresponding to the interactive task is allocated to the account to be allocated.
A determining module 202 configured to determine a resource usage parameter corresponding to the account to be allocated in the historical sliding time window, where the resource usage parameter is used to characterize a situation that the account to be allocated uses a virtual resource in the historical sliding time window.
The determining module 202 is further configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource usage parameter meets a preset allocation condition.
Optionally, the resource usage parameter includes a resource usage rate, where the resource usage rate is a ratio of resource usage times to resource allocation times, the resource usage times are times that the account to be allocated uses virtual resources in the historical sliding time window, the resource allocation times are times that the account to be allocated is allocated with virtual resources in the historical sliding time window, and the preset allocation condition includes that the preset allocation condition is greater than or equal to a usage rate threshold value.
The determining module 202 is specifically configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource usage rate is greater than or equal to the usage rate threshold.
Optionally, the determining module 202 is further configured to determine, when the resource usage rate is smaller than the usage rate threshold, whether a resource allocation success rate of the account to be allocated in the historical sliding time window is smaller than or equal to a success rate threshold, where the resource allocation success rate is a ratio of the resource allocation times to the resource request times, and the resource request times are times of requesting to allocate virtual resources to the account to be allocated in the historical sliding time window.
The determining module 202 is further configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource allocation success rate is less than or equal to the success rate threshold.
Optionally, the determining module 202 is further configured to determine that the virtual resources of the account to be allocated corresponding to the interactive task remain unchanged when the resource allocation success rate is greater than the success rate threshold, or the account to be allocated has already been allocated with the virtual resources corresponding to the interactive task.
Optionally, the historical sliding time window includes a plurality of tasks.
The determining module 202 is specifically configured to determine a first number of first target tasks in the multiple interactive tasks belonging to the same virtual space in the historical sliding time window, where the first target tasks are the interactive tasks using the virtual resources corresponding to the account to be allocated.
The determining module 202 is specifically configured to determine a second number of second target tasks from the multiple interactive tasks belonging to the same virtual space in the historical sliding time window, where the second target tasks are the interactive tasks corresponding to the account to be allocated and allocating virtual resources.
The determining module 202 is further specifically configured to determine the resource usage based on the first quantity and the second quantity.
Optionally, the resource allocation apparatus 20 further includes a sending module 203.
The determining module 202 is further configured to determine a resource allocation response sent to the terminal if the number of the currently received resource allocation requests is greater than or equal to a number threshold, where the resource allocation response is used to notify the terminal that the virtual resource allocation corresponding to the target task fails.
A sending module 203 configured to send the resource allocation response to the terminal.
Optionally, the resource allocation apparatus 20 further includes a processing module 204.
The processing module 204 is configured to add the resource allocation request to the target queue when the received resource allocation request meets a preset processing condition.
The determining module 202 is specifically configured to determine, according to the queue order of the resource allocation requests in the target queue, a resource usage parameter corresponding to the account to be allocated in the historical sliding time window.
Optionally, the processing module 204 is configured to allocate, to the account to be allocated, a virtual resource corresponding to the interactive task when the preset resource allocation time of the interactive task is reached, where each interactive task corresponds to at least one preset resource allocation time.
As described above, the embodiments of the present disclosure may perform the division of the functional modules on the resource allocation apparatus according to the above method example. The integrated module can be realized in a hardware form, and can also be realized in a software functional module form. In addition, it should be further noted that the division of the modules in the embodiments of the present disclosure is schematic, and is only a logic function division, and there may be another division manner in actual implementation. For example, the functional blocks may be divided for the respective functions, or two or more functions may be integrated into one processing block.
Regarding the resource allocation apparatus in the foregoing embodiment, the specific manner in which each module performs operations and the beneficial effects thereof have been described in detail in the foregoing method embodiment, and are not described herein again.
Fig. 12 is a schematic structural diagram of another resource allocation apparatus provided in the present disclosure. As shown in fig. 12, the resource allocation apparatus 30 may include at least one processor 301 and a memory 303 for storing processor-executable instructions. Wherein the processor 301 is configured to execute instructions in the memory 303 to implement the resource allocation method in the above-described embodiments.
In addition, the resource allocation device 30 may further include a communication bus 302 and at least one communication interface 304.
The processor 301 may be a Central Processing Unit (CPU), a micro-processing unit, an ASIC, or one or more integrated circuits for controlling the execution of programs according to the present disclosure.
The communication bus 302 may include a path that conveys information between the aforementioned components.
The communication interface 304 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 303 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be self-contained and connected to the processing unit by a bus. The memory may also be integrated with the processing unit.
The memory 303 is used for storing instructions for executing the disclosed solution, and is controlled to be executed by the processor 301. The processor 301 is configured to execute instructions stored in the memory 303 to implement the functions of the disclosed method.
In particular implementations, processor 301 may include one or more CPUs such as CPU0 and CPU1 in fig. 12 for one embodiment.
In a specific implementation, the resource allocation apparatus 30 may include a plurality of processors, for example, the processor 301 and the processor 307 in fig. 12, as an embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In a specific implementation, the resource allocation apparatus 30 may further include an output device 305 and an input device 306, as an embodiment. The output device 305 is in communication with the processor 301 and may display information in a variety of ways. For example, the output device 305 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 306 is in communication with the processor 301 and can accept user input in a variety of ways. For example, the input device 306 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
Those skilled in the art will appreciate that the configuration shown in fig. 12 does not constitute a limitation of the resource allocation apparatus 30, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In addition, the present disclosure also provides a computer-readable storage medium including instructions that, when executed by a server, cause the server to perform the resource allocation method provided in the above embodiment.
In addition, the present disclosure also provides a computer program product including instructions that, when executed by a server, cause the server to perform the resource allocation method as provided in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for resource allocation, comprising:
receiving a resource allocation request sent by a terminal, wherein the resource allocation request comprises an identification of an account to be allocated and an identification of an interactive task, and the resource allocation request is used for requesting to allocate virtual resources corresponding to the interactive task to the account to be allocated;
determining resource use parameters corresponding to the account to be allocated in a historical sliding time window, wherein the resource use parameters are used for representing the condition that the account to be allocated uses virtual resources in the historical sliding time window;
and when the resource use parameters meet preset allocation conditions, determining to allocate the virtual resources corresponding to the interactive tasks to the account to be allocated.
2. The method according to claim 1, wherein the resource usage parameter includes a resource usage rate, the resource usage rate is a ratio of a resource usage number to a resource allocation number, the resource usage number is a number of times that the account to be allocated uses virtual resources within the historical sliding time window, the resource allocation number is a number of times that the account to be allocated is allocated with virtual resources within the historical sliding time window, and the preset allocation condition includes a usage rate threshold value or more;
when the resource usage parameter meets a preset allocation condition, determining to allocate the virtual resource corresponding to the interactive task to the account to be allocated, including:
and when the resource utilization rate is greater than or equal to the utilization rate threshold value, determining to allocate the virtual resources corresponding to the interactive task for the account to be allocated.
3. The method of claim 2, further comprising:
when the resource utilization rate is smaller than the utilization rate threshold, determining whether a resource allocation success rate corresponding to the account to be allocated in the historical sliding time window is smaller than or equal to a success rate threshold, wherein the resource allocation success rate is a ratio of the resource allocation times to resource request times, and the resource request times are times of requesting to allocate virtual resources to the account to be allocated in the historical sliding time window;
and when the resource allocation success rate is smaller than or equal to the success rate threshold, determining to allocate the virtual resources corresponding to the interactive task for the account to be allocated.
4. The method of claim 3, further comprising:
when the resource allocation success rate is greater than the success rate threshold value, or the account to be allocated is allocated with the virtual resource corresponding to the interactive task, determining that the virtual resource of the account to be allocated corresponding to the interactive task remains unchanged.
5. The method according to claim 1, wherein the determining the resource usage parameter corresponding to the account to be allocated in the historical sliding time window comprises:
determining a first number of first target tasks in the plurality of interactive tasks which belong to the same virtual space in the historical sliding time window, wherein the first target tasks are the interactive tasks which use the virtual resources and correspond to the account to be allocated;
determining a second number of second target tasks in the plurality of interactive tasks which belong to the same virtual space in the historical sliding time window, wherein the second target tasks are the interactive tasks which are corresponding to the accounts to be allocated and used for allocating virtual resources;
determining the resource usage parameter based on the first quantity and the second quantity.
6. The method of any one of claims 1-5, wherein the method further comprises:
if the number of the currently received resource allocation requests is larger than or equal to the number threshold, determining a resource allocation response sent to the terminal, wherein the resource allocation response is used for notifying the terminal that the virtual resource allocation corresponding to the interactive task fails;
and sending the resource allocation response to the terminal.
7. A resource allocation apparatus, comprising: a receiving module and a determining module;
the receiving module is configured to receive a resource allocation request sent by a terminal, where the resource allocation request includes an identifier of an account to be allocated and an identifier of an interactive task, and the resource allocation request is used to request allocation of virtual resources corresponding to the interactive task for the account to be allocated;
the determining module is configured to determine resource usage parameters corresponding to the account to be allocated in a historical sliding time window, where the resource usage parameters are used to characterize a situation that the account to be allocated uses virtual resources in the historical sliding time window;
the determining module is further configured to determine to allocate the virtual resource corresponding to the interactive task to the account to be allocated when the resource usage parameter meets a preset allocation condition.
8. A server, characterized in that the server comprises:
a processor;
a memory configured to store the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the resource allocation method of any one of claims 1-6.
9. A computer-readable storage medium having instructions stored thereon, wherein the instructions in the computer-readable storage medium, when executed by a server, enable the server to perform the resource allocation method of any one of claims 1-6.
10. A computer program product, characterized in that it comprises computer instructions which, when run on a server, cause the server to carry out the resource allocation method according to any one of claims 1-6.
CN202111449165.3A 2021-11-30 2021-11-30 Resource allocation method, device, server and storage medium Pending CN114155026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111449165.3A CN114155026A (en) 2021-11-30 2021-11-30 Resource allocation method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111449165.3A CN114155026A (en) 2021-11-30 2021-11-30 Resource allocation method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114155026A true CN114155026A (en) 2022-03-08

Family

ID=80455408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111449165.3A Pending CN114155026A (en) 2021-11-30 2021-11-30 Resource allocation method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114155026A (en)

Cited By (3)

* 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
CN114884900A (en) * 2022-06-09 2022-08-09 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN115391042A (en) * 2022-08-29 2022-11-25 北京达佳互联信息技术有限公司 Resource allocation method and device, electronic equipment and storage medium

Cited By (6)

* 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
CN114884900A (en) * 2022-06-09 2022-08-09 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN114884900B (en) * 2022-06-09 2023-10-31 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN115391042A (en) * 2022-08-29 2022-11-25 北京达佳互联信息技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN115391042B (en) * 2022-08-29 2024-03-19 北京达佳互联信息技术有限公司 Resource allocation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11582166B2 (en) Systems and methods for provision of a guaranteed batch
CN107341050B (en) Service processing method and device based on dynamic thread pool
CN114155026A (en) Resource allocation method, device, server and storage medium
WO2019205371A1 (en) Server, message allocation method, and storage medium
US20200328984A1 (en) Method and apparatus for allocating resource
CN106681835B (en) The method and resource manager of resource allocation
CN107241281B (en) Data processing method and device
CN104243405A (en) Request processing method, device and system
CN112887228B (en) Cloud resource management method and device, electronic equipment and computer readable storage medium
CN113849312A (en) Data processing task allocation method and device, electronic equipment and storage medium
US20120324466A1 (en) Scheduling Execution Requests to Allow Partial Results
CN112860974A (en) Computing resource scheduling method and device, electronic equipment and storage medium
CN112686528A (en) Method, apparatus, server and medium for allocating customer service resources
CN109801425B (en) Queue polling prompting method, device, equipment and storage medium in surface tag service
CN114116173A (en) Method, device and system for dynamically adjusting task allocation
CN112527509A (en) Resource allocation method and device, electronic equipment and storage medium
US9152549B1 (en) Dynamically allocating memory for processes
KR20150074531A (en) Apparatus and method for providing bandwidth on demand service
CN111062572A (en) Task allocation method and device
CN109842665B (en) Task processing method and device for task allocation server
EP4357916A1 (en) Job processing method and apparatus, computer device, and storage medium
CN114489978A (en) Resource scheduling method, device, equipment and storage medium
CN113722729A (en) Authority management method, device, terminal, server and storage medium
CN115391042B (en) Resource allocation method and device, electronic equipment and storage medium
US10979359B1 (en) Polling resource management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination