Resource consumption determination method and device, storage medium and electronic device
By detecting and estimating the virtual resource consumption of the product at different processing stages, the problem of low resource utilization in the existing technology is solved, and more reasonable resource allocation and utilization is achieved.
Patent Information
- Application Number
- CN202510636263.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-29
AI Technical Summary
In the prior art, since resource allocation is usually based on the maximum resource consumed by the product historically, the problem of low resource utilization is caused.
By detecting the resource consumption of the product in the first period, including the virtual resources consumed by the first processing, the second processing and the management, the resource consumption in the target period is estimated, and the actual resource consumption in the target period is determined based on these resources.
It improves the rationality and utilization rate of resource allocation and solves the problem of excessive resource allocation.
Smart Images

Figure CN120560833A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the financial field, and in particular, to a method, device, storage medium, electronic device, and computer program product for determining resource consumption. Background Art
[0002] Calculating the resources consumed by a product is conducive to the rational allocation of resources. In related technologies, resource allocation is usually based on the maximum resources consumed historically by the product. Therefore, there is a problem of low resource utilization due to the allocated amount of resources being far greater than the actual amount of resources consumed. Summary of the Invention
[0003] Embodiments of the present invention provide a method, device, storage medium, electronic device, and computer program product for determining resource consumption, so as to at least solve the problem of low resource utilization in related technologies caused by the allocated amount of resources being much greater than the actual amount of consumed resources.
[0004] According to one embodiment of the present invention, a method for determining resource consumption is provided, comprising: detecting a first resource consumed by a first product within a first time period from a target database, wherein the first resource comprises: a first virtual resource for indicating a first processing consumed by other authorized platforms on the first product within the first time period, a second virtual resource for indicating a second processing consumed by the first product within the first time period, and a third virtual resource for indicating a management of the first product within the first time period; determining a fourth virtual resource consumed by the other platforms for performing the first processing on the first product within the target time period based on the first virtual resource, determining a fifth virtual resource consumed by performing the second processing on the first product within the target time period based on the second virtual resource, and determining a sixth virtual resource consumed by managing the first product within the target time period based on the third virtual resource, wherein the target time period is later than the first time period; and determining the target resources consumed by the first product within the target time period based on the fourth virtual resource, the fifth virtual resource, and the sixth virtual resource.
[0005] In an optional embodiment, determining the fourth virtual resource consumed by the other platform to perform the first processing on the first product within the target time period based on the first virtual resource includes: determining the fourth virtual resource based on the first virtual resource, the first recycled resource obtained by consuming the first virtual resource, and the second recycled resource to be obtained by consuming the fourth virtual resource at the target moment, wherein the target moment is the moment of determining the target resource, and the target time period includes the target moment.
[0006] In an optional embodiment, determining the fifth virtual resource consumed for performing the second processing on the first product within the target time period based on the second virtual resource includes: determining the target resource amount of the seventh virtual resource and the target duration from the target moment to the acquisition moment of the first object acquiring the first product, wherein the seventh virtual resource is used to indicate the virtual resources corresponding to the first product to be transferred at the target moment after the first object acquires the first product; when the target resource amount is greater than the first threshold and the target duration is greater than the second threshold, determining that the second processing needs to be performed on the first product acquired by the first object, and determining the fifth virtual resource based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, wherein the eighth virtual resource is used to indicate the virtual resources to be transferred when it is determined that the second processing needs to be performed on the first product acquired by the second object, and the fifth virtual resource is used to indicate the virtual resources consumed for performing the second processing on the first product within the target time period, and the second object is the object that acquires the first product within the first time period.
[0007] In an optional embodiment, determining the sixth virtual resource consumed for managing the first product within the target time period based on the third virtual resource includes: determining the sixth virtual resource based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, wherein the ninth virtual resource is used to indicate the virtual resource to be transferred by the third object at the first moment, the first moment is the moment when the time from the third object to obtaining the first product is greater than the third threshold, the first time period includes the first moment, the third object includes the second object, the tenth virtual resource is used to indicate the virtual resource corresponding to the first product to be transferred at the second moment after the fourth object obtains the first product, the second moment is the moment when the time from the fourth object to obtaining the first product is greater than the fourth threshold, the target time period includes the second moment, the fourth threshold is less than the second threshold, and the fourth object includes the first object.
[0008] In an optional embodiment, the number of the first products that perform the first processing within the first time period is multiple, and the fourth virtual resource is determined based on the first virtual resource, the first recycling resource obtained by consuming the first virtual resource, and the second recycling resource to be obtained by consuming the fourth virtual resource at the target time, including: fourth virtual resource = second recycling resource × (first virtual resource / first recycling resource); wherein, the first virtual resource is the sum of the first virtual resources consumed by multiple first products that perform the first processing, and the first recycling resource is the sum of the first recycling resources obtained by multiple first products that consume the first virtual resource.
[0009] In an optional embodiment, the number of the first products that execute the second processing within the first time period is multiple, and the fifth virtual resource is determined based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, including: the fifth virtual resource = (seventh virtual resource) × (second virtual resource / eighth virtual resource); wherein, the second virtual resource is the sum of the second virtual resources consumed by multiple first products that execute the second processing, and the eighth virtual resource is the sum of the eighth virtual resources to be transferred from multiple first products that consume the second virtual resources.
[0010] In an optional embodiment, the number of the first products managed within the first time period is multiple, and the sixth virtual resource is determined based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, including: the sixth virtual resource = (tenth virtual resource) × (third virtual resource / ninth virtual resource); wherein, the third virtual resource is the sum of the third virtual resources consumed in managing multiple first products, and the ninth virtual resource is the sum of the ninth virtual resources to be transferred by multiple first products at the first moment.
[0011] In an optional embodiment, the target resource also includes: an eleventh virtual resource used to indicate the virtual resources consumed in transferring multiple first products within the target time period, and the eleventh virtual resource is determined in the following manner: the eleventh virtual resource = the twelfth virtual resource / the first number; wherein the twelfth virtual resource is used to indicate the virtual resources consumed in transferring multiple first products within the first time period, and the first number is used to indicate the number of the first products transferred in the first time period.
[0012] According to another embodiment of the present invention, a device for determining resource consumption is provided, comprising: a detection module for detecting a first resource consumed by a first product within a first time period from a target database, wherein the first resource comprises: a first virtual resource for indicating the first processing consumed by other authorized platforms during the first time period, a second virtual resource for indicating the second processing consumed by the first product during the first time period, and a third virtual resource for indicating the management of the first product during the first time period; a first determination module for determining a fourth virtual resource consumed by the other platforms during the target time period for performing the first processing on the first product based on the first virtual resource, a fifth virtual resource consumed by performing the second processing on the first product during the target time period based on the second virtual resource, and a sixth virtual resource consumed by managing the first product during the target time period based on the third virtual resource, wherein the target time period is later than the first time period; and a second determination module for determining the target resources consumed by the first product during the target time period based on the fourth virtual resource, the fifth virtual resource, and the sixth virtual resource. According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0013] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.
[0014] According to yet another embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0015] Through the present invention, since the target resources consumed by the first product in the target period are estimated based on the first resources consumed by the first product in the first period, resources can be allocated according to the estimated resource consumption. Therefore, the problem of low resource utilization caused by the resource allocation usually based on the maximum resources consumed historically by the product in the related art can be solved, thereby improving the rationality of resource allocation and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a hardware structure block diagram of a mobile terminal according to a method for determining resource consumption according to an embodiment of the present invention;
[0017] Figure 2is a flow chart of a method for determining resource consumption according to an embodiment of the present invention;
[0018] Figure 3 4 is a structural block diagram of a device for determining resource consumption according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.
[0020] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0021] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG is a block diagram of the hardware structure of a mobile terminal according to a method for determining resource consumption according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining resource consumption in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0024] In this embodiment, a method for determining resource consumption running on the above mobile terminal or network architecture is provided. Figure 2 FIG. 1 is a flow chart of a method for determining resource consumption according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0025] Step S202: Detecting first resources consumed by a first product during a first period from a target database, wherein the first resources include: a first virtual resource for indicating a first process consumed by another authorized platform on the first product during the first period; a second virtual resource for indicating a second process consumed by the first product during the first period; and a third virtual resource for indicating a third virtual resource consumed by managing the first product during the first period.
[0026] Step S204: determining, based on the first virtual resources, a fourth virtual resource consumed by the other platform performing the first processing on the first product within a target period; determining, based on the second virtual resources, a fifth virtual resource consumed by performing the second processing on the first product within the target period; and determining, based on the third virtual resources, a sixth virtual resource consumed by managing the first product within the target period, wherein the target period is later than the first period.
[0027] Step S206: determining target resources consumed by the first product within the target period based on the fourth virtual resource, the fifth virtual resource, and the sixth virtual resource.
[0028] In the above steps, the first time period includes but is not limited to: the past month, the past year, the past three years, the same period last year, etc., and the target time period includes but is not limited to: this month, this quarter, this year, etc. For example, when the first time period is January 2025, the target time period is February 2025.
[0029] The following uses the first product as a software product as an example to illustrate the solution in this embodiment:
[0030] In the case where the first product is a software product, the first resources include but are not limited to the virtual resources consumed by the first product to complete the upgrade within the first time period, the target resources include but are not limited to the virtual resources estimated to be consumed by the first product to complete the upgrade within the target time period, the first processing includes but is not limited to the construction of an upgrade package for upgrading the first product on other platforms within the first time period, the first virtual resources include but are not limited to the computing resources and / or storage resources consumed by the construction of the upgrade package within the first time period, the second processing includes but is not limited to the compatibility processing of the upgraded first product within the first time period, the second virtual resources include but are not limited to the computing resources and / or storage resources consumed by the compatibility processing of the upgraded first product within the first time period, the management of the first product includes but is not limited to the collection of operating data of the first product after the upgrade within the first time period, and the third virtual resources include but are not limited to the computing resources and / or storage resources consumed by the collection of operating data of the first product after the upgrade within the first time period.
[0031] The following example illustrates the solution in this embodiment by taking the first product as a financial product for a user defaulting on a transaction, and the resource consumption as the funds consumed in collecting debts from the defaulting user of the first product for the defaulted transaction.
[0032] The first resource includes but is not limited to data on funds spent on debt collection for default users in the first period, the target resource includes but is not limited to data on funds estimated to be spent on debt collection for default users in the target period, the first processing includes but is not limited to authorizing other platforms to collect debts for default users, the first virtual resource includes but is not limited to funds spent on authorizing other platforms to collect debts for default users, the second processing includes but is not limited to using litigation to collect debts for default users, the second virtual resource includes but is not limited to funds spent on using litigation to collect debts for default users, the management of the first product includes but is not limited to the management of the manual debt collection process for default users, and the third virtual resource includes but is not limited to funds spent on manual debt collection process for default users in the first period.
[0033] In the above steps, by estimating the resource consumption of the first product in the target period based on the resource consumption data of the first product in the first period, resources can be allocated according to the estimated resource consumption, which solves the problem of low resource utilization in related technologies caused by the resource allocation usually based on the maximum resources historically consumed by the product, and improves the rationality of resource allocation and resource utilization.
[0034] Among them, the executors of the above steps may be statistical and data analysis programs, risk management programs, devices or processors or servers equipped with the above programs, or computing devices associated with devices capable of collecting the above types of information, etc., but are not limited thereto.
[0035] In an optional embodiment, determining the fourth virtual resource consumed by the other platform to perform the first processing on the first product within the target time period based on the first virtual resource includes: determining the fourth virtual resource based on the first virtual resource, the first recycled resource obtained by consuming the first virtual resource, and the second recycled resource to be obtained by consuming the fourth virtual resource at the target moment, wherein the target moment is the moment of determining the target resource, and the target time period includes the target moment.
[0036] In the above steps, when the first product is a software product, the first recycled resources include but are not limited to the computing resources and / or storage resources whose consumption has been reduced by the first product after the upgrade during the first time period, the second recycled resources include but are not limited to the computing resources and / or storage resources whose consumption is to be reduced by the first product after the upgrade at the target time, and the fourth virtual resources include but are not limited to the computing resources and / or storage resources expected to be consumed by the upgrade package for upgrading the first product built on other platforms at the target time.
[0037] In the above steps, when the first product is a financial product in a user default transaction, the first recovery resource includes but is not limited to authorizing other platforms to collect the recovered funds from the defaulting user within the first time period, the second recovery resource includes but is not limited to authorizing other platforms to collect the funds to be recovered from the defaulting user at the target time, and the fourth virtual resource includes but is not limited to the funds estimated to be spent on authorizing other platforms to collect the funds from the defaulting user at the target time.
[0038] In an optional embodiment, determining the fifth virtual resource consumed for performing the second processing on the first product within the target time period based on the second virtual resource includes: determining the target resource amount of the seventh virtual resource and the target duration from the target moment to the acquisition moment of the first object acquiring the first product, wherein the seventh virtual resource is used to indicate the virtual resources corresponding to the first product to be transferred at the target moment after the first object acquires the first product; when the target resource amount is greater than the first threshold and the target duration is greater than the second threshold, determining that the second processing needs to be performed on the first product acquired by the first object, and determining the fifth virtual resource based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, wherein the eighth virtual resource is used to indicate the virtual resources to be transferred when it is determined that the second processing needs to be performed on the first product acquired by the second object, and the fifth virtual resource is used to indicate the virtual resources consumed for performing the second processing on the first product within the target time period, and the second object is the object that acquires the first product within the first time period.
[0039] In the above steps, when the first product is a software product, the seventh virtual resource includes but is not limited to the computing resources and / or storage resources that should be reduced but are still occupied by the running upgraded first product at the target time (i.e., virtual resources to be transferred), the eighth virtual resource includes but is not limited to the computing resources and / or storage resources that should be reduced but are still occupied by the running upgraded first product during the first period when performing the second process (i.e., virtual resources to be transferred), and the fifth virtual resource includes but is not limited to the computing resources and / or storage resources consumed by the running upgraded first product when performing the second process at the target time. Exemplarily, the acquisition time includes but is not limited to: the time when the upgraded first product starts running, the first threshold value includes but is not limited to: the computing resources and / or storage resources that should be reduced but are still occupied reach 20% of the computing resources that should be reduced and / or 20% of the storage resources that should be reduced, and the second threshold value includes but is not limited to: 10 hours, 20 hours, 30 hours, etc. The first object includes but is not limited to: a device that upgrades the first product within the target period and whose number of the fifth virtual resources at the target time is greater than a first threshold and whose time from the target time to the time of obtaining the first product is greater than a second threshold.
[0040] In the above steps, if the first product is a financial product traded in a user default, the seventh virtual resource includes but is not limited to the default amount of the defaulting user who traded the first product at the target time, the eighth virtual resource includes but is not limited to the default amount of the defaulting user when the second process is executed within the first time period, and the fifth virtual resource includes but is not limited to the estimated cost of using litigation to collect defaults from the defaulting user within the target time period. Exemplarily, the acquisition time includes but is not limited to: the transaction time of the first product, the first threshold includes but is not limited to: 100,000 yuan, 200,000 yuan, 300,000 yuan, etc., and the second threshold includes but is not limited to: 6 months, 8 months, 12 months, etc. The first target includes but is not limited to: users whose default amount is greater than the first threshold and whose default time at the target time is greater than the second threshold. Exemplarily, the first threshold includes but is not limited to being determined based on the average default amount of multiple defaulting users when the second process is executed within the first time period. The second threshold includes but is not limited to being determined based on the average difference between the default time of multiple defaulting users within the first time period and the target time.
[0041] In an optional embodiment, determining the sixth virtual resource consumed for managing the first product within the target time period based on the third virtual resource includes: determining the sixth virtual resource based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, wherein the ninth virtual resource is used to indicate the virtual resource to be transferred by the third object at the first moment, the first moment is the moment when the time from the third object to obtaining the first product is greater than the third threshold, the first time period includes the first moment, the third object includes the second object, the tenth virtual resource is used to indicate the virtual resource corresponding to the first product to be transferred at the second moment after the fourth object obtains the first product, the second moment is the moment when the time from the fourth object to obtaining the first product is greater than the fourth threshold, the target time period includes the second moment, the fourth threshold is less than the second threshold, and the fourth object includes the first object.
[0042] In the above steps, when the first product is a software product, the ninth virtual resource includes but is not limited to the computing resources and / or storage resources (i.e., virtual resources to be transferred) that should be reduced at the first moment but are still occupied by the first product after the upgrade, the first moment includes but is not limited to: the moment when the time length from the moment when the first product after the upgrade starts to run is greater than a third threshold, exemplarily, the third threshold is but not limited to: 1 hour, 2 hours, 3 hours, etc. The tenth virtual resource includes but is not limited to the computing resources and / or storage resources (i.e., virtual resources to be transferred) that should be reduced at the second moment but are still occupied by the first product after the upgrade, the second moment includes but is not limited to: the moment when the time length from the moment when the first product after the upgrade starts to run is greater than a fourth threshold, exemplarily, the fourth threshold is but not limited to: 1 hour, 2 hours, 3 hours, etc. The sixth virtual resource includes but is not limited to the computing resources and / or storage resources consumed for collecting the operation data of the first product after the upgrade.
[0043] In the above steps, in the case that the first product is a financial product in which the user defaults on the transaction, the third object includes but is not limited to users who default on the transaction of the first product within the first time period, the first moment includes but is not limited to: the moment when the defaulting users within the first time period begin to default, the eighth virtual resource includes but is not limited to: the default amount when the defaulting users within the first time period begin to default, the fourth object includes but is not limited to: users who default on the transaction of the first product within the target time period, the second moment includes but is not limited to: the moment when the defaulting users within the target time period begin to default, the ninth virtual resource includes but is not limited to: the default amount when the defaulting users within the target time period begin to default, and the tenth virtual resource includes but is not limited to the funds estimated to be spent on manually managing the default collection process for defaulting users within the target time period.
[0044] In an optional embodiment, the number of the first products that perform the first processing within the first time period is multiple, and the fourth virtual resource is determined based on the first virtual resource, the first recycling resource obtained by consuming the first virtual resource, and the second recycling resource to be obtained by consuming the fourth virtual resource at the target time, including: fourth virtual resource = second recycling resource × (first virtual resource / first recycling resource); wherein, the first virtual resource is the sum of the first virtual resources consumed by multiple first products that perform the first processing, and the first recycling resource is the sum of the first recycling resources obtained by multiple first products that consume the first virtual resource.
[0045] In the above steps, exemplarily, in the scenario where the first product is a software product, the first virtual resources include but are not limited to the sum of virtual resources (including computing resources and / or storage resources) consumed by multiple first product upgrade packages during the first period, and the first recycled resources include but are not limited to the sum of virtual resources reduced by running multiple upgraded first products separately during the first period.
[0046] In the above steps, exemplarily, in a scenario where the first product is a financial product for user default transactions, and the resource consumption is the funds consumed in collecting debts from defaulting users of the first product in default transactions, the first virtual resource includes but is not limited to the sum of funds spent on authorizing other platforms to collect debts from multiple defaulting users during the first period, and the first recovered resource includes but is not limited to the sum of funds (virtual resources include funds) recovered by authorizing other platforms to collect debts from multiple defaulting users during the first period.
[0047] In an optional embodiment, the method further includes determining the estimated funds (i.e., the fourth virtual resource) to be spent on authorizing other platforms to collect debts from defaulting users at the target time by: determining a collection cost factor based on the "overdue stage" and "recovery rate" of the debt at the observation point (i.e., the target time) according to the "Authorized Collection Payment Standards" signed with the other platforms, dividing the upper and lower limits of the overdue stage (e.g., overdue month) and the upper and lower limits of the recovery rate (amount to be recovered / default amount), where the fourth virtual resource = the second recovery resource × the collection cost factor. The authorized collection payment standards are shown in Table 1:
[0048] Table 1
[0049]
[0050]
[0051] In an optional embodiment, the number of the first products that execute the second processing within the first time period is multiple, and the fifth virtual resource is determined based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, including: the fifth virtual resource = (seventh virtual resource) × (second virtual resource / eighth virtual resource); wherein, the second virtual resource is the sum of the second virtual resources consumed by multiple first products that execute the second processing, and the eighth virtual resource is the sum of the eighth virtual resources to be transferred from multiple first products that consume the second virtual resources.
[0052] In the above steps, exemplarily, in the scenario where the first product is a software product, the second virtual resources include but are not limited to the sum of the virtual resources (computing resources and / or storage resources) consumed for compatibility processing of multiple upgraded first products within the first time period, and the eighth virtual resources include but are not limited to the sum of the virtual resources (computing resources and / or storage resources) that should be reduced but are still occupied by multiple upgraded first products running within the first time period when executing the second processing.
[0053] In the above steps, exemplarily, in a scenario where the first product is a financial product resulting from a user default transaction, the second virtual resource includes but is not limited to the sum of the funds (i.e., virtual resources) spent on using litigation to collect defaults from multiple defaulting users during the first period, and the eighth virtual resource includes but is not limited to the sum of the default amounts of multiple defaulting users when executing the second processing.
[0054] In an optional embodiment, the number of the first products managed within the first time period is multiple, and the sixth virtual resource is determined based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, including: the sixth virtual resource = (tenth virtual resource) × (third virtual resource / ninth virtual resource); wherein, the third virtual resource is the sum of the third virtual resources consumed in managing multiple first products, and the ninth virtual resource is the sum of the ninth virtual resources to be transferred by multiple first products at the first moment.
[0055] In the above steps, illustratively, in the scenario of the first software product, the third virtual resource includes, but is not limited to, the sum of virtual resources (i.e., computing resources and / or storage resources) consumed by collecting operational data of the plurality of first products after the upgrade during the first period. The ninth virtual resource includes, but is not limited to, the sum of virtual resources (i.e., computing resources and / or storage resources) still occupied by the plurality of first products after the upgrade during the first period, which should be reduced at the first moment.
[0056] In the above steps, exemplarily, in the scenario where the first product is a financial product for a user default transaction, the third virtual resource includes but is not limited to the funds spent on manually managing the default collection process for multiple defaulting users during the first period, and the ninth virtual resource includes but is not limited to: the sum of the default amounts when multiple defaulting users began to default during the first period.
[0057] In an optional embodiment, the target resource also includes: an eleventh virtual resource used to indicate the virtual resources consumed in transferring multiple first products within the target time period, and the eleventh virtual resource is determined in the following manner: the eleventh virtual resource = the twelfth virtual resource / the first number; wherein the twelfth virtual resource is used to indicate the virtual resources consumed in transferring multiple first products within the first time period, and the first number is used to indicate the number of the first products transferred in the first time period.
[0058] In the above steps, exemplarily, in the scenario where the first product is a software product, the eleventh virtual resource includes but is not limited to: the virtual resources (i.e., computing resources and / or storage resources) consumed by transmitting one installation package of the first product within the target time period, the twelfth virtual resource includes but is not limited to: the sum of the virtual resources (i.e., computing resources and / or storage resources) consumed by transmitting multiple installation packages of the first product within the first time period, and the first number includes but is not limited to: the number of installation packages transmitted within the first time period.
[0059] In the above steps, exemplarily, in a scenario where the first product is a financial product for a user default transaction, and the resource consumption is the funds consumed in collecting debts from the defaulting user of the first product in the default transaction, the twelfth virtual resource includes but is not limited to: the sum of the funds spent on sending collection letters (including letter costs and / or postage costs) to multiple defaulting users within the first time period, and the first number of times includes but is not limited to the number of times collection letters are sent to multiple defaulting users within the first time period.
[0060] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0061] This embodiment also provides a device for determining resource consumption, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0062] Figure 3 is a structural block diagram of a device for determining resource consumption according to an embodiment of the present invention, such as Figure 3 As shown, the device includes: a detection module 32, used to detect the first resource consumed by the first product within a first time period from the target database, wherein the first resource includes: a first virtual resource used to indicate the first processing consumed by other authorized platforms to perform the first processing on the first product within the first time period, a second virtual resource used to indicate the second processing consumed by the first product within the first time period, and a third virtual resource used to indicate the management of the first product within the first time period; a first determination module 34, used to determine the fourth virtual resource consumed by the other platforms to perform the first processing on the first product within the target time period based on the first virtual resource, determine the fifth virtual resource consumed by performing the second processing on the first product within the target time period based on the second virtual resource, and determine the sixth virtual resource consumed by managing the first product within the target time period based on the third virtual resource, wherein the target time period is later than the first time period; a second determination module 36, used to determine the target resources consumed by the first product within the target time period based on the fourth virtual resource, the fifth virtual resource and the sixth virtual resource.
[0063] In an optional embodiment, the first determination module 34 includes: a first determination sub-module, used to determine the fourth virtual resource consumed by the other platform to perform the first processing on the first product within the target period based on the first virtual resource in the following manner: determine the fourth virtual resource based on the first virtual resource, the first recycled resource obtained by consuming the first virtual resource, and the second recycled resource to be obtained by consuming the fourth virtual resource at the target moment, wherein the target moment is the moment for determining the target resource, and the target period includes the target moment.
[0064] In an optional embodiment, the first determination module 34 includes: a second determination submodule, used to determine the fifth virtual resource consumed by performing the second processing on the first product within the target time period based on the second virtual resource in the following manner: determining the target resource amount of the seventh virtual resource and the target time length from the target moment to the acquisition moment of the first object acquiring the first product, wherein the seventh virtual resource is used to indicate the virtual resource corresponding to the first product to be transferred at the target moment after the first object acquires the first product; when the target resource amount is greater than the first threshold and the target time length is greater than the second threshold, determining that the second processing needs to be performed on the first product acquired by the first object, and determining the fifth virtual resource based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, wherein the eighth virtual resource is used to indicate the virtual resource to be transferred when it is determined that the second processing needs to be performed on the first product acquired by the second object, and the fifth virtual resource is used to indicate the virtual resource consumed by performing the second processing on the first product within the target time period, and the second object is the object that acquires the first product within the first time period.
[0065] In an optional embodiment, the first determination module 34 includes: a third determination submodule, which is used to determine the sixth virtual resource consumed for managing the first product within the target time period based on the third virtual resource in the following manner: determining the sixth virtual resource based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, wherein the ninth virtual resource is used to indicate the virtual resource to be transferred by the third object at the first moment, the first moment is the moment when the time length from the third object to obtaining the first product is greater than the third threshold, the first time period includes the first moment, the third object includes the second object, the tenth virtual resource is used to indicate the virtual resource corresponding to the first product to be transferred at the second moment after the fourth object obtains the first product, the second moment is the moment when the time length from the fourth object to obtaining the first product is greater than the fourth threshold, the target time period includes the second moment, the fourth threshold is less than the second threshold, and the fourth object includes the first object.
[0066] In an optional embodiment, the number of the first products that perform the first processing within the first time period is multiple, and the first determination submodule includes: a first determination unit, used to determine the fourth virtual resource based on the first virtual resource, the first recycling resource obtained by consuming the first virtual resource, and the second recycling resource to be obtained by consuming the fourth virtual resource at the target time in the following manner: fourth virtual resource = second recycling resource × (first virtual resource / first recycling resource); wherein, the first virtual resource is the sum of the first virtual resources consumed by multiple first products that perform the first processing, and the first recycling resource is the sum of the first recycling resources obtained by multiple first products that consume the first virtual resource.
[0067] In an optional embodiment, the number of the first products that execute the second processing within the first time period is multiple, and the second determination submodule includes: a second determination unit, used to determine the fifth virtual resource based on the second virtual resource, the seventh virtual resource and the eighth virtual resource in the following manner: fifth virtual resource = (seventh virtual resource) × (second virtual resource / eighth virtual resource); wherein, the second virtual resource is the sum of the second virtual resources consumed by multiple first products that execute the second processing, and the eighth virtual resource is the sum of the eighth virtual resources to be transferred from multiple first products that consume the second virtual resources.
[0068] In an optional embodiment, the number of the first products managed within the first time period is multiple, and the third determination submodule includes: a third determination unit, used to determine the sixth virtual resource based on the third virtual resource, the ninth virtual resource and the tenth virtual resource in the following manner: sixth virtual resource = (tenth virtual resource) × (third virtual resource / ninth virtual resource); wherein, the third virtual resource is the sum of the third virtual resources consumed in managing multiple first products, and the ninth virtual resource is the sum of the ninth virtual resources to be transferred by multiple first products at the first moment.
[0069] In an optional embodiment, the target resource also includes: an eleventh virtual resource used to indicate the virtual resources consumed by transferring multiple first products within the target time period, and the device also includes: a third determination module used to determine the eleventh virtual resource in the following manner: the eleventh virtual resource = the twelfth virtual resource / the first number; wherein the twelfth virtual resource is used to indicate the virtual resources consumed by transferring multiple first products within the first time period, and the first number is used to indicate the number of the first products transferred in the first time period.
[0070] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0071] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0072] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0073] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0074] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0075] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any one of the above method embodiments are implemented.
[0076] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0077] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0078] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A method for determining resource consumption, characterized in that: include: Detecting first resources consumed by a first product in a first time period from a target database, wherein the first resources include: a first virtual resource used to indicate a first process consumed by another authorized platform on the first product in the first time period, a second virtual resource used to indicate a second process consumed by the first product in the first time period, and a third virtual resource used to indicate a third virtual resource consumed by managing the first product in the first time period; determining, based on the first virtual resources, fourth virtual resources consumed by the other platform performing the first processing on the first product within a target period; determining, based on the second virtual resources, fifth virtual resources consumed by performing the second processing on the first product within the target period; and determining, based on the third virtual resources, sixth virtual resources consumed by managing the first product within the target period, wherein the target period is later than the first period; The target resource consumed by the first product within the target period is determined based on the fourth virtual resource, the fifth virtual resource, and the sixth virtual resource.
2. The method according to claim 1, characterized in that Determining, based on the first virtual resources, fourth virtual resources consumed by the other platform in executing the first process on the first product within a target period includes: The fourth virtual resource is determined based on the first virtual resource, the first recycled resource obtained by consuming the first virtual resource, and the second recycled resource to be obtained by consuming the fourth virtual resource at the target moment, wherein the target moment is the moment of determining the target resource, and the target period includes the target moment.
3. The method according to claim 1, characterized in that Determining, based on the second virtual resources, the fifth virtual resource consumed by performing the second process on the first product within the target period includes: Determining a target amount of a seventh virtual resource and a target duration from a target moment to an acquisition moment of the first product by the first object, wherein the seventh virtual resource is used to indicate the virtual resources corresponding to the first product to be transferred at the target moment after the first object acquires the first product; When the target resource amount is greater than a first threshold and the target duration is greater than a second threshold, it is determined that the second processing needs to be performed on the first product acquired by the first object, and the fifth virtual resource is determined based on the second virtual resource, the seventh virtual resource and the eighth virtual resource, wherein the eighth virtual resource is used to indicate the virtual resources to be transferred when it is determined that the second processing needs to be performed on the first product acquired by the second object, and the fifth virtual resource is used to indicate the virtual resources consumed by performing the second processing on the first product within the target time period, and the second object is the object that acquires the first product within the first time period.
4. The method according to claim 1, wherein Determining, based on the third virtual resource, the sixth virtual resource consumed for managing the first product within the target period includes: The sixth virtual resource is determined based on the third virtual resource, the ninth virtual resource and the tenth virtual resource, wherein the ninth virtual resource is used to indicate the virtual resource to be transferred by the third object at the first moment, the first moment is the moment when the time length from the third object to obtaining the first product is greater than the third threshold, the first time period includes the first moment, the third object includes the second object, the tenth virtual resource is used to indicate the virtual resource corresponding to the first product to be transferred at the second moment after the fourth object obtains the first product, the second moment is the moment when the time length from the fourth object to obtaining the first product is greater than the fourth threshold, the target time period includes the second moment, the fourth threshold is less than the second threshold, and the fourth object includes the first object.
5. The method according to claim 2, characterized in that The number of the first products that perform the first processing within the first time period is multiple, and determining the fourth virtual resource according to the first virtual resource, the first recycled resource obtained by consuming the first virtual resource, and the second recycled resource to be obtained by consuming the fourth virtual resource at the target time includes: Fourth virtual resource = second recycled resource × (first virtual resource / first recycled resource); The first virtual resource is the sum of the first virtual resources consumed by multiple first products performing the first process, and the first recycled resource is the sum of the first recycled resources obtained by multiple first products consuming the first virtual resources.
6. The method according to claim 3, characterized in that The number of the first products that perform the second processing within the first time period is multiple, and determining the fifth virtual resource according to the second virtual resource, the seventh virtual resource, and the eighth virtual resource includes: Fifth virtual resource=(seventh virtual resource)×(second virtual resource / eighth virtual resource); The second virtual resource is the sum of the second virtual resources consumed by multiple first products executing the second process, and the eighth virtual resource is the sum of the eighth virtual resources to be transferred by multiple first products consuming the second virtual resources.
7. The method according to claim 4, characterized in that There are multiple first products managed in the first time period, and determining the sixth virtual resource based on the third virtual resource, the ninth virtual resource, and the tenth virtual resource includes: Sixth virtual resource = (tenth virtual resource) × (third virtual resource / ninth virtual resource); The third virtual resource is the sum of the third virtual resources consumed in managing the plurality of the first products, and the ninth virtual resource is the sum of the ninth virtual resources to be transferred by the plurality of the first products at the first moment.
8. The method according to claim 1, characterized in that The target resource also includes: an eleventh virtual resource for indicating the consumption of transferring the plurality of the first products within the target period, The eleventh virtual resource is determined by: The eleventh virtual resource = the twelfth virtual resource / the first number; The twelfth virtual resource is used to indicate the virtual resources consumed by transferring multiple first products during the first time period, and the first number of times is used to indicate the number of the first products transferred during the first time period.
9. A device for determining resource consumption, characterized in that: include: a detection module, configured to detect, from a target database, first resources consumed by a first product during a first period of time, wherein the first resources include: a first virtual resource for indicating a first process consumed by another authorized platform on the first product during the first period of time, a second virtual resource for indicating a second process consumed by the first product during the first period of time, and a third virtual resource for indicating a third virtual resource consumed by managing the first product during the first period of time; a first determining module, configured to determine, based on the first virtual resources, a fourth virtual resource consumed by the other platform performing the first processing on the first product within a target period; determine, based on the second virtual resources, a fifth virtual resource consumed by performing the second processing on the first product within the target period; and determine, based on the third virtual resources, a sixth virtual resource consumed by managing the first product within the target period, wherein the target period is later than the first period; The second determining module is configured to determine target resources consumed by the first product within the target period based on the fourth virtual resource, the fifth virtual resource, and the sixth virtual resource.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.