CN116485096A - Resource processing method, device, computer equipment and storage medium - Google Patents

Resource processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116485096A
CN116485096A CN202310198353.6A CN202310198353A CN116485096A CN 116485096 A CN116485096 A CN 116485096A CN 202310198353 A CN202310198353 A CN 202310198353A CN 116485096 A CN116485096 A CN 116485096A
Authority
CN
China
Prior art keywords
resource
subset
initial
target
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
CN202310198353.6A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310198353.6A priority Critical patent/CN116485096A/en
Publication of CN116485096A publication Critical patent/CN116485096A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a resource processing method, a device, computer equipment, a storage medium and a computer program product, and relates to the technical field of big data processing. The method comprises the following steps: obtaining target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters; acquiring a first initial resource from a resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range; generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that parameters of the initial resource set meet preset conditions. By adopting the method, the efficiency and accuracy of generating the resource set can be improved.

Description

Resource processing method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of big data processing technologies, and in particular, to a resource processing method, apparatus, computer device, and storage medium.
Background
In some resource interaction scenes, there are some resources with poor fluidity, and the some resources are difficult to generate resource benefits, which can cause the problem of resource waste. In general, resources meeting the set index can be extracted from the specific information corresponding to the part of resources to obtain a resource set, and the resources in the resource set are converted to generate resource benefits.
However, when the amount of resources with poor fluidity is large or the setting of the index is complex, a large amount of data needs to be processed, and the efficiency and accuracy of acquiring the resource set cannot be ensured.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a resource processing method, apparatus, computer device, storage medium, and computer program product that improve the efficiency and accuracy of acquiring a set of resources.
In a first aspect, an embodiment of the present disclosure provides a resource processing method, where the method includes:
obtaining target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters;
acquiring a first initial resource from a resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range;
Generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that parameters of the initial resource set meet preset conditions.
In one embodiment, the determining that the initial resource set is the target resource set when the parameter of the initial resource set meets a preset condition includes:
and determining the initial resource set as a target resource set under the condition that the difference value between the parameter of the initial resource set and the preset parameter is in a second preset range.
In one embodiment, the obtaining a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset includes:
and under the condition that the resource quantity of the initial resource subset is smaller than the preset resource quantity, acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to the initial resource subset until the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, so as to obtain the target resource subset.
In one embodiment, the obtaining a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset includes:
acquiring the number of resource transfer times corresponding to the initial resource subset;
acquiring a second initial resource from the initial resource subset under the condition that the number of resource transfer times is smaller than the preset number of times and the resource quantity of the initial resource subset is larger than or equal to the preset resource quantity, wherein the difference value between the index parameter of the second initial resource and the target index parameter is in a fourth preset range;
and transferring the second initial resources to the resource group until the number of resource transfer times is equal to the preset number of times, and obtaining a target resource subset.
In one embodiment, the obtaining the first initial resource from the resource group matched with the subset attribute includes:
determining a resource group matched with the subset attribute from a preset resource group;
determining a plurality of groups of candidate resources of which the difference value between the index parameter and the target index parameter in the resource group is in a first preset range;
And acquiring a first initial resource from the plurality of groups of candidate resources according to a preset resource extraction mode.
In a second aspect, embodiments of the present disclosure further provide a resource processing apparatus, including:
the acquisition module is used for acquiring target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters;
the transfer module is used for acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range;
the determining module is used for generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that the parameters of the initial resource set meet preset conditions.
In one embodiment, the determining module includes:
the first determining submodule is used for determining the initial resource set as a target resource set under the condition that the difference value between the parameter of the initial resource set and the preset parameter is in a second preset range.
In one embodiment, the transfer module comprises:
and the first transfer sub-module is used for acquiring a first initial resource from the resource group matched with the subset attribute under the condition that the resource quantity of the initial resource subset is smaller than the preset resource quantity, and transferring the first initial resource to the initial resource subset until the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, so as to obtain the target resource subset.
In one embodiment, the transfer module comprises:
the first acquisition sub-module is used for acquiring the resource transfer times corresponding to the initial resource subset;
a second obtaining sub-module, configured to obtain a second initial resource from the initial resource subset when the number of resource transfers is less than a preset number and the resource amount of the initial resource subset is greater than or equal to a preset resource amount, where a difference between an index parameter of the second initial resource and the target index parameter is located in a fourth preset range;
and the second transferring sub-module is used for transferring the second initial resources to the resource group until the number of the resource transfer times is equal to the preset number of times, so as to obtain a target resource subset.
In one embodiment, the transfer module comprises:
a second determining submodule, configured to determine a resource group matched with the subset attribute from a preset resource group;
a third determining submodule, configured to determine a plurality of candidate resources in which a difference between the index parameter and the target index parameter in the resource group is located in a first preset range;
and the third acquisition sub-module is used for acquiring the first initial resources from the plurality of groups of candidate resources according to a preset resource extraction mode.
In a third aspect, embodiments of the present disclosure also provide a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments of the present disclosure when the computer program is executed.
In a fourth aspect, embodiments of the present disclosure also provide a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments of the present disclosure.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method according to any of the embodiments of the present disclosure.
According to the embodiment of the disclosure, when the resources are processed, the target parameters are acquired, the first initial resources are acquired from the corresponding resource groups according to the target parameters, the first initial resources are transferred to the initial resource subsets, the target resource subsets conforming to the index parameters can be obtained, the initial resource sets are generated according to the target resource subsets, and when the initial resource sets conform to the preset conditions, the initial resource sets are determined to be the target resource sets, so that the generation of the multi-level resource sets is realized; firstly, acquiring a subset conforming to the index, and then generating a resource set conforming to the index from the subset, so that the finally obtained resource set and the subset both meet the index requirement and can be suitable for more application scenes; and resources are extracted from the corresponding resource sub-pools, and judgment and comparison are performed, so that the resource set generation efficiency and accuracy can be effectively improved, and the method is suitable for extracting a plurality of application scenes such as resource sets from mass resources.
Drawings
FIG. 1 is a flow diagram of a method of resource processing in one embodiment;
FIG. 2 is a schematic diagram of a resource processing system in one embodiment;
FIG. 3 is a flow diagram of a method of resource processing in one embodiment;
FIG. 4 is a flow diagram of a method of resource processing in one embodiment;
FIG. 5 is a flow diagram of a method of resource processing in one embodiment;
FIG. 6 is a flow diagram of a method of resource processing in one embodiment;
FIG. 7 is a flow diagram of a method of resource processing in one embodiment;
FIG. 8 is a flow diagram of a method of generating a resource set in one embodiment;
FIG. 9 is a flow diagram of a method of optimizing a subset of resources in one embodiment;
FIG. 10 is a block diagram of a resource processing device in one embodiment;
FIG. 11 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the disclosed embodiments and are not intended to limit the disclosed embodiments.
The data acquisition, storage, use and processing and the like in the technical scheme meet the relevant regulations of national laws and regulations.
In one embodiment, as shown in fig. 1, there is provided a resource processing method, the method comprising:
Step S110, obtaining target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters;
in the embodiment of the disclosure, when the target resource set is determined, the target parameter is acquired. Specifically, the target parameters include a subset attribute of the target resource subset and a target index parameter, wherein the target resource set and resources in the target resource subset are obtained from a preset resource pool, and because different types of resources need to be obtained from the resource pool to generate the target resource set under different application scenarios, in this embodiment, the target resource set includes the target resource subset, and in the process of obtaining the resources to form the resource set, the extracted resource types are limited by the subset attribute of the target resource subset. In general, the subset attribute may be determined according to an actual application scenario, for example, a resource pool may include resources in multiple different regions, and when it is required to ensure that a target resource set obtained by final obtaining includes resources in multiple different regions, the subset attribute may be corresponding to a region to which the resources belong; the resource pool may further include a plurality of resources with different resource attributes, where the resource attributes may include, but are not limited to, fixed resources, variable resources, and when it is required to ensure that the finally obtained target resource set includes the resources with different resource attributes, the subset attribute may be corresponding to the resource attribute corresponding to the resource. The target index parameter is typically set in advance according to the actual application scenario, and in one example, the resources in the resource pool and the resource set correspond to a resource deadline and a resource benefit, so the target index parameter may include, but is not limited to, a target deadline and a target benefit of the target resource subset. In one example, the target parameter corresponds to a parameter of the target resource subset, and when the target parameter is determined, the target parameter may be obtained through a target setting parameter of a target resource set corresponding to the target resource subset, that is, the target setting parameter of the target resource set is obtained, and the target parameter corresponding to the target resource subset is determined according to the target setting parameter, where the target setting parameter may be obtained according to an actual application scenario setting.
Fig. 2 is a schematic structural diagram of a resource processing system according to an exemplary embodiment, and referring to fig. 2, an overall resource group includes N resource groups, each of the resource groups includes multiple groups of resources, and each of the groups of resources corresponds to a corresponding parameter. In the resource processing process, M resource sets need to be generated, each resource set includes N resource subsets, and resources in each resource subset are extracted from a corresponding resource group, where M, N is set to an integer greater than 0. In one example, the determination manner of the resource group in each resource group may be obtained by dividing the resource group according to the actual application scenario according to the resource attribute, where the resource attribute may include, but is not limited to, a region to which the resource belongs. In an example, the resources in the whole resource group are the resources meeting the preset requirements after being screened, for example, when the resource set needs to be acquired for resource conversion, the resources in the corresponding whole resource group are all the resources capable of resource conversion.
Step S120, a first initial resource is obtained from a resource group matched with the subset attribute, and the first initial resource is transferred to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range;
In the embodiment of the disclosure, after the target parameter is determined, according to the subset attribute corresponding to the target parameter, a first initial resource is obtained from the resource group matched with the subset attribute. Specifically, the resource grouping may be obtained by dividing a preset resource group according to preset attribute information, where a correspondence exists between the preset attribute information and the subset attribute. In one possible implementation manner, the preset resource groups include a plurality of groups of resource groups obtained by dividing according to preset attribute information, and one or more groups of resources are corresponding to each resource group. And determining a matched resource group according to the subset attribute in the target parameter, determining a first initial resource of which the difference value between the index parameter and the target index parameter is in a first preset range from the determined resource group, transferring the first initial resource from the resource group to the initial resource subset to obtain the target resource subset, wherein the first preset range can be determined according to an actual application scene in general. In an example, the resource group may include a plurality of candidate resources with index parameters meeting the conditions, a first initial resource may be determined from the plurality of candidate resources with index parameters meeting the conditions according to a preset extraction mode, where the preset extraction mode may be determined according to an actual application scenario, for example, the preset extraction mode may be set to be a candidate resource with the largest extraction resource amount or the smallest extraction resource amount as the first initial resource; the preset extraction mode can also be set to be random extraction. And transferring the first initial resource to the initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the target resource subset and the target index parameter is within a preset error range. In one example, when the difference between the index parameter of the initial resource subset obtained after the transfer and the target index parameter is not within the preset error range, the first initial resource may be continuously extracted from the resource group and the resource transfer may be performed until the difference between the index parameter of the obtained initial resource subset and the target index parameter is within the preset error range, so as to obtain the target resource subset. In another example, a preset transfer number may be further set, and when the resource transfer number reaches the preset transfer number, a target resource subset is obtained, so as to optimize an index parameter of the target resource subset.
Step S130, generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that the parameters of the initial resource set meet preset conditions.
In the embodiment of the disclosure, an initial resource set is generated according to the obtained target resource subset, and the initial resource set is determined to be the target resource set under the condition that parameters of the initial resource set meet preset conditions. Specifically, the obtained target resource subsets are combined to obtain an initial resource set, whether the parameters of the initial resource set meet preset conditions is judged, and when the parameters of the initial resource set meet the preset conditions, the initial resource set at the moment is considered to meet the requirements, and the initial resource set is determined to be the target resource set. The preset condition may be obtained in advance according to an actual application scenario. In one possible implementation manner, the preset condition may be set such that a difference between a parameter of the target resource set and the preset parameter is within a preset error range, so that the obtained target resource set meets the requirement, where the preset parameter and the preset error range are both obtained according to the actual application scenario; the damage condition may also be set such that the amount of resources in the target set of resources reaches a preset threshold, so that the obtained amount of resources in the target set of resources meets the standard. In one possible implementation manner, summarizing, when the parameters of the initial resource set do not meet the preset conditions, the first initial resource can be acquired again to update the target resource subset, the new target resource subset is utilized to form the initial resource set, judgment is performed again, and iteration is continued until the obtained initial resource set meets the preset conditions. In one example, the initial resource set may include one or more target resource subsets, which may be specifically set according to an actual application scenario.
Fig. 3 is a flowchart of a resource processing method according to an exemplary embodiment, and with reference to fig. 3, targets of a target resource set are set according to an actual application scenario, where the targets may include, but are not limited to, preset parameters and the like; setting an error threshold by combining the targets of the target resource set and the actual application scene, wherein the error threshold can also be obtained by determining a preset range of the difference value; determining basic indexes of the whole resource group and the resource group according to the application scene; determining basic indexes of a target resource subset in the target resource set according to targets of the target resource set; generating an initial resource set according to the basic indexes of the target resource subset, judging and optimizing the initial resource set, and updating the resources in the resource group and the resource group according to the resource transfer condition; and under the condition that a plurality of target resource sets are required to be acquired, judging whether the number of the target resource sets meets the requirement, if so, obtaining a plurality of target resource sets, generating the target resource sets, and if not, continuously generating and optimizing the target resource sets until the number meets the requirement.
According to the embodiment of the disclosure, when the resources are processed, the target parameters are acquired, the first initial resources are acquired from the corresponding resource groups according to the target parameters, the first initial resources are transferred to the initial resource subsets, the target resource subsets conforming to the index parameters can be obtained, the initial resource sets are generated according to the target resource subsets, and when the initial resource sets conform to the preset conditions, the initial resource sets are determined to be the target resource sets, so that the generation of the multi-level resource sets is realized; firstly, acquiring a subset conforming to the index, and then generating a resource set conforming to the index from the subset, so that the finally obtained resource set and the subset both meet the index requirement and can be suitable for more application scenes; and resources are extracted from the corresponding resource sub-pools, and judgment and comparison are performed, so that the resource set generation efficiency and accuracy can be effectively improved, and the method is suitable for extracting a plurality of application scenes such as resource sets from mass resources.
In one embodiment, as shown in fig. 4, in the case where the parameter of the initial resource set meets the preset condition, determining that the initial resource set is the target resource set includes:
step S131, determining the initial resource set as a target resource set if the difference between the parameter of the initial resource set and the preset parameter is within a second preset range.
In the embodiment of the disclosure, when the target resource set is determined, when the difference between the parameter of the initial resource set and the preset parameter is within the second preset range, the initial resource set is determined to be the target resource set. Specifically, the preset parameters are generally parameters obtained by setting according to an actual application scenario in advance, for example, when a resource set needs to be extracted from a resource pool, different preset parameters can be corresponding to the purpose of the resource set, and when the difference between the parameter of the resource set and the preset parameter meets the requirement, the resource set at the moment can be considered to meet the requirement. The second preset range can be set according to an actual application scene, in general, the second preset range can be set to a smaller value according to an allowable error, when the difference between the parameter of the initial resource set and the preset parameter is in the second preset range, that is, the difference is smaller at the moment, and in the allowable error range, the parameter of the initial resource set can be considered to meet the requirement at the moment, and the initial resource set at the moment is determined to be the target resource set. In one example, the parameters of the initial set of resources may be changed by adjusting the target subset of resources in the initial set of resources in the event that the difference between the parameters of the initial set of resources and the preset parameters is outside of the second preset range. In one example, different application scenarios may correspond to different parameters, and parameters of the initial resource set may be obtained according to a parameter type of the preset parameters, where the parameters may include, but are not limited to, a resource yield, a resource amount, a resource deadline, and the like, which is not limited in this disclosure.
According to the method and the device for determining the target resource set, when the target resource set is determined, the parameters of the initial resource set are compared with the preset parameters, and whether the initial resource set is the target resource set or not is judged by utilizing the difference value and the preset range, so that the parameters of the obtained target resource set accord with the preset parameters, the efficiency of generating the resource set is ensured, the accuracy of acquiring the target resource set is improved, the generated resource set accords with index requirements, and the method and the device for determining the target resource set can be suitable for more application scenes.
In one embodiment, as shown in fig. 5, the obtaining a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset, to obtain a target resource subset, includes:
step S121, when the resource amount of the initial resource subset is smaller than the preset resource amount, acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to the initial resource subset until the difference between the index parameter of the initial resource subset and the target index parameter is in a third preset range, thereby obtaining the target resource subset.
In the embodiment of the disclosure, when the target resource subset is determined, when the resource amount of the initial resource subset is smaller than the preset resource amount, the resource amount of the initial resource subset is considered to be smaller at the moment, the requirement is not met, and the resources need to be continuously extracted from the resource group. And determining a corresponding resource group according to the subset attribute in the target parameter, acquiring a first initial resource from the determined resource group, and transferring the first initial resource to the initial resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range. And obtaining the target resource subset under the condition that the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, wherein the third preset range can be obtained according to an actual application scene, and is usually a smaller parameter value within an error allowable range. In one example, there may be a plurality of sets of resources in the resource group, where the difference between the target index parameter and the target index parameter is within a first preset range, and the first initial resource may be determined from the plurality of sets of resources according to a preset resource determining manner, where the preset resource determining manner may include, but is not limited to, random extraction, extraction of a resource with a maximum amount of resources, extraction of a resource with a minimum amount of resources, and the disclosure is not limited thereto.
According to the method and the device for obtaining the target resource subset, the first initial resource is obtained from the resource group, and is transferred to the initial resource subset until index parameters of the initial resource subset meet requirements, the target resource subset is obtained, when the target resource subset is determined, the resources are extracted from the resource sub-pool, the obtained initial resource subset is judged, the parameters of the obtained target resource subset are guaranteed to meet the requirements, the obtaining of the resource subset meeting the requirements is achieved, and therefore a subsequent multi-level resource set can be generated, the generating requirements of the multi-level multi-index resource set are met, more complex application scenarios can be adapted, more accurate resource sets can be provided, and processing of the subsequent resource set is facilitated.
In one embodiment, as shown in fig. 6, the obtaining a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset, to obtain a target resource subset, includes:
step S122, obtaining the number of resource transfer times corresponding to the initial resource subset;
step S123, when the number of resource transfers is less than a preset number of times and the resource amount of the initial resource subset is greater than or equal to a preset resource amount, acquiring a second initial resource from the initial resource subset, where a difference value between an index parameter of the second initial resource and the target index parameter is located in a fourth preset range;
And step S124, transferring the second initial resource to the resource group until the number of resource transfer times is equal to the preset number of times, and obtaining a target resource subset.
In the embodiment of the present disclosure, when determining the target resource subset, the number of resource transfer times corresponding to the initial resource subset is obtained, where the number of resource transfer times may include, but is not limited to, the number of times of transferring out the resources in the initial resource subset, and the sum of the number of times of transferring in the resources, which may be specifically determined according to an actual application scenario. In this embodiment, when determining the target resource subset, the method further includes an optimization process for the target resource subset, specifically, a preset number of times may be set, a resource transfer number of times of the initial resource subset is limited, and iteration of the initial resource subset is implemented, so as to optimize the initial resource subset, where the preset number of times may be set according to an actual application scenario. When the resource amount of the initial resource subset is larger than or equal to the preset resource amount, the resource amount can be considered to meet the requirement at the moment, but when the resource transfer times are smaller than the preset times, the initial resource subset can be considered to be required to be continuously optimized at the moment so as to improve the quality of the obtained target resource subset, and therefore, the resource transfer from the initial resource subset to the resource grouping can be obtained. And determining a second initial resource from the initial resource subset, wherein the difference value between the index parameter of the second initial resource and the target index parameter is in a fourth preset range, the fourth preset range can be set according to an actual application scene, and when the difference value between the index parameter and the target index parameter is in the fourth preset range, the difference between the resource and the actual demand is considered to be larger at the moment, and the resource can be transferred from the initial resource subset to be put into a resource group. In one example, the fourth preset range may also be determined according to a difference between the parameter of the current initial resource subset and the target index parameter, and as the parameter of the initial resource subset changes in the resource transfer process, the fourth preset range may also change accordingly. When the number of resource transfer times corresponding to the initial resource subset is equal to the preset number of times, the number of resource transfer iterations at the moment can be considered to meet the requirement, and the initial resource subset at the moment is determined to be the target resource subset.
According to the method and the device for optimizing the resources, when the target resource subset is obtained, the obtained resource transfer times corresponding to the target resource subset are required to meet the preset times, the resources are transferred back to the resource group when the resource quantity of the initial resource subset is larger than the preset resource quantity, iterative optimization of the initial resource subset is achieved, the quality of the resources forming the target resource subset is guaranteed, the finally determined target resource subset meets the requirements, the accuracy of the process of extracting the resource forming the resource set from the resource group is further improved, and the method and the device can be suitable for more application scenes.
In one embodiment, as shown in fig. 7, the obtaining the first initial resource from the resource group matched with the subset attribute includes:
step S125, determining a resource group matched with the subset attribute from a preset resource group;
step S126, determining a plurality of groups of candidate resources of which the difference value between the index parameter and the target index parameter in the resource group is in a first preset range;
step S127, obtaining a first initial resource from the multiple sets of candidate resources according to a preset resource extraction mode.
In the embodiment of the disclosure, when the first initial resource is acquired, a matched resource group is determined from a preset resource group according to the subset attribute in the acquired target parameter. Wherein the preset resource group comprises one or more resource groups. In one example, the resources in the resource group are divided by a preset grouping method to obtain a divided resource group, namely a preset resource group, wherein the preset resource group comprises the divided resource group, the preset grouping method can be obtained according to the setting of an actual application scene, a corresponding relation exists between the preset grouping method and the dividing method of the subset attribute, and an association relation exists between the divided resource group and the subset attribute. In general, a resource group includes multiple groups of resources, and when determining a first initial resource, the resource group may include resources whose differences between multiple groups of index parameters and target index parameters are within a first preset range, and the multiple groups of resources are determined to be multiple groups of candidate resources. Acquiring first initial resources from a plurality of groups of candidate resources through a preset resource extraction mode, wherein the preset resource extraction mode can be obtained according to actual application scene setting, for example, the preset resource extraction mode can be set as the initial resource with the largest extraction resource amount or the smallest extraction resource amount as the first initial resource; the preset extraction mode can also be set to be random extraction.
According to the embodiment of the disclosure, the process of determining the resource grouping from the resource group can be realized through the subset attribute, so that the method is suitable for the application scene of a multi-level resource group, the accuracy of the generated resource set is improved, and the method can be suitable for the requirements of multi-level and multi-index; and the first initial resource is determined in a resource extraction mode, the parameters of the resource do not need to be judged and compared repeatedly, the calculated amount of data processing is reduced, the resource collection acquisition efficiency is improved, the resource collection can be acquired in time for subsequent processing under the condition of large resource amount, and the utilization rate of the resource is improved.
In one example, the methods described in this disclosure may be applied to multiple levelsThe generation of the multi-index resource set can enable the generated resource set to meet the preset index requirements, and meanwhile, a plurality of resource subsets included in the resource set also respectively meet the set subset index requirements. Specifically, a resource set target is first set, where the set target may include, but is not limited to, the number of resource sets M, the resource set element (the total resource amount BAL of the resource set target, the weighted term T of the resource set target, the weighted interest rate I of the resource set target, etc.); targets for grouping P resources in a resource set (resource total resource amount ratio BALP j Weighted term T j Weighted interest rate I j ). Setting an optimized error threshold, and setting a total resource quantity error threshold alpha, a weighted interest rate error threshold beta, a weighted remaining deadline error threshold gamma of the resource set, a total resource quantity error threshold alpha ' of the resource subset, a weighted interest rate error threshold beta ' of the resource subset and a weighted remaining deadline error threshold gamma ' of the resource subset according to an actual application scene. Calculating basic indexes of the whole resource group through the formulas (1), (2) and (3), wherein the basic indexes can comprise the following indexes of the whole resource group: the resource quantity K, the resource quantity of the resource group users and the resource group weighted interest rate, and the resource group weighted remaining period.
Calculating a basic index of the resource group by the formulas (4), (5), (6), wherein the basic index of the resource group may include the following indexes: the resource quantity Kj, the user average resource quantity, the weighted interest rate and the weighted remaining period.
The basic index of the initial set of resources is calculated from the targets of the set of resources, specifically, the number of resource groups initial assets required in the initial set of resources is calculated by equation (7).
Wherein C is a vector of 1*j.
And generating an initial resource set according to the calculated index. Specifically, fig. 8 is a flowchart of a method for generating a resource set according to an exemplary embodiment, and referring to fig. 8, an initial resource set is composed of P resource subsets, a jth initial resource subset is generated, and C is randomly extracted from a jth resource group according to a jth value of a resource number C of the initial resource set j Pen resources, the j resource subset forming the initial resource set, the extracted C is not reserved in the resource group j Pen resources. Optimizing the initial resource subset to obtain a j-th resource subset, and updating the resource group according to the transfer condition of the resources in the optimization process, wherein the aim of updating the resource group comprises checking to ensure that the resources of the resource subset are deleted in the resource group, thereby ensuring that no same resource exists in any two resource subsets; when the number of the generated resource subsets<And when P, the number of the resource subsets does not meet the requirement, and the resource subsets are continuously generated until the number of the resource subsets=p, and one resource set is generated by the P resource subsets. After obtaining the resource set, optimizing the resource set according to preset error thresholds alpha, beta and gamma, and optimizing the resourceUpdating the source group to ensure that the resources in the resource sets are deleted in the resource group and that no same resource exists in the two resource sets; when the number of the generated resource sets meets the preset requirement, for example, the number is equal to M, the resource processing process is completed, and when the number of the generated resource sets does not meet the preset requirement, for example, the number is smaller than M, the resource sets are continuously generated according to the flow until the number meets the preset requirement.
In this embodiment, the optimization modes of the resource set and the resource subset are the same, and the optimization of the resource set and the resource subset can be performed by using a greedy method. Taking the optimization process of the resource subset as an example, fig. 9 is a flowchart of a method for optimizing the resource subset according to an exemplary embodiment, and referring to fig. 9, the basic indexes of the initial resource subset include: number of resources k j Resource aggregate resource quantity bal j Resource aggregate weighted interest rate i j Resource set weighted remaining deadline t j . In determining whether the resource set satisfies the threshold condition, the determination may be made by the resource amount, the resource subset weighted interest rate, the resource subset weighted remaining term, specifically, by ABS (resource subset total resource amount bal j Resource set target total resource quantity BAL total resource quantity duty cycle BALP j ) Whether or not the total resource amount error threshold α' is equal to or less, ABS (resource subset weighted interest rate i) j Resource set target weighted interest rate I j ) Whether or not the weighted interest rate error threshold value beta' is equal to or less, ABS (resource subset weighted remaining term t) j Resource set target weighted remaining deadline T j ) Whether the resource set meets the threshold condition is judged by whether the weighted remaining deadline error threshold gamma 'is smaller than or equal to the weighted remaining deadline error threshold gamma'. When the resource subset is optimized, the basic index of the resource subset is firstly obtained, whether the corresponding resource grouping and the resource subset have resources or not is judged, if the resources do not meet the requirements, the iteration process is not required to be continued, and the iteration process is ended; judging whether the iteration times meet the preset times, if not, judging whether the resource subset meets the set threshold condition, and if not, entering a corresponding branch according to the comparison result between the resource quantity of the resource subset and the set resource quantity And transferring the resources according to the judgment result; and after the resource transfer, performing the next judgment and operation by using the current resource subset j and the current resource group j, namely the resource subset after adding one resource a (or deleting one resource b) and the resource group after deleting one resource a (or adding one resource b).
According to the method and the device for generating the resource set, the resource quantity of the initial resource set and the pen average resource quantity in the whole resource group are utilized, when the resources are acquired, the resources meeting the conditions are directly extracted, iterative adjustment judgment is carried out on the resource subset and the resource set, the speed of generating the resource set can be effectively improved, the resource subset is subjected to iterative optimization to obtain the resource set, the resource set is subjected to iterative optimization, the generated resource set and the resource subset can meet the corresponding index requirements, the generation of the multi-level multi-index resource subset is realized, the resource set meeting the constraint conditions can be obtained, and the method and the device can be suitable for various complex application scenes such as more mass resources.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the figures may include steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
Based on the same inventive concept, the embodiments of the present disclosure also provide a resource processing device for implementing the above-mentioned related resource processing method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more resource processing apparatus provided below may refer to the limitation of the resource processing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in FIG. 10, there is provided a resource processing apparatus 1000, the apparatus comprising:
an acquisition module 1010, configured to acquire target parameters, where the target parameters include a subset attribute of a subset of target resources and a target index parameter;
a transfer module 1020, configured to obtain a first initial resource from a resource packet that matches the subset attribute, and transfer the first initial resource to an initial resource subset to obtain a target resource subset, where a difference between an index parameter of the first initial resource and the target index parameter is in a first preset range;
the determining module 1030 is configured to generate an initial resource set according to the target resource subset, and determine that the initial resource set is a target resource set if parameters of the initial resource set meet a preset condition.
In one embodiment, the determining module includes:
the first determining submodule is used for determining the initial resource set as a target resource set under the condition that the difference value between the parameter of the initial resource set and the preset parameter is in a second preset range.
In one embodiment, the transfer module comprises:
and the first transfer sub-module is used for acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to the initial resource subset until the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, so as to obtain the target resource subset.
In one embodiment, the transfer module comprises:
the first acquisition sub-module is used for acquiring the resource transfer times corresponding to the initial resource subset;
a second obtaining sub-module, configured to obtain a second initial resource from the initial resource subset when the number of resource transfers is less than a preset number and the resource amount of the initial resource subset is greater than or equal to a preset resource amount, where a difference between an index parameter of the second initial resource and the target index parameter is located in a fourth preset range;
And the second transferring sub-module is used for transferring the second initial resources to the resource group until the number of the resource transfer times is equal to the preset number of times, so as to obtain a target resource subset.
In one embodiment, the transfer module comprises:
a second determining submodule, configured to determine a resource group matched with the subset attribute from a preset resource group;
a third determining submodule, configured to determine a plurality of candidate resources in which a difference between the index parameter and the target index parameter in the resource group is located in a first preset range;
and the third acquisition sub-module is used for acquiring the first initial resources from the plurality of groups of candidate resources according to a preset resource extraction mode.
The respective modules in the above-described resource processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data such as data generated or preset in the resource processing process of resource sets, resource groups, index parameters, subset attributes and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with an embodiment of the present disclosure and is not limiting of the computer device to which an embodiment of the present disclosure is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) according to the embodiments of the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided by the present disclosure may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided by the present disclosure may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided in the present disclosure may be general-purpose processors, central processing units, graphic processors, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like, without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few implementations of the disclosed embodiments, which are described in more detail and are not to be construed as limiting the scope of the disclosed embodiments. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made to the disclosed embodiments without departing from the spirit of the disclosed embodiments. Accordingly, the scope of the disclosed embodiments should be determined from the following claims.

