WO2012155486A1 - Billing method and device for call service - Google Patents

Billing method and device for call service Download PDF

Info

Publication number
WO2012155486A1
WO2012155486A1 PCT/CN2011/082871 CN2011082871W WO2012155486A1 WO 2012155486 A1 WO2012155486 A1 WO 2012155486A1 CN 2011082871 W CN2011082871 W CN 2011082871W WO 2012155486 A1 WO2012155486 A1 WO 2012155486A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
call
period
charging
time period
Prior art date
Application number
PCT/CN2011/082871
Other languages
French (fr)
Chinese (zh)
Inventor
屈天喜
Original Assignee
中兴通讯股份有限公司
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
Priority claimed from CN201110316332.7A external-priority patent/CN102377892B/en
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012155486A1 publication Critical patent/WO2012155486A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/43Billing software details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/68Payment of value-added services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/80Rating or billing plans; Tariff determination aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/81Dynamic pricing, e.g. change of tariff during call

Definitions

  • the present invention relates to the field of communications, and in particular to a charging method and apparatus for a call service.
  • BACKGROUND OF THE INVENTION The so-called time-based charging refers to a time period in which the system has some call offers to the user every day. The rate is different according to the time period of the user's call, and the rate type of the bill generated by the service is also different.
  • the existing time-based billing system includes the following network elements:
  • User equipment 102 User Equipment 102
  • UE User Equipment
  • a device for initiating a call, answering a call, and performing other call operations such as a GSM or CDMA mobile phone, a PSTN terminal, an IMS terminal, etc.
  • CN Core Network
  • IMS IP Multimedia Subsystem, IP Multimedia Subsystem
  • NGN Next Generation Network
  • GSM Global System for Mobile communication
  • Service Server 106 Application Server, referred to as AS, for broadband) Network (such as IMS, NGN) or SCP (Service Control Point, SCP for narrowband networks such as GSM, CDMA, PSTN), hereinafter referred to as AS, provides the underlying service capabilities, such as: call control, bill generation and other functions;
  • BOSS Business & Operation Support System
  • BOSS provides basic functions including user data management, billing, billing, and settlement.
  • the above-mentioned existing time-based charging system does not realize the true time-period charging, because the existing time-based charging system sets the rate according to the user's call start time. That is to say, the rate type in the bill generated from the call start time to the call end time is consistent with the rate type set by the call start time, even if there are different rate type time periods during the ongoing call, The time-based billing system also cannot generate corresponding bills according to the rate types of different time periods, that is, the related technology cannot charge different rate periods during the ongoing call.
  • a charging method for a call service including: acquiring a call duration corresponding to a call service; dividing the call duration into one or more according to a predetermined rate period Charging time period; calculating the cost of the calling service according to each charging time period and the corresponding rate of each charging time period.
  • the step of dividing the call duration into one or more charging time periods according to the predetermined rate time period comprises: dividing the portion of the call duration that coincides with the predetermined rate time period into the first charging time a segment that divides a portion of the call duration that does not coincide with the predetermined rate period into a second billing period.
  • the step of dividing the portion of the call duration that coincides with the predetermined rate period into the first billing period comprises: recording, respectively, the portion of the call duration that coincides with each of the predetermined rate periods as A first billing period.
  • the rates corresponding to each of the first charging time periods are the same, or the rates corresponding to at least two of the first charging time periods in all the first charging time periods are the same.
  • the step of acquiring the duration of the call corresponding to the call service includes: acquiring a call start time and a call end time corresponding to the call service.
  • the part of the call duration that coincides with the predetermined rate period is determined by: making the current time the call start time, and performing the following steps from the call start time until the call end time: determining whether the current time falls In the predetermined rate period, if it falls, the current time is determined as the portion of the call duration that coincides with the predetermined rate period; the next time is set as the current time.
  • a charging apparatus for a call service comprising: an obtaining unit configured to acquire a call duration corresponding to a call service; and a dividing unit configured to follow a predetermined rate time The segment divides the duration of the call into one or more charging time periods; the charging unit is configured to calculate the cost of the calling service according to each charging time period and a rate corresponding to each charging time period.
  • the dividing unit comprises: a first dividing module, configured to divide a portion of the call duration that coincides with the predetermined rate period into a first charging period; and a second dividing module, configured to be in the duration of the call The portion that does not coincide with the predetermined rate period is divided into the second billing period.
  • the first dividing module comprises: a recording submodule, configured to record, respectively, a portion of the call duration that coincides with each predetermined rate period as a first billing period, wherein each first meter The rates corresponding to the fee periods are the same, or the rates corresponding to at least two of the first billing periods in all the first billing periods are the same.
  • the dividing unit further comprises: a determining module, configured to make the current time a call start time of the call duration, and performing the following steps from the call start time to the call end time of the call duration: determining whether the current time falls within the predetermined time In the rate period, if it falls, the current time is determined as the portion of the call duration that coincides with the predetermined rate period; the next time is set as the current time.
  • a determining module configured to make the current time a call start time of the call duration, and performing the following steps from the call start time to the call end time of the call duration: determining whether the current time falls within the predetermined time In the rate period, if it falls, the current time is determined as the portion of the call duration that coincides with the predetermined rate period; the next time is set as the current time.
  • the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and the rate corresponding to each billing period and each billing period is Calculate the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby realizing the true meaning.
  • the charging according to the time period solves the problem that the prior art can not charge different rate time periods during the continuous call, which improves the accuracy of the system charging and improves the user satisfaction.
  • FIG. 1 is a structural diagram of a time-based charging system according to the related art
  • FIG. 2 is a preferred structural diagram of a charging device for a call service according to an embodiment of the present invention
  • FIG. 4 is another preferred structural view of a dividing unit according to an embodiment of the present invention
  • FIG. 5 is a first dividing module according to an embodiment of the present invention.
  • FIG. 6 is a preferred flow chart of a charging method for a call service according to an embodiment of the present invention
  • FIG. 7 is a call according to a predetermined rate period according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a charging apparatus for a call service according to an embodiment of the present invention.
  • the charging apparatus for calling service includes: an obtaining unit 202, setting To obtain the call duration corresponding to the call service; the dividing unit 204, in communication with the obtaining unit 202, is configured to divide the call duration into one or more charging time periods according to a predetermined rate time period; the charging unit 206, The communication unit 204 is configured to calculate a fee for the call service according to each charging period and a rate corresponding to each charging period.
  • the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and corresponding to each billing period and each billing period.
  • the rate calculates the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby achieving
  • the true time-based billing increases the accuracy of the system's billing by time period and improves user satisfaction.
  • the present invention further improves the dividing unit 204 to accurately and efficiently divide the call duration of the call service into different charging time periods according to a predetermined rate period. Specifically, as shown in FIG.
  • the foregoing dividing unit 204 includes: a first dividing module 302, configured to divide a portion of the call duration that coincides with a predetermined rate period into a first charging period;
  • the module 304 is configured to divide a portion of the call duration that does not coincide with the predetermined rate period into a second billing period.
  • different charging time periods are divided according to whether the time duration of the call overlaps with the predetermined rate time period, so that accurate division can be achieved, and the efficiency of the division can be improved.
  • the present invention further improves the first dividing module 302. As shown in FIG.
  • the first dividing module 302 includes: a recording submodule 402, configured to set the duration of the call with each The part of the first billing period is the same as the first billing period, and the rates corresponding to each of the first billing periods are the same, or at least two of the first billing periods. The rates corresponding to the first billing period are the same.
  • a recording submodule 402 configured to set the duration of the call with each The part of the first billing period is the same as the first billing period, and the rates corresponding to each of the first billing periods are the same, or at least two of the first billing periods.
  • the rates corresponding to the first billing period are the same.
  • the call duration and the predetermined rate time are clearly and accurately recorded.
  • the overlapping portions of the segments are divided to facilitate calculation of the calling service fee for the first charging period.
  • the rates corresponding to each of the first charging time periods are the same, or the rates corresponding to at least two of the first charging time periods in all the first charging time periods are the same, and the present invention implements the call.
  • the service cost calculation is performed for a plurality of different time periods in the duration, so that the service charging requirements of different rates of different services can be satisfied, and the applicability of the present invention is improved.
  • the present invention further modifies the partitioning unit 204 to improve the accuracy of accurately and efficiently dividing the call duration of the call service into one or more billing periods in accordance with a predetermined rate period. Specifically, as shown in FIG.
  • the dividing unit 204 further includes: a determining module 502, configured to make the current time a call start time of the call duration, and perform the following steps from the call start time until the end of the call duration Time: Determine whether the current time falls within a predetermined rate period. If it falls, determine the current time as the part of the call duration that coincides with the predetermined rate time period; set the next time as the current time.
  • a determining module 502 configured to make the current time a call start time of the call duration, and perform the following steps from the call start time until the end of the call duration Time: Determine whether the current time falls within a predetermined rate period. If it falls, determine the current time as the part of the call duration that coincides with the predetermined rate time period; set the next time as the current time.
  • the duration of the call service in the foregoing preferred embodiments includes at least: a call start time of the call service and a call end time, to accurately define the call duration of the call service, so as to accurately accurately follow the predetermined rate period.
  • the call duration of the call service is accurately and efficiently divided into one or more billing periods.
  • the predetermined rate time period in each of the foregoing preferred embodiments includes only the preferential time period, the pre-configured preferential time period of the system, and the rate corresponding to the other non-concession time period, so that the corresponding time period can be obtained during charging.
  • the predetermined rate period in each of the foregoing preferred embodiments may also include a preferential period and a non-concession period, so that the present invention can meet different rates of different services.
  • the business billing requirements increase the applicability of the present invention.
  • Embodiment 2 On the basis of FIG. 2-5, the present invention further provides a preferred flowchart of a charging method for a call service. As shown in FIG. 6, the charging method for a call service includes:
  • S602 Obtain a call duration corresponding to the call service.
  • S604 divide the call duration into one or more billing time segments according to a predetermined rate period;
  • S606 Calculate the cost of the call service according to each charging time period and a rate corresponding to each charging time period.
  • the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and corresponding to each billing period and each billing period.
  • the rate calculates the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby achieving
  • the true time-based billing increases the accuracy of the system's billing by time period and improves user satisfaction.
  • the present invention also provides a preferred scheme for dividing a call duration into different billing periods according to a predetermined rate period. Specifically, the part of the call duration that coincides with the predetermined rate period is divided into a first billing period; and the part of the call duration that does not coincide with the predetermined rate period is divided into the second billing time. segment.
  • the solution of dividing the duration of the call into one or more charging time periods according to the predetermined rate period may further include: setting the duration of the call with each predetermined rate time The segments coincident are recorded as a first billing period.
  • the duration of the call and the predetermined rate period are clearly and accurately The coincident portions are divided to facilitate calculation of the call service fee for the first charging period.
  • the rates corresponding to each of the first charging periods in the first charging period in the foregoing embodiments may be the same, or may be at least two of the first billing periods.
  • the rates corresponding to the time period are the same.
  • the rates corresponding to each of the first charging periods are the same, or the rates corresponding to at least two of the first charging periods in all the first charging periods are the same. It is possible to calculate the service cost for a plurality of different time periods in the duration of the call, thereby satisfying the service charging requirements of different rates of different services, and improving the applicability of the present invention.
  • the duration of the call service in the foregoing preferred embodiments includes at least: a call start time of the call service and a call end time, to accurately define the call duration of the call service, so as to accurately accurately follow the predetermined rate period.
  • the call duration of the call service is accurately and efficiently divided into one or more billing periods.
  • the present invention also provides a preferred solution for determining a portion of a call duration that coincides with a predetermined rate period.
  • the current time is the call start time, and the following steps are performed from the call start time until the call end time: determining whether the current time falls within a predetermined rate period, and if it falls, Then, the current time is determined as a portion of the call duration that coincides with the predetermined rate time period; the next time is set as the current time.
  • the predetermined rate time period in each of the foregoing preferred embodiments includes only the preferential time period, the pre-configured preferential time period of the system, and the rate corresponding to the other non-concession time period, so that the corresponding time period can be obtained during charging.
  • the predetermined rate period in each of the foregoing preferred embodiments may also include a preferential period and a non-concession period, so that the present invention can meet different rates of different services.
  • the business billing requirements increase the applicability of the present invention.
  • Embodiment 3 This preferred embodiment is applicable to, but not limited to, the following scenarios: (1) The rates are classified into two types: preferential and non-concess; (2) the time period recorded in the database (equivalent to the predetermined rate period) is a discount. period;
  • the time period is the time period of the same day, that is, the minimum time at the start of the time period is '00:00', and the maximum value at the end time is '23:59'; (5)
  • the duration and offer of the call in each embodiment is equivalent to the first charging period.
  • the preferred embodiment provides a preferred scheme for dividing the charging period. As shown in FIG. 7, the duration of the call is divided into one or more charging periods according to a predetermined rate period.
  • the scheme of the segment includes the following steps: S702:
  • the database timeforfm records a plurality of (more than or equal to 0) user numbers usernum and a time period corresponding to the user number;
  • S704 The stored procedure (equivalent to the division unit) is input as the user number usemunu call start time starttime, and the call end time ij endtime;
  • S706 The difference between the endtime and the starttime date is timeoverday, the date of the starttime (year, month, and day) is startd, the starttime is divided into startm, the endtime is divided into endm, and the second day of startd is startdnext;
  • step S708 determining whether the time startm of the call start time exists in the time period, if startm exists in the time period corresponding to usernum, step S710 is performed, otherwise step S724 is performed;
  • S714 determining whether the number of days between the end of the call and the date of the call start time is greater than 0, if timeoverday>0, then executing step S716, otherwise performing step S718;
  • S716 assigning the date of the current time period to the end of the curendtime is startd, the time is divided into Dbendtime, the number of seconds is 0, step S756;
  • step S718 determining whether the time end endm of the call end time is less than the end time of the time period dbendtime, if endm ⁇ dbendtime, step S720 is performed, otherwise step S722 is performed;
  • S720 assigning the current time period end time curendtime is the call end time endtime, executing step S756;
  • S722 assigning the current time period end time curendtime date is startd, the time is divided into dbendtime, the number of seconds is 0, and step S756 is performed;
  • the starting time of the time period is dbstarttime
  • step S734 assign the current time period end time curendtime to the call end time endtime, step S756;
  • S736 determining whether the start time of the time period is between the time startm and the '23:59' of the call start time, if there is a time period corresponding to the usernum starting time between startm and '23:59', step S738 is performed, otherwise Go to step S742;
  • S738 The start time of the time period is dbstarttime;
  • S740 The time end of the current time period is assigned. The date of the curendtime is startd, and the time is divided into dbstarttime, the number of seconds is 0, and step S756 is performed;
  • step S748 determining whether the start time of the time period is between '00:00' and the matching end time matchendm, if there is a time period starting time corresponding to usernum between '00:00' and matchendm, step S750 is performed, otherwise the step is performed.
  • S750 The time of the beginning of the time period is dbstarttime;
  • S752 The time of the current time period is the end time of the curendtime is startdnext, the time is divided into dbstarttime, the number of seconds is 0, and the step S756 is performed;
  • S756 assigning the current time period start time curstarttime to starttime, assigning the next time period start time nextstarttime to curendtime, assigning the next time period to the end of time 'J nextendtime is endtime;
  • S758 storing procedure (equivalent to dividing unit) output as current The time period rate curfe e type, the current time period start time curstarttime, the current time period end time curendtime, the next time period start time nextstarttime, the next time period end time curendtime, and the program ends.
  • the rates are exemplified by the preferential and non-concessions, so as to explain the division of the call duration into one or more counts according to the predetermined rate period mentioned in the preferred embodiment.
  • the logic flow of the time period is not limited thereto, and there may be multiple rate types, such as an increased charging type during a busy period of a business, and a free type of a free time period of the business, which may be extended on the basis of the method.
  • the time period recorded in the database is a preferential time period.
  • the time period recorded in the database may also be a non-concession time period, or may be multiple.
  • the start time of the current time period, the start time of the current time period, the start time of the next time period, the end time of the next time period, the call start time, and the call end time all include a date part and a time division part,
  • a date part and a time division part In order to facilitate the billing situation in the scene of the call start date and the cross-day, it is convenient to distinguish whether the call start and end time is cross-day, thereby improving the accuracy of billing.
  • "1" indicates a preferential time period
  • "0" indicates a non-concession time period.
  • Rates are divided into two types: preferential and non-concess;
  • time period is the same day period, that is, the minimum time at the beginning of the time period is '00:00', and the maximum value at the end time is '23:59';
  • the portion in which the call duration coincides with the preferential time period in each embodiment corresponds to the first charging period.
  • Scene 1 The start and end date of the call does not cross the sky, and the call start time is in the time zone, for example, the call start time is '2011.08.15
  • the dividing unit divides the call duration into one or more charging time periods according to a predetermined rate time period.
  • the logic flow includes the following steps: SI: The division unit accesses the database, enters the user number A, the call start time '2011.08.1508:45:30', and the call end time '2011.08.1510:11:09', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1508:45:30', the current time period end time '2011.08.1509:00:00', the next time period start time '2011.08.1509:00:00', the next time period End time '2011.08.1510:11:09'; S2: The billing unit generates the first bill, where the rate is the current time period rate 0, and the starting time is the current time period start time ' 2011.08.15 08:45 :30', the
  • the determining module determines that the start time of the next time period '2011.08.1509:00:00' is not equal to the end time of the next time period '2011.08.1510:11:09', then assigns the start time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time;
  • S4 The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1509:00:00', and the call end time '2011.08.1510:11:09', and outputs the current time period rate 1 (offer), current The time period starting time '2011.08.1509:00:00', the current time period ending time '2011.08.1510:11:09', the next time period starting time '2011.08.1510:11:09', the next time period ends Time ' 2011.08.1510:11:09';
  • S5 The billing unit generates the second bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.15 09:00: 00', the end time is the end time of the current time period ' 2011.08.15 10:11:09';
  • the determining module determines the starting time of the next time period '2011.08.1510:11:09' is equal to the ending time of the next time period '2011.08.1510:11:09', then the CDR is generated and the program ends.
  • (2) Scene 2 The start and end date of the call does not cross the sky, and the call start time is within the time limit. For example, the call start time is '2011.08.15 15:10:10', and the call end time is '2011.08.1518:12:32',
  • the logic of dividing the duration of the call into one or more charging periods according to the predetermined rate period includes the following steps:
  • S1 The division unit accesses the database, and enters the user number A, the call start time '2011.08.1515:10:10', and the call end time '2011.08.1518:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1515:10:10', current time period end time '2011.08.1517:00:00', next time period start time '2011.08.1517:00:00', the next time period ends Moment '2011.08.1518:12:32';
  • S2 The billing unit generates the first bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.15 15:10:10', and the ending time is the current time period ending time. ' 2011.08.15 17:00:00';
  • the determining module determines that the start time of the next time period '2011.08.1517:00:00' is not equal to the end time of the next time period, 2011.08.1518:12:32', then assigns the start time of the next time period to the call. At the beginning time, the end time of the next time period is assigned to the call end time;
  • the division unit accesses the database, and enters the user number A, the call start time '2011.08.1517:00:00', and the call end time '2011.08.1518:12:32', and outputs the current time period rate 0 (; non-offer) , the current time period start time '2011.08.1517:00:00', the current time period end time '2011.08.1518:12:32', the next time period start time '2011.08.1518:12:32', the next time End of the period '2011.08.1518:12:32';
  • the charging unit generates a second bill, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 17:00:00', and the ending time is the current time period ending time. ' 2011.08.15 18:12:32';
  • the determining module determines that the starting time of the next time period '2011.08.1518:12:32' is equal to the ending time of the next time period '2011.08.1518:12:32', then the CDR is generated and the program ends.
  • the logic of dividing the duration of the call into one or more charging time segments according to the predetermined rate period includes the following steps: S1: The dividing unit accesses the database, and inputs the user number A and the call start time.
  • the charging unit generates the first CDR, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 23:10:10', and the ending time is the current time period ending time ' 2011.08.16 09:00:00';
  • the determining module determines that the start time of the next time period '2011.08.1609:00:00' is not equal to the end time of the next time period '2011.08.1610:12:32', then the start time of the next time period is assigned to the call start.
  • S4 The division unit accesses the database, and enters the user number A, the call start time '2011.08.1609:00:00', and the call end time '2011.08.1610:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1609:00:00', current time period end time '2011.08.1610:12:32', next time period start time '2011.08.1610:12:32', the next time period ends Time '2011.08.1610:12:32'; S5: The billing unit generates the second bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.16 09:00: 00', the end time is the end time of the current time period ' 2011.08.16 10:12:32';
  • the determining module determines the starting time of the next time period '2011.08.1610:12:32' is equal to the ending time of the next time period '2011.08.1610:12:32', then the CDR is generated and the program ends.
  • the start and end date of the call is 1 day, and the call start time is within the time limit.
  • the call start time is '2011.08.15 16:10:10'
  • the call end time is '2011.08.1602:12:32'.
  • the logic of dividing the duration of the call into one or more charging periods according to the predetermined rate period includes the following steps:
  • the division unit accesses the database, and enters the user number A, the call start time '2011.08.1516:10:10', and the call end time '2011.08.1602:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1516:10:10', current time period end time '2011.08.1517:00:00', next time period start time '2011.08.1517:00:00', the next time period ends Moment '2011.08.1602:12:32';
  • the billing unit generates the first bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.15 16:10:10', and the ending time is the current time period ending time. ' 2011.08.15 17:00:00';
  • the determining module determines that the start time of the next time period '2011.08.1517:00:00' is not equal to the end time of the next time period '2011.08.1602:12:32', then the start time of the next time period is assigned to the call start. At the moment, assigning the end time of the next time period to the call end time;
  • S4 The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1517:00:00', and the call end time '2011.08.1602:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1517:00:00', the current time period at the end of the time I 2011.08.1602:12:32', the next time period start time '2011.08.1602:12:32', the next time End of the period '2011.08.1602:12:32'; S5: The charging unit generates a second bill, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 17:00:00', and the ending time is the current time period ending time. ' 2011.08.16 02:12:32';
  • the determining module determines the starting time of the next time period '2011.08.1602:12:32' is equal to the ending time of the next time period '2011.08.1602:12:32', then the CDR is generated and the program ends.
  • the call start and end date is more than one day, and the call start time is outside the time period.
  • the call start time is '2011.08.15 23:10:10'
  • the call end time is '2011.08.1701:12:32'
  • the logic of dividing the duration of the call into one or more charging time segments according to the predetermined rate period includes the following steps: S1: The dividing unit accesses the database, and inputs the user number A and the call start time.
  • the charging unit generates the first CDR, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 23:10:10', and the ending time is the current time period ending time ' 2011.08.16 09:00:00';
  • the determining module determines that the start time of the next time period '2011.08.1609:00:00' is not equal to the end time of the next time period '2011.08.1701:12:32', then the start time of the next time period is assigned to the call start.
  • S4 The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1609:00:00', and the call end time '2011.08.1701:12: 32', output the current time period rate 1 (offer), the current time period start time '2011.08.1609:00:00', the current time period end time '2011.08.1612:00:00', the next time period start time ' 2011.08.1612:00:00', the end of the next time period ' 2011.08.1701:12:32';
  • the charging unit generates a second bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.16 09:00:00', and the ending time is the current time period ending time. ' 2011.08.16 12:00:00';
  • S6 The determining module determines that the starting time of the next time period '2011.08.1612:00:00' is not equal to the ending time of the next time period '2011.08.1701:12:32', then assigning the starting time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time;
  • S7 The division unit accesses the database, and enters the user number A, the call start time '2011.08.1612:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1612:00:00', the current time period end time '2011.08.1615:00:00', the next time period start time '2011.08.1615:00:00', the next time period End time '2011.08.1701:12:32';
  • S8 The billing unit generates the third bill, where the rate is the current time
  • the determining module determines that the start time of the next time period '2011.08.1615:00:00' is not equal to the end time of the next time period '2011.08.1701:12:32', then assigns the start time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time;
  • the division unit accesses the database, and inputs the user number A, the call start time '2011.08.1615:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 1 (offer), current The time period starting time '2011.08.1615:00:00', the current time period ending time '2011.08.1617:00:00', the next time period starting time '2011.08.1617:00:00', the next time period ends Time ' 2011.08.1701:12:32';
  • S11 The billing unit generates the fourth bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.16 15:00: 00', the end time is the end time of the current time period '2011.08.16 17:00:00';
  • the determining module determines that the starting time of the next time period '2011.08.16 17:00:00' is not equal to the ending time of the next time period '2011.08.1701:12:32', then assigning the starting time of the next time period to the call At the beginning time, the end time of the next time period is assigned to the call end time;
  • the division unit accesses the database, and inputs the user number A, the call start time '2011.08.1617:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1617:00:00', the current time period at the end of the time I 2011.08.1701:12:32', the next time period start time '2011.08.1701:12:32', the next time End of the segment '2011.08.1701:12:32'; S14: The billing unit generates the fifth bill, where the rate is the current time period rate 0, and the starting time is the current time period start time ' 2011.08.16 17: 00:00', the end time is the end time of the current time period ' 2011.08.17 01:12:32';
  • the determining module determines that the starting time of the next time period '2011.08.17 01:12:32' is equal to the ending time of the next time period '2011.08.1701:12:32', then the CDR is generated and the program ends.
  • the above five scenarios for charging by time period are only preferred examples, and the present invention is not limited thereto.
  • the present invention can accurately and efficiently charge by time period, and improve billing by time period. The accuracy of the customer, to improve customer satisfaction, will not repeat them here.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the computing device may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Meter Arrangements (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Disclosed are a billing method and device for a call service. The method comprises: obtaining a call duration corresponding to a call service; according to preset rate periods, dividing the call duration into one or more billing periods; according to each billing period and the rate corresponding to the billing period, calculating a fee of the call service. The present invention solves the problem in the prior art that during a continuous call period, billing cannot be performed with respect to different rate periods. Therefore, the system has the higher accuracy of billing, and the user satisfaction is increased.

Description

用于呼叫业务的计费方法和装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种用于呼叫业务的计费方法和装置。 背景技术 所谓按时间段计费, 是指系统对用户每天有一些通话优惠的时间段, 按用户通话 的时间段的不同, 费率也不相同, 从而业务生成的话单中费率类型也不相同。 如图 1 所示, 现有的按时间段计费系统包括如下网元:  TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a charging method and apparatus for a call service. BACKGROUND OF THE INVENTION The so-called time-based charging refers to a time period in which the system has some call offers to the user every day. The rate is different according to the time period of the user's call, and the rate type of the bill generated by the service is also different. . As shown in Figure 1, the existing time-based billing system includes the following network elements:
1 ) 用户终端 102 (User Equipment, 简称为 UE), 用户发起呼叫、 接听呼叫以及 做其他呼叫操作的装置, 如 GSM或 CDMA手机、 PSTN终端、 IMS终端等; 2) 核心网 104 (Core Network, 简称为 CN), 提供用户的注册、 签约等功能, 包 括 IMS (IP Multimedia Subsystem, IP多媒体子系统)、 NGN (Next Generation Network, 下一代通信网络)、 GSM (Global System for Mobile communication, 全球移动通信系 统)、 CDMA ( Code Division Multiple Access, 码分多址接入)、 PSTN (Public Switched Telephone Network, 公共交换电话网) 等核心网; 3 )业务服务器 106 (Application Server, 简称为 AS,用于宽带网络如 IMS、 NGN) 或 SCP ( Service Control Point, 简称为 SCP, 用于窄带网络如 GSM、 CDMA、 PSTN), 以下统称为 AS, 提供底层业务能力, 如: 呼叫控制, 话单生成等功能; 1) User equipment 102 (User Equipment, UE for short), a device for initiating a call, answering a call, and performing other call operations, such as a GSM or CDMA mobile phone, a PSTN terminal, an IMS terminal, etc.; 2) a core network 104 (Core Network, Referred to as CN), it provides users with functions such as registration and signing, including IMS (IP Multimedia Subsystem, IP Multimedia Subsystem), NGN (Next Generation Network), GSM (Global System for Mobile communication). System), CDMA (Code Division Multiple Access), PSTN (Public Switched Telephone Network), and other core networks; 3) Service Server 106 (Application Server, referred to as AS, for broadband) Network (such as IMS, NGN) or SCP (Service Control Point, SCP for narrowband networks such as GSM, CDMA, PSTN), hereinafter referred to as AS, provides the underlying service capabilities, such as: call control, bill generation and other functions;
4)业务运营支撑系统 108 (Business & Operation Support System, 简称为 BOSS), 其提供的基本功能包括用户资料管理、 计费、 出帐、 结算等。 但是, 上述现有的按时间段计费系统并未实现真正意义上的按时间段计费, 这是 因为, 现有的按时间段计费系统是按用户通话开始时刻设定费率的, 也就是说, 从通 话开始时刻一直到通话结束时刻生成的话单中的费率类型与通话开始时刻设定的费率 类型保持一致, 即使在持续通话期间有不同费率类型的时间段, 现有的按时间段计费 系统也无法实现按不同时间段的费率类型生成相应的话单, 也就是说, 相关技术在持 续通话期间不能对不同的费率时间段计费。 发明内容 本发明提供了一种用于呼叫业务的计费方法和装置, 以至少解决相关技术中在持 续通话期间不能对不同的费率时间段计费的问题。 根据本发明的一个方面, 提供了一种用于呼叫业务的计费方法, 其包括: 获取呼 叫业务所对应的通话持续时间; 按照预定的费率时间段将通话持续时间划分成一个或 多个计费时间段; 根据每个计费时间段以及每个计费时间段对应的费率计算呼叫业务 的费用。 优选地, 按照预定的费率时间段将通话持续时间划分成一个或多个计费时间段的 步骤包括:将通话持续时间中与预定的费率时间段重合的部分划分成第一计费时间段; 将通话持续时间中与预定的费率时间段不重合的部分划分成第二计费时间段。 优选地, 将通话持续时间中与预定的费率时间段重合的部分划分成第一计费时间 段的步骤包括: 将通话持续时间中与每个预定的费率时间段重合的部分分别记录为一 个第一计费时间段。 优选地, 每个第一计费时间段对应的费率都相同, 或者, 所有第一计费时间段中 至少有两个第一计费时间段对应的费率相同。 优选地, 获取呼叫业务所对应的通话持续时间的步骤包括: 获取呼叫业务所对应 的通话开始时刻以及通话结束时刻。 优选地, 通过以下步骤来确定通话持续时间中与预定的费率时间段重合的部分: 令当前时刻为通话开始时刻,并从通话开始时刻开始执行以下步骤直到通话结束时刻: 判断当前时刻是否落入预定的费率时间段中, 若落入, 则将当前时刻确定为通话持续 时间中与预定的费率时间段重合的部分; 将下一时刻设置为当前时刻。 根据本发明的另一方面, 提供了一种用于呼叫业务的计费装置, 其包括: 获取单 元, 设置为获取呼叫业务所对应的通话持续时间; 划分单元, 设置为按照预定的费率 时间段将通话持续时间划分成一个或多个计费时间段; 计费单元, 设置为根据每个计 费时间段以及每个计费时间段对应的费率计算呼叫业务的费用。 优选地, 划分单元包括: 第一划分模块, 设置为将通话持续时间中与预定的费率 时间段重合的部分划分成第一计费时间段; 第二划分模块, 设置为将通话持续时间中 与预定的费率时间段不重合的部分划分成第二计费时间段。 优选地, 第一划分模块包括: 记录子模块, 设置为将通话持续时间中与每个预定 的费率时间段重合的部分分别记录为一个第一计费时间段, 其中, 每个第一计费时间 段对应的费率都相同, 或者, 所有第一计费时间段中至少有两个第一计费时间段对应 的费率相同。 优选地, 划分单元还包括: 确定模块, 设置为令当前时刻为通话持续时间的通话 开始时刻, 并从通话开始时刻开始执行以下步骤直到通话持续时间的通话结束时刻: 判断当前时刻是否落入预定的费率时间段中, 若落入, 则将当前时刻确定为通话持续 时间中与预定的费率时间段重合的部分; 将下一时刻设置为当前时刻。 在本发明中, 按照预定的费率时间段将呼叫业务的通话持续时间划分成一个或多 个计费时间段, 并根据每个计费时间段以及每个计费时间段所对应的费率计算呼叫业 务的费用, 而不是只按照通话开始时刻对应的费率来计算整个通话持续时间的费用, 这样可以准确计算通话持续时间在各个重合的费率时间段上的费用, 从而实现真正意 义上的按时间段计费, 解决现了有技术中在持续通话期间不能对不同的费率时间段计 费的问题, 提高了系统计费的精确性、 提高了用户的满意度。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据相关技术的按时间段计费系统的结构图; 图 2是根据本发明实施例的用于呼叫业务的计费装置的一种优选的结构图; 图 3是根据本发明实施例的划分单元的一种优选的结构图; 图 4是根据本发明实施例的划分单元的另一种优选的结构图; 图 5是根据本发明实施例的第一划分模块的一种优选的结构图; 图 6是根据本发明实施例的用于呼叫业务的计费方法的一种优选的流程图; 图 7是根据本发明实施例的按照预定的费率时间段将通话持续时间划分成一个或 多个计费时间段的一种优选的逻辑流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在以下各个实施例中, 通信可以由无线连接或有线连接或其两者的组合来实现, 本发明对此不做限定。 实施例 1 图 2是根据本发明实施例的用于呼叫业务的计费装置的一种优选的结构图, 如图 2所示, 该用于呼叫业务的计费装置包括: 获取单元 202, 设置为获取呼叫业务所对应 的通话持续时间; 划分单元 204, 与获取单元 202通信, 设置为按照预定的费率时间 段将通话持续时间划分成一个或多个计费时间段; 计费单元 206, 与划分单元 204通 信,设置为根据每个计费时间段以及每个计费时间段对应的费率计算呼叫业务的费用。 在上述优选的实施例中, 按照预定的费率时间段将呼叫业务的通话持续时间划分 成一个或多个计费时间段, 并根据每个计费时间段以及每个计费时间段所对应的费率 计算呼叫业务的费用, 而不是只按照通话开始时刻对应的费率来计算整个通话持续时 间的费用, 这样可以准确计算通话持续时间在各个重合的费率时间段上的费用, 从而 实现真正意义上的按时间段计费, 提高了系统按时间段计费的精确性、 提高了用户的 满意度。 进一步地, 本发明还对划分单元 204进行了改进, 以实现按照预定的费率时间段 将呼叫业务的通话持续时间准确有效地划分成不同的计费时间段。 具体地, 如图 3所 示, 上述划分单元 204包括: 第一划分模块 302, 设置为将通话持续时间中与预定的 费率时间段重合的部分划分成第一计费时间段; 第二划分模块 304, 设置为将通话持 续时间中与预定的费率时间段不重合的部分划分成第二计费时间段。 在本实施例中, 根据通话持续时间中与预定的费率时间段是否重合来划分不同的计费时间段, 这样可 以实现准确的划分, 并能够提高划分的效率。 在上述实施例的基础上,本发明还对第一划分模块 302进行了改进, 如图 4所示, 该第一划分模块 302包括: 记录子模块 402, 设置为将通话持续时间中与每个预定的 费率时间段重合的部分分别记录为一个第一计费时间段, 其中, 每个第一计费时间段 对应的费率都相同, 或者, 所有第一计费时间段中至少有两个第一计费时间段对应的 费率相同。 在本实施例中, 通过将通话持续时间中与每个预定的费率时间段重合的部 分分别记录为一个第一计费时间段, 清楚准确地将通话持续时间中与预定的费率时间 段重合的部分划分出来, 从而便于对第一计费时间段进行呼叫业务费用的计算。另外, 每个第一计费时间段对应的费率都相同, 或者, 所有第一计费时间段中至少有两个第 一计费时间段对应的费率相同, 本发明实现了可以对通话持续时间中的多种不同费率 的时间段进行业务费用计算, 从而可以满足不同业务的不同费率的业务计费需求, 提 高了本发明的适用性。 优选地, 本发明还对划分单元 204做了进一步的改进, 以提高按照预定的费率时 间段将呼叫业务的通话持续时间准确有效地划分成一个或多个计费时间段的准确性。 具体地, 如图 5所示, 该划分单元 204还包括: 确定模块 502, 设置为令当前时刻为 通话持续时间的通话开始时刻, 并从通话开始时刻开始执行以下步骤直到通话持续时 间的通话结束时刻: 判断当前时刻是否落入预定的费率时间段中, 若落入, 则将当前 时刻确定为通话持续时间中与预定的费率时间段重合的部分; 将下一时刻设置为当前 时刻。 在本实施例中, 通过判断当前时刻是否落入预定的费率时间段中, 判断是否将 当前时刻确定为通话持续时间中与预定的费率时间段重合的部分, 从而可以实现在当 前时刻与预定的费率时间段存在的多种关系的场景下将通话持续时间划分成一个或多 个计费时间段, 提高了将通话持续时间划分成一个或多个计费时间段的准确性, 提高 了对通话持续时间中计费时间段的计费精确度。 优选地, 上述各优选实施例中呼叫业务的通话持续时间至少包括: 呼叫业务的通 话开始时刻以及通话结束时刻, 以准确界定呼叫业务的通话持续时间, 便于准确地按 照预定的费率时间段将呼叫业务的通话持续时间准确有效地划分成一个或多个计费时 间段。 优选地, 上述各优选实施例中的预定的费率时间段只包括优惠时间段, 系统预先 配置的优惠时间段和其他非优惠时间段对应的费率, 以便在计费时可以获取相应时间 段上的费率。 当然, 本发明对此不做限定, 上述各优选实施例中的预定的费率时间段 也可以同时包括优惠时间段和\或非优惠时间段, 以使得本发明可以满足不同业务的不 同费率的业务计费需求, 提高了本发明的适用性。 实施例 2 在图 2-5 的基础上, 本发明还提供了一种用于呼叫业务的计费方法的优选的流程 图, 如图 6所示, 该用于呼叫业务的计费方法包括: 4) Business & Operation Support System (BOSS), which provides basic functions including user data management, billing, billing, and settlement. However, the above-mentioned existing time-based charging system does not realize the true time-period charging, because the existing time-based charging system sets the rate according to the user's call start time. That is to say, the rate type in the bill generated from the call start time to the call end time is consistent with the rate type set by the call start time, even if there are different rate type time periods during the ongoing call, The time-based billing system also cannot generate corresponding bills according to the rate types of different time periods, that is, the related technology cannot charge different rate periods during the ongoing call. SUMMARY OF THE INVENTION The present invention provides a charging method and apparatus for a call service to at least solve the problem of not being able to charge different rate time periods during a continuous call in the related art. According to an aspect of the present invention, a charging method for a call service is provided, including: acquiring a call duration corresponding to a call service; dividing the call duration into one or more according to a predetermined rate period Charging time period; calculating the cost of the calling service according to each charging time period and the corresponding rate of each charging time period. Preferably, the step of dividing the call duration into one or more charging time periods according to the predetermined rate time period comprises: dividing the portion of the call duration that coincides with the predetermined rate time period into the first charging time a segment that divides a portion of the call duration that does not coincide with the predetermined rate period into a second billing period. Preferably, the step of dividing the portion of the call duration that coincides with the predetermined rate period into the first billing period comprises: recording, respectively, the portion of the call duration that coincides with each of the predetermined rate periods as A first billing period. Preferably, the rates corresponding to each of the first charging time periods are the same, or the rates corresponding to at least two of the first charging time periods in all the first charging time periods are the same. Preferably, the step of acquiring the duration of the call corresponding to the call service includes: acquiring a call start time and a call end time corresponding to the call service. Preferably, the part of the call duration that coincides with the predetermined rate period is determined by: making the current time the call start time, and performing the following steps from the call start time until the call end time: determining whether the current time falls In the predetermined rate period, if it falls, the current time is determined as the portion of the call duration that coincides with the predetermined rate period; the next time is set as the current time. According to another aspect of the present invention, a charging apparatus for a call service is provided, comprising: an obtaining unit configured to acquire a call duration corresponding to a call service; and a dividing unit configured to follow a predetermined rate time The segment divides the duration of the call into one or more charging time periods; the charging unit is configured to calculate the cost of the calling service according to each charging time period and a rate corresponding to each charging time period. Preferably, the dividing unit comprises: a first dividing module, configured to divide a portion of the call duration that coincides with the predetermined rate period into a first charging period; and a second dividing module, configured to be in the duration of the call The portion that does not coincide with the predetermined rate period is divided into the second billing period. Preferably, the first dividing module comprises: a recording submodule, configured to record, respectively, a portion of the call duration that coincides with each predetermined rate period as a first billing period, wherein each first meter The rates corresponding to the fee periods are the same, or the rates corresponding to at least two of the first billing periods in all the first billing periods are the same. Preferably, the dividing unit further comprises: a determining module, configured to make the current time a call start time of the call duration, and performing the following steps from the call start time to the call end time of the call duration: determining whether the current time falls within the predetermined time In the rate period, if it falls, the current time is determined as the portion of the call duration that coincides with the predetermined rate period; the next time is set as the current time. In the present invention, the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and the rate corresponding to each billing period and each billing period is Calculate the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby realizing the true meaning. The charging according to the time period solves the problem that the prior art can not charge different rate time periods during the continuous call, which improves the accuracy of the system charging and improves the user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawings: FIG. 1 is a structural diagram of a time-based charging system according to the related art; FIG. 2 is a preferred structural diagram of a charging device for a call service according to an embodiment of the present invention; A preferred structural view of a dividing unit according to an embodiment of the present invention; FIG. 4 is another preferred structural view of a dividing unit according to an embodiment of the present invention; FIG. 5 is a first dividing module according to an embodiment of the present invention. A preferred structural diagram; FIG. 6 is a preferred flow chart of a charging method for a call service according to an embodiment of the present invention; FIG. 7 is a call according to a predetermined rate period according to an embodiment of the present invention. A preferred logic flow diagram for dividing the duration into one or more billing periods. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. In the following embodiments, the communication may be implemented by a wireless connection or a wired connection or a combination of both, which is not limited by the present invention. Embodiment 1 FIG. 2 is a schematic structural diagram of a charging apparatus for a call service according to an embodiment of the present invention. As shown in FIG. 2, the charging apparatus for calling service includes: an obtaining unit 202, setting To obtain the call duration corresponding to the call service; the dividing unit 204, in communication with the obtaining unit 202, is configured to divide the call duration into one or more charging time periods according to a predetermined rate time period; the charging unit 206, The communication unit 204 is configured to calculate a fee for the call service according to each charging period and a rate corresponding to each charging period. In the above preferred embodiment, the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and corresponding to each billing period and each billing period. The rate calculates the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby achieving The true time-based billing increases the accuracy of the system's billing by time period and improves user satisfaction. Further, the present invention further improves the dividing unit 204 to accurately and efficiently divide the call duration of the call service into different charging time periods according to a predetermined rate period. Specifically, as shown in FIG. 3, the foregoing dividing unit 204 includes: a first dividing module 302, configured to divide a portion of the call duration that coincides with a predetermined rate period into a first charging period; The module 304 is configured to divide a portion of the call duration that does not coincide with the predetermined rate period into a second billing period. In this embodiment, different charging time periods are divided according to whether the time duration of the call overlaps with the predetermined rate time period, so that accurate division can be achieved, and the efficiency of the division can be improved. On the basis of the foregoing embodiment, the present invention further improves the first dividing module 302. As shown in FIG. 4, the first dividing module 302 includes: a recording submodule 402, configured to set the duration of the call with each The part of the first billing period is the same as the first billing period, and the rates corresponding to each of the first billing periods are the same, or at least two of the first billing periods. The rates corresponding to the first billing period are the same. In this embodiment, by recording the portion of the call duration that coincides with each predetermined rate period as a first billing period, the call duration and the predetermined rate time are clearly and accurately recorded. The overlapping portions of the segments are divided to facilitate calculation of the calling service fee for the first charging period. In addition, the rates corresponding to each of the first charging time periods are the same, or the rates corresponding to at least two of the first charging time periods in all the first charging time periods are the same, and the present invention implements the call. The service cost calculation is performed for a plurality of different time periods in the duration, so that the service charging requirements of different rates of different services can be satisfied, and the applicability of the present invention is improved. Preferably, the present invention further modifies the partitioning unit 204 to improve the accuracy of accurately and efficiently dividing the call duration of the call service into one or more billing periods in accordance with a predetermined rate period. Specifically, as shown in FIG. 5, the dividing unit 204 further includes: a determining module 502, configured to make the current time a call start time of the call duration, and perform the following steps from the call start time until the end of the call duration Time: Determine whether the current time falls within a predetermined rate period. If it falls, determine the current time as the part of the call duration that coincides with the predetermined rate time period; set the next time as the current time. In this embodiment, by determining whether the current time falls within a predetermined rate period, determining whether the current time is determined as a portion of the call duration that coincides with the predetermined rate period, thereby achieving the current time and The scenario of dividing the duration of the call into one or more charging time segments in the scenario of multiple relationships in the predetermined rate period improves the accuracy of dividing the duration of the call into one or more charging periods, and improves The charging accuracy of the charging period in the duration of the call. Preferably, the duration of the call service in the foregoing preferred embodiments includes at least: a call start time of the call service and a call end time, to accurately define the call duration of the call service, so as to accurately accurately follow the predetermined rate period. The call duration of the call service is accurately and efficiently divided into one or more billing periods. Preferably, the predetermined rate time period in each of the foregoing preferred embodiments includes only the preferential time period, the pre-configured preferential time period of the system, and the rate corresponding to the other non-concession time period, so that the corresponding time period can be obtained during charging. The rate on. Certainly, the present invention does not limit this. The predetermined rate period in each of the foregoing preferred embodiments may also include a preferential period and a non-concession period, so that the present invention can meet different rates of different services. The business billing requirements increase the applicability of the present invention. Embodiment 2 On the basis of FIG. 2-5, the present invention further provides a preferred flowchart of a charging method for a call service. As shown in FIG. 6, the charging method for a call service includes:
S602: 获取呼叫业务所对应的通话持续时间; S604: 按照预定的费率时间段将通话持续时间划分成一个或多个计费时间段; S606:根据每个计费时间段以及每个计费时间段对应的费率计算呼叫业务的费用。 在上述优选的实施例中, 按照预定的费率时间段将呼叫业务的通话持续时间划分 成一个或多个计费时间段, 并根据每个计费时间段以及每个计费时间段所对应的费率 计算呼叫业务的费用, 而不是只按照通话开始时刻对应的费率来计算整个通话持续时 间的费用, 这样可以准确计算通话持续时间在各个重合的费率时间段上的费用, 从而 实现真正意义上的按时间段计费, 提高了系统按时间段计费的精确性、 提高了用户的 满意度。 相应地, 本发明还提供了一种优选的按照预定的费率时间段将通话持续时间划分 成不同的计费时间段的方案。 具体地, 将通话持续时间中与预定的费率时间段重合的 部分划分成第一计费时间段; 将通话持续时间中与预定的费率时间段不重合的部分划 分成第二计费时间段。 在本实施例中, 根据通话持续时间中与预定的费率时间段是否 重合来划分不同的计费时间段, 这样可以实现准确的划分, 并能够提高划分的效率。 进一步地, 在上述优选实施例中, 按照预定的费率时间段将通话持续时间划分成 一个或多个计费时间段的方案还可以包括: 将通话持续时间中与每个预定的费率时间 段重合的部分分别记录为一个第一计费时间段。 在本实施例中, 通过将通话持续时间 中与每个预定的费率时间段重合的部分分别记录为一个第一计费时间段, 清楚准确地 将通话持续时间中与预定的费率时间段重合的部分划分出来, 从而便于对第一计费时 间段进行呼叫业务费用的计算。 优选地, 上述各实施例中第一计费时间段中每个第一计费时间段对应的费率可以 是都相同, 也可以是所有第一计费时间段中至少有两个第一计费时间段对应的费率相 同。 在本实施例中, 每个第一计费时间段对应的费率都相同, 或者, 所有第一计费时 间段中至少有两个第一计费时间段对应的费率相同, 本发明实现了可以对通话持续时 间中的多种不同费率的时间段进行业务费用计算, 从而可以满足不同业务的不同费率 的业务计费需求, 提高了本发明的适用性。 优选地, 上述各优选实施例中呼叫业务的通话持续时间至少包括: 呼叫业务的通 话开始时刻以及通话结束时刻, 以准确界定呼叫业务的通话持续时间, 便于准确地按 照预定的费率时间段将呼叫业务的通话持续时间准确有效地划分成一个或多个计费时 间段。 优选地, 本发明还提供了一种优选的确定通话持续时间中与预定的费率时间段重 合的部分的方案。 具体地, 令当前时刻为通话开始时刻, 并从通话开始时刻开始执行 以下步骤直到通话结束时刻: 判断当前时刻是否落入预定的费率时间段中, 若落入, 则将当前时刻确定为通话持续时间中与预定的费率时间段重合的部分; 将下一时刻设 置为当前时刻。 在本实施例中, 通过判断当前时刻是否落入预定的费率时间段中, 判 断是否将当前时刻确定为通话持续时间中与预定的费率时间段重合的部分, 从而可以 实现在当前时刻与预定的费率时间段存在的多种关系的场景下将通话持续时间划分成 一个或多个计费时间段, 提高了将通话持续时间划分成一个或多个计费时间段的准确 性, 提高了对通话持续时间中计费时间段的计费精确度。 优选地, 上述各优选实施例中的预定的费率时间段只包括优惠时间段, 系统预先 配置的优惠时间段和其他非优惠时间段对应的费率, 以便在计费时可以获取相应时间 段上的费率。 当然, 本发明对此不做限定, 上述各优选实施例中的预定的费率时间段 也可以同时包括优惠时间段和\或非优惠时间段, 以使得本发明可以满足不同业务的不 同费率的业务计费需求, 提高了本发明的适用性。 实施例 3 本优选实施例适用但不限于以下场景: ( 1 ) 费率分为优惠和非优惠两种类型; (2) 数据库 (相当于预定的费率时间段) 中记载的时间段为优惠时间段; S602: Obtain a call duration corresponding to the call service. S604: divide the call duration into one or more billing time segments according to a predetermined rate period; S606: Calculate the cost of the call service according to each charging time period and a rate corresponding to each charging time period. In the above preferred embodiment, the call duration of the call service is divided into one or more billing time periods according to a predetermined rate period, and corresponding to each billing period and each billing period. The rate calculates the cost of the call service, instead of calculating the cost of the entire call duration only according to the rate corresponding to the call start time, so that the cost of the call duration in each coincident rate period can be accurately calculated, thereby achieving The true time-based billing increases the accuracy of the system's billing by time period and improves user satisfaction. Accordingly, the present invention also provides a preferred scheme for dividing a call duration into different billing periods according to a predetermined rate period. Specifically, the part of the call duration that coincides with the predetermined rate period is divided into a first billing period; and the part of the call duration that does not coincide with the predetermined rate period is divided into the second billing time. segment. In this embodiment, different charging time periods are divided according to whether the time duration of the call overlaps with the predetermined rate time period, so that accurate division can be achieved, and the efficiency of the division can be improved. Further, in the above preferred embodiment, the solution of dividing the duration of the call into one or more charging time periods according to the predetermined rate period may further include: setting the duration of the call with each predetermined rate time The segments coincident are recorded as a first billing period. In this embodiment, by recording the portion of the call duration that coincides with each of the predetermined rate periods as a first billing period, the duration of the call and the predetermined rate period are clearly and accurately The coincident portions are divided to facilitate calculation of the call service fee for the first charging period. Preferably, the rates corresponding to each of the first charging periods in the first charging period in the foregoing embodiments may be the same, or may be at least two of the first billing periods. The rates corresponding to the time period are the same. In this embodiment, the rates corresponding to each of the first charging periods are the same, or the rates corresponding to at least two of the first charging periods in all the first charging periods are the same. It is possible to calculate the service cost for a plurality of different time periods in the duration of the call, thereby satisfying the service charging requirements of different rates of different services, and improving the applicability of the present invention. Preferably, the duration of the call service in the foregoing preferred embodiments includes at least: a call start time of the call service and a call end time, to accurately define the call duration of the call service, so as to accurately accurately follow the predetermined rate period. The call duration of the call service is accurately and efficiently divided into one or more billing periods. Preferably, the present invention also provides a preferred solution for determining a portion of a call duration that coincides with a predetermined rate period. Specifically, the current time is the call start time, and the following steps are performed from the call start time until the call end time: determining whether the current time falls within a predetermined rate period, and if it falls, Then, the current time is determined as a portion of the call duration that coincides with the predetermined rate time period; the next time is set as the current time. In this embodiment, by determining whether the current time falls within a predetermined rate period, determining whether the current time is determined as a portion of the call duration that coincides with the predetermined rate period, thereby achieving the current time and The scenario of dividing the duration of the call into one or more charging time segments in the scenario of multiple relationships in the predetermined rate period improves the accuracy of dividing the duration of the call into one or more charging periods, and improves The charging accuracy of the charging period in the duration of the call. Preferably, the predetermined rate time period in each of the foregoing preferred embodiments includes only the preferential time period, the pre-configured preferential time period of the system, and the rate corresponding to the other non-concession time period, so that the corresponding time period can be obtained during charging. The rate on. Certainly, the present invention does not limit this. The predetermined rate period in each of the foregoing preferred embodiments may also include a preferential period and a non-concession period, so that the present invention can meet different rates of different services. The business billing requirements increase the applicability of the present invention. Embodiment 3 This preferred embodiment is applicable to, but not limited to, the following scenarios: (1) The rates are classified into two types: preferential and non-concess; (2) the time period recorded in the database (equivalent to the predetermined rate period) is a discount. period;
( 3 ) 同一用户的优惠时间段没有重叠的时间, 例如, 已经有了时间 段' 12:00'~' 15:00', 则不能再存在时刻段 ' 13 :00'~' 16:00'或' 11 :00'~' 14:00'; (3) There is no overlapping time for the same user's preferential time period. For example, if there is already a time period '12:00'~' 15:00', then there is no longer a time period '13:00'~' 16:00' Or ' 11 :00'~' 14:00';
(4)时间段为同一天的时间段, 即时间段开始时刻最小值为 '00:00', 结束时刻最 大值为 '23 :59' ; ( 5 )以各实施例中通话持续时间与优惠时间段相重合的部分相当于第一计费时间 段。 在上述场景下, 本优选实施例提供了一种优选的划分计费时间段的方案, 如图 7 所示, 该按照预定的费率时间段将通话持续时间划分成一个或多个计费时间段的方案 包括如下步骤: S702: 数据库 timeforfm记载若干条 (大于等于 0条)用户号码 usernum以及与该用 户号码对应的时间段; (4) The time period is the time period of the same day, that is, the minimum time at the start of the time period is '00:00', and the maximum value at the end time is '23:59'; (5) The duration and offer of the call in each embodiment The portion in which the time periods coincide is equivalent to the first charging period. In the above scenario, the preferred embodiment provides a preferred scheme for dividing the charging period. As shown in FIG. 7, the duration of the call is divided into one or more charging periods according to a predetermined rate period. The scheme of the segment includes the following steps: S702: The database timeforfm records a plurality of (more than or equal to 0) user numbers usernum and a time period corresponding to the user number;
S704 : 存储过程 (相当于划分单元) 输入为用户号码 usemunu 通话开始时刻 starttime、 通话结束时亥 ij endtime; S706: 记 endtime与 starttime日期相差天数为 timeoverday, 记 starttime的日期 (年 月日)为 startd, 记 starttime的时分为 startm, 记 endtime的时分为 endm, 记 startd的第 二天为 startdnext; S704: The stored procedure (equivalent to the division unit) is input as the user number usemunu call start time starttime, and the call end time ij endtime; S706: The difference between the endtime and the starttime date is timeoverday, the date of the starttime (year, month, and day) is startd, the starttime is divided into startm, the endtime is divided into endm, and the second day of startd is startdnext;
S708 : 判断通话开始时刻的时分 startm 是否存在时间段内, 若 startm 存在于 usernum对应的时间段中, 则执行步骤 S710, 否则执行步骤 S724; S708: determining whether the time startm of the call start time exists in the time period, if startm exists in the time period corresponding to usernum, step S710 is performed, otherwise step S724 is performed;
S710: 记该时间段的结束时刻为 dbendtime; S710: Remember that the end time of the time period is dbendtime;
S712: 赋当前时间段费率类型 curfeetype为 " 1 ", 即优惠费率; S712: assigning the current time period rate type curfeetype to "1", that is, the preferential rate;
S714:判断通话结束时刻与通话开始时刻日期相差的天数 timeoverday是否大于 0, 若 timeoverday>0, 则执行步骤 S716, 否则执行步骤 S718; S716: 赋当前时间段结束时刻 curendtime的日期为 startd, 时分为 dbendtime, 秒 数为 0 , 执行步骤 S756; S714: determining whether the number of days between the end of the call and the date of the call start time is greater than 0, if timeoverday>0, then executing step S716, otherwise performing step S718; S716: assigning the date of the current time period to the end of the curendtime is startd, the time is divided into Dbendtime, the number of seconds is 0, step S756;
S718: 判断通话结束时刻的时分 endm是否小于该时间段的结束时刻 dbendtime, 若 endm<dbendtime, 则执行步骤 S720, 否则执行步骤 S722; S718: determining whether the time end endm of the call end time is less than the end time of the time period dbendtime, if endm <dbendtime, step S720 is performed, otherwise step S722 is performed;
S720:赋当前时间段结束时刻 curendtime为通话结束时刻 endtime,执行步骤 S756; S722: 赋当前时间段结束时刻 curendtime的日期为 startd, 时分为 dbendtime, 秒 数为 0, 执行步骤 S756; S720: assigning the current time period end time curendtime is the call end time endtime, executing step S756; S722: assigning the current time period end time curendtime date is startd, the time is divided into dbendtime, the number of seconds is 0, and step S756 is performed;
S724: 赋当前时间段费率 curfeetype=0, 即非优惠费率; S724: Assign the current time period rate curfeetype=0, that is, the non-concession rate;
S726:判断通话结束时刻与通话开始时刻日期相差的天数 timeoverday是否等于 0, 若 timeoverday=0, 则执行步骤 S728, 否则执行步骤 S736; S728: 判断时间段开始时刻是否在通话开始时刻的时分 startm和通话结束时刻的 时分 endm之间, 若存在 usernum对应的时间段的开始时刻在 startm和 endm之间,则 执行步骤 S730否则执行步骤 S734; S726: determining whether the number of days between the end time of the call and the date of the call start time is equal to 0. If timeoverday=0, step S728 is performed, otherwise step S736 is performed; S728: determining whether the start time of the time period is at the start time of the call start time and Between the time end endm of the call end time, if there is a start time of the time period corresponding to usernum between startm and endm, then step S730 is performed otherwise step S734 is performed;
S730: 记时间段开始时刻为 dbstarttime; S730: The starting time of the time period is dbstarttime;
S732: 赋当前时间段结束时刻 curendtime的日期为 startd, 时分为 dbstarttime, 秒 数为 0, 执行步骤 S756; S732: Assigning the current time period end time The date of the curendtime is startd, the time is divided into dbstarttime, the number of seconds is 0, and the step S756 is performed;
S734:赋当前时间段结束时刻 curendtime为通话结束时刻 endtime,执行步骤 S756; S736: 判断时间段开始时刻是否在通话开始时刻的时分 startm和 '23:59'之间, 若 存在 usernum对应的时间段开始时刻在 startm和' 23:59'之间, 则执行步骤 S738, 否则 执行步骤 S742; S734: assign the current time period end time curendtime to the call end time endtime, step S756; S736: determining whether the start time of the time period is between the time startm and the '23:59' of the call start time, if there is a time period corresponding to the usernum starting time between startm and '23:59', step S738 is performed, otherwise Go to step S742;
S738: 记时间段开始时刻为 dbstarttime; S740: 赋当前时间段结束时刻 curendtime的日期为 startd, 时分为 dbstarttime, 秒 数为 0, 执行步骤 S756; S738: The start time of the time period is dbstarttime; S740: The time end of the current time period is assigned. The date of the curendtime is startd, and the time is divided into dbstarttime, the number of seconds is 0, and step S756 is performed;
S742:判断通话结束时刻与通话开始时刻日期相差的天数 timeoverday是否等于 1, 若 timeoverday=l, 则执行步骤 S744, 否则执行步骤 S746; S742: determining the number of days between the call end time and the call start time date, whether timeoverday is equal to 1, if timeoverday = 1, then executing step S744, otherwise executing step S746;
S744: 赋匹配结束时刻 matchendm为 endm , 执行步骤 S748; S746: 赋匹配结束时刻 matchendm为' 23 :59'; S744: Matching the end time matchendm to endm, executing step S748; S746: assigning the matching end time matchendm to '23:59';
S748: 判断时间段开始时刻是否在 '00:00'和匹配结束时刻 matchendm之间, 若存 在 usernum对应的时间段开始时刻在 '00:00'和 matchendm之间, 则执行步骤 S750, 否 则执行步骤 S754; S748: determining whether the start time of the time period is between '00:00' and the matching end time matchendm, if there is a time period starting time corresponding to usernum between '00:00' and matchendm, step S750 is performed, otherwise the step is performed. S754;
S750: 记时间段开始时刻为 dbstarttime; S752: 赋当前时间段结束时刻 curendtime的日期为 startdnext, 时分为 dbstarttime, 秒数为 0, 执行步骤 S756; S750: The time of the beginning of the time period is dbstarttime; S752: The time of the current time period is the end time of the curendtime is startdnext, the time is divided into dbstarttime, the number of seconds is 0, and the step S756 is performed;
S754: 赋当前时间段结束时刻 curendtime为通话结束时刻 endtime; S754: assigning the current time period end time curendtime is the call end time endtime;
S756: 赋当前时间段开始时刻 curstarttime 为 starttime, 赋下一时间段开始时刻 nextstarttime为 curendtime, 赋下一时间段结束时亥 'J nextendtime为 endtime; S758: 存储过程(相当于划分单元)输出为当前时间段费率 curfeetype、 当前时间 段开始时刻 curstarttime、 当前时间段结束时刻 curendtime、 下一时间段开始时刻 nextstarttime 下一时间段结束时刻 curendtime, 程序结束。 优选的, 在上述优选的实施例中费率以优惠和不优惠两类为例, 以便说明本优选 实施例所提到的按照预定的费率时间段将通话持续时间划分成一个或多个计费时间段 的逻辑流程, 本发明不仅限于此, 还可以有多种费率类型, 例如业务繁忙时段的增加 收费类型, 业务空闲时段的免费类型, 均可在此方法的基础上扩展。 优选的, 在上述优选的实施例中数据库中记录的时间段为优惠时间段, 当然, 这 只是一种优选的示例, 数据库中记录的时间段还可以是不优惠的时间段, 也可以是多 种不同费率类型的时间段。 优选的, 当前时间段的开始时刻、 当前时间段的开始时刻、 下一时间段的开始时 亥 lj、 下一时间段的结束时刻、 通话开始时刻以及通话结束时刻均包括日期部分和时分 部分, 以便于通话起止日期跨天的场景下的计费情况, 便于区别通话起止时刻是否跨 天, 从而提高了计费的精确度。 优选的, 在上述优选的实施例中以 " 1"表示优惠的时间段, 以 " 0" 表示非优惠 的时间段, 当然, 这只是一种优选的示例, 可以用 "1"表示非优惠的时间段, 以 " 0" 表示优惠的时间段, 还可以用多位数字来表示费率类型, 如 "11"、 "00"、 "10"、 "01" 等形式表示。 在上述实施例的基础上, 以下以用户 A对应的优惠时间段记录为 '09: 00'~'12: 00'、 '15: 00'~'17: 00'为例, 结合不同场景, 具体描述划分单元按照预定的费率时 间段将通话持续时间划分成一个或多个计费时间段的逻辑流程。 假设在以下各个场景 具有以下条件: S756: assigning the current time period start time curstarttime to starttime, assigning the next time period start time nextstarttime to curendtime, assigning the next time period to the end of time 'J nextendtime is endtime; S758: storing procedure (equivalent to dividing unit) output as current The time period rate curfe e type, the current time period start time curstarttime, the current time period end time curendtime, the next time period start time nextstarttime, the next time period end time curendtime, and the program ends. Preferably, in the above preferred embodiment, the rates are exemplified by the preferential and non-concessions, so as to explain the division of the call duration into one or more counts according to the predetermined rate period mentioned in the preferred embodiment. The logic flow of the time period, the present invention is not limited thereto, and there may be multiple rate types, such as an increased charging type during a busy period of a business, and a free type of a free time period of the business, which may be extended on the basis of the method. Preferably, in the above preferred embodiment, the time period recorded in the database is a preferential time period. Of course, this is only a preferred example. The time period recorded in the database may also be a non-concession time period, or may be multiple. A time period of different rate types. Preferably, the start time of the current time period, the start time of the current time period, the start time of the next time period, the end time of the next time period, the call start time, and the call end time all include a date part and a time division part, In order to facilitate the billing situation in the scene of the call start date and the cross-day, it is convenient to distinguish whether the call start and end time is cross-day, thereby improving the accuracy of billing. Preferably, in the above preferred embodiment, "1" indicates a preferential time period, and "0" indicates a non-concession time period. Of course, this is only a preferred example, and "1" may be used to indicate non-preferential The time period, with "0" for the time period of the offer, can also be used to indicate the rate type, such as "11", "00", "10", "01", etc. On the basis of the above embodiment, the following is recorded as the '09: 00'~'12: 00', '15: 00'~'17: 00' corresponding to the preferential time period corresponding to the user A, and combined with different scenarios, specifically Describe the logic flow by which the dividing unit divides the duration of the call into one or more charging periods according to a predetermined rate period. Assume that the following conditions are met in each of the following scenarios:
(1) 费率分为优惠和非优惠两种类型; (1) Rates are divided into two types: preferential and non-concess;
(2) 数据库 (相当于预定的费率时间段) 中记载的时间段为优惠时间段; (2) The time period recorded in the database (equivalent to the predetermined rate period) is the preferential time period;
( 3 ) 同一用户的优惠时间段没有重叠的时间, 例如, 已经有了时间 段' 12:00'~'15:00', 则不能再存在时刻段 '13:00'~'16:00'或' 11:00'~'14:00'; (4)时间段为同一天的时间段, 即时间段开始时刻最小值为 '00:00', 结束时刻最 大值为 '23:59'; (3) There is no overlapping time for the same user's preferential time period. For example, if there is already a time period '12:00'~'15:00', then there is no longer a time period '13:00'~'16:00' Or '11:00'~'14:00'; (4) The time period is the same day period, that is, the minimum time at the beginning of the time period is '00:00', and the maximum value at the end time is '23:59';
(5)以各实施例中通话持续时间与优惠时间段相重合的部分相当于第一计费时间 段。 (5) The portion in which the call duration coincides with the preferential time period in each embodiment corresponds to the first charging period.
(一) 场景 1 通话起止日期不跨天,通话开始时刻在时间段以夕卜,如通话开始时刻为' 2011.08.15(1) Scene 1 The start and end date of the call does not cross the sky, and the call start time is in the time zone, for example, the call start time is '2011.08.15
08:45:30', 通话结束时刻为' 2011.08.15 10:11:09', 在该场景下, 划分单元按照预定的 费率时间段将通话持续时间划分成一个或多个计费时间段的逻辑流程包括如下步骤: SI: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1508:45:30'、 通话结束时刻 '2011.08.1510:11:09',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1508:45:30'、 当前时间段结束时刻' 2011.08.1509:00:00'、 下一时间段开 始时刻 '2011.08.1509:00:00'、 下一时间段结束时刻 ' 2011.08.1510:11:09'; S2: 计费单元生成第 1条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.15 08:45:30', 结束时刻为当前时间段结束时刻' 2011.08.15 09:00:00'; 08:45:30', the call end time is '2011.08.15 10:11:09'. In this scenario, the dividing unit divides the call duration into one or more charging time periods according to a predetermined rate time period. The logic flow includes the following steps: SI: The division unit accesses the database, enters the user number A, the call start time '2011.08.1508:45:30', and the call end time '2011.08.1510:11:09', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1508:45:30', the current time period end time '2011.08.1509:00:00', the next time period start time '2011.08.1509:00:00', the next time period End time '2011.08.1510:11:09'; S2: The billing unit generates the first bill, where the rate is the current time period rate 0, and the starting time is the current time period start time ' 2011.08.15 08:45 :30', the end time is the end time of the current time period ' 2011.08.15 09:00:00';
S3: 确定模块判断下一时间段开始时刻 '2011.08.1509:00:00'不等于下一时间段结 束时刻 '2011.08.1510:11:09', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S3: The determining module determines that the start time of the next time period '2011.08.1509:00:00' is not equal to the end time of the next time period '2011.08.1510:11:09', then assigns the start time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time;
S4: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1509:00:00'、 通话结束时刻 '2011.08.1510:11:09',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1509:00:00'、 当前时间段结束时刻 ' 2011.08.1510:11:09'、 下一时间段开始 时刻' 2011.08.1510:11:09'、 下一时间段结束时刻 ' 2011.08.1510:11:09'; S5: 计费单元生成第 2条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.15 09:00:00', 结束时刻为当前时间段结束时刻' 2011.08.15 10:11:09'; S4: The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1509:00:00', and the call end time '2011.08.1510:11:09', and outputs the current time period rate 1 (offer), current The time period starting time '2011.08.1509:00:00', the current time period ending time '2011.08.1510:11:09', the next time period starting time '2011.08.1510:11:09', the next time period ends Time ' 2011.08.1510:11:09'; S5: The billing unit generates the second bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.15 09:00: 00', the end time is the end time of the current time period ' 2011.08.15 10:11:09';
S6: 确定模块判断下一时间段开始时刻 '2011.08.1510:11:09'等于下一时间段结束 时刻' 2011.08.1510:11:09', 则话单生成完毕, 程序结束。 (二) 场景 2 通话起止日期不跨天,通话开始时刻在时间段以内,如通话开始时刻为' 2011.08.15 15:10:10', 通话结束时刻为' 2011.08.1518:12:32', 在该场景下, 划分单元按照预定的 费率时间段将通话持续时间划分成一个或多个计费时间段的逻辑流程包括如下步骤: S6: The determining module determines the starting time of the next time period '2011.08.1510:11:09' is equal to the ending time of the next time period '2011.08.1510:11:09', then the CDR is generated and the program ends. (2) Scene 2 The start and end date of the call does not cross the sky, and the call start time is within the time limit. For example, the call start time is '2011.08.15 15:10:10', and the call end time is '2011.08.1518:12:32', In this scenario, the logic of dividing the duration of the call into one or more charging periods according to the predetermined rate period includes the following steps:
S1: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1515:10:10'、 通话结束时刻 '2011.08.1518:12:32',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1515:10:10'、 当前时间段结束时刻 ' 2011.08.1517:00:00'、 下一时间段开始 时刻' 2011.08.1517:00:00'、 下一时间段结束时刻 ' 2011.08.1518:12:32'; S2: 计费单元生成第 1条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.15 15:10:10', 结束时刻为当前时间段结束时刻' 2011.08.15 17:00:00'; S1: The division unit accesses the database, and enters the user number A, the call start time '2011.08.1515:10:10', and the call end time '2011.08.1518:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1515:10:10', current time period end time '2011.08.1517:00:00', next time period start time '2011.08.1517:00:00', the next time period ends Moment '2011.08.1518:12:32'; S2: The billing unit generates the first bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.15 15:10:10', and the ending time is the current time period ending time. ' 2011.08.15 17:00:00';
S3: 确定模块判断下一时间段开始时刻 '2011.08.1517:00:00'不等于下一时间段结 束时亥 I 2011.08.1518:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S3: The determining module determines that the start time of the next time period '2011.08.1517:00:00' is not equal to the end time of the next time period, 2011.08.1518:12:32', then assigns the start time of the next time period to the call. At the beginning time, the end time of the next time period is assigned to the call end time;
S4: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1517:00:00'、 通话结束时刻 '2011.08.1518:12:32',输出当前时间段费率 0(;非优惠)、当前时间段开始 时刻' 2011.08.1517:00:00'、 当前时间段结束时刻 ' 2011.08.1518:12:32'、 下一时间段开 始时刻 '2011.08.1518:12:32'、 下一时间段结束时刻 ' 2011.08.1518:12:32'; S4: The division unit accesses the database, and enters the user number A, the call start time '2011.08.1517:00:00', and the call end time '2011.08.1518:12:32', and outputs the current time period rate 0 (; non-offer) , the current time period start time '2011.08.1517:00:00', the current time period end time '2011.08.1518:12:32', the next time period start time '2011.08.1518:12:32', the next time End of the period '2011.08.1518:12:32';
S5: 计费单元生成第 2条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.15 17:00:00', 结束时刻为当前时间段结束时刻' 2011.08.15 18:12:32'; S5: The charging unit generates a second bill, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 17:00:00', and the ending time is the current time period ending time. ' 2011.08.15 18:12:32';
S6: 确定模块判断下一时间段开始时刻 '2011.08.1518:12:32'等于下一时间段结束 时刻' 2011.08.1518:12:32', 则话单生成完毕, 程序结束。 S6: The determining module determines that the starting time of the next time period '2011.08.1518:12:32' is equal to the ending time of the next time period '2011.08.1518:12:32', then the CDR is generated and the program ends.
(三) 场景 3 通话起止日期跨 1天,通话开始时刻在时间段以外,如通话开始时刻为 '2011.08.15 23:10:10', 通话结束时刻为' 2011.08.1610:12:32', 在该场景下, 划分单元按照预定的 费率时间段将通话持续时间划分成一个或多个计费时间段的逻辑流程包括如下步骤: S1: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1523:10:10'、 通话结束时刻 '2011.08.1610:12:32',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1523:10:10'、 当前时间段结束时刻' 2011.08.1609:00:00'、 下一时间段开 始时刻 '2011.08.1609:00:00'、 下一时间段结束时刻 ' 2011.08.1610:12:32'; (3) Scene 3 The start and end date of the call is one day, and the call start time is outside the time period. For example, the call start time is '2011.08.15 23:10:10', and the call end time is '2011.08.1610:12:32', In this scenario, the logic of dividing the duration of the call into one or more charging time segments according to the predetermined rate period includes the following steps: S1: The dividing unit accesses the database, and inputs the user number A and the call start time. '2011.08.1523:10:10', call end time '2011.08.1610:12:32', output current time period rate 0 (non-preferential), current time period start time '2011.08.1523:10:10', The current time period end time '2011.08.1609:00:00', the next time period start time '2011.08.1609:00:00', the next time period end time '2011.08.1610:12:32';
S2: 计费单元生成第 1条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.15 23:10:10', 结束时刻为当前时间段结束时刻' 2011.08.16 09:00:00'; S2: The charging unit generates the first CDR, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 23:10:10', and the ending time is the current time period ending time ' 2011.08.16 09:00:00';
S3: 确定模块判断下一时间段开始时刻 '2011.08.1609:00:00'不等于下一时间段结 束时刻 '2011.08.1610:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S4: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1609:00:00'、 通话结束时刻 '2011.08.1610:12:32',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1609:00:00'、 当前时间段结束时刻' 2011.08.1610:12:32'、 下一时间段开始 时刻' 2011.08.1610:12:32'、 下一时间段结束时刻 ' 2011.08.1610:12:32'; S5: 计费单元生成第 2条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.16 09:00:00', 结束时刻为当前时间段结束时刻' 2011.08.16 10:12:32'; S3: The determining module determines that the start time of the next time period '2011.08.1609:00:00' is not equal to the end time of the next time period '2011.08.1610:12:32', then the start time of the next time period is assigned to the call start. At the moment, assigning the end time of the next time period to the call end time; S4: The division unit accesses the database, and enters the user number A, the call start time '2011.08.1609:00:00', and the call end time '2011.08.1610:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1609:00:00', current time period end time '2011.08.1610:12:32', next time period start time '2011.08.1610:12:32', the next time period ends Time '2011.08.1610:12:32'; S5: The billing unit generates the second bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.16 09:00: 00', the end time is the end time of the current time period ' 2011.08.16 10:12:32';
S6: 确定模块判断下一时间段开始时刻 '2011.08.1610:12:32'等于下一时间段结束 时刻' 2011.08.1610:12:32', 则话单生成完毕, 程序结束。 (四) 场景 4 通话起止日期跨 1天,通话开始时刻在时间段以内,如通话开始时刻为 '2011.08.15 16:10:10', 通话结束时刻为' 2011.08.1602:12:32', 在该场景下, 划分单元按照预定的 费率时间段将通话持续时间划分成一个或多个计费时间段的逻辑流程包括如下步骤: S6: The determining module determines the starting time of the next time period '2011.08.1610:12:32' is equal to the ending time of the next time period '2011.08.1610:12:32', then the CDR is generated and the program ends. (4) Scene 4 The start and end date of the call is 1 day, and the call start time is within the time limit. For example, the call start time is '2011.08.15 16:10:10', and the call end time is '2011.08.1602:12:32'. In this scenario, the logic of dividing the duration of the call into one or more charging periods according to the predetermined rate period includes the following steps:
S1: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1516:10:10'、 通话结束时刻 '2011.08.1602:12:32',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1516:10:10'、 当前时间段结束时刻 ' 2011.08.1517:00:00'、 下一时间段开始 时刻' 2011.08.1517:00:00'、 下一时间段结束时刻 ' 2011.08.1602:12:32'; S1: The division unit accesses the database, and enters the user number A, the call start time '2011.08.1516:10:10', and the call end time '2011.08.1602:12:32', and outputs the current time period rate 1 (offer), current Time period start time '2011.08.1516:10:10', current time period end time '2011.08.1517:00:00', next time period start time '2011.08.1517:00:00', the next time period ends Moment '2011.08.1602:12:32';
S2: 计费单元生成第 1条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.15 16:10:10', 结束时刻为当前时间段结束时刻' 2011.08.15 17:00:00'; S2: The billing unit generates the first bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.15 16:10:10', and the ending time is the current time period ending time. ' 2011.08.15 17:00:00';
S3: 确定模块判断下一时间段开始时刻 '2011.08.1517:00:00'不等于下一时间段结 束时刻 '2011.08.1602:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S3: The determining module determines that the start time of the next time period '2011.08.1517:00:00' is not equal to the end time of the next time period '2011.08.1602:12:32', then the start time of the next time period is assigned to the call start. At the moment, assigning the end time of the next time period to the call end time;
S4: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1517:00:00'、 通话结束时刻 '2011.08.1602:12:32',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1517:00:00'、 当前时间段结束时亥 I 2011.08.1602:12:32'、 下一时间段开 始时刻' 2011.08.1602:12:32'、 下一时间段结束时刻' 2011.08.1602:12:32'; S5: 计费单元生成第 2条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.15 17:00:00', 结束时刻为当前时间段结束时刻' 2011.08.16 02:12:32'; S4: The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1517:00:00', and the call end time '2011.08.1602:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1517:00:00', the current time period at the end of the time I 2011.08.1602:12:32', the next time period start time '2011.08.1602:12:32', the next time End of the period '2011.08.1602:12:32'; S5: The charging unit generates a second bill, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 17:00:00', and the ending time is the current time period ending time. ' 2011.08.16 02:12:32';
S6: 确定模块判断下一时间段开始时刻 '2011.08.1602:12:32'等于下一时间段结束 时刻' 2011.08.1602:12:32', 则话单生成完毕, 程序结束。 S6: The determining module determines the starting time of the next time period '2011.08.1602:12:32' is equal to the ending time of the next time period '2011.08.1602:12:32', then the CDR is generated and the program ends.
(五) 场景 5 通话起止日期跨多天,通话开始时刻在时间段以外,如通话开始时刻为' 2011.08.15 23:10:10', 通话结束时刻为' 2011.08.1701:12:32', 在该场景下, 划分单元按照预定的 费率时间段将通话持续时间划分成一个或多个计费时间段的逻辑流程包括如下步骤: S1: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1523:10:10'、 通话结束时刻 '2011.08.1701:12:32',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1523:10:10'、 当前时间段结束时刻' 2011.08.1609:00:00'、 下一时间段开 始时刻' 2011.08.1609:00:00'、 下一时间段结束时刻' 2011.08.1701:12:32'; (5) Scene 5 The call start and end date is more than one day, and the call start time is outside the time period. For example, the call start time is '2011.08.15 23:10:10', and the call end time is '2011.08.1701:12:32', In this scenario, the logic of dividing the duration of the call into one or more charging time segments according to the predetermined rate period includes the following steps: S1: The dividing unit accesses the database, and inputs the user number A and the call start time. '2011.08.1523:10:10', call end time '2011.08.1701:12:32', output current time period rate 0 (non-preferential), current time period start time '2011.08.1523:10:10', The current time period end time '2011.08.1609:00:00', the next time period start time '2011.08.1609:00:00', the next time period end time '2011.08.1701:12:32';
S2: 计费单元生成第 1条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.15 23:10:10', 结束时刻为当前时间段结束时刻' 2011.08.16 09:00:00'; S2: The charging unit generates the first CDR, wherein the rate is the current time period rate 0, and the starting time is the current time period starting time '2011.08.15 23:10:10', and the ending time is the current time period ending time ' 2011.08.16 09:00:00';
S3: 确定模块判断下一时间段开始时刻 '2011.08.1609:00:00'不等于下一时间段结 束时刻 '2011.08.1701:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S4: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1609:00:00'、 通话结束时刻 '2011.08.1701:12:32',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1609:00:00'、 当前时间段结束时刻 ' 2011.08.1612:00:00'、 下一时间段开始 时刻' 2011.08.1612:00:00'、 下一时间段结束时刻' 2011.08.1701:12:32'; S3: The determining module determines that the start time of the next time period '2011.08.1609:00:00' is not equal to the end time of the next time period '2011.08.1701:12:32', then the start time of the next time period is assigned to the call start. At the moment, the end time of the next time period is assigned to the call end time; S4: The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1609:00:00', and the call end time '2011.08.1701:12: 32', output the current time period rate 1 (offer), the current time period start time '2011.08.1609:00:00', the current time period end time '2011.08.1612:00:00', the next time period start time ' 2011.08.1612:00:00', the end of the next time period ' 2011.08.1701:12:32';
S5: 计费单元生成第 2条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.16 09:00:00', 结束时刻为当前时间段结束时刻' 2011.08.16 12:00:00'; S5: The charging unit generates a second bill, wherein the rate is the current time period rate 1, and the starting time is the current time period starting time '2011.08.16 09:00:00', and the ending time is the current time period ending time. ' 2011.08.16 12:00:00';
S6: 确定模块判断下一时间段开始时刻 '2011.08.1612:00:00'不等于下一时间段结 束时刻 '2011.08.1701:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S7: 划分单元访问数据库, 输入用户号码 A、通话开始时刻 '2011.08.1612:00:00'、 通话结束时刻 '2011.08.1701:12:32',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1612:00:00'、 当前时间段结束时刻 ' 2011.08.1615:00:00'、 下一时间段开 始时刻' 2011.08.1615:00:00'、 下一时间段结束时刻' 2011.08.1701:12:32'; S8: 计费单元生成第 3条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.16 12:00:00', 结束时刻为当前时间段结束时刻' 2011.08.16 15:00:00'; S6: The determining module determines that the starting time of the next time period '2011.08.1612:00:00' is not equal to the ending time of the next time period '2011.08.1701:12:32', then assigning the starting time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time; S7: The division unit accesses the database, and enters the user number A, the call start time '2011.08.1612:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1612:00:00', the current time period end time '2011.08.1615:00:00', the next time period start time '2011.08.1615:00:00', the next time period End time '2011.08.1701:12:32'; S8: The billing unit generates the third bill, where the rate is the current time period rate 0, and the starting time is the current time period start time ' 2011.08.16 12:00 :00', the end time is the end time of the current time period ' 2011.08.16 15:00:00';
S9: 确定模块判断下一时间段开始时刻 '2011.08.1615:00:00'不等于下一时间段结 束时刻 '2011.08.1701:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一时 间段结束时刻赋给通话结束时刻; S9: The determining module determines that the start time of the next time period '2011.08.1615:00:00' is not equal to the end time of the next time period '2011.08.1701:12:32', then assigns the start time of the next time period to the call start At the moment, assigning the end time of the next time period to the call end time;
S10:划分单元访问数据库,输入用户号码 A、通话开始时刻' 2011.08.1615:00:00'、 通话结束时刻 '2011.08.1701:12:32',输出当前时间段费率 1(优惠)、当前时间段开始时 刻' 2011.08.1615:00:00'、 当前时间段结束时刻 ' 2011.08.1617:00:00'、 下一时间段开始 时刻' 2011.08.1617:00:00'、 下一时间段结束时刻' 2011.08.1701:12:32'; S11: 计费单元生成第 4条话单, 其中费率为当前时间段费率 1, 开始时刻为当前 时间段开始时刻' 2011.08.16 15:00:00', 结束时刻为当前时间段结束时刻' 2011.08.16 17:00:00'; S10: The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1615:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 1 (offer), current The time period starting time '2011.08.1615:00:00', the current time period ending time '2011.08.1617:00:00', the next time period starting time '2011.08.1617:00:00', the next time period ends Time ' 2011.08.1701:12:32'; S11: The billing unit generates the fourth bill, where the rate is the current time period rate 1, and the starting time is the current time period start time ' 2011.08.16 15:00: 00', the end time is the end time of the current time period '2011.08.16 17:00:00';
S12: 确定模块判断下一时间段开始时刻' 2011.08.16 17:00:00'不等于下一时间段 结束时刻' 2011.08.1701:12:32', 则将下一时间段开始时刻赋给通话开始时刻, 将下一 时间段结束时刻赋给通话结束时刻; S12: The determining module determines that the starting time of the next time period '2011.08.16 17:00:00' is not equal to the ending time of the next time period '2011.08.1701:12:32', then assigning the starting time of the next time period to the call At the beginning time, the end time of the next time period is assigned to the call end time;
S13:划分单元访问数据库,输入用户号码 A、通话开始时刻' 2011.08.1617:00:00'、 通话结束时刻 '2011.08.1701:12:32',输出当前时间段费率 0(非优惠)、当前时间段开始 时刻' 2011.08.1617:00:00'、 当前时间段结束时亥 I 2011.08.1701:12:32'、 下一时间段开 始时刻' 2011.08.1701:12:32'、 下一时间段结束时刻' 2011.08.1701:12:32'; S14: 计费单元生成第 5条话单, 其中费率为当前时间段费率 0, 开始时刻为当前 时间段开始时刻' 2011.08.16 17:00:00', 结束时刻为当前时间段结束时刻' 2011.08.17 01:12:32'; S13: The division unit accesses the database, and inputs the user number A, the call start time '2011.08.1617:00:00', and the call end time '2011.08.1701:12:32', and outputs the current time period rate 0 (non-preferential), The current time period start time '2011.08.1617:00:00', the current time period at the end of the time I 2011.08.1701:12:32', the next time period start time '2011.08.1701:12:32', the next time End of the segment '2011.08.1701:12:32'; S14: The billing unit generates the fifth bill, where the rate is the current time period rate 0, and the starting time is the current time period start time ' 2011.08.16 17: 00:00', the end time is the end time of the current time period ' 2011.08.17 01:12:32';
S15: 确定模块判断下一时间段开始时刻' 2011.08.17 01:12:32'等于下一时间段结 束时刻 '2011.08.1701:12:32', 则话单生成完毕, 程序结束。 当然, 上述按时间段计费的 5种场景只是优选的示例, 本发明不仅限于此, 除上 述以外的多种场景, 本发明可以实现准确有效地按时间段计费, 提高按时间段计费的 精确度, 提高客户满意度, 在此不再赘述。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 S15: The determining module determines that the starting time of the next time period '2011.08.17 01:12:32' is equal to the ending time of the next time period '2011.08.1701:12:32', then the CDR is generated and the program ends. Of course, the above five scenarios for charging by time period are only preferred examples, and the present invention is not limited thereto. In addition to the above various scenarios, the present invention can accurately and efficiently charge by time period, and improve billing by time period. The accuracy of the customer, to improve customer satisfaction, will not repeat them here. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

