CN107360006A - A kind of resource billing method and device - Google Patents

A kind of resource billing method and device Download PDF

Info

Publication number
CN107360006A
CN107360006A CN201710439373.2A CN201710439373A CN107360006A CN 107360006 A CN107360006 A CN 107360006A CN 201710439373 A CN201710439373 A CN 201710439373A CN 107360006 A CN107360006 A CN 107360006A
Authority
CN
China
Prior art keywords
resource
daily record
default
charging
change
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.)
Granted
Application number
CN201710439373.2A
Other languages
Chinese (zh)
Other versions
CN107360006B (en
Inventor
宣宇
巩向锋
陆川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201710439373.2A priority Critical patent/CN107360006B/en
Publication of CN107360006A publication Critical patent/CN107360006A/en
Application granted granted Critical
Publication of CN107360006B publication Critical patent/CN107360006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1403Architecture for metering, charging or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/141Indication of costs
    • H04L12/1414Indication of costs in real-time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1432Metric aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiments of the invention provide a kind of resource billing method and device, wherein this method includes:If detect that user uses the multiple resources of cloud platform,Then determine the charging mode of multiple resources,If the charging mode of the resource in multiple resources is periodic metering,Then obtain the metrical information of the resource change daily record of cloud platform and every kind of resource according to resource change daily record generation periodic metering,The metrical information uses duration including every kind of resource,Every kind of resource of foundation periodic metering uses duration and default charging policy,Charging is carried out to every kind of resource of periodic metering,Generate sub- bill corresponding to every kind of resource of periodic metering,According to all sub- bills,Determine the total bill of user,Using the embodiment of the present invention,Duration is used according to resource change daily record generation resource,Because the logging time of resource change log recording is accurate to the second,Relative to existing minute is accurate to according to monitoring data generation resource metrical information,Improve the degree of accuracy of resource charging.

Description

A kind of resource billing method and device
Technical field
The present invention relates to technical field of data processing, is filled more particularly to a kind of resource billing method and a kind of resource charging Put.
Background technology
Cloud computing is the increase, use and delivery mode of the related service based on internet, and cloud computing provides available, just Network access prompt, on demand, into can quickly provide including network, server, is stored, application software, the resource such as service Computing resources shared pool, cloud computing are typically characterised by using on demand, and it is cloud platform business to carry out charging for resource therein With the basis of change.
Existing cloud computing resources charging is come the usage amount of computing resource, so as to enter by monitoring of the monitoring system to resource Row charging.Resource is monitored due to monitoring system generally use periodic detection mode, so that cloud computing provides The time precision of source charging depends on the detection cycle of monitoring system, ageing dependent on charge system and the data of monitoring system Pull the cycle, but monitoring system can not change in resources is accurate, feed back to charge system in real time, it is therefore, existing to pass through The problem of billing accuracy and insufficient actual effect be present in the method that monitoring system carries out cloud computing resources charging.
The content of the invention
In view of the above problems, it is proposed that the embodiment of the present invention overcomes above mentioned problem or at least in part to provide one kind A kind of resource billing method and a kind of resource message accounting to solve the above problems.
In order to solve the above problems, the embodiment of the invention discloses a kind of resource billing method, including:
If detect that user uses the multiple resources of cloud platform, it is determined that the charging mode of the multiple resources;
If it is determined that the charging mode of the resource in the multiple resources is periodic metering, then the money of the cloud platform is obtained Change daily record in source;
The metrical information of every kind of resource of the periodic metering, the metrical information are generated according to resource change daily record Duration is used including every kind of resource;
According to use duration and the default charging policy of every kind of resource of the periodic metering, to the every of the periodic metering Kind resource carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering;
According to all sub- bills, the total bill of the user is determined.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
The accounts information of the user is obtained, the accounts information includes the expense that prestores;
Prestore expense according to described in, it is determined that the predetermined period corresponding to expense that prestores;
The resource that the cloud platform is obtained according to the predetermined period changes daily record.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
Receive the change message of the resource change used for user;
Obtain the resource change daily record after being changed corresponding to the change message.
Preferably, the step of resource obtained after being changed corresponding to the change message changes daily record includes:
Obtain the informed source of the change message;
According to the informed source, the change daily record of the resource after the change of the informed source is obtained.
Preferably, the metrical information of every kind of resource that the periodic metering is generated according to resource change daily record Step includes:
Changed from the resource in daily record, extract the log recording associated with the metrical information;
User profile is obtained using the log recording of the association, and, the resource type for every kind of resource that user uses, Resource distribution, using the time started and use the end time;
According to every kind of resource using the time started and using the end time, when calculating the use of every kind of resource It is long.
Preferably, it is described to be changed from the resource in daily record, extract the log recording that is associated with the metrical information Step includes:
Obtain in the resource change daily record, the action behavior information of every log recording;
Judge whether the action behavior information influences the metrical information;
If so, then extract log recording corresponding to the action behavior information;
If it is not, then abandon log recording corresponding to the action behavior information.
Preferably, duration and default charging policy are used in every kind of resource according to the periodic metering, to institute The every kind of resource for stating periodic metering carries out charging, before generating sub- bill corresponding to every kind of resource of the periodic metering, also wraps Include:
The resource type of the every kind of resource used according to user, resource distribution, time started and the end time of use are used, Determine whether there is default resource sharing combination;
Combined if there is the default resource sharing, then generate the metrical information of the default resource sharing combination, institute The metrical information for stating default resource sharing combination uses duration including the default resource sharing combination.
Preferably, the resource rate of the default charging policy of every kind of resource including every kind of resource and marketing because Element, every kind of resource according to the periodic metering uses duration and default charging policy, to the every of the periodic metering The step of kind resource carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering includes:
Resource type and resource distribution according to every kind of resource, obtain the resource rate of every kind of resource;
Obtain Marketing Factors corresponding to the user profile;
Duration, resource rate and Marketing Factors are used according to every kind of resource, charging is carried out to every kind of resource, Generate sub- bill corresponding to every kind of resource.
Preferably, described according to all sub- bills, before the total bill for determining the user, in addition to:
The default charging policy of the default resource sharing combination is obtained, the default charging policy includes the default money Source shares the resource rate and Marketing Factors of combination;
The resource rate combined using duration, the default resource sharing and battalion according to the default resource sharing combination Pin factor, charging, sub- bill corresponding to the generation default resource sharing combination are carried out to the default resource sharing combination.
In order to solve the above problems, the embodiment of the invention discloses a kind of resource message accounting, including:
Charging mode determining module, if for detecting that user uses the multiple resources of cloud platform, determine described a variety of The charging mode of resource;
Resource changes log acquisition module, if by the charging mode of the resource in the multiple resources for based on time Take, obtain the resource change daily record of the cloud platform;
Metrical information generation module, for every kind of resource according to the resource change daily record generation periodic metering Metrical information, the metrical information use duration including every kind of resource;
Sub- bill generation module, duration and default charging plan are used for every kind of resource according to the periodic metering Slightly, charging is carried out to every kind of resource of the periodic metering, generates sub- bill corresponding to every kind of resource of the periodic metering;
Total bill determining module, for according to all sub- bills, determining the total bill of the user.
Alternatively, the resource change log acquisition module includes:
Accounts information acquisition submodule, for obtaining the accounts information of the user, the accounts information includes the expense that prestores With;
Predetermined period acquisition submodule, for the expense that prestored according to described in, it is determined that the predetermined period corresponding to expense that prestores;
First resource changes log acquisition submodule, and the resource for obtaining the cloud platform according to the predetermined period becomes More daily record.
Alternatively, the resource change log acquisition module includes:
Message sink submodule is changed, for receiving the change message of the resource change used for user;
Secondary resource changes log acquisition submodule, for obtaining the resource change after being changed corresponding to the change message Daily record.
Alternatively, the Secondary resource change log acquisition submodule includes:
Informed source acquiring unit, for obtaining the informed source of the change message;
Resource changes log acquisition unit, for according to the informed source, obtaining the resource change of the informed source Daily record.
Alternatively, the metrical information generation module includes:
Log recording extracting sub-module, for being changed from the resource in daily record, extract and associated with the metrical information Log recording;
Metrical information acquisition submodule, for obtaining user profile using the log recording of the association, and, user makes The resource type of every kind of resource, resource distribution, using the time started and use the end time;
Resource uses duration calculation submodule, at the end of using time started and use according to every kind of resource Between, the resource for calculating every kind of resource uses duration.
Alternatively, the log recording extracting sub-module includes:
Behavioural information acquiring unit, for obtaining in the resource change daily record, the action behavior letter of every log recording Breath;
Judging unit, for judging whether the action behavior information influences metrical information;
Extraction unit, for extracting log recording corresponding to the action behavior information;
Discarding unit, for abandoning log recording corresponding to the action behavior information.
Alternatively, described device also includes:
Resource sharing Combined metering information generating module, for resource type, the money of the every kind of resource used according to user Source configuration, using the time started and use the end time, it is determined whether default resource sharing combination be present;If there is default money Source shares combination, then generates the metrical information of the default resource sharing combination, the metering letter of the default resource sharing combination Breath includes the use duration of the default resource sharing combination.
Alternatively, the resource rate of the default charging policy of every kind of resource including every kind of resource and marketing because Element, the sub- bill generation module include:
Resource rate acquisition submodule, for the resource type according to every kind of resource and resource distribution, described in acquisition The resource rate of every kind of resource;
Marketing Factors acquisition submodule, for obtaining Marketing Factors corresponding to the user profile;
Sub- bill generates submodule, for the resource according to every kind of resource using duration, resource rate and marketing because Element carries out charging to every kind of resource, generates sub- bill corresponding to every kind of resource.
Alternatively, the sub- bill generation module also includes:
Resource sharing combines sub- bill generation submodule, for obtaining the default charging plan of the default resource sharing combination Slightly, the default charging policy includes the resource rate and Marketing Factors of the default resource sharing combination;According to described default The resource rate combined using duration, the default resource sharing and Marketing Factors of resource sharing combination, to the default money Source shares combination and carries out charging, sub- bill corresponding to the generation default resource sharing combination.
In order to solve the above problems, the embodiment of the invention discloses a kind of electronic equipment, including memory, processor and deposit Storage realizes above-mentioned on a memory and the computer program that can run on a processor, during the computing device described program The step of method of anticipating.
In order to solve the above problems, the embodiment of the invention discloses a kind of computer-readable recording medium, it is stored thereon with Computer program, it is characterised in that the program realizes the step of above-mentioned any one method when being executed by processor.
The embodiment of the present invention includes advantages below:
If the embodiment of the present invention detects that user uses the multiple resources of cloud platform, it is determined that the charged party of multiple resources Formula, if the charging mode of the resource in multiple resources is periodic metering, obtain resource change daily record and the foundation of cloud platform The metrical information of every kind of resource of resource change daily record generation periodic metering, when the metrical information includes the use of every kind of resource Long, every kind of resource of foundation periodic metering uses duration and default charging policy, and every kind of resource of periodic metering is counted Take, generate sub- bill corresponding to every kind of resource of periodic metering, according to all sub- bills, the total bill of user is determined, using this Inventive embodiments, duration is used according to resource change daily record generation resource, because resource change daily record generates in real time, record Logging time is accurate to the second, is accurate to minute according to monitoring data generation resource metrical information relative to existing, improves money The degree of accuracy of source charging.
,, can be with after receiving the change message that the message system of cloud platform is sent if resource changes in the embodiment of the present invention Immediately the resource change daily record after being changed corresponding to change message is obtained, and according to the resource change daily record generation metering after change Information, change in resources can be synchronized in charging in real time, real time billing can be carried out, generate real-time billing invoice.
In the embodiment of the present invention, each subsystem of cloud platform only maintains resource change daily record, without charging relevant treatment, cloud Platform decouples mutually with charge system, improves the overall reliability of cloud platform system.
In the embodiment of the present invention, combined if default resource sharing in the multiple resources that user uses be present, according to pre- If the charging policy of resource sharing combination carries out charging to shared resource, the flexibility of resource charging is improved.
Brief description of the drawings
Fig. 1 is a kind of step flow chart of resource billing method embodiment of the present invention;
Fig. 2 is a kind of structured flowchart of resource message accounting embodiment of the present invention.
Embodiment
In order to facilitate the understanding of the purposes, features and advantages of the present invention, it is below in conjunction with the accompanying drawings and specific real Applying mode, the present invention is further detailed explanation.
Reference picture 1, a kind of step flow chart of resource billing method embodiment of the present invention is shown, can specifically be included Following steps:
Step 101, if detecting that user uses the multiple resources of cloud platform, it is determined that the charged party of the multiple resources Formula.
In the embodiment of the present invention, resource can refer to the resource in resource-sharing pond in cloud computing.Cloud computing is distributed meter Traditional computer and the network skills such as calculation, parallel computation, effectiveness calculating, network storage, virtualization, load balancing, hot-standby redundancy The product of art development fusion.The resource in resource-sharing pond can include network, server, storage, application software, clothes in cloud computing Business etc..The resource of cloud computing is to use on demand, and its charging mode can include periodic metering, and periodic metering refers to certain money Source rate, business service expense calculated using the duration of resource according to user, it is unrelated with flow, such as cloud main frame, cloud hard disk, The business such as cloud database, object storage.
Cloud platform can include multiple subsystems, and the resource of multiple subsystems can be different, and user can use cloud platform One or more subsystem resource.
The embodiment of the present invention can be that charging is carried out in units of user, such as when user logs in cloud platform by account, The resource used the account carries out charging, and the resource used can be multiple resources, it is therefore desirable to determine that user uses more The charging mode of kind resource.
The charging mode for determining resource can be determined according to resource type, such as advance to different resource types Charging mode or the type of service asked according to user is set to be determined, such as cloud host service is used and counted on time Take mode, when user uses resource, you can learn the charging mode of the resource.
Step 102, if the charging mode of the resource in the multiple resources is periodic metering, the cloud platform is obtained Resource change daily record.
If the charging mode of the resource in the multiple resources that user uses is periodic metering, the money of cloud platform can be obtained Change daily record in source.In actual applications, cloud platform subsystems possess the resource change daily record of itself, resource change daily record note Recorded the action of the change of resource, for example, start, start in, shutdown, delete, change configuration etc., the unique mark of resource, Operator ID, operating time, resource information (configuration, specification etc.).Charge system can obtain cloud platform according to predetermined period The resource change daily record of subsystems, the resource change daily record of each subsystem of cloud platform can be stored in subsystems, It can also be stored in the database server that cloud platform is specified, therefore, it can be in cloud platform to obtain resource change daily record Resource change daily record is obtained in each subsystem or resource change day is obtained in cloud platform specified database server Will.
In an embodiment of the present invention, the resource that cloud platform can be obtained according to predetermined period changes daily record, then walks Rapid 102 can include following sub-step:
Sub-step S11, obtains the accounts information of the user, and the accounts information includes the expense that prestores;
Sub-step S12, prestore expense according to described in, it is determined that the predetermined period corresponding to expense that prestores;
Sub-step S13, the resource that the cloud platform is obtained according to the predetermined period change daily record.
In actual applications, charge system can set the cycle for obtaining the change daily record of cloud platform resource, specifically, can To obtain different predetermined period according to the expense that prestores of user, such as user prestores the reduction of expense, predetermined period It is corresponding to shorten, it can so avoid user from prestoring expense deficiency, cause the situation of arrearage, said below with an example It is bright:
Such as user A by Account Logon cloud platform when, charge system can obtain the expense that prestores of user A account, If the expense that prestores is more than 1000 yuan, the cycle for obtaining resource change daily record can be 1 hour, if the expense that prestores is more than 500 Member is less than 1000 yuan, and the cycle for obtaining resource change daily record can be 0.5 hour, when the expense of prestoring is less than 500 yuan, obtains money The cycle of source change daily record can be 0.3 hour, the expense that can so be prestored with prior notice user deficiency, avoid user and owe Take.
In another preferred embodiment of the present invention, it cannot be guaranteed making for resource because periodicity obtains resource change daily record It can be fed back in real time in charge system with state, can not also generate the billing invoice of user in real time, therefore cloud platform is each Individual subsystem first can be analyzed once while resource log is recorded, if being related to the resource that user uses The daily record that dosage, configuration, state etc. have an impact to metrical information, a change message can be transmitted by message system to meter Charge system, charge system obtain the resource change daily record after corresponding change, then step immediately according to the source of change message 102 can include following sub-step:
Sub-step S21, receive the change message of the resource change used for user.
In actual applications, charge system is the periodic resource change daily record for obtaining each subsystem of cloud platform, such as The resource change daily record for obtaining each subsystem every 1 hour, it is possible that during the resource change daily record cycle is obtained, resource Configuration have sent change, for example, user's online upgrading cloud main frame configures, upgrade to from using monokaryon CPU cloud main frames using double-core CPU cloud main frames, it is clear that the resource distribution used is different, and resource rate is also different, in this case, it is necessary to arrive Next cycle just learns after obtaining resource change daily record, so results in charging real-time deficiency.
In order to avoid the above situation, cloud platform subsystems are when recording resource change daily record, if resource changes day The change of will is even more that when having influence on resource usage, configuration, state change etc. to have an impact resource charging, can pass through message system System transmits a change message can receive the change message to charge system, charge system.
Sub-step S22, obtain the resource change daily record after being changed corresponding to the change message.
In embodiments of the present invention, step S22 can include following sub-step:
Sub-step S221, obtain the informed source of the change message;
Sub-step S222, according to the informed source, obtain the resource change daily record of the informed source.
Charge system obtains change message pair immediately after the change message that the resource that user uses changes is received The resource change daily record answered, specifically, the message queue that the different subsystem of cloud platform is sent is different, passes through message queue Change message can be distinguished and come from the specific subsystem of cloud platform, then obtain the change of the resource after the change of the subsystem immediately Daily record, such as the resource change daily record after the time point of generation change message can be obtained, it can so obtain real-time money Daily record is changed in source, improves the real-time of resource charging.
Resource change data are not directly sent to charge system by the embodiment of the present invention by message system, but are only transmitted Message is changed, ensure that cloud platform system coupling and reliability, in the case where message system collapses, will not also lose resource Data are changed, also do not interfere with the service of each subsystem of cloud platform and charge system itself.
Step 103, the metrical information of every kind of resource of the periodic metering is generated according to resource change daily record, it is described Metrical information uses duration including every kind of resource.
In one preferred embodiment of the invention, step 103 can include following sub-step:
Sub-step S31, changed from the resource in daily record, extract the log recording associated with the metrical information.
In above-mentioned resource change daily record, the change action of resource is have recorded, can be changed from resource in daily record, according to change The implication more acted, the log recording associated with metrical information is extracted, can specifically include following sub-step:
Sub-step S311, obtain in the resource change daily record, the action behavior information of every log recording;
Sub-step S312, judges whether the action behavior information influences metrical information;If so, sub-step S313 is performed, If it is not, perform sub-step S314.
Sub-step S313, extract log recording corresponding to the action behavior information;
Sub-step S314, abandon log recording corresponding to the action behavior information.
In actual applications, the resource that resource change daily record includes obtaining according to predetermined period changes daily record, also includes connecing The resource change daily record obtained after change message is received, the log recording in resource change daily record can be analyzed one by one, obtained every The action behavior information of bar log recording, by understanding the implication of action behavior information in log recording, judge whether it can shadow Metrical information is rung, such as whether action behavior information is influenceed using duration, configuration etc., if it is, this log recording is extracted, Otherwise, this log recording is abandoned, so as to filter out the log recording unrelated with metrical information.Such as certain log recording is Time in resource startup, will not change resource uses duration, then this daily record is abandoned, if log recording is to have recorded money The source change of title, not interfering with metrical information, then yet this daily record also can be abandoned directly, and if log recording is to enable money Second configuration in source, such as is changed to using double-core core CPU 2G internal memories from using cloud main frame monokaryon CPU 1G internal memories, due to Difference is put, resource rate is also different, then influences whether metrical information, then extracts the log recording.
In this preferred embodiment, judge whether to have influence on metrical information by the action behavior information in log recording, such as It is no, then log recording is abandoned, filters out the log recording unrelated with metrical information, finally gives the daily record associated with metrical information Record.
Sub-step S32, user profile is obtained using the log recording of the association, and, every kind of resource that user uses Resource type, resource distribution, using the time started and use the end time.
After the log recording of association is extracted, log recording is analyzed, understands action behavior in journal record Implication, therefrom obtain metrical information.Every kind of resource that metrical information can use including the use of the user profile of the resource, user Resource type, resource distribution, begin to use time and end time etc..
Such as start to generate resource change daily record after cloud platform some subsystem start, resource changes daily record including the use of this The user of subsystem, user using the resource type of the various resources of the subsystem, resource distribution, begin to use the time, terminate When usage time, such as resource A, resource change daily record can record a user and use subsystem resource A use Long log recording, time started are the operating times of log recording, and the end time is sky, in certain log recording in future User terminates to use resource A, then the operating time for using duration, the end time being recorded as to daily record before updating.
User profile can be the unique ID of user, can also be the tenant of user in the environment of multi-tenant ID, such as can be the account of user etc..
Resource type can include the cloud computings such as virtual machine, disk, CPU, internal memory, IP, object storage, database, caching Service Source.
Resource distribution can be the specification of resource, such as cloud main frame monokaryon CPU 1G internal memories or double-core CPU 2G internal memories, Disk 100G, disk 200G, IP bandwidth 1Mbps, 5Mbps etc..
The embodiment of the present invention, because change daily record is typically the alteration of record resource in real time, it in time can be with The second is accurate to, therefore, the metrical information that the log recording associated in daily record with metrical information generates is changed according to resource, relative to Resource metrical information is obtained by monitoring data in the prior art, improves the accuracy of resource metrical information.
Sub-step S33, according to every kind of resource using the time started and using the end time, calculate every kind of money The resource in source uses duration.
In the embodiment of the present invention, the charging mode of resource is periodic metering, and its expense is relevant with using duration, is remembered from daily record Obtained in record using the time started and using after the end time, be then using the time started and using the duration between the end time To use duration.Due to being that change daily record records in real time using the time started and using the end time, therefore, resource uses duration Computational accuracy it is high.
In a kind of alternative embodiment of the present invention, there can also be the common charge mode of multiple resources, then metrical information It can also generate in the following manner:
The resource type of the every kind of resource used according to user, resource distribution, time started and the end time of use are used, Determine whether there is default resource sharing combination;
Combined if there is default resource sharing, then generate the metrical information of the default resource sharing combination, it is described pre- If the metrical information of resource sharing combination uses duration including the default resource sharing combination.
In actual applications, default resource sharing can be set to combine, when detecting user while be total to using resource is preset During with resource in combination, can calculate default resource sharing combination uses duration, is illustrated below with example:
For example, user is 08 using the time started using resource A:00:00, the use of the end time is 12:00:00;
The use of the resource B time started that uses is 09:00:00, the use of the end time is 11:00:00;
The use of the resource C time started that uses is 07:00:00, the use of the end time is 12:00:00;
Assuming that it is 1.0 yuan/hour that resource A, B, C, which share every kind of resource, exclusive use is then 1.5 yuan/hour, then can be according to The resource type of every kind of resource, resource distribution determine whether there is resource A, B, C in the multiple resources used according to user, if deposited The shared duration of end time computing resource A, B, C using the time started and is then being used according to resource A, B, C, as described above Example, resource source A, B, C share the period as 09:00:00-11:00:00, i.e., a length of 2 hours during shared use, make at this It is 3.0 yuan/hour with duration 2 hours, presetting resource A, B, C to share the rate combined, and outside shared duration 2 hours, then Charging is carried out to resource A, B, C according to the rate of exclusive use.
Certainly, above-mentioned multiple resources share combination and are intended only as example, can be according to reality when implementing the embodiment of the present invention Border situation sets other multiple resources to share combination, and the embodiment of the present invention is not any limitation as to this.In addition, except above-mentioned a variety of moneys Source is shared outside combination, and those skilled in the art can also share combination, the present invention according to being actually needed using other multiple resources Embodiment is not also any limitation as to this.
Step 104, according to the periodic metering every kind of resource use duration and default charging policy, to it is described on time Every kind of resource of charging carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering.
In embodiments of the present invention, presetting charging policy includes the resource rate and Marketing Factors of every kind of resource, then step 104 can include following sub-step:
Sub-step S41, resource type and resource distribution according to every kind of resource, the resource of acquisition every kind of resource Rate.
In actual applications, the different resource distribution of the resource of different types of resource or same type, its hardware cost, Maintenance cost is different, and its resource rate is also different, such as the resource rate of cloud main frame monokaryon CPU 1G internal memories is 0.01 yuan/hour, the resource rate of double-core CPU 2G internal memories is 0.02 yuan/hour.Therefore, when need to resource carry out charging When, it is necessary to obtain the resource type of every kind of resource and the resource rate of resource distribution.Specifically, various moneys can be pre-set Resource rate corresponding to Source Type and resource distribution, and being stored in charge system, can be with when needing to carry out charging to resource Directly obtained in storage medium every kind of resource resource type and resource distribution corresponding to resource rate.
Sub-step S42, obtain Marketing Factors corresponding to the user profile.
In actual applications, some resources there may be marketing activity, such as the discount activity for some users, such as Some resource user C can make a call to 5 foldings (such as user C is VIP user), if the rate of the resource is 0.02 yuan/hour, then Marketing Factors are superimposed with, rate is 0.01 yuan/hour after folding.
Can certainly be the marketing activity for some resources, such as some resource can make a call to 5 from moment A to moment B Roll over (such as idle in business), at this point it is possible to obtain Marketing Factors corresponding to the resource.
Certainly, above-mentioned discount activity is only example, and those skilled in the art can also associate according to actual conditions Other Marketing Factors, such as integration deduction etc., the embodiment of the present invention is without limitation.
Sub-step S43, the resource according to every kind of resource is using duration, resource rate and Marketing Factors to described every kind of Resource carries out charging, generates sub- bill corresponding to every kind of resource.
The resource of every kind of resource is obtained using after duration, resource rate and Marketing Factors, can be calculated according to preset rules The expense of resource, sub- bill corresponding to every kind of resource is generated, specifically, can calculate every kind of resource uses duration and resource rate Product after, can obtain the sub- bill of every kind of resource after considering Marketing Factors.
In order to better illustrate the embodiment of the present invention, illustrated below in conjunction with example:
Changed from resource in daily record, obtaining resource A metrical information is:
Use the time started:2016-12-01 00:00:00;
Use the end time:2016-12-01 01:00:00;
Resource:A (A is type);
Configuration:Double-core CPU, internal memory 2G;
User:X;
Resource rate:Double-core CPU, internal memory 2G resource rate are 0.2 yuan/hour;
Marketing Factors:User X has a discount, from 2016-12-01 00:30:00 arrives 2016-12-31 23:59:59, Discount rate 0.5.
The resource expense so ultimately generated is singly in detail:
2016-12-01 00:00:00 arrives 2016-12-01 00:30:When 00A resource double-core CPU internal memory 2G resources use It is long 0.5 hour, 0.5 × 0.2=0.1 members of deducting fees;
2016-12-01 00:30:00 arrives 2016-12-01 01:00:When 00A resources double-core CPU, internal memory 2G resource use It is long 0.5 hour, 0.5 × 0.2 × 0.5=0.05 members of deducting fees.
Then user X is using resource A bill:0.15 yuan of resource A.
It should be noted that above-mentioned example is only used for convenient understanding explanation, the embodiment of the present invention is not limited to above-mentioned Foundation using duration, resource rate and Marketing Factors to resource carry out charging mode.
In a kind of alternative embodiment of the present invention, default resource sharing can also be calculated according to default resource sharing combination The sub- bill of combination, specifically may include steps of:
The default charging policy of the default resource sharing combination is obtained, the default charging policy includes the default money Source shares the resource rate and Marketing Factors of combination;
The resource rate combined using duration, the default resource sharing and battalion according to the default resource sharing combination Pin factor, charging, sub- bill corresponding to the generation default resource sharing combination are carried out to the default resource sharing combination.
In the embodiment of the present invention, the charging policy of default resource sharing combination includes the resource that default resource sharing combines and taken Rate and Marketing Factors, then it can calculate the resource rate combined using duration and default resource sharing of default resource sharing combination Product after, consider that Marketing Factors can obtain sub- bill corresponding to default resource sharing combination.
In order to better illustrate the embodiment of the present invention, illustrated below in conjunction with example:
Changed from resource in daily record, obtaining the period that resource A, B, C are used is:
The use of the resource A time started that uses is 08:00:00, the use of the end time is 12:00:00;
The use of the resource B time started that uses is 09:00:00, the use of the end time is 11:00:00;
The use of the resource C time started that uses is 07:00:00, the use of the end time is 12:00:00;
Resource rate:
Resource A rates:1.5 yuan/hour;Resource B rates:1.5 yuan/hour;Resource C rates:1.5 yuan/hour;
Resource A, B, C share combination rate:3 yuan/hour;
User:X;
Marketing Factors:User X has a discount, discount rate 0.85.
Generating the shared sub- bill of resource A, B, C is:
09:00:00-11:00:00 user X is simultaneously using resource A, B, C bill:3 × 2 × 0.85=5.1 members.
For being not belonging to that charging can be carried out according to resource rate when being used alone using resource A, B, C portion simultaneously, Such as:
Generating the sub- bill that resource A is used alone is:
08:00:00-09:00:00 user X is using resource A bill:1 × 1.5 × 0.85=1.275 members;
11:00:00-12:00:00 user X is using resource A bill:1 × 1.5 × 0.85=1.275 members;
Generating the sub- bill that resource C is used alone is:
07:00:00-09:00:00 user X is using resource C bill:2 × 1.5 × 0.85=2.55 members;
11:00:00-12:00:00 user X is using resource C bill:1 × 1.5 × 0.85=1.275 members.
In another example, resource A bill can also be generated in the following way for resource A:
08:00:00-09:00:00 user X is using resource A bill:1 × 1.5 × 0.85=1.275 members;
09:00:00-11:00:00 user X is using resource A bill:2 × 1 × 0.85=1.7 members;
11:00:00-12:00:00 user X is using resource A bill:1 × 1.5 × 0.85=1.275 members.
Certainly, above-mentioned multiple resources share combination and charging mode is intended only as example, when implementing the embodiment of the present invention, The shared combination of other multiple resources and charging mode, the embodiment of the present invention can be set not to limit this according to actual conditions System.In addition, in addition to above-mentioned multiple resources share combination and charging mode, those skilled in the art can also be according to being actually needed Combination is shared using other multiple resources and charging mode, the embodiment of the present invention are not also any limitation as to this.
Step 105, according to all sub- bills, the total bill of the user is determined.
In actual applications, after the sub- bill either shared sub- bill of multiple resources for generating every kind of resource, Ke Yihe And all sub- bills of user, the total bill of user is generated, total bill is notified into user or deducted fees according to total bill.
If the embodiment of the present invention detects that user uses the multiple resources of cloud platform, it is determined that the charged party of multiple resources Formula, if the charging mode of the resource in multiple resources is periodic metering, the resource change daily record of cloud platform is obtained, according to money Source change daily record generation periodic metering every kind of resource metrical information, according to periodic metering every kind of resource metrical information and Default charging policy, charging is carried out to every kind of resource of periodic metering, generates sub- bill corresponding to every kind of resource of periodic metering, According to all sub- bills, the total bill of user is determined, using the embodiment of the present invention, is measured according to resource change daily record generation resource Information, because resource change daily record generates in real time, the logging time of record is accurate to the second, is given birth to relative to existing according to monitoring data Minute is accurate into resource metrical information, improves the degree of accuracy of resource charging.
In the embodiment of the present invention, if resource changes, after the change message that message system is sent is received, it can obtain immediately The resource change daily record after being changed corresponding to change message is taken, and daily record generation metrical information is changed according to the resource after change, Change in resources can be synchronized in charging in real time, ensure that the real-time of charging.
The resource billing method of the embodiment of the present invention, cloud platform only needs to safeguard that resource changes daily record, without charging phase Pass is handled, and cloud platform decouples mutually with charge system, improves the overall reliability of cloud platform system.
In the embodiment of the present invention, combined if default resource sharing in the multiple resources that user uses be present, according to pre- If the charging policy of resource sharing combination carries out charging to shared resource, the flexibility of resource charging is improved.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of action group Close, but those skilled in the art should know, the embodiment of the present invention is not limited by described sequence of movement, because according to According to the embodiment of the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented Necessary to example.
Reference picture 2, a kind of structured flowchart of resource message accounting embodiment of the present invention is shown, can specifically included such as Lower module:
Charging mode determining module 201, if for detecting that user uses the multiple resources of cloud platform, determine described more The charging mode of kind resource;
Resource change log acquisition module 202, if the charging mode for the resource in the multiple resources is on time Charging, obtain the resource change daily record of the cloud platform;
Metrical information generation module 203, for generating every kind of money of the periodic metering according to resource change daily record The metrical information in source, the metrical information use duration including every kind of resource;
Sub- bill generation module 204, duration and default charging are used for every kind of resource according to the periodic metering Strategy, charging is carried out to every kind of resource of the periodic metering, generates sub- bill corresponding to every kind of resource of the periodic metering;
Total bill determining module 205, for according to all sub- bills, determining the total bill of the user.
Alternatively, resource change log acquisition module 202 includes:
Accounts information acquisition submodule, for obtaining the accounts information of the user, the accounts information includes the expense that prestores With;
Predetermined period acquisition submodule, for the expense that prestored according to described in, it is determined that the predetermined period corresponding to expense that prestores;
First resource changes log acquisition submodule, and the resource for obtaining the cloud platform according to the predetermined period becomes More daily record.
Alternatively, resource change log acquisition module 202 includes:
Message sink submodule is changed, for receiving the change message of the resource change used for user;
Secondary resource changes log acquisition submodule, for obtaining the resource change after being changed corresponding to the change message Daily record.
Alternatively, the Secondary resource change log acquisition submodule includes:
Informed source acquiring unit, for obtaining the informed source of the change message;
Resource changes log acquisition unit, for according to the informed source, obtaining the resource change of the informed source Daily record.
Alternatively, metrical information generation module 203 includes:
Log recording extracting sub-module, for being changed from the resource in daily record, extract and associated with the metrical information Log recording;
Metrical information acquisition submodule, for obtaining user profile using the log recording of the association, and, user makes The resource type of every kind of resource, resource distribution, using the time started and use the end time;
Resource uses duration calculation submodule, at the end of using time started and use according to every kind of resource Between, the resource for calculating every kind of resource uses duration.
Alternatively, the log recording extracting sub-module includes:
Behavioural information acquiring unit, for obtaining in the resource change daily record, the action behavior letter of every log recording Breath;
Judging unit, for judging whether the action behavior information influences metrical information;
Extraction unit, for extracting log recording corresponding to the action behavior information;
Discarding unit, for abandoning log recording corresponding to the action behavior information.
Alternatively, described device also includes:
Resource sharing Combined metering information generating module, for resource type, the money of the every kind of resource used according to user Source configuration, using the time started and use the end time, it is determined whether default resource sharing combination be present;If there is default money Source shares combination, then generates the metrical information of the default resource sharing combination, the metering letter of the default resource sharing combination Breath includes the use duration of the default resource sharing combination.
Alternatively, the resource rate of the default charging policy of every kind of resource including every kind of resource and marketing because Element, sub- bill generation module 204 include:
Resource rate acquisition submodule, for the resource type according to every kind of resource and resource distribution, described in acquisition The resource rate of every kind of resource;
Marketing Factors acquisition submodule, for obtaining Marketing Factors corresponding to the user profile;
Sub- bill generates submodule, for the resource according to every kind of resource using duration, resource rate and marketing because Element carries out charging to every kind of resource, generates sub- bill corresponding to every kind of resource.
Alternatively, the sub- bill generation module 204 also includes:
Resource sharing combines sub- bill generation submodule, for obtaining the default charging plan of the default resource sharing combination Slightly, the default charging policy includes the resource rate and Marketing Factors of the default resource sharing combination;According to described default The resource rate combined using duration, the default resource sharing and Marketing Factors of resource sharing combination, to the default money Source shares combination and carries out charging, sub- bill corresponding to the generation default resource sharing combination.
The embodiment of the present invention determines the charged party of multiple resources when detecting that user uses the multiple resources of cloud platform Formula, when the charging mode of the resource in multiple resources is periodic metering, the resource change daily record of cloud platform is obtained, according to resource The metrical information of every kind of resource of daily record generation periodic metering is changed, according to the metrical information of every kind of resource of periodic metering and pre- Design charges strategy, charging is carried out to every kind of resource of periodic metering, generates sub- bill corresponding to every kind of resource of periodic metering, according to According to all sub- bills, the total bill of user is determined, using the embodiment of the present invention, is believed according to resource change daily record generation resource metering Breath, because resource change daily record generates in real time, the logging time of record is accurate to the second, is generated relative to existing according to monitoring data Resource metrical information is accurate to minute, improves the degree of accuracy of resource charging.
The embodiments of the invention provide a kind of electronic equipment and a kind of computer-readable recording medium, the electronic equipment bag The computer program that includes memory, processor and storage on a memory and can run on a processor, the computing device Following steps are realized during described program:
If detect that user uses the multiple resources of cloud platform, it is determined that the charging mode of the multiple resources;
If the charging mode of the resource in the multiple resources is periodic metering, the resource for obtaining the cloud platform becomes More daily record;
The metrical information of every kind of resource of the periodic metering, the metrical information are generated according to resource change daily record Duration is used including every kind of resource;
According to use duration and the default charging policy of every kind of resource of the periodic metering, to the every of the periodic metering Kind resource carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering;
According to all sub- bills, the total bill of the user is determined.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
The accounts information of the user is obtained, the accounts information includes the expense that prestores;
Prestore expense according to described in, it is determined that the predetermined period corresponding to expense that prestores;
The resource that the cloud platform is obtained according to the predetermined period changes daily record.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
Receive the change message of the resource change used for user;
Obtain the resource change daily record after being changed corresponding to the change message.
Preferably, the step of resource obtained after being changed corresponding to the change message changes daily record includes:
Obtain the informed source of the change message;
According to the informed source, the resource change daily record of the informed source is obtained.
Preferably, the metrical information of every kind of resource that the periodic metering is generated according to resource change daily record Step includes:
Changed from the resource in daily record, extract the log recording associated with the metrical information;
User profile, resource type, the resource of every kind of resource that user uses are obtained using the log recording of the association Configuration, using the time started and use the end time;
According to every kind of resource using the time started and using the end time, calculating the resource of every kind of resource makes Use duration.
Preferably, it is described to be changed from the resource in daily record, extract the log recording that is associated with the metrical information Step includes:
Obtain in the resource change daily record, the action behavior information of every log recording;
Judge whether the action behavior information influences metrical information;
If so, then extract log recording corresponding to the action behavior information;
If it is not, then abandon log recording corresponding to the action behavior information.
Preferably, duration and default charging policy are used in every kind of resource according to the periodic metering, to institute The every kind of resource for stating periodic metering carries out charging, before generating sub- bill corresponding to every kind of resource of the periodic metering, also wraps Include:
The resource type of the every kind of resource used according to user, resource distribution, time started and the end time of use are used, Determine whether there is default resource sharing combination;
Combined if there is the default resource sharing, then generate the metrical information of the default resource sharing combination, institute The metrical information for stating default resource sharing combination uses duration including the default resource sharing combination.
Preferably, the resource rate of the default charging policy of every kind of resource including every kind of resource and marketing because Element, the metrical information of every kind of resource according to the periodic metering and default charging policy are to the every kind of of the periodic metering Resource carries out charging, and the step of generating sub- bill corresponding to every kind of resource of the periodic metering includes:
Resource type and resource distribution according to every kind of resource, obtain the resource rate of every kind of resource;
Obtain Marketing Factors corresponding to the user profile;
Resource according to every kind of resource carries out charging using duration, resource rate and Marketing Factors to every kind of resource, Generate sub- bill corresponding to every kind of resource.
Preferably, described according to all sub- bills, before the total bill for determining the user, in addition to:
The default charging policy of the default resource sharing combination is obtained, the default charging policy includes the default money Source shares the resource rate and Marketing Factors of combination;
The resource rate combined using duration, the default resource sharing and battalion according to the default resource sharing combination Pin factor, charging, sub- bill corresponding to the generation default resource sharing combination are carried out to the default resource sharing combination.
The computer-readable recording medium storage has computer program, can be realized such as when the program is executed by processor Lower step:
If detect that user uses the multiple resources of cloud platform, it is determined that the charging mode of the multiple resources;
If the charging mode of the resource in the multiple resources is periodic metering, the resource for obtaining the cloud platform becomes More daily record;
The metrical information of every kind of resource of the periodic metering, the metrical information are generated according to resource change daily record Duration is used including every kind of resource;
According to use duration and the default charging policy of every kind of resource of the periodic metering, to the every of the periodic metering Kind resource carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering;
According to all sub- bills, the total bill of the user is determined.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
The accounts information of the user is obtained, the accounts information includes the expense that prestores;
Prestore expense according to described in, it is determined that the predetermined period corresponding to expense that prestores;
The resource that the cloud platform is obtained according to the predetermined period changes daily record.
Preferably, the step of resource for obtaining the cloud platform changes daily record includes:
Receive the change message of the resource change used for user;
Obtain the resource change daily record after being changed corresponding to the change message.
Preferably, the step of resource obtained after being changed corresponding to the change message changes daily record includes:
Obtain the informed source of the change message;
According to the informed source, the resource change daily record of the informed source is obtained.
Preferably, the metrical information of every kind of resource that the periodic metering is generated according to resource change daily record Step includes:
Changed from the resource in daily record, extract the log recording associated with the metrical information;
User profile, resource type, the resource of every kind of resource that user uses are obtained using the log recording of the association Configuration, using the time started and use the end time;
According to every kind of resource using the time started and using the end time, calculating the resource of every kind of resource makes Use duration.
Preferably, it is described to be changed from the resource in daily record, extract the log recording that is associated with the metrical information Step includes:
Obtain in the resource change daily record, the action behavior information of every log recording;
Judge whether the action behavior information influences metrical information;
If so, then extract log recording corresponding to the action behavior information;
If it is not, then abandon log recording corresponding to the action behavior information.
Preferably, duration and default charging policy are used in every kind of resource according to the periodic metering, to institute The every kind of resource for stating periodic metering carries out charging, before generating sub- bill corresponding to every kind of resource of the periodic metering, also wraps Include:
The resource type of the every kind of resource used according to user, resource distribution, time started and the end time of use are used, Determine whether there is default resource sharing combination;
Combined if there is the default resource sharing, then generate the metrical information of the default resource sharing combination, institute The metrical information for stating default resource sharing combination uses duration including the default resource sharing combination.
Preferably, the resource rate of the default charging policy of every kind of resource including every kind of resource and marketing because Element, the metrical information of every kind of resource according to the periodic metering and default charging policy are to the every kind of of the periodic metering Resource carries out charging, and the step of generating sub- bill corresponding to every kind of resource of the periodic metering includes:
Resource type and resource distribution according to every kind of resource, obtain the resource rate of every kind of resource;
Obtain Marketing Factors corresponding to the user profile;
Resource according to every kind of resource carries out charging using duration, resource rate and Marketing Factors to every kind of resource, Generate sub- bill corresponding to every kind of resource.
Preferably, described according to all sub- bills, before the total bill for determining the user, in addition to:
The default charging policy of the default resource sharing combination is obtained, the default charging policy includes the default money Source shares the resource rate and Marketing Factors of combination;
The resource rate combined using duration, the default resource sharing and battalion according to the default resource sharing combination Pin factor, charging, sub- bill corresponding to the generation default resource sharing combination are carried out to the default resource sharing combination.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, what each embodiment stressed be with The difference of other embodiment, between each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can use complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can use one or more wherein include computer can With in the computer-usable storage medium (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention is with reference to method according to embodiments of the present invention, terminal device (system) and computer program The flow chart and/or block diagram of product describes.It should be understood that can be by computer program instructions implementation process figure and/or block diagram In each flow and/or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These can be provided Computer program instructions are set to all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to produce a machine so that is held by the processor of computer or other programmable data processing terminal equipments Capable instruction is produced for realizing in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames The device for the function of specifying.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing terminal equipments In the computer-readable memory to work in a specific way so that the instruction being stored in the computer-readable memory produces bag The manufacture of command device is included, the command device is realized in one flow of flow chart or multiple flows and/or one side of block diagram The function of being specified in frame or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps is performed on computer or other programmable terminal equipments to produce computer implemented processing, so that The instruction performed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows And/or specified in one square frame of block diagram or multiple square frames function the step of.
Although having been described for the preferred embodiment of the embodiment of the present invention, those skilled in the art once know base This creative concept, then other change and modification can be made to these embodiments.So appended claims are intended to be construed to Including preferred embodiment and fall into having altered and changing for range of embodiment of the invention.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or terminal device including a series of elements are not only wrapped Those key elements, but also the other element including being not expressly set out are included, or is also included for this process, method, article Or the key element that terminal device is intrinsic.In the absence of more restrictions, wanted by what sentence "including a ..." limited Element, it is not excluded that other identical element in the process including the key element, method, article or terminal device also be present.
Above to a kind of resource billing method provided by the present invention and device, it is described in detail, it is used herein Specific case is set forth to the principle and embodiment of the present invention, and the explanation of above example is only intended to help and understands The method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, having There will be changes in body embodiment and application, in summary, this specification content should not be construed as to the present invention Limitation.

Claims (12)

  1. A kind of 1. resource billing method, it is characterised in that including:
    If detect that user uses the multiple resources of cloud platform, it is determined that the charging mode of the multiple resources;
    If it is determined that the charging mode of the resource in the multiple resources is periodic metering, then the resource for obtaining the cloud platform becomes More daily record;
    The metrical information of every kind of resource of the periodic metering is generated according to resource change daily record, the metrical information includes Every kind of resource uses duration;
    According to use duration and the default charging policy of every kind of resource of the periodic metering, to every kind of money of the periodic metering Source carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering;
    According to all sub- bills, the total bill of the user is determined.
  2. 2. according to the method for claim 1, it is characterised in that the step of the resource change daily record for obtaining the cloud platform Suddenly include:
    The accounts information of the user is obtained, the accounts information includes the expense that prestores;
    Prestore expense according to described in, it is determined that the predetermined period corresponding to expense that prestores;
    The resource that the cloud platform is obtained according to the predetermined period changes daily record.
  3. 3. according to the method for claim 1, it is characterised in that the step of the resource change daily record for obtaining the cloud platform Suddenly include:
    Receive the change message of the resource change used for user;
    Obtain the resource change daily record after being changed corresponding to the change message.
  4. 4. according to the method for claim 3, it is characterised in that the money obtained after being changed corresponding to the change message The step of source change daily record, includes:
    Obtain the informed source of the change message;
    According to the informed source, the change daily record of the resource after the change of the informed source is obtained.
  5. 5. according to the method described in claim any one of 1-4, it is characterised in that described according to resource change daily record generation The step of metrical information of every kind of resource of the periodic metering, includes:
    Changed from the resource in daily record, extract the log recording associated with the metrical information;
    User profile is obtained using the log recording of the association, and, resource type, the resource of every kind of resource that user uses Configuration, using the time started and use the end time;
    According to every kind of resource using the time started and using the end time, calculate every kind of resource uses duration.
  6. 6. according to the method for claim 5, it is characterised in that it is described to be changed from the resource in daily record, extract and institute The step of log recording for stating metrical information association, includes:
    Obtain in the resource change daily record, the action behavior information of every log recording;
    Judge whether the action behavior information influences the metrical information;
    If so, then extract log recording corresponding to the action behavior information;
    If it is not, then abandon log recording corresponding to the action behavior information.
  7. 7. according to the method for claim 6, it is characterised in that in making for every kind of resource according to the periodic metering With duration and default charging policy, charging is carried out to every kind of resource of the periodic metering, generates the every kind of of the periodic metering Before sub- bill corresponding to resource, in addition to:
    The resource type of the every kind of resource used according to user, resource distribution, time started and the end time of use are used, it is determined that Combined with the presence or absence of default resource sharing;
    Combined if there is the default resource sharing, then generate the metrical information of the default resource sharing combination, it is described pre- If the metrical information of resource sharing combination uses duration including the default resource sharing combination.
  8. 8. according to the method for claim 5, it is characterised in that the default charging policy of every kind of resource includes described every The resource rate and Marketing Factors of kind resource, every kind of resource according to the periodic metering use duration and default charging Strategy, charging is carried out to every kind of resource of the periodic metering, generates sub- bill corresponding to every kind of resource of the periodic metering The step of include:
    Resource type and resource distribution according to every kind of resource, obtain the resource rate of every kind of resource;
    Obtain Marketing Factors corresponding to the user profile;
    According to every kind of resource using duration, resource rate and Marketing Factors, charging, generation are carried out to every kind of resource Sub- bill corresponding to every kind of resource.
  9. 9. according to the method for claim 7, it is characterised in that described according to all sub- bills, determine the user's Before total bill, in addition to:
    The default charging policy of the default resource sharing combination is obtained, the default charging policy is total to including the default resource With the resource rate and Marketing Factors of combination;
    According to the default resource sharing combination the resource rate combined using duration, the default resource sharing and marketing because Element, charging, sub- bill corresponding to the generation default resource sharing combination are carried out to the default resource sharing combination.
  10. A kind of 10. resource message accounting, it is characterised in that including:
    Charging mode determining module, if for detecting that user uses the multiple resources of cloud platform, determine the multiple resources Charging mode;
    Resource changes log acquisition module, if the charging mode for the resource in the multiple resources is periodic metering, obtains The resource of the cloud platform is taken to change daily record;
    Metrical information generation module, the metering of every kind of resource for generating the periodic metering according to resource change daily record Information, the metrical information use duration including every kind of resource;
    Sub- bill generation module, it is right for every kind of resource according to the periodic metering using duration and default charging policy Every kind of resource of the periodic metering carries out charging, generates sub- bill corresponding to every kind of resource of the periodic metering;
    Total bill determining module, for according to all sub- bills, determining the total bill of the user.
  11. 11. a kind of electronic equipment, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, it is characterised in that the step of any one of claim 1-9 methods described is realized during the computing device described program Suddenly.
  12. 12. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The step of any one of claim 1-9 methods described is realized during execution.
CN201710439373.2A 2017-06-12 2017-06-12 Resource charging method and device Active CN107360006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710439373.2A CN107360006B (en) 2017-06-12 2017-06-12 Resource charging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710439373.2A CN107360006B (en) 2017-06-12 2017-06-12 Resource charging method and device

Publications (2)

Publication Number Publication Date
CN107360006A true CN107360006A (en) 2017-11-17
CN107360006B CN107360006B (en) 2021-01-22

Family

ID=60272801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710439373.2A Active CN107360006B (en) 2017-06-12 2017-06-12 Resource charging method and device

Country Status (1)

Country Link
CN (1) CN107360006B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171540A (en) * 2017-12-26 2018-06-15 北京星河星云信息技术有限公司 For the method and apparatus of resource metering and billing
CN108900361A (en) * 2018-08-10 2018-11-27 北京金山云网络技术有限公司 Cloud resource, which configures, determines method, apparatus and electronic equipment
CN109063074A (en) * 2018-07-24 2018-12-21 浪潮(北京)电子信息产业有限公司 Data processing method, device, equipment and medium based on Hadoop
CN109255602A (en) * 2018-09-26 2019-01-22 广东浪潮大数据研究有限公司 A kind of resource uses charging method, device and equipment
CN109783312A (en) * 2018-12-18 2019-05-21 华为技术有限公司 A kind of metering method of resource usage, apparatus and system
CN109801135A (en) * 2019-01-16 2019-05-24 金蝶软件(中国)有限公司 Bill generation method, device, computer equipment and storage medium
CN110197368A (en) * 2018-03-21 2019-09-03 腾讯科技(深圳)有限公司 A kind of cloud resource processing method, device and storage medium
CN110929121A (en) * 2018-09-20 2020-03-27 中国石油化工股份有限公司 Log analysis-based seismic data processing machine time refined calculation method and system
CN111224791A (en) * 2020-01-10 2020-06-02 上海云海万邦数据科技有限公司 Cloud resource charging method and device, electronic equipment and storage medium
CN111628906A (en) * 2020-05-11 2020-09-04 紫光云技术有限公司 Method for carrying out flow statistics and monitoring on IP of bullet-supplying public network
CN111651345A (en) * 2020-04-13 2020-09-11 优刻得科技股份有限公司 System testing method and device and electronic equipment
CN111754270A (en) * 2020-07-01 2020-10-09 浪潮云信息技术股份公司 Charging management system of cloud computing product general product model
CN112990952A (en) * 2019-12-12 2021-06-18 北京金山云网络技术有限公司 Cloud computing metering charging method and device, electronic equipment and storage medium
CN113516507A (en) * 2021-06-16 2021-10-19 国云科技股份有限公司 Resource charging method and device for multi-cloud management platform
CN113517989A (en) * 2021-09-14 2021-10-19 浙江九州云信息科技有限公司 Resource charging method and device for IaaS cloud platform
CN113553303A (en) * 2021-06-24 2021-10-26 南方科技大学 Resource management method, device, medium and electronic equipment of super computer
CN113934543A (en) * 2021-10-21 2022-01-14 江苏安超云软件有限公司 Universal charging method and device for cloud resources, electronic equipment and storage medium
CN114629732A (en) * 2020-12-11 2022-06-14 北京金山云网络技术有限公司 Charging method and device for cloud resources, electronic equipment and medium
US11743154B2 (en) 2021-07-20 2023-08-29 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for processing network usage of a cloud product, device, storage medium and product
CN117742975A (en) * 2024-02-20 2024-03-22 北京搜狐新媒体信息技术有限公司 Resource data processing method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521662A (en) * 2011-11-29 2012-06-27 曙光信息产业(北京)有限公司 Consumption charging method in cloud computing environment
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
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521662A (en) * 2011-11-29 2012-06-27 曙光信息产业(北京)有限公司 Consumption charging method in cloud computing environment
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and 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 (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171540A (en) * 2017-12-26 2018-06-15 北京星河星云信息技术有限公司 For the method and apparatus of resource metering and billing
CN110197368A (en) * 2018-03-21 2019-09-03 腾讯科技(深圳)有限公司 A kind of cloud resource processing method, device and storage medium
CN110197368B (en) * 2018-03-21 2024-02-13 腾讯科技(深圳)有限公司 Cloud resource processing method, device and storage medium
CN109063074A (en) * 2018-07-24 2018-12-21 浪潮(北京)电子信息产业有限公司 Data processing method, device, equipment and medium based on Hadoop
CN108900361A (en) * 2018-08-10 2018-11-27 北京金山云网络技术有限公司 Cloud resource, which configures, determines method, apparatus and electronic equipment
CN110929121A (en) * 2018-09-20 2020-03-27 中国石油化工股份有限公司 Log analysis-based seismic data processing machine time refined calculation method and system
CN110929121B (en) * 2018-09-20 2023-07-04 中国石油化工股份有限公司 Log analysis-based seismic data processor time refinement calculation method and system
CN109255602A (en) * 2018-09-26 2019-01-22 广东浪潮大数据研究有限公司 A kind of resource uses charging method, device and equipment
CN109783312A (en) * 2018-12-18 2019-05-21 华为技术有限公司 A kind of metering method of resource usage, apparatus and system
CN109801135B (en) * 2019-01-16 2021-04-13 金蝶软件(中国)有限公司 Bill generation method and device, computer equipment and storage medium
CN109801135A (en) * 2019-01-16 2019-05-24 金蝶软件(中国)有限公司 Bill generation method, device, computer equipment and storage medium
CN112990952A (en) * 2019-12-12 2021-06-18 北京金山云网络技术有限公司 Cloud computing metering charging method and device, electronic equipment and storage medium
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
CN111651345A (en) * 2020-04-13 2020-09-11 优刻得科技股份有限公司 System testing method and device and electronic equipment
CN111628906A (en) * 2020-05-11 2020-09-04 紫光云技术有限公司 Method for carrying out flow statistics and monitoring on IP of bullet-supplying public network
CN111628906B (en) * 2020-05-11 2023-05-09 紫光云技术有限公司 Method for carrying out flow statistics and monitoring on elastic public network IP
CN111754270A (en) * 2020-07-01 2020-10-09 浪潮云信息技术股份公司 Charging management system of cloud computing product general product model
CN114629732A (en) * 2020-12-11 2022-06-14 北京金山云网络技术有限公司 Charging method and device for cloud resources, electronic equipment and medium
CN113516507B (en) * 2021-06-16 2024-02-13 国云科技股份有限公司 Multi-cloud management platform resource charging method and device
CN113516507A (en) * 2021-06-16 2021-10-19 国云科技股份有限公司 Resource charging method and device for multi-cloud management platform
CN113553303A (en) * 2021-06-24 2021-10-26 南方科技大学 Resource management method, device, medium and electronic equipment of super computer
US11743154B2 (en) 2021-07-20 2023-08-29 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for processing network usage of a cloud product, device, storage medium and product
CN113517989B (en) * 2021-09-14 2021-12-17 浙江九州云信息科技有限公司 Resource charging method and device for IaaS cloud platform
CN113517989A (en) * 2021-09-14 2021-10-19 浙江九州云信息科技有限公司 Resource charging method and device for IaaS cloud platform
CN113934543A (en) * 2021-10-21 2022-01-14 江苏安超云软件有限公司 Universal charging method and device for cloud resources, electronic equipment and storage medium
CN117742975A (en) * 2024-02-20 2024-03-22 北京搜狐新媒体信息技术有限公司 Resource data processing method and device, storage medium and electronic equipment
CN117742975B (en) * 2024-02-20 2024-06-04 北京搜狐新媒体信息技术有限公司 Resource data processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN107360006B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN107360006A (en) A kind of resource billing method and device
CN107240002B (en) Electric power transaction method and device and micro-grid system
CN107864193B (en) Business processing method, device, system and service equipment
CN107798057B (en) Transaction data processing method, device, storage medium and computer equipment
WO2013066659A1 (en) Marketplace for composite application and data solutions
CN109598495A (en) Data processing method, device, server and computer readable storage medium
CN109657132A (en) Recommendation information cost control method, device, computer equipment and storage medium
CN106487603A (en) A kind of response test method and device
TW201826188A (en) Data processing method and system
WO2019086522A1 (en) A COMPUTER IMPLEMENTED METHOD, A SYSTEM AND A COMPUTER PROGRAM FOR OPTIMIZING THE OPERATION OF A CLOUD HOSTED SOFTWARE AS A SERVICE (SaaS) SYSTEM
CN108038009A (en) Front and back end exchange method, device and computer equipment based on Web applications
CN109034493A (en) A kind of account balance prediction technique and device
CN111768174A (en) Activity management method, apparatus, device and medium
CN104156442B (en) Cumulative data application method
CN110246018A (en) Report generation device, method and equipment
CN114253746A (en) Product application service management method, device, equipment and medium based on software as a service (SaaS)
CN110059171A (en) Intelligent answer performance improvement method and system
CN109146574A (en) Ad click cheating monitoring method and device
CN110163606B (en) Refund method and device based on blockchain and electronic equipment
CN104079566B (en) The computational methods of result property value in terminal, server and the page
US20150032619A1 (en) Communication network for collecting data and executing electronic transaction services
Kalmar et al. What does I (o) T cost?
CN107945004A (en) Expense accumulates collection methods and device
CN114095497A (en) Resource usage amount proving method and system based on block chain and oriented to cloud network scene
CN113691534A (en) Identity authentication charging system and method

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
GR01 Patent grant
GR01 Patent grant