CN107566133A - A kind of resource billing method, device and platform - Google Patents
A kind of resource billing method, device and platform Download PDFInfo
- Publication number
- CN107566133A CN107566133A CN201711020919.7A CN201711020919A CN107566133A CN 107566133 A CN107566133 A CN 107566133A CN 201711020919 A CN201711020919 A CN 201711020919A CN 107566133 A CN107566133 A CN 107566133A
- Authority
- CN
- China
- Prior art keywords
- resource
- virtual machine
- charging
- user
- resources
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The invention discloses a kind of resource billing method, device and platform, including:Obtain duration and resource quantity that the user in metering period uses resources of virtual machine every time;At the end of metering period, billing invoice is obtained using the duration of resources of virtual machine, resource quantity and resource pricing according to user every time.From technical scheme, the resource use of the charging method, device and platform to user has carried out accurate charging, has avoided user resources and pecuniary waste.
Description
Technical field
The present invention relates to cloud computing technology, espespecially a kind of resource billing method, device and platform.
Background technology
Currently, cloud computing is gradually approved by industry, and cloud data center operating system is gradually realized and is committed to put into practice, in society
It can produce and more and more important effect is played in sphere of life.Billing function is one of Core Feature in cloud operating system,
Its validity is to weigh cloud computing operating system availability, the key index of stability, and reasonable, efficient charging method can be cut
The real effective development for ensureing every business function in cloud computing operating system.
The charging methods of the most of existing cloud operating systems on the one hand more mode for employing the bag period, charging plan
It is slightly fixed, single, the accurate charging of progress is not used to the resource of user, causes user resources and pecuniary waste;Separately
On the one hand it also have ignored charging in different time sections (resource load, utilization rate are different in different time sections), charging discount (is such as set
Block meter rate principle is put, with reference to electricity pricing) etc. charging specific aim strategy to cloud computing resources utilization rate (cloud computing operating system
The circulation of middle resource and utilization rate) influence, result in charging result inaccuracy, resource utilization ratio is low.
The content of the invention
In order to solve the above-mentioned technical problem, the embodiment provides a kind of resource billing method, including:
Obtain duration and resource quantity that the user in metering period uses resources of virtual machine every time;
At the end of the metering period, according to the user every time using the duration of resources of virtual machine, resource quantity and
Resource pricing obtains billing invoice.
Embodiments of the invention additionally provide a kind of resource message accounting, including:
Log information acquisition module, use the duration and money of resources of virtual machine every time for obtaining the user in metering period
Source quantity;
Accounting module, at the end of the metering period, according to the user every time using resources of virtual machine when
Long, resource quantity and resource pricing obtain billing invoice.
Embodiments of the invention additionally provide a kind of resource charging platform, including memory, processor and are stored in described
On memory and the computer program that can run on the processor, it is characterised in that calculating described in the computing device
The processing of the above method is realized during machine program.
The embodiment of the present invention also provides a kind of computer-readable recording medium, is stored thereon with computer program, the meter
The processing of the method such as the embodiment of the present invention is realized when calculation machine program is performed.
In above-described embodiment scheme, the charging method, device and platform are according to user every time using resources of virtual machine
Duration, resource quantity and resource pricing obtain billing invoice, and the resource use to user has carried out accurate charging, avoids user
Resource and pecuniary waste.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this
The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is the flow chart of the resource billing method of the embodiment of the present invention;
Fig. 2 is the structural representation of the resource message accounting of the embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
The embodiment provides a kind of resource billing method, as shown in figure 1, this method includes:
Step 101, duration and resource quantity that the user in metering period uses resources of virtual machine every time are obtained.
In the present embodiment, user can log in cloud operating system, autonomous to set bill metering period, and the metering period can be with
It is one day, the time of one week or longer.In other embodiments, metering period can also be by the maintenance management people of cloud computing system
Member configures.
Operation of the user to virtual machine is recorded in log information, including the start of virtual machine, shutdown, virtual machine configuration
The information (time of such as switching on and shutting down, the time of configuration change) of item, change operation etc., is obtained according to the above-mentioned time point of acquisition
User uses each charging duration of resources of virtual machine.
Resource quantity can obtain according to the configuration item information and configuration change operation information for the virtual machine that user uses, bag
Include the information of CPU, internal memory, hard drive space etc..
Step 102, at the end of the metering period, according to the user every time using the duration of resources of virtual machine, money
Source quantity and resource pricing obtain billing invoice.
In the present embodiment, the mode of poll judges whether metering period (billing period) terminates at a time interval, if
It is, into next step;If it is not, continue poll.
In the present embodiment, according to the type of service of virtual machine, the resource pricing (different business based on the type of service is obtained
The virtual machine configuration of type has different prices, as software development business is relatively high to the resource requirement of CPU, internal memory, to depositing
The resource requirement of reservoir etc. is relatively low, then we can so be set on the basis of standard price for software development business:It is right
CPU, the resource of internal memory use and give relatively low price).In other embodiments, different types of service can also have identical
Price.
Then, according to foregoing obtained resource pricing (resource pricing such as CPU, internal memory, disk) and by the metering period
Charging duration determined by each chargeable time point and according to the virtual machine configuration item information in corresponding charging duration, configuration change
The resource quantity that operation information obtains, obtains billing invoice.
In the present embodiment, according to billing invoice described in charging privileges Developing Tactics, final billing invoice is obtained.
If in metering period user using resources of virtual machine period at least partly fall into enjoy charging privileges when
Between section, then using the duration of resources of virtual machine, resource quantity and enjoyed on the period for enjoy charging privileges according to the user
There is the favourable price of the period upper resource of charging privileges, billing invoice is adjusted, obtains final billing invoice.For example,
User has used resources of virtual machine at 17 points to 20 points, and the period between 18 points to 20 points can enjoy charging privileges, then will be right
Billing amount of the user between 18 points to 20 points is adjusted, and the resource accounting of the period is carried out by favourable price
Calculate.
In the present embodiment, according to charging privileges Developing Tactics billing invoice, final billing invoice is obtained, including:Described
After billing invoice exceedes certain amount, overages are given with certain discount, obtains final billing invoice.
The implementation process of the resource billing method of the present embodiment will be described in detail by an example below.
For example the metering period that user sets is one day, virtual machine v1.
Relevant information in log information module:Virtual machine v1 before the metering period starts is configured to 4GHz CPU,
2G internal memories, 100G hard drive space, the resource pricing t of v1 associations are:5/GHz* hours (CPU), 6/GB* hours (internal memory), 7/
100GB* hours (disk)
User is 9 in the day:00 unlatching virtual machine, 11:00 closing virtual machine, 14:00 unlatching virtual machine, 16:00 closes
Virtual machine.16:25 change v1 are configured to:4GHz CPU, 4GB internal memories, 200GB hard drive space, 16:30 unlatching virtual machines, 20:
00 closes virtual machine.
1st, initial billing invoice is calculated:
P=2* (4*5+2*6+7/100*100)+2* (4*5+2*6+7/100*100)+3.5* (4*5+4*6+7/100*
200th)=359
2nd, preferential policy calculation (note:Keeper can set a variety of preferential strategies)
Such as Administrator:(1) strategy 1:At night because service access amount is reduced after 18 points, resource pricing carries out excellent
Favour is set, and resource pricing t1 is changed into:4/GHz* hours (CPU), 5/GB* hours (internal memory), 6/100GB* hours (disk);(2)
Strategy 2:Give seventy percent discount in part of the billing invoice more than 300.
It is according to the bill that strategy 1 calculates:(there are 2 hours between 18 points to 20 points, price difference * virtual machines twice are matched somebody with somebody
It is the bill value saved to put * 2 hours)
P1=P- (t-t1) * 2=359- ((5-4) * 2*4+ (6-5) * 2*4+ (7-6) * 2*2)
=359-20=339
It is according to the bill that strategy 2 calculates:
P2=300+ (P1-300) * 0.7=300+27.3=327.3
P2 is final billing invoice
Embodiments of the invention additionally provide a kind of resource message accounting, as shown in Fig. 2 the device includes:
Log information acquisition module 201, use the duration of resources of virtual machine every time for obtaining the user in metering period
And resource quantity;
Accounting module 202, at the end of the metering period, resources of virtual machine to be used every time according to the user
Duration, resource quantity and resource pricing obtain billing invoice.
In the present embodiment, the resource message accounting also includes charging privileges computing module, for each according to user
After obtaining billing invoice using the duration of resources of virtual machine, resource quantity and resource pricing, according to charging privileges Developing Tactics
The billing invoice, obtain final billing invoice.
Charging privileges computing module billing invoice according to charging privileges Developing Tactics, final billing invoice is obtained, wrapped
Include:If user at least partly falls into the period for enjoying charging privileges using the period of resources of virtual machine in metering period,
Charging privileges using the duration of resources of virtual machine, resource quantity and are then enjoyed on the period for enjoy charging privileges according to user
Period upper resource favourable price, billing invoice is adjusted, obtains final billing invoice.
Charging privileges computing module billing invoice according to charging privileges Developing Tactics, final billing invoice is obtained, wrapped
Include:After the billing invoice exceedes certain amount, overages are given with certain discount, obtains final charging account
It is single.
It can be seen from the above technical proposal that the present invention considers the charging pin such as charging in different time sections, charging discount
To influence of the property strategy to cloud computing resources utilization rate, the resource use to user has carried out accurate charging, avoids user's money
Source and pecuniary waste, while substantially increase resource utilization ratio.
In actual applications, the log information acquisition module 201, accounting module 202 and charging privileges computing module 203
Can be by central processing unit (Central Processing Unit, CPU), the microprocessor positioned at resource message accounting
(Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or scene
Programmable gate array (Field Programmable Gate Array, FPGA) etc. is realized.
Embodiments of the invention additionally provide a kind of resource charging platform, including memory, processor and are stored in storage
On device and the computer program that can run on a processor, the present embodiment is realized during computer program described in the computing device
The processing of the method for above-mentioned resource charging.
Embodiments of the invention additionally provide a kind of computer-readable recording medium, are stored thereon with computer program, institute
State the method that computer program is used to perform above-mentioned resource charging.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use
Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (10)
1. a kind of resource billing method, including:
Obtain duration and resource quantity that the user in metering period uses resources of virtual machine every time;
At the end of the metering period, duration, resource quantity and the resource of resources of virtual machine are used every time according to the user
Price obtains billing invoice.
2. resource billing method according to claim 1, it is characterised in that:
After billing invoice being obtained according to the user using the duration of resources of virtual machine, resource quantity and resource pricing every time,
Also include:
According to billing invoice described in charging privileges Developing Tactics, final billing invoice is obtained.
3. resource billing method according to claim 2, it is characterised in that:
The billing invoice according to charging privileges Developing Tactics, final charging wealth list is obtained, including:If the charging week
The user at least partly falls into the period for enjoying charging privileges using the period of resources of virtual machine in phase, then according to
User is on the period for enjoying charging privileges using the duration of resources of virtual machine, resource quantity and described to enjoy charging excellent
The favourable price of the period of favour upper resource, is adjusted to the billing invoice, obtains final billing invoice.
4. resource billing method according to claim 2, it is characterised in that:
The billing invoice according to charging privileges Developing Tactics, final billing invoice is obtained, including:In the billing invoice
After certain amount, overages are given with certain discount, obtains final billing invoice.
5. according to the resource billing method any one of claim 1-4, it is characterised in that:
User in the acquisition metering period uses the duration and resource quantity of resources of virtual machine every time, including:Described in acquisition
The log information of the user in calculating cycle, virtual machine available machine time and unused time in the log information determine
The user uses the duration of resources of virtual machine every time, virtual machine configuration item and configuration change behaviour in the log information
Determine that the user uses the resource quantity of resources of virtual machine every time as information.
6. a kind of resource message accounting, including:
Log information acquisition module, use the duration and number of resources of resources of virtual machine every time for obtaining user in metering period
Amount;
Accounting module, at the end of the metering period, using duration, the money of resources of virtual machine every time according to the user
Source quantity and resource pricing obtain billing invoice.
7. resource message accounting according to claim 6, it is characterised in that:
The resource message accounting also includes charging privileges computing module, for being provided every time using virtual machine according to the user
After duration, resource quantity and the resource pricing in source obtain billing invoice, according to billing invoice described in charging privileges Developing Tactics,
Obtain final billing invoice.
8. resource message accounting according to claim 7, it is characterised in that:
Charging privileges computing module billing invoice according to charging privileges Developing Tactics, obtains final billing invoice, bag
Include:If the user is at least partly fallen into using the period of resources of virtual machine and enjoys charging privileges in the metering period
Period, then the duration of resources of virtual machine, number of resources are used on the period for enjoying charging privileges according to the user
The favourable price of amount and the period for enjoying charging privileges upper resource, is adjusted to the billing invoice, obtains final
Billing invoice.
9. resource message accounting according to claim 7, it is characterised in that:
Charging privileges computing module billing invoice according to charging privileges Developing Tactics, obtains final billing invoice, bag
Include:After the billing invoice exceedes certain amount, overages are given with certain discount, obtains final charging account
It is single.
10. a kind of resource charging platform, including memory, processor and it is stored on the memory and can be in the processor
The computer program of upper operation, it is characterised in that realize such as claim 1-5 described in the computing device during computer program
Any one of method processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711020919.7A CN107566133A (en) | 2017-10-26 | 2017-10-26 | A kind of resource billing method, device and platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711020919.7A CN107566133A (en) | 2017-10-26 | 2017-10-26 | A kind of resource billing method, device and platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107566133A true CN107566133A (en) | 2018-01-09 |
Family
ID=61031882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711020919.7A Pending CN107566133A (en) | 2017-10-26 | 2017-10-26 | A kind of resource billing method, device and platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107566133A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109491787A (en) * | 2018-11-01 | 2019-03-19 | 郑州云海信息技术有限公司 | The book keeping operation statistical method and system of computing resource under a kind of cluster computing environment |
CN109801135A (en) * | 2019-01-16 | 2019-05-24 | 金蝶软件(中国)有限公司 | Bill generation method, device, computer equipment and storage medium |
CN110381137A (en) * | 2019-07-19 | 2019-10-25 | 浪潮云信息技术有限公司 | Object storage usage amount statistical method and system based on ceph |
CN110570225A (en) * | 2019-06-25 | 2019-12-13 | 上海达龙信息科技有限公司 | Virtual cloud desktop use charging method, system, medium and electronic equipment |
CN110688224A (en) * | 2019-09-23 | 2020-01-14 | 苏州大学 | Hybrid cloud service flow scheduling method |
CN111224791A (en) * | 2020-01-10 | 2020-06-02 | 上海云海万邦数据科技有限公司 | Cloud resource charging method and device, electronic equipment and storage medium |
CN112202871A (en) * | 2020-09-27 | 2021-01-08 | 北京金山云网络技术有限公司 | Metering and charging method, device and system for cloud computing resources and electronic equipment |
CN112333226A (en) * | 2020-09-01 | 2021-02-05 | 中国铁路设计集团有限公司 | Cloud application platform charging method based on user activity |
CN113516507A (en) * | 2021-06-16 | 2021-10-19 | 国云科技股份有限公司 | Resource charging method and device for multi-cloud management platform |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103095471A (en) * | 2013-01-25 | 2013-05-08 | 浪潮电子信息产业股份有限公司 | Charging method based on usage amount in cloud operating system (OS) |
CN103414576A (en) * | 2013-07-24 | 2013-11-27 | 广东电子工业研究院有限公司 | Charging method for use of cloud computing resources |
CN103475495A (en) * | 2013-07-23 | 2013-12-25 | 国云科技股份有限公司 | Cloud-computing virtual-machine resource-usage charging method |
CN104320266A (en) * | 2014-10-17 | 2015-01-28 | 浪潮(北京)电子信息产业有限公司 | Charging method and device under cloud computing operation system |
CN104333456A (en) * | 2014-10-22 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Service charging method and system under cloud computing environment |
CN104574051A (en) * | 2015-01-12 | 2015-04-29 | 浪潮(北京)电子信息产业有限公司 | Charging method and device |
CN105245351A (en) * | 2015-08-28 | 2016-01-13 | 浪潮集团有限公司 | Charging method and device |
-
2017
- 2017-10-26 CN CN201711020919.7A patent/CN107566133A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103095471A (en) * | 2013-01-25 | 2013-05-08 | 浪潮电子信息产业股份有限公司 | Charging method based on usage amount in cloud operating system (OS) |
CN103475495A (en) * | 2013-07-23 | 2013-12-25 | 国云科技股份有限公司 | Cloud-computing virtual-machine resource-usage charging method |
CN103414576A (en) * | 2013-07-24 | 2013-11-27 | 广东电子工业研究院有限公司 | Charging method for use of cloud computing resources |
CN104320266A (en) * | 2014-10-17 | 2015-01-28 | 浪潮(北京)电子信息产业有限公司 | Charging method and device under cloud computing operation system |
CN104333456A (en) * | 2014-10-22 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Service charging method and system under cloud computing environment |
CN104574051A (en) * | 2015-01-12 | 2015-04-29 | 浪潮(北京)电子信息产业有限公司 | Charging method and device |
CN105245351A (en) * | 2015-08-28 | 2016-01-13 | 浪潮集团有限公司 | Charging method and device |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109491787A (en) * | 2018-11-01 | 2019-03-19 | 郑州云海信息技术有限公司 | The book keeping operation statistical method and system of computing resource under a kind of cluster computing environment |
CN109801135A (en) * | 2019-01-16 | 2019-05-24 | 金蝶软件(中国)有限公司 | Bill generation method, device, computer equipment and storage medium |
CN109801135B (en) * | 2019-01-16 | 2021-04-13 | 金蝶软件(中国)有限公司 | Bill generation method and device, computer equipment and storage medium |
CN110570225A (en) * | 2019-06-25 | 2019-12-13 | 上海达龙信息科技有限公司 | Virtual cloud desktop use charging method, system, medium and electronic equipment |
CN110381137A (en) * | 2019-07-19 | 2019-10-25 | 浪潮云信息技术有限公司 | Object storage usage amount statistical method and system based on ceph |
CN110688224A (en) * | 2019-09-23 | 2020-01-14 | 苏州大学 | Hybrid cloud service flow scheduling method |
CN110688224B (en) * | 2019-09-23 | 2021-11-23 | 苏州大学 | Hybrid cloud service flow scheduling method |
CN111224791A (en) * | 2020-01-10 | 2020-06-02 | 上海云海万邦数据科技有限公司 | Cloud resource charging method and device, electronic equipment and storage medium |
CN111224791B (en) * | 2020-01-10 | 2020-12-08 | 上海云海万邦数据科技有限公司 | Cloud resource charging method and device, electronic equipment and storage medium |
CN112333226A (en) * | 2020-09-01 | 2021-02-05 | 中国铁路设计集团有限公司 | Cloud application platform charging method based on user activity |
CN112202871A (en) * | 2020-09-27 | 2021-01-08 | 北京金山云网络技术有限公司 | Metering and charging method, device and system for cloud computing resources and electronic equipment |
CN113516507A (en) * | 2021-06-16 | 2021-10-19 | 国云科技股份有限公司 | Resource charging method and device for multi-cloud management platform |
CN113516507B (en) * | 2021-06-16 | 2024-02-13 | 国云科技股份有限公司 | Multi-cloud management platform resource charging method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107566133A (en) | A kind of resource billing method, device and platform | |
CN108090225B (en) | Database instance running method, device and system and computer readable storage medium | |
CN107240002B (en) | Electric power transaction method and device and micro-grid system | |
CN103646218B (en) | The definition device of data access authority and behavior authority and definition method | |
CN105049218B (en) | PhiCloud clouds charging method and system | |
US20120239558A1 (en) | Method and systems for efficiently processing large volumes of complex small value financial transactions | |
CN102521921A (en) | Charge control device, prepayment electricity selling system, electricity selling system and method thereof | |
CN109166027A (en) | A kind of loaning bill contract processing method and processing device | |
CN102521662A (en) | Consumption charging method in cloud computing environment | |
CN104574051A (en) | Charging method and device | |
CN103095471A (en) | Charging method based on usage amount in cloud operating system (OS) | |
CN104320266A (en) | Charging method and device under cloud computing operation system | |
He et al. | A consensus and incentive program for charging piles based on consortium blockchain | |
CN105245351A (en) | Charging method and device | |
CN104333456A (en) | Service charging method and system under cloud computing environment | |
CN108023735A (en) | A kind of charging method based on dynamic resource | |
Guo et al. | Peer-to-peer energy trading and smart contracting platform of community-based virtual power plant | |
JP7246503B2 (en) | Management system, exchange battery system and program | |
CN109191204A (en) | The accounting management method and device of virtual machine in cloud data system | |
CN103955854B (en) | A kind of account management device and method | |
US11157974B2 (en) | Prepaid utility metering with complex rates using advanced metering infrastructure (AMI) smart meters | |
CN109376043A (en) | A kind of method and apparatus of equipment monitoring | |
Zhang et al. | Joint chance-constrained program based electric vehicles optimal dispatching strategy considering drivers' response uncertainty | |
CN109428732A (en) | A kind of call bill processing method and equipment | |
CN114240416A (en) | Data processing method, data processing 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180109 |