1. 一种用于呼叫业务的计费方法, 包括: 1. A charging method for a call service, comprising:
获取呼叫业务所对应的通话持续时间;  Obtain the duration of the call corresponding to the call service;
按照预定的费率时间段将所述通话持续时间划分成一个或多个计费时间 段;  Dividing the duration of the call into one or more billing periods according to a predetermined rate period;
根据每个所述计费时间段以及每个所述计费时间段对应的费率计算所述呼 叫业务的费用。  The fee of the call service is calculated according to each of the charging period and a rate corresponding to each of the charging periods.
2. 根据权利要求 1所述的方法, 其中, 按照预定的费率时间段将所述通话持续时 间划分成一个或多个计费时间段的步骤包括: 2. The method according to claim 1, wherein the step of dividing the call duration into one or more billing periods according to a predetermined rate period comprises:
将所述通话持续时间中与所述预定的费率时间段重合的部分划分成第一计 费时间段;  Dividing a portion of the call duration that coincides with the predetermined rate period into a first billing period;
将所述通话持续时间中与所述预定的费率时间段不重合的部分划分成第二 计费时间段。  A portion of the call duration that does not coincide with the predetermined rate period is divided into a second billing period.
3. 根据权利要求 2所述的方法, 其中, 将所述通话持续时间中与所述预定的费率 时间段重合的部分划分成第一计费时间段的步骤包括: 3. The method according to claim 2, wherein the step of dividing the portion of the call duration that coincides with the predetermined rate period into the first billing period comprises:
将所述通话持续时间中与每个所述预定的费率时间段重合的部分分别记录 为一个第一计费时间段。  The portion of the call duration that coincides with each of the predetermined rate periods is recorded as a first billing period.
4. 根据权利要求 3所述的方法, 其中, 每个所述第一计费时间段对应的费率都相 同, 或者, 所有所述第一计费时间段中至少有两个所述第一计费时间段对应的 费率相同。 The method according to claim 3, wherein each of the first charging time periods has the same rate, or at least two of the first charging time periods are the first ones. The rates corresponding to the billing period are the same.
5. 根据权利要求 1所述的方法, 其中, 获取呼叫业务所对应的通话持续时间的步 骤包括: 5. The method according to claim 1, wherein the step of obtaining a call duration corresponding to the call service comprises:
获取呼叫业务所对应的通话开始时刻以及通话结束时刻。  Obtain the call start time and call end time corresponding to the call service.
6. 根据权利要求 5所述的方法, 其中, 通过以下步骤来确定所述通话持续时间中 与所述预定的费率时间段重合的部分: 6. The method according to claim 5, wherein the portion of the call duration that coincides with the predetermined rate period is determined by the following steps:
令当前时刻为所述通话开始时刻, 并从所述通话开始时刻开始执行以下步 骤直到所述通话结束时刻: 判断所述当前时刻是否落入所述预定的费率时间段 中, 若落入, 则将所述当前时刻确定为所述通话持续时间中与所述预定的费率 时间段重合的部分; 将下一时刻设置为所述当前时刻。 一种用于呼叫业务的计费装置, 包括: Determining that the current time is the call start time, and performing the following steps from the call start time to the call end time: determining whether the current time falls within the predetermined rate time period If the user falls, the current time is determined as a portion of the call duration that coincides with the predetermined rate time period; and the next time is set as the current time. A charging device for a call service, comprising:
获取单元, 设置为获取呼叫业务所对应的通话持续时间;  The obtaining unit is set to obtain a call duration corresponding to the call service;
划分单元, 设置为按照预定的费率时间段将所述通话持续时间划分成一个 或多个计费时间段;  a dividing unit, configured to divide the call duration into one or more charging time periods according to a predetermined rate time period;
计费单元, 设置为根据每个所述计费时间段以及每个所述计费时间段对应 的费率计算所述呼叫业务的费用。 根据权利要求 7所述的装置, 其中, 所述划分单元包括: 第一划分模块, 设置为将所述通话持续时间中与所述预定的费率时间段重 合的部分划分成第一计费时间段;  The charging unit is configured to calculate a fee of the call service according to each of the charging period and a rate corresponding to each charging period. The apparatus according to claim 7, wherein the dividing unit comprises: a first dividing module, configured to divide a portion of the call duration that coincides with the predetermined rate period into a first billing time Paragraph
第二划分模块, 设置为将所述通话持续时间中与所述预定的费率时间段不 重合的部分划分成第二计费时间段。 根据权利要求 8所述的装置, 其中, 所述第一划分模块包括:  And a second dividing module, configured to divide a portion of the call duration that does not coincide with the predetermined rate period into a second billing period. The device according to claim 8, wherein the first dividing module comprises:
记录子模块, 设置为将所述通话持续时间中与每个所述预定的费率时间段 重合的部分分别记录为一个第一计费时间段, 其中, 每个所述第一计费时间段 对应的费率都相同, 或者, 所有所述第一计费时间段中至少有两个所述第一计 费时间段对应的费率相同。 根据权利要求 8或 9所述的装置, 其中, 所述划分单元还包括: 确定模块, 设置为令当前时刻为所述通话持续时间的通话开始时刻, 并从 所述通话开始时刻开始执行以下步骤直到所述通话持续时间的通话结束时刻: 判断所述当前时刻是否落入所述预定的费率时间段中, 若落入, 则将所述当前 时刻确定为所述通话持续时间中与所述预定的费率时间段重合的部分; 将下一 时刻设置为所述当前时刻。  a recording sub-module, configured to record, respectively, a portion of the call duration that coincides with each of the predetermined rate time periods as a first charging time period, where each of the first charging time periods The corresponding rates are the same, or the rate corresponding to at least two of the first charging periods in all the first charging periods is the same. The device according to claim 8 or 9, wherein the dividing unit further comprises: a determining module, configured to make the current time a call start time of the call duration, and perform the following steps from the call start time a call end time of the call duration: determining whether the current time falls within the predetermined rate time period, and if it falls, determining the current time as the call duration and the a portion of the predetermined rate period coincident; the next moment is set to the current time.
PCT/CN2011/082871 2011-10-18 2011-11-24 Billing method and device for call service WO2012155486A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110316332.7 2011-10-18
CN201110316332.7A CN102377892B (en) 2011-10-18 Charging method and device for call business

