CN113610558A - Resource distribution method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113610558A
CN113610558A CN202110784514.0A CN202110784514A CN113610558A CN 113610558 A CN113610558 A CN 113610558A CN 202110784514 A CN202110784514 A CN 202110784514A CN 113610558 A CN113610558 A CN 113610558A
Authority
CN
China
Prior art keywords
resource
target
virtual
configuration information
preset
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
CN202110784514.0A
Other languages
Chinese (zh)
Inventor
岳景来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 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 CN202110784514.0A priority Critical patent/CN113610558A/en
Publication of CN113610558A publication Critical patent/CN113610558A/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/0212Chance discounts or incentives
    • 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/0223Discounts or incentives, e.g. coupons or rebates based on inventory

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)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a resource distribution method, a resource distribution device, an electronic device and a storage medium, wherein the method comprises the steps of responding to a resource distribution request of a target object, and determining a target resource type corresponding to a target virtual resource to be distributed; acquiring target resource configuration information corresponding to a target resource type from preset resource configuration information, wherein the preset resource configuration information comprises resource configuration information corresponding to multiple resource types, and the resource configuration information is configuration information used for generating virtual resources corresponding to the resource types; generating a target virtual resource based on the target resource configuration information; the target virtual resource is distributed to the target object. By utilizing the embodiment of the disclosure, rich resource distribution scenes can be realized, and the flexibility and reusability of system configuration are improved.

Description