Claims (13)

1. A method of resource processing, the method comprising:
obtaining target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters;
acquiring a first initial resource from a resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range;
Generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that parameters of the initial resource set meet preset conditions.
2. The method according to claim 1, wherein the determining that the initial resource set is the target resource set if the parameter of the initial resource set meets a preset condition includes:
and determining the initial resource set as a target resource set under the condition that the difference value between the parameter of the initial resource set and the preset parameter is in a second preset range.
3. The method of claim 1, wherein the obtaining a first initial resource from the resource group matching the subset attribute and transferring the first initial resource to an initial resource subset to obtain a target resource subset comprises:
and under the condition that the resource quantity of the initial resource subset is smaller than the preset resource quantity, acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to the initial resource subset until the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, so as to obtain the target resource subset.
4. The method of claim 1, wherein the obtaining a first initial resource from the resource group matching the subset attribute and transferring the first initial resource to an initial resource subset to obtain a target resource subset comprises:
acquiring the number of resource transfer times corresponding to the initial resource subset;
acquiring a second initial resource from the initial resource subset under the condition that the number of resource transfer times is smaller than the preset number of times and the resource quantity of the initial resource subset is larger than or equal to the preset resource quantity, wherein the difference value between the index parameter of the second initial resource and the target index parameter is in a fourth preset range;
and transferring the second initial resources to the resource group until the number of resource transfer times is equal to the preset number of times, and obtaining a target resource subset.
5. The method of claim 1, wherein the obtaining a first initial resource from a group of resources that match the subset attribute comprises:
determining a resource group matched with the subset attribute from a preset resource group;
determining a plurality of groups of candidate resources of which the difference value between the index parameter and the target index parameter in the resource group is in a first preset range;
And acquiring a first initial resource from the plurality of groups of candidate resources according to a preset resource extraction mode.
6. A resource processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring target parameters, wherein the target parameters comprise subset attributes of a target resource subset and target index parameters;
the transfer module is used for acquiring a first initial resource from the resource group matched with the subset attribute, and transferring the first initial resource to an initial resource subset to obtain a target resource subset, wherein the difference value between the index parameter of the first initial resource and the target index parameter is in a first preset range;
the determining module is used for generating an initial resource set according to the target resource subset, and determining the initial resource set as a target resource set under the condition that the parameters of the initial resource set meet preset conditions.
7. The apparatus of claim 6, wherein the determining module comprises:
the first determining submodule is used for determining the initial resource set as a target resource set under the condition that the difference value between the parameter of the initial resource set and the preset parameter is in a second preset range.
8. The apparatus of claim 6, wherein the transfer module comprises:
and the first transfer sub-module is used for acquiring a first initial resource from the resource group matched with the subset attribute under the condition that the resource quantity of the initial resource subset is smaller than the preset resource quantity, and transferring the first initial resource to the initial resource subset until the difference value between the index parameter of the initial resource subset and the target index parameter is in a third preset range, so as to obtain the target resource subset.
9. The apparatus of claim 6, wherein the transfer module comprises:
the first acquisition sub-module is used for acquiring the resource transfer times corresponding to the initial resource subset;
a second obtaining sub-module, configured to obtain a second initial resource from the initial resource subset when the number of resource transfers is less than a preset number and the resource amount of the initial resource subset is greater than or equal to a preset resource amount, where a difference between an index parameter of the second initial resource and the target index parameter is located in a fourth preset range;
and the second transferring sub-module is used for transferring the second initial resources to the resource group until the number of the resource transfer times is equal to the preset number of times, so as to obtain a target resource subset.
10. The apparatus of claim 6, wherein the transfer module comprises:
a second determining submodule, configured to determine a resource group matched with the subset attribute from a preset resource group;
a third determining submodule, configured to determine a plurality of candidate resources in which a difference between the index parameter and the target index parameter in the resource group is located in a first preset range;
and the third acquisition sub-module is used for acquiring the first initial resources from the plurality of groups of candidate resources according to a preset resource extraction mode.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the resource processing method of any of claims 1 to 5 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the resource processing method of any of claims 1 to 5.
13. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the resource processing method of any of claims 1 to 5.
CN202310198353.6A 2023-03-01 2023-03-01 Resource processing method, device, computer equipment and storage medium Pending CN116485096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310198353.6A CN116485096A (en) 2023-03-01 2023-03-01 Resource processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310198353.6A CN116485096A (en) 2023-03-01 2023-03-01 Resource processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116485096A true CN116485096A (en) 2023-07-25