Publications (1)

Publication Number Publication Date
WO2012155486A1 true WO2012155486A1 (en) 2012-11-22

Family

ID=45795825

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/082871 WO2012155486A1 (en) 2011-10-18 2011-11-24 Billing method and device for call service

Country Status (1)

Country Link
WO (1) WO2012155486A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437352A (en) * 2002-02-04 2003-08-20 华为技术有限公司 Data flow quantity statistical method
CN1553693A (en) * 2003-05-26 2004-12-08 华为技术有限公司 Universal charging method
CN101222559A (en) * 2008-01-23 2008-07-16 中兴通讯股份有限公司 Service charging method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437352A (en) * 2002-02-04 2003-08-20 华为技术有限公司 Data flow quantity statistical method
CN1553693A (en) * 2003-05-26 2004-12-08 华为技术有限公司 Universal charging method
CN101222559A (en) * 2008-01-23 2008-07-16 中兴通讯股份有限公司 Service charging method and system

Also Published As

Publication number Publication date
CN102377892A (en) 2012-03-14

Similar Documents

Publication Publication Date Title
US8903062B2 (en) Telecommunications least cost routing system
US11234116B2 (en) Distributed ledger system for management and implementation of exchanges of wireless services between wireless service providers
US20150024709A1 (en) Method and server for sharing data traffic
US20150271342A1 (en) Network resource allocation in communication networks
US11546740B2 (en) Routing of toll-free numbers and text messages using a toll-free exchange
US9807249B2 (en) Routing of toll-free numbers using a toll-free exchange
JP7226858B2 (en) Method and device for providing roaming service using blockchain
CN110417561B (en) Block chain-based distributed charging method, device and system
JP2018521524A (en) Method and system for generating call detail records for billing systems
US8929858B1 (en) Banded billing system for telecommunication service
US8532275B2 (en) Cloud-based virtual tandem
US9350879B2 (en) Method and system for dual-network telephone calling
WO2012155486A1 (en) Billing method and device for call service
CN108668244B (en) Service processing method, device and storage medium
US8838487B1 (en) Maintaining a common identifier for a user session on a communication network
US8155291B2 (en) Payment system for paying peering partners in a peering arrangement
CN1240204C (en) Billing method in electronic switch in a cellular network
US8903356B1 (en) Method and system for suggesting individual payments for a common billing account
JP2001036673A (en) Method and system for reporting optimal charge plan
JP2022518621A (en) How to provide neutral network services using blockchain and systems and equipment for that purpose
KR102426378B1 (en) Apparatus and method for charging for communicating service
WO2017147836A1 (en) Charging method and system based on base station
TWM612822U (en) Collection device of telecommunication service fee
JP2000115415A (en) Charging system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865657

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11865657

Country of ref document: EP

Kind code of ref document: A1