CN110300000B - Charging mode changing method and device, electronic equipment and readable storage medium - Google Patents

Charging mode changing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110300000B
CN110300000B CN201910569380.3A CN201910569380A CN110300000B CN 110300000 B CN110300000 B CN 110300000B CN 201910569380 A CN201910569380 A CN 201910569380A CN 110300000 B CN110300000 B CN 110300000B
Authority
CN
China
Prior art keywords
charging mode
attribute information
target
current
current charging
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.)
Active
Application number
CN201910569380.3A
Other languages
Chinese (zh)
Other versions
CN110300000A (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 Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201910569380.3A priority Critical patent/CN110300000B/en
Publication of CN110300000A publication Critical patent/CN110300000A/en
Application granted granted Critical
Publication of CN110300000B publication Critical patent/CN110300000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • G06Q20/145Payments according to the detected use or quantity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/28Pre-payment schemes, e.g. "pay before"
    • 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/1485Tariff-related aspects

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the invention provides a method and a device for changing a cloud computing resource charging mode, electronic equipment and a readable storage medium, which are applied to a charging server in a cloud computing system, wherein the method comprises the following steps: receiving a charging mode change request which is sent by a user and carries a target charging mode; determining attribute information of a target charging mode; acquiring attribute information of a current charging mode of a user; determining whether to allow the current charging mode to be changed into a target charging mode or not according to the attribute information of the current charging mode; taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed; and under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode. The invention can avoid repeated payment for users.

Description

Charging mode changing method and device, electronic equipment and readable storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for changing a charging mode of cloud computing resources, electronic equipment and a readable storage medium.
Background
With the continuous development of cloud computing technology, cloud computing resource services are continuously upgraded, and accordingly different charging modes of cloud computing resources appear. Once a cloud computing resource service instance (for example, if a cloud host is allocated to a customer, the cloud host may be regarded as an instance, and if 3 hard disks are allocated to the customer, the 3 hard disks are 3 instances respectively), is successfully created, and then a corresponding charging mode is associated. For example, a cloud computing system may be as shown in fig. 1, comprising: the system comprises a charging server and cloud hosts, wherein the charging of the cloud hosts is realized by the charging server, and the basic process of the charging is as follows: and obtaining charging information (including the number of the cloud hosts, the charging mode, the charging amount corresponding to the charging mode and the like) from the charging log, and charging the user according to the charging information.
If the user wants to change the charging mode in the charging period, in order to ensure that the user does not cause interference (i.e. more or less charges) to the charging logic in the charging mode changing process, only the user is supported to change to the specified charging mode or not to change.
If the charging mode is changed, for example, if the peak type charging mode with a charging period of 1 natural month is used by the user before 1 month and 10 days (the peak type charging mode is that charging duration is charged according to the whole month as long as usage is generated in the current month), the charging mode is changed to another charging mode from 1 month and 11 days later, for example, the charging mode is changed to the peak type charging mode with a charging period of 2 natural months; since the peak type billing method is used before month 1 and 10, the peak type billing method generates usage in month 1, and then the charge calculated at this time is: the sum of the charge obtained in the peak-type billing manner for the entire month 1 (instead of 10 days of 1 month 1 to 1 month 10) and the charge obtained in the peak-type billing manner for the billing period of 2 natural months after 1 month 11 (the charge for the entire month 1 and 2 months), thus resulting in the repeated billing for month 1. Therefore, the existing charging mode changing method can cause the user to pay repeatedly.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for changing a cloud computing resource charging mode, an electronic device and a readable storage medium, so as to avoid repeated payment for a user. The specific technical scheme is as follows:
the embodiment of the invention provides a cloud computing resource charging mode changing method, which is applied to a charging server in a cloud computing system and comprises the following steps:
receiving a charging mode change request which is sent by a user and carries a target charging mode;
determining attribute information of the target charging mode;
acquiring attribute information of the current charging mode of the user;
determining whether to allow the current charging mode to be changed into the target charging mode or not according to the attribute information of the current charging mode;
taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed;
and changing the current charging mode into the target charging mode when the system time is detected to reach the change time.
Optionally, the step of determining whether to allow the current charging mode to be changed to the target charging mode according to the attribute information of the current charging mode includes:
under the condition that the attribute information of the current charging mode is prepaid, the current charging mode is not allowed to be changed into the target charging mode;
and under the condition that the attribute information of the current charging mode is post-payment, allowing the current charging mode to be changed into the target charging mode.
Optionally, the step of determining the attribute information of the target charging method includes:
determining attribute information of a target charging mode according to a target charging mode identifier, a pre-stored corresponding relation between each charging mode identifier and the attribute information of each charging mode;
the step of obtaining the attribute information of the current charging mode of the user comprises the following steps:
acquiring a current charging mode identifier from the stored user information of the user;
and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, each pre-stored charging mode identification and the attribute information of each charging mode.
Optionally, the taking the arrival time of the next period with a larger charging period in the target charging manner and the current charging manner as a change time includes:
and when the attribute information of the current charging mode is post-payment and the attribute information of the target charging mode is post-payment or prepayment, taking the arrival time of the target charging mode and the next cycle with a larger charging cycle in the current charging mode as the change time.
Optionally, in a case that it is determined that the change is allowed, the method further includes:
and taking the end time of the charging period of the current charging mode as the change time under the condition that the attribute information of the current charging mode is postpaid and the attribute information of the target charging mode is prepaid.
The embodiment of the invention provides a cloud computing resource charging mode changing device, which is applied to a charging server in a cloud computing system, and comprises the following components:
a change request receiving module for receiving a charging mode change request carrying a target charging mode sent by a user;
the target attribute information determining module is used for determining the attribute information of the target charging mode;
a current attribute information acquisition module, configured to acquire attribute information of a current charging mode of the user;
a module for determining whether to change, according to the attribute information of the current charging mode, whether to allow the current charging mode to be changed into the target charging mode;
a change time determining module, configured to, when it is determined that a change is allowed, use an arrival time of a next period having a larger charging period in the target charging method and the current charging method as a change time;
and the charging mode changing module is used for changing the current charging mode into the target charging mode under the condition that the system time is detected to reach the changing time.
Optionally, the determining whether to change the module includes:
a determination disallowance change submodule, configured to disallow changing the current charging manner to the target charging manner when the attribute information of the current charging manner is prepaid;
and the determination permission changing sub-module is used for allowing the current charging mode to be changed into the target charging mode under the condition that the attribute information of the current charging mode is postpaid.
Optionally, the target attribute information determining module is specifically configured to determine the attribute information of the target charging mode according to a target charging mode identifier, a pre-stored correspondence between each charging mode identifier and the attribute information of each charging mode;
the current attribute information acquisition module is specifically configured to acquire a current charging mode identifier from the stored user information of the user; and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, each pre-stored charging mode identification and the attribute information of each charging mode.
Optionally, the change time determining module is specifically configured to, when the attribute information of the current charging manner is postpaid, and the attribute information of the target charging manner is postpaid or prepaid, use an arrival time of a next period with a larger charging period in the target charging manner and the current charging manner as the change time.
Optionally, the cloud computing resource charging manner changing apparatus in the embodiment of the present invention, when determining that the change is allowed, further includes:
and the backward pre-time determining module is used for taking the charging period ending time of the current charging mode as the change time under the condition that the attribute information of the current charging mode is post-payment and the attribute information of the target charging mode is pre-payment.
An embodiment of the present invention provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement any one of the above steps of the cloud computing resource charging method changing method when executing the program stored in the memory.
The embodiment of the invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the cloud computing resource charging mode changing methods are realized.
The cloud computing resource charging mode changing method, the cloud computing resource charging mode changing device, the electronic equipment and the readable storage medium provided by the embodiment of the invention receive a charging mode changing request which is sent by a user and carries a target charging mode; determining attribute information of a target charging mode; acquiring attribute information of a current charging mode of a user; determining whether to allow the current charging mode to be changed into a target charging mode or not according to the attribute information of the current charging mode; taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed; and under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode. Because the change time is the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode, and the problem of overlapping charging periods does not exist before and after the change time, the charging is carried out according to the current charging mode before the change time, and the charging is carried out according to the target charging mode after the change time arrives, so that the repeated payment of the user can be avoided. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a cloud computing system architecture;
fig. 2 is a flowchart of a method for changing a cloud computing resource charging manner according to an embodiment of the present invention;
fig. 3 is another flowchart of a method for changing a cloud computing resource charging manner according to an embodiment of the present invention;
fig. 4 is a structural diagram of a cloud computing resource charging method changing apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem of repeated payment of a user in the existing cloud computing resource charging mode changing method, the embodiment of the invention provides a cloud computing resource charging mode changing method, a cloud computing resource charging mode changing device, electronic equipment and a readable storage medium, so that repeated payment of the user is avoided.
First, the method for changing the cloud computing resource charging manner provided by the embodiment of the present invention is described in detail below, and the method for changing the cloud computing resource charging manner of the embodiment of the present invention is applied to a charging server in a cloud computing system.
Referring to fig. 2, fig. 2 is a flowchart of a method for changing a cloud computing resource charging manner according to an embodiment of the present invention, including the following steps:
s201, receiving a charging mode change request carrying a target charging mode sent by a user.
S202, determining attribute information of the target charging mode.
S203, obtaining the attribute information of the current charging mode of the user.
And S204, determining whether to allow the current charging mode to be changed into the target charging mode according to the attribute information of the current charging mode.
If it is determined that the change is permitted, S205 sets the arrival time of the next period having a larger charging period in the target charging method and the current charging method as the change time.
And S206, under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode.
The embodiment shown in fig. 2 has the advantages that since the change time is the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode, and there is no problem of overlapping charging periods before and after the change time, the charging is performed according to the current charging mode before the change time, and the charging is performed according to the target charging mode after the change time arrives, so that the user can be prevented from repeatedly paying.
Referring to fig. 3, fig. 3 is another flowchart of a method for changing a cloud computing resource charging manner according to an embodiment of the present invention, where the method includes the following steps:
s301, receiving a charging mode change request carrying a target charging mode sent by a user.
In cloud computing resource applications, a user needs to pay to obtain a certain service. The charging server can preset various charging modes for the user to select, and each charging mode can correspond to a unique charging mode identifier. The user can select the target charging mode to be changed on the interface provided by the charging server, and in the process, the charging server can receive a charging mode changing request which is sent by the user and carries the target charging mode identifier.
S302, determining the attribute information of the target charging mode according to the target charging mode identification, the corresponding relation between each pre-stored charging mode identification and the attribute information of each charging mode.
In the embodiment of the invention, each charging mode corresponds to the unique charging mode identifier, so the attribute information of the target charging mode can be determined according to the corresponding relationship between each pre-stored charging mode identifier and the attribute information of each charging mode. Wherein the attribute information includes: billing period and payment category. Each charging mode can correspond to different charging periods, and the charging period is natural day (00: 00 time of each day-24: 00 time of each day), natural month (00: 00 time of the first day of each month-24: 00 time of the last day of each month) and the like under normal conditions. The payment categories include prepaid, which is a payment followed by a re-consumption, and postpaid, which is a consumption followed by a re-payment. In the embodiment of the invention, the charging server can determine the payment category of each charging mode when setting the charging mode, namely the charging mode belongs to prepayment or post-payment. For example, the corresponding relationship between the charging method identifier and the attribute information of each charging method can be seen in table 1.
TABLE 1
Charging mode identification Charging period Payment category
A 1 month Post-paid payment
B 2 months old Post-paid payment
C 1 month Prepayment
S303, obtaining the current charging mode identification from the stored user information of the user, and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, the pre-stored charging mode identifications and the attribute information of each charging mode.
Specifically, the user information stored in the charging server includes: the user name of the user, the current charging mode identification, the cloud computing resource service instance used by the user and the like. Since the changes supported by different charging methods are different. Therefore, whether the current charging method supports change can be determined according to the attribute information of the current charging method. The attribute information of the current charging mode can be determined according to the current charging mode identifier obtained from the user information and table 1. The user information can be seen in table 2.
TABLE 2
User name Charging mode identification Cloud computing resource service instance
wang A 1 32G hard disk
zhang B 1 cloud host
li C 2 cloud hosts
S304, when the attribute information of the current charging method is prepaid, the current charging method is not allowed to be changed to the target charging method.
In the embodiment of the invention, because the prepayment is carried out before the consumption, and the consumption time of the user is determined according to the payment amount, the prepayment only has a charging mode, and a scene of changing the prepayment into the prepayment does not exist, but a scene of changing the prepayment into the payment after the prepayment does not exist in the actual service. Therefore, if the payment type of the current charging mode is prepaid, the charging mode is not supported to be changed by the user, and prompt information indicating that the request cannot be changed can be sent to the user. For example, the prompt may be "change not supported," or the like.
S305, when the attribute information of the current charging method is the postpaid, allowing the current charging method to be changed to the target charging method.
And S306, taking the arrival time of the next period with larger charging period in the target charging mode and the current charging mode as the change time under the condition that the attribute information of the current charging mode is post-payment and the attribute information of the target charging mode is post-payment or prepayment.
Specifically, if the attribute information of the current charging mode is postpaid and the attribute information of the target charging mode is postpaid or prepaid, if the charging periods of the current charging mode and the target charging mode are different, in order to avoid overlapping of the charging periods, that is, to avoid repeated payment for the user, a larger charging period may be selected, and the arrival time of the next period with a larger charging period is used as the change time.
For example, if the attribute information of the current charging method and the target charging method are both postpaid, the charging period of the current charging method is 1 natural month, and the charging period of the target charging method is 2 natural months, then the larger charging period is 2 natural months. If the current date is 3 months and 10 days, the calculated arrival time of the next 2 natural months is 00:00 time of 5 months and 1 day (when 2 natural months exist, 1-2 months are a charging period, and 3-4 months are a charging period), namely, the charging mode is changed at 00:00 time of 5 months and 1 day. And charging according to the current charging mode before the time of 00:00 of 1 month and 5 days, and charging according to the target charging mode after the time of 00:00 of 1 day and 5 months.
If the time of changing the charging method is determined to be 3 months and 10 days as in the prior art, the current charging method generates charges in 3 months and the target charging method generates charges in 3 months when the user is charged, so that the user is charged repeatedly. Therefore, by applying the method of the embodiment of the invention, the charging method is changed at the arrival time of the next period with a larger charging period, so that the repeated payment of the user can be avoided, and the loss of the user is reduced. Similarly, if the attribute information of the current charging mode is postpaid and the attribute information of the target charging mode is prepayment, the invention can also avoid repeated payment for the user.
And S307, taking the end time of the charging period of the current charging mode as the change time under the condition that the attribute information of the current charging mode is postpaid and the attribute information of the target charging mode is prepayment.
Specifically, when the attribute information of the current charging method is postpaid and the attribute information of the target charging method is prepaid, the end time of the charging period of the current charging method may be used as the change time. Thus, the charging mode is rapidly changed for the user while avoiding repeated payment of the user. For example, if the charging period of the current charging method is 1 natural month, the current charging method may be changed to the target charging method at 24:00 of the last day of the month. Thus, compared with the prior art, the problem that the user pays the whole month only by consuming days can be avoided, thereby reducing the loss of the user.
And S308, under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode.
In the embodiment of the invention, the system time can be detected in real time, whether the system time reaches the change time or not is judged, and if yes, the current charging mode is changed into the target charging mode.
According to the cloud computing resource charging mode changing method, after a charging mode changing request which is sent by a user and carries a target charging mode is received, attribute information of the target charging mode is determined according to a target charging mode identification. And determining the attribute information of the current charging mode according to the acquired identifier of the current charging mode. When the attribute information of the current charging method is prepaid, the current charging method is not allowed to be changed to the target charging method. If the payment type is to be changed from post-payment to post-payment or pre-payment, the arrival time of the next period with larger charging period in the target charging mode and the current charging mode is used as the change time; if the payment type is to be changed from post-payment to pre-payment, the end time of the charging period of the current charging mode can be used as the change time; and under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode. In the embodiment of the invention, because the problem of overlapping charging periods does not exist before and after the changing time, the repeated payment of the user can be avoided, thereby reducing the loss of the user.
Corresponding to the above method embodiment, an embodiment of the present invention provides a cloud computing resource charging manner changing apparatus, which is applied to a charging server in a cloud computing system, and referring to fig. 4, fig. 4 is a structural diagram of the cloud computing resource charging manner changing apparatus according to the embodiment of the present invention, and includes:
a change request receiving module 401, configured to receive a charging method change request carrying a target charging method and sent by a user;
a target attribute information determination module 402, configured to determine attribute information of a target charging manner;
a current attribute information obtaining module 403, configured to obtain attribute information of a current charging mode of a user;
a change determining module 404, configured to determine whether to allow the current charging manner to be changed to the target charging manner according to the attribute information of the current charging manner;
a change time determination module 405, configured to, when determining that a change is allowed, use an arrival time of a next period with a larger charging period in the target charging method and the current charging method as a change time;
and a charging method changing module 406, configured to change the current charging method to the target charging method when it is detected that the system time reaches the change time.
Optionally, determining whether to change the module includes:
determining a disallowance change submodule, which is used for disallowing the change of the current charging mode to the target charging mode under the condition that the attribute information of the current charging mode is prepaid;
and the determination permission changing sub-module is used for allowing the current charging mode to be changed into the target charging mode under the condition that the attribute information of the current charging mode is postpaid.
Optionally, the target attribute information determining module is specifically configured to determine the attribute information of the target charging mode according to the target charging mode identifier, a pre-stored correspondence between each charging mode identifier and the attribute information of each charging mode;
the current attribute information acquisition module is specifically used for acquiring a current charging mode identifier from the stored user information of the user; and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, each pre-stored charging mode identification and the attribute information of each charging mode.
Optionally, the change time determining module is specifically configured to, when the attribute information of the current charging manner is postpaid, and the attribute information of the target charging manner is postpaid or prepaid, use an arrival time of a next period with a larger charging period in the target charging manner and the current charging manner as the change time.
Optionally, the cloud computing resource charging manner changing apparatus in the embodiment of the present invention, when determining that the change is allowed, further includes:
and the backward pre-time determining module is used for taking the charging period ending time of the current charging mode as the change time under the condition that the attribute information of the current charging mode is the backward payment and the attribute information of the target charging mode is the pre-payment.
According to the cloud computing resource charging mode changing device provided by the embodiment of the invention, because the changing time is the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode, and the problem of overlapping charging periods does not exist before and after the changing time, the charging is carried out according to the current charging mode before the changing time, and the charging is carried out according to the target charging mode after the changing time arrives, so that the repeated payment of a user can be avoided.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present invention further provides an electronic device, referring to fig. 5, where fig. 5 is a structural diagram of the electronic device according to the embodiment of the present invention, including: the system comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 are communicated with each other through the communication bus 504;
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps of any one of the above-described cloud computing resource charging method changing methods when executing the program stored in the memory 503.
It should be noted that the communication bus 504 mentioned in the electronic device may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus 504 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The communication interface 502 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory 503 may include a RAM (Random Access Memory) and a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The processor 501 may be a general-purpose processor, including: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In the electronic equipment of the embodiment of the invention, the processor receives a charging mode changing request which is sent by a user and carries a target charging mode by executing a program stored in the memory; determining attribute information of a target charging mode; acquiring attribute information of a current charging mode of a user; determining whether to allow the current charging mode to be changed into a target charging mode or not according to the attribute information of the current charging mode; taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed; and under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode. Because the change time is the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode, and the problem of overlapping charging periods does not exist before and after the change time, the charging is carried out according to the current charging mode before the change time, and the charging is carried out according to the target charging mode after the change time arrives, so that the repeated payment of the user can be avoided.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of any cloud computing resource charging mode changing method are realized.
When an instruction stored in a computer-readable storage medium of the embodiment of the invention runs on a computer, receiving a charging mode change request which is sent by a user and carries a target charging mode; determining attribute information of a target charging mode; acquiring attribute information of a current charging mode of a user; determining whether to allow the current charging mode to be changed into a target charging mode or not according to the attribute information of the current charging mode; taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed; and under the condition that the system time is detected to reach the change time, changing the current charging mode into the target charging mode. Because the change time is the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode, and the problem of overlapping charging periods does not exist before and after the change time, the charging is carried out according to the current charging mode before the change time, and the charging is carried out according to the target charging mode after the change time arrives, so that the repeated payment of the user can be avoided.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic device and the readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A cloud computing resource charging mode changing method is applied to a charging server in a cloud computing system, and comprises the following steps:
receiving a charging mode change request which is sent by a user and carries a target charging mode;
determining attribute information of the target charging mode;
acquiring attribute information of the current charging mode of the user;
determining whether to allow the current charging mode to be changed into the target charging mode or not according to the attribute information of the current charging mode;
taking the arrival time of the next period with a larger charging period in the target charging mode and the current charging mode as the change time under the condition of determining that the change is allowed;
and changing the current charging mode into the target charging mode when the system time is detected to reach the change time.
2. The method according to claim 1, wherein the step of determining whether to allow the current charging method to be changed to the target charging method according to the attribute information of the current charging method includes:
under the condition that the attribute information of the current charging mode is prepaid, the current charging mode is not allowed to be changed into the target charging mode;
and under the condition that the attribute information of the current charging mode is post-payment, allowing the current charging mode to be changed into the target charging mode.
3. The method according to claim 1, wherein the step of determining the attribute information of the target charging method includes:
determining attribute information of a target charging mode according to a target charging mode identifier, a pre-stored corresponding relation between each charging mode identifier and the attribute information of each charging mode;
the step of obtaining the attribute information of the current charging mode of the user comprises the following steps:
acquiring a current charging mode identifier from the stored user information of the user;
and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, each pre-stored charging mode identification and the attribute information of each charging mode.
4. The method according to claim 1, wherein the changing the arrival time of the next period with a larger charging period in the target charging method and the current charging method as the changing time comprises:
and when the attribute information of the current charging mode is post-payment and the attribute information of the target charging mode is post-payment or prepayment, taking the arrival time of the target charging mode and the next cycle with a larger charging cycle in the current charging mode as the change time.
5. The method according to claim 1, wherein if it is determined that the change is allowed, the method further comprises:
and taking the end time of the charging period of the current charging mode as the change time under the condition that the attribute information of the current charging mode is postpaid and the attribute information of the target charging mode is prepaid.
6. A cloud computing resource charging mode changing device is applied to a charging server in a cloud computing system, and the device comprises:
a change request receiving module for receiving a charging mode change request carrying a target charging mode sent by a user;
the target attribute information determining module is used for determining the attribute information of the target charging mode;
a current attribute information acquisition module, configured to acquire attribute information of a current charging mode of the user;
a module for determining whether to change, according to the attribute information of the current charging mode, whether to allow the current charging mode to be changed into the target charging mode;
a change time determining module, configured to, when it is determined that a change is allowed, use an arrival time of a next period having a larger charging period in the target charging method and the current charging method as a change time;
and the charging mode changing module is used for changing the current charging mode into the target charging mode under the condition that the system time is detected to reach the changing time.
7. The cloud computing resource billing method changing apparatus according to claim 6, wherein the determining whether to change the module includes:
a determination disallowance change submodule, configured to disallow changing the current charging manner to the target charging manner when the attribute information of the current charging manner is prepaid;
and the determination permission changing sub-module is used for allowing the current charging mode to be changed into the target charging mode under the condition that the attribute information of the current charging mode is postpaid.
8. The cloud computing resource charging mode changing device according to claim 6, wherein the target attribute information determining module is specifically configured to determine the attribute information of the target charging mode according to a target charging mode identifier, a correspondence between pre-stored respective charging mode identifiers and attribute information of respective charging modes;
the current attribute information acquisition module is specifically configured to acquire a current charging mode identifier from the stored user information of the user; and determining the attribute information of the current charging mode according to the corresponding relation between the current charging mode identification, each pre-stored charging mode identification and the attribute information of each charging mode.
9. The cloud computing resource charging mode changing apparatus according to claim 6, wherein the change time determining module is specifically configured to, when the attribute information of the current charging mode is postpaid, and the attribute information of the target charging mode is postpaid or prepaid, take an arrival time of a next period with a larger charging period in the target charging mode and the current charging mode as the change time.
10. The cloud computing resource billing method changing apparatus according to claim 6, wherein in a case where it is determined that the change is permitted, the apparatus further comprises:
and the backward pre-time determining module is used for taking the charging period ending time of the current charging mode as the change time under the condition that the attribute information of the current charging mode is post-payment and the attribute information of the target charging mode is pre-payment.
11. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the charging method changing method according to any one of claims 1 to 5 when executing the program stored in the memory.
12. A computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the charging method changing method according to any one of claims 1 to 5 are implemented.
CN201910569380.3A 2019-06-27 2019-06-27 Charging mode changing method and device, electronic equipment and readable storage medium Active CN110300000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910569380.3A CN110300000B (en) 2019-06-27 2019-06-27 Charging mode changing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910569380.3A CN110300000B (en) 2019-06-27 2019-06-27 Charging mode changing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110300000A CN110300000A (en) 2019-10-01
CN110300000B true CN110300000B (en) 2022-03-04

Family

ID=68029300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910569380.3A Active CN110300000B (en) 2019-06-27 2019-06-27 Charging mode changing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110300000B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111080415A (en) * 2019-12-20 2020-04-28 北京金山云网络技术有限公司 Method and device for processing lease data of cloud computing resources and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956482A (en) * 2005-10-27 2007-05-02 华为技术有限公司 Method and system for implementing flexible charging
CN101076072A (en) * 2007-07-19 2007-11-21 华为技术有限公司 Method and system for processing prepaid network and postpaid network service
CN101835129A (en) * 2009-03-12 2010-09-15 华为技术有限公司 Method and system for distinguishing payment type, service supply device and service charging device
CN103067185A (en) * 2012-12-28 2013-04-24 无锡城市云计算中心有限公司 Accounting method in cloud computing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956482A (en) * 2005-10-27 2007-05-02 华为技术有限公司 Method and system for implementing flexible charging
CN101076072A (en) * 2007-07-19 2007-11-21 华为技术有限公司 Method and system for processing prepaid network and postpaid network service
CN101835129A (en) * 2009-03-12 2010-09-15 华为技术有限公司 Method and system for distinguishing payment type, service supply device and service charging device
CN103067185A (en) * 2012-12-28 2013-04-24 无锡城市云计算中心有限公司 Accounting method in cloud computing system

Also Published As

Publication number Publication date
CN110300000A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
EP3644264A1 (en) Diagnostic device rental method, server, and storage medium
CN111071094B (en) Charging method and device
CN105787733B (en) Service information processing method and device
CN110233741B (en) Service charging method, device, equipment and storage medium
CN111062758A (en) Pricing method, device and system of cloud product
CN111709777A (en) Payment mode recommendation method, system, terminal device and storage medium
CN110969492A (en) Pricing method, device and system of cloud product
CN111209060A (en) Capability development platform processing method and device
CN112202871A (en) Metering and charging method, device and system for cloud computing resources and electronic equipment
US10944874B2 (en) Telecommunication system for monitoring and controlling of a network providing resource to a user
CN110300000B (en) Charging mode changing method and device, electronic equipment and readable storage medium
CN113037510A (en) Charging method, charging device and computer readable storage medium
CN107846614B (en) Video traffic scheduling method and device and electronic equipment
CN111988749B (en) Dynamic tariff generation method and device
US20200051037A1 (en) Maintenance device management method and server, and computer readable storage medium
CN111651345A (en) System testing method and device and electronic equipment
CN109618070B (en) Call bill charging method, device, equipment and medium
WO2019184632A1 (en) Rating method and apparatus
CN1322706C (en) Method of realizing real time segmental charging
CN110969493A (en) Bill amount determining method and device, electronic equipment and storage medium
EP3331196B1 (en) Telecommunication system for monitoring and controlling of a network providing resource to a user
CN111542005B (en) Charging method, device, equipment and storage medium
CN114493756A (en) Resource management method, device, equipment and storage medium
CN115760090A (en) Transaction processing method, device and system based on block chain
CN113037512A (en) Statistical method and device for network resource consumption and server

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