Resource distribution method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource distribution method and apparatus, an electronic device, and a storage medium.
Background
In some internet platforms, resource distribution activities are often held that distribute virtual resources, such as electronic coupons, to users. In the related art, in a virtual resource distribution process of a resource distribution activity, a certain type of virtual resource is often and fixedly distributed to a user, so that the distributed virtual resource is single, the interaction effect is poor, a resource distribution system only supports a single resource distribution scene, and the flexibility and the reusability of the system are poor.
Disclosure of Invention
The present disclosure provides a resource distribution method, apparatus, electronic device and storage medium, so as to solve at least the problems of single distributed virtual resource, poor system flexibility and reusability, etc. in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a resource distribution method, including:
responding to a resource distribution request of a target object, and determining a target resource type corresponding to a target virtual resource to be distributed;
acquiring target resource configuration information corresponding to the target resource type from preset resource configuration information, wherein the preset resource configuration information comprises resource configuration information corresponding to multiple resource types, and the resource configuration information is configuration information used for generating virtual resources corresponding to the resource types;
generating the target virtual resource based on the target resource configuration information;
and distributing the target virtual resource to the target object.
Optionally, the target resource configuration information includes at least two pieces of resource configuration information to be selected and configuration selection information;
the generating the target virtual resource of the target object based on the target resource configuration information comprises:
determining first resource configuration information from the at least two resource configuration information to be selected according to the configuration selection information;
and generating a target virtual resource of the target object based on the first resource configuration information.
Optionally, the target resource types include: under the condition of a random resource type, the first resource configuration information comprises a first basic resource and a first resource floating parameter;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
generating a first resource interval according to the first basic resource and the first resource floating parameter;
and randomly determining the target virtual resource based on the first resource interval.
Optionally, the target resource types include: under the condition of a random resource type, the first resource configuration information comprises a plurality of first preset virtual resources and first selection parameters corresponding to the plurality of first preset virtual resources;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
determining the target virtual resource from the plurality of first preset virtual resources based on the first selection parameter.
Optionally, the target resource types include: in the case of the inflation resource type, the first resource configuration information includes a second basic resource, a second resource floating parameter, and a first inflation coefficient;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
generating a second resource interval according to the second basic resource and the second resource floating parameter;
randomly determining a first initial virtual resource based on the second resource interval;
generating the target virtual resource based on the first initial virtual resource and the first expansion coefficient.
Optionally, the target resource types include: under the condition of the expansion resource type, the first resource configuration information includes a plurality of second preset virtual resources, second selection parameters corresponding to the plurality of second preset virtual resources, and second expansion coefficients;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
determining a second initial virtual resource from the plurality of second preset virtual resources based on the second selection parameter;
generating the target virtual resource based on the second initial virtual resource and the second expansion coefficient.
Optionally, the determining, in response to the resource distribution request of the target object, a target resource type corresponding to the target virtual resource to be distributed includes:
receiving the resource distribution request, wherein the resource distribution request comprises an initial resource type of a virtual resource requested by the resource distribution request;
and taking the initial resource type as the target resource type.
Optionally, after the receiving the resource distribution request, the method further includes:
carrying out anomaly detection on the target object to obtain an anomaly detection result;
and if the abnormal detection result indicates that the target object has an abnormality, taking an abnormal resource type corresponding to the initial resource type as the target resource type.
Optionally, the method further includes:
if the abnormality detection result indicates that the target object is not abnormal, performing extraction qualification identification on the target object based on object attribute information and/or resource attribute information of the target object to obtain an extraction qualification identification result;
if the extraction qualification identification result is the extraction qualification of the virtual resource with the preset extraction resource type, updating the initial resource type based on the preset extraction resource type to obtain the target resource type.
Optionally, in a case that the target resource type includes the preset extraction resource type; the target resource configuration information includes: a third preset virtual resource corresponding to at least one resource amount, a remaining quantity of the third preset virtual resource corresponding to any resource amount, a third selection parameter of the third preset virtual resource corresponding to any resource amount, and an extraction state of the third preset virtual resource corresponding to any resource amount;
the generating the target virtual resource of the target object based on the target resource configuration information comprises:
randomly extracting virtual resources from third virtual resources corresponding to the at least one resource quantity based on the third selection parameter;
and if the extraction result is that the virtual resource is extracted, the extraction state of the extracted virtual resource is a starting state, and the residual quantity of the extracted virtual resource is greater than a preset threshold value, taking the extracted virtual resource as the target virtual resource.
Optionally, the method further includes:
updating the residual quantity corresponding to the extracted virtual resources;
and if the updated residual quantity is less than or equal to the preset threshold value, updating the extraction state corresponding to the extracted virtual resource to be a closed state.
Optionally, in the case that the target resource type includes the abnormal resource type; the target resource configuration information comprises second resource configuration information corresponding to the initial resource type and a preset resource upper limit;
the generating the target virtual resource of the target object based on the target resource configuration information comprises:
generating a third initial virtual resource based on the second resource configuration information;
determining a first cumulative virtual resource of the target object;
if the first accumulated virtual resource is greater than or equal to the preset resource upper limit, generating a reduction coefficient according to the first accumulated virtual resource and the preset resource upper limit;
and performing reduction processing on the third initial virtual resource based on the reduction coefficient to obtain the target virtual resource.
Optionally, the distributing the target virtual resource to the target object includes:
and if the target virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
Optionally, in a case that the target virtual resource is a virtual resource of a random resource type, the method further includes:
if the target virtual resource does not meet the preset resource distribution condition, the step of generating the target virtual resource based on the target resource configuration information is repeatedly executed until the target virtual resource meets the preset resource distribution condition.
Optionally, in a case that the target virtual resource is a virtual resource of an inflation resource type, the method further includes:
if the target virtual resource does not meet the preset resource distribution condition, generating a first subsidy virtual resource, wherein the first subsidy virtual resource and a second accumulated virtual resource of the initial virtual resource corresponding to the target virtual resource meet the preset resource distribution condition;
updating the target virtual resource based on the second accumulated virtual resource and the expansion coefficient corresponding to the target virtual resource;
the distributing the target virtual resource to the target object comprises:
and if the updated target virtual resource meets the preset resource distribution condition, distributing the updated target virtual resource to the target object.
Optionally, in a case that the target virtual resource includes a plurality of virtual resources, the method further includes:
determining a third cumulative virtual resource of the plurality of virtual resources;
the distributing the target virtual resource to the target object comprises:
and if the third accumulated virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
Optionally, the method further includes:
if the third accumulated virtual resource does not meet the preset resource distribution condition, generating a second subsidy virtual resource, wherein the second subsidy virtual resource and a fourth accumulated virtual resource of the designated virtual resource meet the preset resource distribution condition, and the designated virtual resource is any one of the plurality of virtual resources meeting the preset resource screening condition;
updating the designated virtual resource based on the second subsidized virtual resource;
updating the third accumulated virtual resource based on the updated designated virtual resource and other virtual resources, wherein the other virtual resources are virtual resources other than the designated virtual resource in the plurality of virtual resources;
the distributing the target virtual resource to the target object comprises:
and if the updated third accumulated virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource distribution apparatus including:
the target resource type determining module is configured to execute a resource distribution request responding to the target object and determine a target resource type corresponding to the target virtual resource to be distributed;
a target resource allocation information obtaining module configured to perform obtaining, from preset resource allocation information, target resource allocation information corresponding to the target resource type, where the preset resource allocation information includes resource allocation information corresponding to multiple resource types, and the resource allocation information is allocation information used for generating virtual resources of the corresponding resource types;
a target virtual resource generation module configured to perform generation of the target virtual resource based on the target resource configuration information;
a target virtual resource distribution module configured to perform distribution of the target virtual resource to the target object.
Optionally, the target resource configuration information includes at least two pieces of resource configuration information to be selected and configuration selection information;
the target virtual resource generation module comprises:
a first resource configuration information determining unit configured to perform determining first resource configuration information from the at least two resource configuration information to be selected according to the configuration selection information;
a first target virtual resource generating unit configured to perform generation of a target virtual resource of the target object based on the first resource configuration information.
Optionally, the target resource types include: under the condition of a random resource type, the first resource configuration information comprises a first basic resource and a first resource floating parameter;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
a first resource interval generation unit configured to perform determining a first resource interval according to the first base resource and the first resource floating parameter;
a first random sampling unit configured to perform a random determination of the target virtual resource based on the first resource interval.
Optionally, the target resource types include: under the condition of a random resource type, the first resource configuration information comprises a plurality of first preset virtual resources and first selection parameters corresponding to the plurality of first preset virtual resources;
the target virtual resource generation comprises:
a target virtual resource determination unit configured to perform determining the target virtual resource from the plurality of first preset virtual resources based on the first selection parameter.
Optionally, the target resource types include: in the case of the inflation resource type, the first resource configuration information includes a second basic resource, a second resource floating parameter, and a first inflation coefficient;
the target virtual resource generation module comprises:
a second resource interval determination unit configured to perform determining a second resource interval according to the second base resource and the second resource floating parameter;
a second random sampling unit configured to perform random determination of a first initial virtual resource based on the second resource interval;
a second target virtual resource generation unit configured to perform generation of the target virtual resource based on the first initial virtual resource and the first expansion coefficient.
Optionally, the target resource types include: under the condition of the expansion resource type, the first resource configuration information includes a plurality of second preset virtual resources, second selection parameters corresponding to the plurality of second preset virtual resources, and second expansion coefficients;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
a second initial virtual resource determining unit configured to perform determining a second initial virtual resource from the plurality of second preset virtual resources based on the second selection parameter;
a third target virtual resource generation unit configured to perform generation of the target virtual resource based on the second initial virtual resource and the second expansion coefficient.
Optionally, the target resource type determining module includes:
a resource distribution request receiving unit configured to perform receiving the resource distribution request, where the resource distribution request includes an initial resource type of a virtual resource requested by the resource distribution request;
a first target resource type determination unit configured to perform the setting of the initial resource type as the target resource type.
Optionally, after the receiving the resource distribution request, the apparatus further includes:
the abnormality detection unit is configured to perform abnormality detection on the target object to obtain an abnormality detection result;
a second target resource type determining unit, configured to execute, if the abnormality detection result indicates that the target object has an abnormality, taking an abnormal resource type corresponding to the initial resource type as the target resource type.
Optionally, the apparatus further comprises:
the extraction qualification identification unit is configured to perform extraction qualification identification on the target object based on object attribute information and/or resource attribute information of the target object to obtain an extraction qualification identification result if the abnormality detection result indicates that the target object has no abnormality;
a third target resource type determining unit, configured to update the initial resource type based on a preset extraction resource type if the extraction qualification recognition result is an extraction qualification of a virtual resource with the preset extraction resource type, so as to obtain the target resource type.
Optionally, in a case that the target resource type includes the preset extraction resource type; the target resource configuration information includes: a third preset virtual resource corresponding to at least one resource amount, a remaining quantity of the third preset virtual resource corresponding to any resource amount, a third selection parameter of the third preset virtual resource corresponding to any resource amount, and an extraction state of the third preset virtual resource corresponding to any resource amount;
the target virtual resource generation module comprises:
a virtual resource extraction unit configured to perform random extraction of virtual resources from third virtual resources corresponding to the at least one resource amount based on the third selection parameter;
a fourth target resource type determining unit, configured to execute, if the extraction result is that the virtual resource is extracted, and the extraction state of the extracted virtual resource is the start state, and the remaining number of the extracted virtual resource is greater than a preset threshold, taking the extracted virtual resource as the target virtual resource.
Optionally, the apparatus further comprises:
a remaining number updating unit configured to perform updating of the remaining number corresponding to the extracted virtual resource;
and the extraction state updating unit is configured to update the extraction state corresponding to the extracted virtual resource to a closed state if the updated residual quantity is less than or equal to the preset threshold.
Optionally, in the case that the target resource type includes the abnormal resource type; the target resource configuration information comprises second resource configuration information corresponding to the initial resource type and a preset resource upper limit;
the target virtual resource generation module comprises:
a third initial virtual resource generation unit configured to perform generation of a third initial virtual resource based on the second resource configuration information;
a first accumulated virtual resource determination unit configured to perform determining a first accumulated virtual resource of the target object;
a reduction coefficient generating unit configured to execute, if the first accumulated virtual resource is greater than or equal to the preset resource upper limit, generating a reduction coefficient according to the first accumulated virtual resource and the preset resource upper limit;
a reduction processing unit configured to perform reduction processing on the third initial virtual resource based on the reduction coefficient, resulting in the target virtual resource.
Optionally, the target virtual resource distribution module is further configured to execute, if the target virtual resource meets a preset resource distribution condition, distributing the target virtual resource to the target object.
Optionally, in a case that the target virtual resource is a virtual resource of a random resource type, the apparatus further includes:
and the iteration processing module is configured to execute the step of generating the target virtual resource based on the target resource configuration information repeatedly until the target virtual resource meets the preset resource distribution condition if the target virtual resource does not meet the preset resource distribution condition.
Optionally, in a case that the target virtual resource is a virtual resource of an inflation resource type, the apparatus further includes:
a first subsidy virtual resource generating module configured to execute, if the target virtual resource does not satisfy a preset resource distribution condition, generating a first subsidy virtual resource, where a second accumulated virtual resource of the initial virtual resource corresponding to the first subsidy virtual resource and the target virtual resource satisfies the preset resource distribution condition;
a target virtual resource updating module configured to update the target virtual resource based on the second accumulated virtual resource and an expansion coefficient corresponding to the target virtual resource;
the target virtual resource distribution module is further configured to execute the distribution of the updated target virtual resource to the target object if the updated target virtual resource meets the preset resource distribution condition.
Optionally, in a case that the target virtual resource includes a plurality of virtual resources, the apparatus further includes:
a third aggregate virtual resource determination module configured to perform determining a third aggregate virtual resource of the plurality of virtual resources;
the target virtual resource distribution module is further configured to execute the target virtual resource distribution to the target object if the third accumulated virtual resource meets the preset resource distribution condition.
Optionally, the apparatus further comprises:
a second subsidy virtual resource generating module configured to execute, if the third accumulated virtual resource does not satisfy the preset resource distribution condition, generating a second subsidy virtual resource, where the second subsidy virtual resource and a fourth accumulated virtual resource of a designated virtual resource satisfy the preset resource distribution condition, and the designated virtual resource is any one of the plurality of virtual resources that satisfies a preset resource screening condition;
a designated virtual resource update module configured to perform an update of the designated virtual resource based on the second subsidized virtual resource;
a third cumulative virtual resource updating module configured to update the third cumulative virtual resource based on the updated specified virtual resource and other virtual resources, the other virtual resources being virtual resources other than the specified virtual resource in the plurality of virtual resources;
the target virtual resource distribution module is further configured to execute the target virtual resource distribution to the target object if the updated third accumulated virtual resource meets the preset resource distribution condition.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any of the first aspects above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of the first aspects of the embodiments of the present disclosure.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of any one of the first aspects of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the resource distribution process, the configuration information for generating the target virtual resource is determined from the preset resource configuration information including the resource configuration information corresponding to the multiple resource types in combination with the target resource type of the target virtual resource to be generated, so that the accuracy of the virtual resource generated under multiple resource distribution scenes can be improved while the resource distribution system is ensured to support the virtual resource distribution of the multiple resource types; and by presetting the resource configuration information corresponding to various resource types, the resource distribution scenes can be effectively enriched, and simultaneously, the resource configuration information can be conveniently and directly reused through the modification of the resource configuration information subsequently, so that the multi-scene reusability of the system is greatly improved, and the expandability and the configuration flexibility of the system are further effectively 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 illustrating an application environment in accordance with an illustrative embodiment;
FIG. 2 is a flow diagram illustrating a method of resource distribution in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating a method for determining a target resource type corresponding to a target virtual resource to be distributed in response to a resource distribution request of a target object, according to an example embodiment;
FIG. 4 is a flowchart illustrating generation of a target virtual resource of a target object based on target resource configuration information in accordance with an illustrative embodiment;
FIG. 5 is a flowchart illustrating a method for generating a target virtual resource of a target object based on target resource configuration information in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating a resource distribution apparatus according to an example embodiment;
FIG. 7 is a block diagram illustrating an electronic device for resource distribution in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating an electronic device for resource distribution in accordance with an exemplary embodiment.
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 should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment according to an exemplary embodiment, and as shown in fig. 1, the application environment may include a terminal 100 and a server 200.
The terminal 100 may be used to provide a resource distribution service to any user. Specifically, the terminal 100 may include, but is not limited to, a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and other types of electronic devices, and may also be software running on the electronic devices, such as an application program. Optionally, the operating system running on the electronic device may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
In an alternative embodiment, the server 200 may provide a background service for the terminal 100 to perform resource distribution processing. Specifically, the server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
In addition, it should be noted that fig. 1 shows only one application environment provided by the present disclosure, and in practical applications, other application environments may also be included, for example, the resource distribution processing is implemented in a terminal, and the like.
In the embodiment of the present specification, the terminal 100 and the server 200 may be directly or indirectly connected through wired or wireless communication, and the disclosure is not limited herein.
Fig. 2 is a flowchart illustrating a resource distribution method according to an exemplary embodiment, where the resource distribution method is used in an electronic device such as a terminal or a server, as shown in fig. 2, and includes the following steps.
In step S201, in response to a resource distribution request of a target object, determining a target resource type corresponding to a target virtual resource to be distributed;
in a specific embodiment, the target object may be a user in the resource distribution system, or a user account, etc. In practical application, a participating page corresponding to the resource distribution activity can be provided for a user based on a corresponding terminal, and correspondingly, the user can trigger a resource distribution request based on the participating page.
In an optional embodiment, as shown in fig. 3, the determining, in response to the resource distribution request of the target object, a target resource type corresponding to the target virtual resource to be distributed may include:
in step S301, a resource distribution request is received, where the resource distribution request includes an initial resource type of a virtual resource requested by the resource distribution request;
in step S303, the initial resource type is set as the target resource type.
In a specific embodiment, the number of virtual resources requested by the resource distribution request may be one or more, and accordingly, the resource distribution request may further include the number of resource distribution requests. The initial resource type may be a resource type corresponding to each of the one or more requested virtual resources. Specifically, the configuration information of the virtual resource generated corresponding to different resource types is different, that is, the virtual resource generated corresponding to different resource types is different.
In a specific embodiment, the initial resource type may include at least one of a random resource type and an expanded resource type, and specifically, the resource generation manner corresponding to the random resource type may be a resource generation manner capable of randomly generating a virtual resource under a certain rule. The resource generation method corresponding to the expanded resource type may be a resource generation method for generating a virtual resource by performing expansion processing on a certain initial virtual resource.
In the above embodiment, the resource type of the requested virtual resource is carried in the resource distribution request, so that the request of different types of virtual resources can be effectively identified in a virtual resource distribution system supporting multiple resource types, and further, the virtual resources of different resource types can be accurately generated.
In practical applications, in some resource distribution activity scenarios, in order to improve the accuracy of resource distribution and the rationality of resource distribution, after receiving a resource distribution request, as shown in fig. 3, the method may further include:
in step S305, performing anomaly detection on the target object to obtain an anomaly detection result;
in step S307, if the anomaly detection result indicates that the target object has an anomaly, the anomaly resource type corresponding to the initial resource type is used as the target resource type.
In a specific embodiment, the target object may be detected for abnormality by combining preset abnormality index information. Optionally, the abnormality index information may be information for identifying whether the object is abnormal, and specifically, may be set in combination with an abnormal condition that needs to be detected.
In practical application, the generation logic of the resource generation manner corresponding to any initial virtual type may be the same as the generation logic of the resource generation manner corresponding to the abnormal resource type corresponding to the initial virtual type, optionally, the resource amount of the virtual resource corresponding to the initial virtual type may be different from the resource amount of the virtual resource corresponding to the corresponding abnormal resource type, and optionally, the resource amount of the virtual resource corresponding to the initial virtual type may be greater than the resource amount of the virtual resource corresponding to the corresponding abnormal resource type.
In the embodiment, in the determination process of the target resource type, the accuracy and the rationality of resource distribution can be improved on the basis of enriching the resource distribution scene by combining the anomaly detection of the target object.
In an alternative embodiment, as shown in fig. 3, the method may further include the following steps:
in step S309, if the anomaly detection result indicates that the target object is not anomalous, performing extraction qualification identification on the target object based on the object attribute information and/or the resource attribute information of the target object to obtain an extraction qualification identification result;
in step S311, if the extraction qualification recognition result is the extraction qualification of the virtual resource with the preset extraction resource type, the initial resource type is updated based on the preset extraction resource type, so as to obtain the target resource type.
In a specific embodiment, if the anomaly detection result indicates that the target object has no anomaly, extraction qualification recognition of virtual resources of a preset extraction resource type may be performed on the target object in combination with the object attribute information and/or the resource attribute information of the target object to obtain an extraction qualification recognition result. Specifically, the resource generation manner corresponding to the preset extracted resource type may be a resource generation manner for generating the virtual resource in an extraction manner based on a certain rule. Optionally, the resource amount of the virtual resource of the preset extracted resource type is greater than the resource amount of the virtual resource of the initial resource type.
In a specific embodiment, the object attribute information may be information for describing the object, and in a specific embodiment, the object attribute information is level information, activity information, and the like of the object in the resource distribution system. In a specific embodiment, the resource attribute information may be information of a virtual resource acquired by the target object.
In a particular embodiment, the identification of extraction qualifications may be configured in conjunction with actual application requirements. In a specific embodiment, for example, an object with a rating higher than a preset rating may be set as an object having an extraction qualification (an extraction qualification for extracting a virtual resource of the preset extraction resource type). In a specific embodiment, an object whose resource amount corresponding to the extracted accumulated virtual resource is less than or equal to the preset resource amount may also be set as an object having an extraction qualification (an extraction qualification for extracting the virtual resource of the preset extraction resource type).
In an optional embodiment, if there is one requested virtual resource, updating the initial resource type based on the preset extracted resource type, and obtaining the target resource type may include: and replacing the initial resource type with the preset extracted resource type to obtain the target resource type.
In an optional embodiment, if there are multiple requested virtual resources (in the embodiment of the present specification, the multiple requested virtual resources are at least two), the updating the initial resource type based on the preset extracted resource type, and obtaining the target resource type may include replacing the initial resource type of any requested virtual resource in the initial resource types of the multiple requested virtual resources with the preset extracted resource type, so as to obtain the target resource type.
In a specific embodiment, if the extraction qualification recognition result is the extraction qualification of the virtual resource not having the predetermined extraction resource type, the initial resource type is taken as the target resource type.
In an optional embodiment, the above process of performing extraction qualification recognition on the target object may also be entered without performing anomaly detection, so as to extract a virtual resource of a preset extraction resource type.
In the embodiment, the extraction qualification recognition is combined, so that more virtual resource choices can be provided for the user, resource distribution scenes are enriched better, and the user experience is effectively improved.
In step S203, target resource allocation information corresponding to the target resource type is obtained from the preset resource allocation information.
In a specific embodiment, the preset resource configuration information may include resource configuration information corresponding to multiple resource types, where the resource configuration information is configuration information used for generating virtual resources corresponding to the resource types.
In a specific embodiment, the plurality of resource types may include, but are not limited to, at least two of a random resource type, a dilated resource type, an abnormal resource type, and a preset extracted resource type. Optionally, the virtual resources of the random resource type, the inflation resource type, and the abnormal resource type may be virtual resources that can be picked up in an unlimited amount in a preset resource distribution time period; the virtual resource of the preset extracted resource type may be a virtual resource that is distributed in a limited amount within a preset resource distribution time period.
In a specific embodiment, the resource configuration information corresponding to multiple resource types may be configured in advance in combination with the actual application requirements, so that the distribution requirements of virtual resources of multiple resource types may be effectively met in the resource distribution process.
In step S205, a target virtual resource is generated based on the target resource configuration information;
in an optional embodiment, the target resource configuration information may include at least two pieces of resource configuration information to be selected and configuration selection information;
in an optional embodiment, the generating the target virtual resource of the target object based on the target resource configuration information may include:
determining first resource configuration information from at least two resource configuration information to be selected according to the configuration selection information;
and generating a target virtual resource of the target object based on the first resource configuration information.
In a specific embodiment, the configuration selection information may be used to instruct to select a certain resource configuration information of the at least two resource configuration information to be selected, as the resource configuration information for generating the target virtual resource. Correspondingly, the first resource configuration information may be resource configuration information indicated by the configuration selection information in the target resource configuration information and used for generating the target virtual resource.
In the above embodiment, by configuring multiple resource configuration information for a certain resource type, diversity and flexibility of virtual resource generation can be improved.
In an optional embodiment, in a case that the target resource type includes a random resource type, the target virtual resource may be generated by randomly sampling virtual resources in a preset resource amount interval. Correspondingly, the first resource configuration information may include a first basic resource and a first resource floating parameter; accordingly, the generating the target virtual resource of the target object based on the first resource configuration information may include:
generating a first resource interval according to the first basic resource and the first resource floating parameter;
based on the first resource interval, a target virtual resource is randomly determined.
In a specific embodiment, a first basic resource and a first resource floating parameter that are preset in combination with a virtual resource distribution budget and a distribution quantity corresponding to a random resource type may be used. Specifically, the first basic resource may be a preset virtual resource with a fixed resource amount, the first resource floating parameter may be a resource amount for controlling floating of the first basic resource, and the first resource interval may be a resource amount interval of the virtual resource after the first basic resource is floated by combining the first resource floating parameter. Specifically, taking the first basic resource as x and the first resource floating parameter as y as an example, the first resource interval may be [ x-y, x + y ].
In the above embodiment, the first basic resource, the first resource floating parameter, and other relevant parameter information used for generating the resource interval of the virtual resource are set in the resource configuration information, so that the virtual resource can be generated quickly, and meanwhile, the parameter information can be modified directly in the following process, the resource configuration information can be multiplexed, and the system configuration flexibility and reusability are greatly improved.
In an optional embodiment, in a case that the target resource type includes a random resource type, the target virtual resource may be generated by randomly extracting virtual resources from a plurality of virtual resources of the specified resource amount according to corresponding adoption parameters; correspondingly, the first resource configuration information may include a plurality of first preset virtual resources and first selection parameters corresponding to the plurality of first preset virtual resources; accordingly, the generating the target virtual resource of the target object based on the first resource configuration information may include: a target virtual resource is determined from a first plurality of preset virtual resources based on a first selection parameter.
In a specific embodiment, the plurality of first preset virtual resources may be a plurality of virtual resources with different resource amounts, and the first selection parameter corresponding to each first preset virtual resource may represent a probability that the first preset virtual resource is drawn. Specifically, the first selection parameters corresponding to the plurality of first preset virtual resources and the plurality of first preset virtual resources, which are preset in combination with the virtual resource distribution budget and the distribution quantity corresponding to the random resource type, may be used.
In the above embodiment, through the resource configuration information, a plurality of virtual resources with different resource amounts and corresponding parameter information such as the adoption parameters can be set, so that the accurate control of the distributed resource amount can be improved, the subsequent direct modification of the parameter information is facilitated, the multiplexing of the resource configuration information is realized, and the system configuration flexibility and reusability are greatly improved.
In an optional embodiment, in a case that the target resource type includes an inflation resource type, the first resource configuration information includes a second base resource, a second resource floating parameter, and a first inflation coefficient;
generating the target virtual resource of the target object based on the first resource configuration information includes:
generating a second resource interval according to the second basic resource and the second resource floating parameter;
randomly determining a first initial virtual resource based on the second resource interval;
and generating a target virtual resource based on the first initial virtual resource and the first expansion coefficient.
In a specific embodiment, a second basic resource and a second resource floating parameter preset in combination with a virtual resource distribution budget and a distribution quantity corresponding to the inflation resource type may be used. Specifically, the second basic resource may be a preset virtual resource with a fixed resource amount, the second resource floating parameter may be a resource amount for controlling floating of the second basic resource, and the second resource interval may be a resource amount interval of the virtual resource after the second basic resource is floated by combining the second resource floating parameter.
In a specific embodiment, the first expansion coefficient may be a multiple of the expansion of the first initial virtual resource, and specifically, the resource amount corresponding to the first initial virtual resource may be multiplied by the first expansion coefficient to obtain the target virtual resource.
In the above embodiment, by setting relevant parameter information such as an expansion coefficient, a basic resource, a resource floating parameter and the like for generating the virtual resource in the resource configuration information, the virtual resource of the expanded resource type can be generated quickly, and meanwhile, the parameter information can be modified directly in the following process, so that the resource configuration information is multiplexed, and the system configuration flexibility and reusability are greatly improved.
In an optional embodiment, in a case that the target resource type includes an expansion resource type, the first resource configuration information includes a plurality of second preset virtual resources, a second selection parameter corresponding to the plurality of second preset virtual resources, and a second expansion coefficient;
generating the target virtual resource of the target object based on the first resource configuration information includes:
determining a second initial virtual resource from a plurality of second preset virtual resources based on a second selection parameter;
and generating the target virtual resource based on the second initial virtual resource and the second expansion coefficient.
In a specific embodiment, the plurality of second preset virtual resources may be a plurality of virtual resources with different resource amounts, and the second selection parameter corresponding to each second preset virtual resource may represent a probability that the second preset virtual resource is drawn. Specifically, a plurality of second preset virtual resources and second selection parameters corresponding to the plurality of second preset virtual resources, which are preset by combining the virtual resource distribution budget and the distribution quantity corresponding to the inflation resource type, may be used.
In a specific embodiment, the second expansion coefficient may be a multiple of the expansion of the second initial virtual resource, and specifically, the resource amount corresponding to the second initial virtual resource may be multiplied by the second expansion coefficient to obtain the target virtual resource.
In the above embodiment, a plurality of virtual resources with different resource amounts and corresponding parameters are set in the resource configuration information to generate a second initial virtual resource, and then a target virtual resource is generated by combining the expansion coefficient, so that the distributed resource amount can be accurately controlled.
In an optional embodiment, in the case that the target resource type includes a preset extracted resource type; the target resource configuration information may include: a third preset virtual resource corresponding to at least one resource amount, a remaining quantity of the third preset virtual resource corresponding to any resource amount, a third selection parameter of the third preset virtual resource corresponding to any resource amount, and an extraction state of the third preset virtual resource corresponding to any resource amount; accordingly, as shown in fig. 4, the generating of the target virtual resource of the target object based on the target resource configuration information may include the following steps:
in step S401, randomly extracting virtual resources from third virtual resources corresponding to at least one resource amount based on a third selection parameter;
in step S403, if the extracted virtual resource is extracted, the extraction state of the extracted virtual resource is a start state, and the remaining number of the extracted virtual resource is greater than a preset threshold, the extracted virtual resource is used as a target virtual resource.
In a specific embodiment, the third predetermined virtual resource may be one or more virtual resources of resource amount. The third selection parameter of the third preset virtual resource corresponding to any resource amount may represent the probability that the third preset virtual resource corresponding to the resource amount is drawn. The remaining number of the third preset virtual resource corresponding to any resource amount may be the number of virtual resources remaining in the virtual resource of the resource amount. The extraction state of the third preset virtual resource corresponding to any resource amount may represent whether the third preset virtual resource corresponding to the resource amount can be extracted, and specifically, the state switching may be performed in combination with a resource distribution control requirement. In an optional embodiment, the extraction state may include an open state and a close state, where the open state represents that the third preset virtual resource corresponding to the corresponding resource amount may be extracted; and the closing state represents that the third preset virtual resource corresponding to the corresponding resource quantity cannot be extracted.
Specifically, a third preset virtual resource corresponding to at least one resource amount preset by combining a virtual resource distribution budget corresponding to a preset extracted resource type and a distribution amount, a total resource amount of the third preset virtual resource corresponding to any resource amount, and a third selection parameter of the third preset virtual resource corresponding to any resource amount may be used.
In an alternative embodiment, the virtual resource of the preset extracted resource type may be a virtual resource that is distributed in a limited amount within a preset resource distribution time period. Correspondingly, the extraction result may be that the virtual resource is extracted, or may not be extracted.
In an optional embodiment, if the extraction result is that the virtual resource is extracted, the extraction state of the extracted virtual resource is a start state, and the remaining number of the extracted virtual resource is greater than a preset threshold, the extracted virtual resource is used as the target virtual resource. Specifically, the preset threshold may be a lower limit threshold of the remaining amount of the virtual resources that can be continuously extracted and preset in combination with the actual application requirements, and optionally, the preset threshold may be zero.
Optionally, if the extraction result is that the virtual resource is extracted, but the extraction state of the extracted virtual resource is a closed state, or the remaining number of the extracted virtual resource is zero, the extraction result may be updated to the non-extracted virtual resource.
Optionally, if the virtual resource is not extracted as a result of the extraction, the target virtual resource may be generated based on the target resource configuration information corresponding to the corresponding initial resource type.
In the above embodiment, by combining the setting of the parameter information such as the extraction state and the remaining amount of the virtual resources set in the resource configuration information, the management and control of the virtual resources of the preset extracted resource type can be realized, the accuracy of resource distribution is improved, meanwhile, the subsequent parameter information can be directly modified conveniently, the resource configuration information is multiplexed, and the flexibility and reusability of system configuration are greatly improved.
In an alternative embodiment, as shown in fig. 4, the method may further include the steps of:
in step S405, the extracted remaining number corresponding to the virtual resource is updated;
in step S407, if the updated remaining number is less than or equal to the preset threshold, the extraction state corresponding to the extracted virtual resource is updated to the off state.
In a specific embodiment, under the condition that virtual resources of a plurality of resource amounts corresponding to the resource type are preset for extraction, the resource amount corresponding to the extracted virtual resource may be determined, and the remaining amount of the third preset virtual resource corresponding to the resource amount is reduced by 1, so as to update the remaining amount. Optionally, if the updated remaining number is less than or equal to the preset threshold, the extraction state corresponding to the extracted virtual resource may be updated to the closed state.
In addition, the inventory supplement of the virtual resources of the preset extracted resource type can be realized by updating the residual quantity of the virtual resources of the corresponding resource quantity according to the actual application requirement.
In the above embodiment, after the virtual resources are extracted, the resource quantity is updated in time, and after the virtual resources of a certain resource quantity are distributed, the corresponding extraction state can be closed in time, so that dynamic management and control of the virtual resources can be realized.
In an optional embodiment, when the target resource type includes an abnormal resource type, the target resource configuration information includes second resource configuration information corresponding to the initial resource type and a preset resource upper limit; accordingly, as shown in fig. 5, the generating of the target virtual resource of the target object based on the target resource configuration information may include the following steps:
in step S501, a third initial virtual resource is generated based on the second resource configuration information;
in step S503, a first accumulated virtual resource of the target object is determined;
in step S505, if the first accumulated virtual resource is greater than or equal to the preset resource upper limit, a reduction coefficient is generated according to the first accumulated virtual resource and the preset resource upper limit;
in step S507, a reduction process is performed on the third initial virtual resource based on the reduction coefficient, and a target virtual resource is obtained.
In a specific embodiment, the step of generating the third initial virtual resource based on the second resource configuration information may refer to the step of generating the target virtual resource in the initial resource type related embodiment corresponding to the second resource configuration information, which is not described herein again.
In a specific embodiment, the preset upper limit of the resource may be an upper limit of a virtual resource to which a preset single risk object can be distributed. The first accumulated virtual resource of the target object may be an accumulated virtual resource of the target object. Optionally, if the first accumulated virtual resource is greater than or equal to the preset resource upper limit, the loss of the virtual resource may be reduced by reducing the third initial virtual resource.
In a specific embodiment, the generating the reduction factor according to the first accumulated virtual resource and the preset resource upper limit may be combined with the following formula:
C=(amount+sum-1)/sum
wherein, C is a reduction coefficient, amount is a first accumulated virtual resource, and sum is a preset resource upper limit.
In the above embodiment, by setting parameter information such as a preset resource upper limit in the resource configuration information, and in the case that the first accumulated virtual resource is greater than or equal to the preset resource upper limit, resource loss in an abnormal situation can be reduced by reducing the virtual resource.
In step S207, the target virtual resource is distributed to the target object.
In some application scenarios, the generated target virtual resource can be distributed again under the condition that the generated target virtual resource meets a certain condition by combining with a preset resource distribution condition. Optionally, the distributing the target virtual resource to the target object may include:
and if the target virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
In a specific embodiment, the preset resource distribution condition may be a resource amount corresponding to a virtual resource that can be distributed and is set in advance in combination with an actual application requirement; optionally, the resource amount corresponding to the preset resource distribution condition may be a numerical value with some specific meanings and the like, which can better improve user experience. Optionally, if the resource corresponding to the target virtual resource is the resource amount corresponding to the preset resource distribution condition, the target virtual resource may be distributed to the target object.
In the embodiment, the target virtual resource distribution is controlled by combining the preset resource distribution condition, so that the rationality of resource distribution can be improved, and the user experience can be better improved.
In an optional embodiment, in the case that the target virtual resource is a virtual resource of a random resource type, the method may further include:
and if the target virtual resource does not meet the preset resource distribution condition, repeatedly executing the step of generating the target virtual resource based on the target resource configuration information until the target virtual resource meets the preset resource distribution condition.
Optionally, in order to avoid that the generated target virtual resource does not meet the preset resource distribution condition all the time, which causes a dead cycle of the system, the upper limit of the number of times for repeatedly generating the target virtual resource may be defined, and correspondingly, if the corresponding upper limit of the number of times is reached, the resource distribution may be performed based on the currently generated target virtual resource, so as to improve the stability of the system.
In the above embodiment, in the process of distributing the virtual resources of the random resource type, the rationality of virtual resource distribution can be effectively improved by regenerating the target virtual resource, so that the user experience is better improved.
In an optional embodiment, in the case that the target virtual resource is a virtual resource of an inflation resource type, the method may further include:
if the target virtual resource does not meet the preset resource distribution condition, generating a first subsidy virtual resource, wherein the first subsidy virtual resource and a second accumulated virtual resource of the initial virtual resource corresponding to the target virtual resource meet the preset resource distribution condition;
updating the target virtual resource based on the expansion coefficients corresponding to the second accumulated virtual resource and the target virtual resource;
optionally, the distributing the target virtual resource to the target object includes:
and if the updated target virtual resource meets the preset resource distribution condition, distributing the updated target virtual resource to the target object.
In a specific embodiment, for a virtual resource of an expanded resource type, if the expanded virtual resource does not satisfy a preset resource distribution condition, a first subsidy virtual resource may be generated by combining the initial virtual resource before expansion, and in a specific embodiment, the first subsidy virtual resource may be a minimum integer (resource amount) under a condition that it is ensured that an accumulated virtual resource of the first subsidy virtual resource and the initial virtual resource before expansion satisfies the preset resource distribution condition. After the subsidized virtual resource (the second accumulated virtual resource value) is obtained, the expanded virtual resource can be determined again, and if the newly determined expanded virtual resource meets the preset resource distribution condition, the newly determined expanded virtual resource (the target virtual resource) can be distributed to the target object; and otherwise, continuously updating the target virtual resource by combining the subsidy resource information until the updated target virtual resource meets the preset resource distribution condition.
Optionally, in order to avoid that the generated target virtual resource does not meet the preset resource distribution condition all the time, which causes a system to have a dead cycle, an upper limit of times for generating the target virtual resource in the process of avoiding recognition may be defined, and correspondingly, if the upper limit of times reaches the corresponding upper limit of times, resource distribution may be performed based on the currently generated target virtual resource, so as to improve the stability of the system.
In the above embodiment, in the process of resource distribution of the virtual resource of the random resource type, by subsidy updating of the target virtual resource, the rationality of virtual resource distribution can be effectively improved, and further the user experience can be better improved.
In an optional embodiment, in a case that the target virtual resource includes a plurality of virtual resources, before distributing the target virtual resource to the target object, the method may further include:
determining a third cumulative virtual resource of the plurality of virtual resources;
correspondingly, the distributing the target virtual resource to the target object includes:
and if the third accumulated virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
In a specific embodiment, in a case that the target virtual resource includes a plurality of virtual resources, it may be further determined whether an accumulated virtual resource (a third accumulated virtual resource) of the plurality of virtual resources satisfies a preset resource distribution condition, and if the third accumulated virtual resource satisfies the preset resource distribution condition, the target virtual resource is distributed to the target object.
In the above embodiment, when the target virtual resource includes a plurality of virtual resources, the cumulative virtual resource (third cumulative virtual resource) of the plurality of virtual resources is also subjected to distribution identification control in combination with the preset resource distribution condition, so that the rationality of resource distribution can be more comprehensively improved, and the user experience is better improved.
In an optional embodiment, the method further includes:
if the third accumulated virtual resource does not meet the preset resource distribution condition, generating a second subsidy virtual resource, wherein the second subsidy virtual resource and a fourth accumulated virtual resource of the designated virtual resource meet the preset resource distribution condition, and the designated virtual resource is any one of the plurality of virtual resources which meets the preset resource screening condition;
updating the specified virtual resource based on the second subsidized virtual resource;
updating the third accumulated virtual resource based on the updated designated virtual resource and other virtual resources, wherein the other virtual resources are virtual resources except the designated virtual resource in the plurality of virtual resources;
correspondingly, the distributing the target virtual resource to the target object may include:
and if the updated third accumulated virtual resource meets the preset resource distribution condition, distributing the target virtual resource to the target object.
In a specific embodiment, the designated virtual resource is any one of the plurality of virtual resources that meets the preset resource screening condition. Specifically, the preset resource screening condition may be set in combination with the actual application, and optionally, any virtual resource that meets the preset resource screening condition may be any virtual resource other than the virtual resource of the preset extracted resource type among the plurality of virtual resources, or may be any virtual resource randomly selected from the virtual resources of the specified resource type.
In a specific embodiment, for a case that the accumulated virtual resources of the multiple virtual resources do not satisfy the preset resource distribution condition, a second subsidy virtual resource may be generated in combination with the specified virtual resource, and in a specific embodiment, the second subsidy virtual resource may be a minimum integer (resource amount) in a case that it is ensured that the accumulated virtual resources of the second subsidy virtual resource and the specified virtual resource satisfy the preset resource distribution condition. After updating the specified virtual resource based on the second subsidized virtual resource, the third accumulated virtual resource may be updated. Optionally, if the updated third accumulated virtual resource meets the preset resource distribution condition, multiple virtual resources (target virtual resources) may be distributed to the target object; and otherwise, continuously updating the target virtual resource by combining the subsidy resource information until the updated target virtual resource meets the preset resource distribution condition.
In the above embodiment, when the accumulated virtual resources of the multiple virtual resources do not satisfy the preset resource distribution condition, the designated virtual resources of the multiple virtual resources are subsidized and updated, so that the rationality of resource distribution can be improved, and further, the user experience is better improved.
As can be seen from the technical solutions provided by the embodiments of the present specification, in the resource distribution process, in combination with a target resource type of a target virtual resource to be generated, configuration information used for generating the target virtual resource is determined from preset resource configuration information including resource configuration information corresponding to multiple resource types, so that the accuracy of virtual resources generated in multiple resource distribution scenarios can be improved while ensuring that a resource distribution system supports virtual resource distribution of multiple resource types; and by presetting the resource configuration information corresponding to various resource types, the resource distribution scenes can be effectively enriched, and simultaneously, the resource configuration information can be conveniently and directly reused through the modification of the resource configuration information subsequently, so that the multi-scene reusability of the system is greatly improved, and the expandability and the configuration flexibility of the system are further effectively improved.
FIG. 6 is a block diagram illustrating a resource distribution apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes:
a target resource type determining module 610 configured to execute a resource distribution request in response to a target object, and determine a target resource type corresponding to a target virtual resource to be distributed;
a target resource allocation information obtaining module 620 configured to perform obtaining target resource allocation information corresponding to a target resource type from preset resource allocation information, where the preset resource allocation information includes resource allocation information corresponding to multiple resource types, and the resource allocation information is allocation information used for generating virtual resources of the corresponding resource type;
a target virtual resource generation module 630 configured to perform generation of a target virtual resource based on the target resource configuration information;
a target virtual resource distribution module 640 configured to perform distribution of the target virtual resource to the target object.
Optionally, the target resource configuration information includes at least two pieces of resource configuration information to be selected and configuration selection information;
the target virtual resource generation module 630 includes:
a first resource configuration information determining unit configured to perform determining first resource configuration information from at least two resource configuration information to be selected according to configuration selection information;
and a first target virtual resource generation unit configured to execute generating a target virtual resource of the target object based on the first resource configuration information.
Optionally, the target resource types include: under the condition of the random resource type, the first resource configuration information comprises a first basic resource and a first resource floating parameter;
generating the target virtual resource of the target object based on the first resource configuration information includes:
a first resource interval generation unit configured to perform determining a first resource interval according to a first base resource and a first resource floating parameter;
a first random sampling unit configured to perform a random determination of a target virtual resource based on the first resource interval.
Optionally, the target resource types include: under the condition of the random resource type, the first resource configuration information comprises a plurality of first preset virtual resources and first selection parameters corresponding to the first preset virtual resources;
the target virtual resource generation comprises:
a target virtual resource determination unit configured to perform a determination of a target virtual resource from a plurality of first preset virtual resources based on a first selection parameter.
Optionally, the target resource types include: under the condition of the expansion resource type, the first resource configuration information comprises a second basic resource, a second resource floating parameter and a first expansion coefficient;
the target virtual resource generation module 630 includes:
a second resource interval determination unit configured to perform determining a second resource interval according to a second base resource and a second resource floating parameter;
a second random sampling unit configured to perform random determination of the first initial virtual resource based on the second resource interval;
a second target virtual resource generation unit configured to perform generation of a target virtual resource based on the first initial virtual resource and the first expansion coefficient.
Optionally, the target resource types include: under the condition of the expansion resource type, the first resource configuration information comprises a plurality of second preset virtual resources, second selection parameters corresponding to the second preset virtual resources and second expansion coefficients;
generating the target virtual resource of the target object based on the first resource configuration information includes:
a second initial virtual resource determining unit configured to perform determining a second initial virtual resource from a plurality of second preset virtual resources based on a second selection parameter;
a third target virtual resource generation unit configured to perform generation of a target virtual resource based on the second initial virtual resource and the second expansion coefficient.
Optionally, the target resource type determining module 610 includes:
a resource distribution request receiving unit configured to execute receiving a resource distribution request, the resource distribution request including an initial resource type of a virtual resource requested by the resource distribution request;
a first target resource type determination unit configured to perform the setting of the initial resource type as the target resource type.
Optionally, after receiving the resource distribution request, the apparatus further includes:
the abnormality detection unit is configured to perform abnormality detection on the target object to obtain an abnormality detection result;
and the second target resource type determining unit is configured to execute, if the abnormality detection result indicates that the target object has an abnormality, taking an abnormal resource type corresponding to the initial resource type as the target resource type.
Optionally, the apparatus further comprises:
the extraction qualification identification unit is configured to perform extraction qualification identification on the target object based on the object attribute information and/or the resource attribute information of the target object to obtain an extraction qualification identification result if the abnormality detection result indicates that the target object has no abnormality;
and the third target resource type determining unit is configured to execute the extraction qualification of the virtual resource with the preset extraction resource type if the extraction qualification identification result is the extraction qualification, and update the initial resource type based on the preset extraction resource type to obtain the target resource type.
Optionally, in the case that the target resource type includes a preset extracted resource type; the target resource configuration information includes: a third preset virtual resource corresponding to at least one resource amount, a remaining quantity of the third preset virtual resource corresponding to any resource amount, a third selection parameter of the third preset virtual resource corresponding to any resource amount, and an extraction state of the third preset virtual resource corresponding to any resource amount;
the target virtual resource generation module 630 includes:
a virtual resource extraction unit configured to perform random extraction of virtual resources from third virtual resources corresponding to the at least one resource amount based on a third selection parameter;
and the fourth target resource type determining unit is configured to execute, if the extraction result is that the virtual resource is extracted, the extraction state of the extracted virtual resource is a starting state, and the residual quantity of the extracted virtual resource is greater than a preset threshold value, taking the extracted virtual resource as the target virtual resource.
Optionally, the apparatus further comprises:
a remaining number updating unit configured to perform updating extraction to a remaining number corresponding to the virtual resource;
and the extraction state updating unit is configured to update the extraction state corresponding to the extracted virtual resource to a closed state if the updated residual quantity is less than or equal to a preset threshold.
Optionally, in the case that the target resource type includes an abnormal resource type; the target resource configuration information comprises second resource configuration information corresponding to the initial resource type and a preset resource upper limit;
the target virtual resource generation module 630 includes:
a third initial virtual resource generation unit configured to perform generation of a third initial virtual resource based on the second resource configuration information;
a first accumulated virtual resource determination unit configured to perform determining a first accumulated virtual resource of the target object;
the reduction coefficient generating unit is configured to execute the step of generating a reduction coefficient according to the first accumulated virtual resource and a preset resource upper limit if the first accumulated virtual resource is greater than or equal to the preset resource upper limit;
and a reduction processing unit configured to perform reduction processing on the third initial virtual resource based on the reduction coefficient, resulting in a target virtual resource.
Optionally, the target virtual resource distribution module is further configured to execute, if the target virtual resource meets a preset resource distribution condition, distributing the target virtual resource to the target object.
Optionally, in a case that the target virtual resource is a virtual resource of a random resource type, the apparatus further includes:
and the iteration processing module is configured to execute the step of generating the target virtual resource based on the target resource configuration information repeatedly until the target virtual resource meets the preset resource distribution condition if the target virtual resource does not meet the preset resource distribution condition.
Optionally, in a case that the target virtual resource is a virtual resource of an inflation resource type, the apparatus further includes:
the first subsidy virtual resource generating module is configured to execute the steps of generating a first subsidy virtual resource if the target virtual resource does not meet the preset resource distribution condition, wherein the first subsidy virtual resource and a second accumulated virtual resource of the initial virtual resource corresponding to the target virtual resource meet the preset resource distribution condition;
the target virtual resource updating module is configured to update the target virtual resource based on the second accumulated virtual resource and the expansion coefficient corresponding to the target virtual resource;
the target virtual resource distribution module is further configured to execute distribution of the updated target virtual resource to the target object if the updated target virtual resource meets a preset resource distribution condition.
Optionally, in a case that the target virtual resource includes a plurality of virtual resources, the apparatus further includes:
a third cumulative virtual resource determination module configured to perform determining a third cumulative virtual resource of the plurality of virtual resources;
the target virtual resource distribution module is further configured to execute the distribution of the target virtual resource to the target object if the third accumulated virtual resource meets the preset resource distribution condition.
Optionally, the apparatus further comprises:
the second subsidy virtual resource generating module is configured to execute the step of generating a second subsidy virtual resource if the third accumulated virtual resource does not meet the preset resource distribution condition, wherein the second subsidy virtual resource and a fourth accumulated virtual resource of the designated virtual resource meet the preset resource distribution condition, and the designated virtual resource is any one of the plurality of virtual resources which meets the preset resource screening condition;
a designated virtual resource update module configured to perform an update of the designated virtual resource based on the second subsidized virtual resource;
a third cumulative virtual resource updating module configured to update the third cumulative virtual resource based on the updated specified virtual resource and other virtual resources, the other virtual resources being virtual resources other than the specified virtual resource among the plurality of virtual resources;
the target virtual resource distribution module is further configured to execute distribution of the target virtual resource to the target object if the updated third accumulated virtual resource meets the preset resource distribution condition.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an electronic device for resource distribution, which may be a terminal, according to an exemplary embodiment, and an internal structure diagram of the electronic device may be as shown in fig. 7. The electronic device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a resource distribution method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Fig. 8 is a block diagram illustrating an electronic device for resource distribution, which may be a server, according to an example embodiment, and an internal structure thereof may be as shown in fig. 8. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a resource distribution method.
It will be understood by those skilled in the art that the configurations shown in fig. 7 or fig. 8 are only block diagrams of some configurations relevant to the present disclosure, and do not constitute a limitation on the electronic device to which the present disclosure is applied, and a particular electronic device may include more or less components than those shown in the drawings, or combine some components, or have a different arrangement of components.
In an exemplary embodiment, there is also provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the resource distribution method as in the embodiments of the present disclosure.
In an exemplary embodiment, there is also provided a computer-readable storage medium, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a resource distribution method in the embodiments of the present disclosure.
In an exemplary embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the resource distribution method in the embodiments of the present disclosure.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
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 application 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.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for resource distribution, comprising:
responding to a resource distribution request of a target object, and determining a target resource type corresponding to a target virtual resource to be distributed;
acquiring target resource configuration information corresponding to the target resource type from preset resource configuration information, wherein the preset resource configuration information comprises resource configuration information corresponding to multiple resource types, and the resource configuration information is configuration information used for generating virtual resources corresponding to the resource types;
generating the target virtual resource based on the target resource configuration information;
and distributing the target virtual resource to the target object.
2. The resource distribution method according to claim 1, wherein the target resource configuration information includes at least two resource configuration information to be selected and configuration selection information;
the generating the target virtual resource of the target object based on the target resource configuration information comprises:
determining first resource configuration information from the at least two resource configuration information to be selected according to the configuration selection information;
and generating a target virtual resource of the target object based on the first resource configuration information.
3. The resource distribution method of claim 2, wherein the target resource type comprises: under the condition of a random resource type, the first resource configuration information comprises a first basic resource and a first resource floating parameter;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
generating a first resource interval according to the first basic resource and the first resource floating parameter;
and randomly determining the target virtual resource based on the first resource interval.
4. The resource distribution method of claim 2, wherein the target resource type comprises: under the condition of a random resource type, the first resource configuration information comprises a plurality of first preset virtual resources and first selection parameters corresponding to the plurality of first preset virtual resources;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
determining the target virtual resource from the plurality of first preset virtual resources based on the first selection parameter.
5. The resource distribution method of claim 2, wherein the target resource type comprises: in the case of the inflation resource type, the first resource configuration information includes a second basic resource, a second resource floating parameter, and a first inflation coefficient;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
generating a second resource interval according to the second basic resource and the second resource floating parameter;
randomly determining a first initial virtual resource based on the second resource interval;
generating the target virtual resource based on the first initial virtual resource and the first expansion coefficient.
6. The resource distribution method of claim 2, wherein the target resource type comprises: under the condition of the expansion resource type, the first resource configuration information includes a plurality of second preset virtual resources, second selection parameters corresponding to the plurality of second preset virtual resources, and second expansion coefficients;
the generating the target virtual resource of the target object based on the first resource configuration information comprises:
determining a second initial virtual resource from the plurality of second preset virtual resources based on the second selection parameter;
generating the target virtual resource based on the second initial virtual resource and the second expansion coefficient.
7. A resource distribution apparatus, comprising:
the target resource type determining module is configured to execute a resource distribution request responding to the target object and determine a target resource type corresponding to the target virtual resource to be distributed;
a target resource allocation information obtaining module configured to perform obtaining, from preset resource allocation information, target resource allocation information corresponding to the target resource type, where the preset resource allocation information includes resource allocation information corresponding to multiple resource types, and the resource allocation information is allocation information used for generating virtual resources of the corresponding resource types;
a target virtual resource generation module configured to perform generation of the target virtual resource based on the target resource configuration information;
a target virtual resource distribution module configured to perform distribution of the target virtual resource to the target object.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the resource distribution method of any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the resource distribution method of any of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that the computer instructions, when executed by a processor, implement the resource distribution method of any of claims 1 to 6.
CN202110784514.0A 2021-07-12 2021-07-12 Resource distribution method and device, electronic equipment and storage medium Pending CN113610558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110784514.0A CN113610558A (en) 2021-07-12 2021-07-12 Resource distribution method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110784514.0A CN113610558A (en) 2021-07-12 2021-07-12 Resource distribution method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113610558A true CN113610558A (en) 2021-11-05