Family

ID=87220302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310198353.6A Pending CN116485096A (en) 2023-03-01 2023-03-01 Resource processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116485096A (en)

Similar Documents

Publication Publication Date Title
CN106407207B (en) Real-time newly-added data updating method and device
CN111061758B (en) Data storage method, device and storage medium
CN110275889B (en) Feature processing method and device suitable for machine learning
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
CN108345699B (en) Method, device and storage medium for acquiring multimedia data
CN116485096A (en) Resource processing method, device, computer equipment and storage medium
CN114691630B (en) Smart supply chain big data sharing method and system
CN116932677A (en) Address information matching method, device, computer equipment and storage medium
CN113704565B (en) Learning type space-time index method, device and medium based on global interval error
CN116643902B (en) Interface data simulation method, device, apparatus, storage medium, and program product
CN117610815A (en) Resource quota data processing method, device, computer equipment and storage medium
CN117196598A (en) Resource transfer method, device, computer equipment and storage medium
CN116880927A (en) Rule management method, device, computer equipment and storage medium
CN117834715A (en) Service access processing method, device, computer equipment and storage medium
CN117376410A (en) Service pushing method, device, computer equipment and storage medium
CN116662348A (en) Financial database index construction method, device, equipment and storage medium
CN117909393A (en) Interface parameter mapping acquisition method, device, equipment, medium and program product
CN117112785A (en) Text extraction method, text extraction device, computer equipment and storage medium
CN115269539A (en) Data storage method and device, electronic equipment and storage medium
CN117951336A (en) Enterprise-level data standard processing method, device, equipment and medium
CN117435576A (en) Data migration method, data migration device, computer equipment, storage medium and product
CN117009821A (en) Database type selection method, device, computer equipment and storage medium
CN116755627A (en) Spatial data storage method, spatial data storage device, computer equipment and storage medium
CN116701784A (en) Dot search method, apparatus, device, storage medium, and program product
CN116991944A (en) Data synchronization method, device, computer equipment and storage 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