Family

ID=78337465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110784514.0A Pending CN113610558A (en) 2021-07-12 2021-07-12 Resource distribution method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113610558A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473857A (en) * 2022-09-14 2022-12-13 北京奇艺世纪科技有限公司 Resource distribution method, device, system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633389A (en) * 2016-07-19 2018-01-26 北大方正集团有限公司 A kind of distribution method and device of electronics red packet
WO2019072197A1 (en) * 2017-10-11 2019-04-18 上海掌门科技有限公司 Red packet distribution method, device, and medium
CN110753235A (en) * 2019-10-29 2020-02-04 北京字节跳动网络技术有限公司 Live broadcast room red packet processing method and device, medium and electronic equipment
CN112866084A (en) * 2020-12-31 2021-05-28 上海掌门科技有限公司 Virtual resource processing method, equipment and computer readable medium for chat group
CN113065887A (en) * 2021-03-08 2021-07-02 南京苏宁软件技术有限公司 Resource processing method, resource processing device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633389A (en) * 2016-07-19 2018-01-26 北大方正集团有限公司 A kind of distribution method and device of electronics red packet
WO2019072197A1 (en) * 2017-10-11 2019-04-18 上海掌门科技有限公司 Red packet distribution method, device, and medium
CN110753235A (en) * 2019-10-29 2020-02-04 北京字节跳动网络技术有限公司 Live broadcast room red packet processing method and device, medium and electronic equipment
CN112866084A (en) * 2020-12-31 2021-05-28 上海掌门科技有限公司 Virtual resource processing method, equipment and computer readable medium for chat group
CN113065887A (en) * 2021-03-08 2021-07-02 南京苏宁软件技术有限公司 Resource processing method, resource processing device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473857A (en) * 2022-09-14 2022-12-13 北京奇艺世纪科技有限公司 Resource distribution method, device, system, electronic equipment and storage medium
CN115473857B (en) * 2022-09-14 2023-12-15 北京奇艺世纪科技有限公司 Resource distribution method, device and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112330685B (en) Image segmentation model training method, image segmentation device and electronic equipment
CN109614238B (en) Target object identification method, device and system and readable storage medium
CN111031336A (en) Live broadcast list data updating method and device, electronic equipment and storage medium
CN112637008B (en) Link simulation test method, device, system, computer equipment and storage medium
CN112181423B (en) Project construction method and device based on configuration file, computer equipment and medium
CN108564345B (en) Insurance platform data processing method, electronic device and computer readable storage medium
CN113051458A (en) Data processing method and device, electronic equipment and storage medium
CN113469736A (en) Resource distribution control method, device, system, electronic device and storage medium
CN111209061A (en) Method and device for filling in user information, computer equipment and storage medium
CN113610558A (en) Resource distribution method and device, electronic equipment and storage medium
CN113343024B (en) Object recommendation method and device, electronic equipment and storage medium
CN114461897A (en) Information processing method, device, electronic equipment and storage medium
CN112181437B (en) Gray release method and device based on Devops, computer equipment and storage medium
CN111221517A (en) Model creating method and device, computer equipment and readable storage medium
CN114491093A (en) Multimedia resource recommendation and object representation network generation method and device
CN113901114A (en) Data display method and device, electronic equipment and storage medium
CN114428899A (en) Multimedia resource pushing method and device, electronic equipment and storage medium
CN113362259A (en) Image noise reduction processing method and device, electronic equipment and storage medium
CN113645064B (en) Task issuing method and device, electronic equipment and storage medium
CN113469735B (en) Resource processing method and device, electronic equipment and storage medium
CN113672829B (en) Page display method and device, electronic equipment and storage medium
CN115756577A (en) Software release method and device, electronic equipment and storage medium
CN111526253B (en) Call control method, device, computer equipment and storage medium
CN115580752A (en) Data processing method and device, electronic equipment and storage medium
CN117453931A (en) Multimedia editing template recommendation method and device, electronic equipment and medium

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