Charging anomaly processing method and related device

By detecting the target CHF entity interaction exception and performing exception charging processing, the problem of abnormal CHF entity abnormality is solved, and the billing cannot be performed normally due to abnormality of the main CHF entity or R-CHF entity is achieved, and the stability and normality of the billing processing are achieved sex.

WO2025036097A1PCT designated stage expired Publication Date: 2025-02-20HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106741
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-17
Filing Date
2024-07-22
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

In 5G architecture, when the main CHF entity or R-CHF entity is abnormal, the billing cannot be carried out normally.

Method used

When the interaction exception of the target CHF entity (main CHF entity or second R-CHF entity) is detected by the first R-CHF entity, an exception charging process is performed. Specific measures include generating billing resources, caching billing information, sending response messages, and sending updates or release requests when the target CHF entity interacts normally.

Benefits of technology

Avoid billing cannot be carried out normally due to abnormalities in the main CHF entity or R-CHF entity, and ensure the stability and normality of billing processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106741_20022025_PF_FP_ABST
    Figure CN2024106741_20022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of charging, and in particular to a charging anomaly processing method and a related device. The method comprises: a first R-CHF entity receives a first charging request sent by a CTF entity, and when detecting that an interaction with a target CHF entity related to the first charging request is abnormal, executes processing of abnormal charging. The target CHF entity is a main CHF entity or a second R-CHF entity. The main CHF entity provides on-line quota management and charging record generation. The second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity serves as a relay CHF entity. When the main CHF entity is abnormal or the second R-CHF entity is abnormal, processing of abnormal charging is executed by means of the first R-CHF entity, thereby avoiding the situation where charging cannot be carried out normally.
Need to check novelty before this filing date? Find Prior Art

Description

Billing exception processing method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 17, 2023, with application number 202311045351.X and invention name “Billing exception processing method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of billing, and in particular to a method for handling billing anomalies and related equipment. Background Art

[0003] In the 5G architecture, the billing architecture adopts a fusion architecture of online billing and offline one-time event billing, as shown in Figure 1: The converged charging system (CCS) is a billing system that integrates online billing and offline one-time event billing. It is connected to the charging trigger function (CTF) entity through the Nchf interface. The CCS receives the billing request sent by the CTF entity, which includes the CTF's quota application information and usage information collected by the CTF. Based on the billing request and relevant information about the user's service, such as user type, customer information, account balance, service whitelist / blacklist, account balance change trend, and remaining validity period of the package, the CCS performs billing processing and sends the billing processing results to the CTF entity so that the CTF entity can adjust the billing operation for the user's service.

[0004] CCS includes the charging function (CHF) entity, the account balance management function (ABMF) entity, the charging gateway function (CGF) entity and the rating function (RF) entity.

[0005] The CHF entity includes an online charging function (OCF) and a charging data function (CDF). The CDF receives charging information from the CTF or CEF entities via the Nchf interface, generates CDRs, and transmits them to the CGF entity. The CGF entity ultimately creates charging data record (CDR) files and forwards them to the relevant processing equipment in the billing domain. The OCF function serves as the quota control node for online charging, providing quota management and executing online charging quota processing for various user services. The RF entity is responsible for pricing the charging information provided by the OCF entity. The RF can handle various billing types, such as data volume billing, session / connection time billing, and service event billing. The CGF entity receives CDRs from the CHF entity and performs functions such as call record sorting, merging, filtering, decoding, routing, and distribution. It then transmits the call records to the billing domain via the Bx interface.

[0006] In a charging system including a CTF entity, an R-CHF entity and a main CHF entity, if the main CHF entity or the relay CHF (relay RCH, R-CHF) entity is abnormal, charging may not be performed normally.

[0007] Summary of the Invention

[0008] The embodiment of the present application provides a billing exception method and related devices. The embodiment of the present application can avoid the situation where billing cannot be performed normally due to an abnormality of the main CHF entity or the R-CHF entity.

[0009] In a first aspect, an embodiment of the present application provides a method. The method is applied to a first R-CHF entity. The method includes:

[0010] The first R-CHF entity receives the first charging request sent by the CTF entity, detects that the target CHF entity interaction related to the first charging request is abnormal, and performs abnormal charging processing.

[0011] The target CHF entity is a primary CHF entity or a secondary R-CHF entity. The primary CHF entity provides online quota management and billing record generation. The secondary R-CHF entity is a CHF entity that provides relay between the CTF entity and the primary CHF entity before the first R-CHF entity acts as a relay CHF entity.

[0012] When the main CHF entity or the second R-CHF entity is abnormal, the first R-CHF entity performs abnormal billing processing, thereby preventing billing from failing to proceed normally.

[0013] With reference to the first aspect, in one possible implementation, the target CHF entity is a primary CHF entity, the first charging request is a first charging resource creation request, and is used to request creation of a first charging resource for charging interaction between the CTF entity and the first R-CHF entity. The first R-CHF entity performs abnormal charging processing, including:

[0014] The first R-CHF entity generates a first billing resource for a billing interaction between the CTF entity and the first R-CHF entity; the first R-CHF entity caches the billing information in the first billing request; and the first R-CHF entity sends a first billing response message to the CTF entity in response to the first billing request, where the first billing response message includes an identifier of the first billing resource.

[0015] It should be noted that the charging information buffered by the first R-CHF entity is the charging information that needs to be provided to the main CHF entity.

[0016] By sending the first charging response message to the CTF entity, the CTF entity is informed that the session with the first R-CHF entity has been established.

[0017] In combination with the first aspect, in one possible implementation, the first charging request includes a quota request, and the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0018] The quota suspension indication information or the granted quota is sent to the CTF entity so that the billing process proceeds normally.

[0019] In combination with the first aspect, in one possible implementation, the first charging response message includes the granted quota, and the CTF entity receives usage of the granted quota, and the cached charging information includes a quota suspension identifier corresponding to the usage of the granted quota.

[0020] With reference to the first aspect, in one possible implementation, the first R-CHF entity caches the charging information in the first charging request, including:

[0021] The first R-CHF entity writes the charging information in the first charging request into the first R-CHF call record or saves it in the first charging resource.

[0022] In conjunction with the first aspect, in one possible implementation, caching the billing information in the first billing request includes:

[0023] The charging information in the first charging request is written into the first R-CHF bill or stored in the first charging resource.

[0024] By caching the charging information, it is convenient to provide the charging information to the main CHF entity after the interaction with the main CHF entity is normal, thereby realizing normal charging.

[0025] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0026] When it is detected that the interaction with the target CHF entity related to the first charging request is normal, a second charging request is sent to the primary CHF entity, where the second charging request is a second charging resource creation request, used to request the creation of a second charging resource for the charging interaction between the first R-CHF entity and the primary CHF entity, or the second charging request is a third charging resource update or release request, used to request the update or release of the third charging resource between the CTF entity and the primary CHF entity.

[0027] With reference to the first aspect, in one possible implementation, the second charging request carries cached charging information.

[0028] In one example, the cached billing information includes the billing information in the first billing request. In another example, the cached billing information includes the billing information in the first billing request and a corresponding quota suspension indicator.

[0029] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0030] When it is detected that the target CHF entity related to the first charging request interacts normally, a first R-CHF call record is sent to the primary CHF entity. Here, the target CHF entity related to the first charging request is the primary CHF entity.

[0031] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0032] Before generating the second charging request, a notification message is sent to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; a third charging request is received from the CTF entity, where the third charging request carries the quota request and usage for resuming quota management; and the second charging request includes the quota request and usage carried in the third charging request.

[0033] It should be noted that the usage here refers to the usage of the pending quota or the usage of the granted quota.

[0034] With reference to the first aspect, in one possible implementation, the target CHF is a primary CHF entity corresponding to the first charging request, the first charging request is a second charging resource update request or a second charging resource release request, and is used to request an update or release of a second charging resource for a charging interaction between the first R-CHF entity and the CTF entity. The first R-CHF entity performs abnormal charging processing, including:

[0035] caching the billing information of the first billing request; and sending a first billing response message in response to the first billing request to the CTF entity.

[0036] In combination with the first aspect, in one possible implementation, if the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0037] In combination with the first aspect, in one possible implementation, the cached billing information includes first billing information and a corresponding quota consumption identifier, or second billing information and a corresponding quota suspension identifier, the first billing information is the billing information that uses the available quota granted by the primary CHF entity, and the second part of the billing information is the billing information that does not use the available quota granted by the primary CHF entity.

[0038] In conjunction with the first aspect, in one possible implementation, caching the billing information of the first billing request includes:

[0039] The first billing information and the corresponding consumption quota identifier, or the second billing information and the corresponding quota suspension identifier are written into the first R-CHF call record or saved in the first billing resource.

[0040] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0041] When it is detected that the target CHF interaction related to the first charging request is normal, a second charging request is sent to the main CHF entity. The second charging request is a second charging resource update request or a second charging resource release request, which is used to request to update or release the second charging resource of the charging interaction between the first R-CHF entity and the main CHF entity.

[0042] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0043] When it is detected that the target CHF interaction related to the first charging request is normal, a first R-CHF call record is sent to the primary CHF entity.

[0044] In combination with the first aspect, in one possible implementation, if the billing information and the corresponding quota suspension identifier are stored in the first billing resource, the second billing request carries the billing information and the corresponding quota suspension identifier or quota consumption identifier.

[0045] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0046] Before generating the second charging request, a notification message is sent to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; a third charging request is received from the CTF entity, where the third charging request carries the quota request and usage for resuming quota management; and the second charging request includes the quota request and usage carried in the third charging request.

[0047] It should be noted that the usage here refers to the usage of the pending quota or the usage of the granted quota.

[0048] In conjunction with the first aspect, in one possible implementation, the target CHF entity is a primary CHF entity corresponding to a first charging request, the first charging request is a one-time event charging request for online direct deduction or offline one-time event charging, and abnormal charging processing is performed, including:

[0049] caching the billing information of the first billing request; and sending a first billing response message in response to the first billing request to the CTF entity.

[0050] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0051] Writing the billing information and the corresponding online direct deduction indication information or offline one-time event billing indication information into the first R-CHF call record;

[0052] When it is detected that the target CHF interaction related to the first charging request is normal, a first R-CHF call record is sent to the primary CHF entity.

[0053] In conjunction with the first aspect, in one possible implementation, the method of this embodiment further includes:

[0054] Saving the billing information of the first billing request and the corresponding online direct deduction indication information or offline one-time event billing indication information in the first billing resource;

[0055] When it is detected that the target CHF interaction related to the first billing request is normal, a second billing request is sent to the main CHF entity. The second billing request is a one-time event billing request. The second billing request carries billing information and corresponding online direct deduction indication information or offline one-time event billing indication information.

[0056] With reference to the first aspect, in one possible implementation, the target CHF entity is a second R-CHF entity, and the second R-CHF entity is a CHF entity that provides relay for the CTF entity and the primary CHF entity before the first R-CHF entity; the first charging request is a first charging resource update request or a first charging resource release request, which is used to request update or release of a first charging resource for charging interaction between the second R-CHF entity and the CTF entity; and performing abnormal charging processing includes:

[0057] generating a fourth billing resource between the CTF entity and the first R-CHF entity according to the first billing request, and using the first billing resource identifier as the identifier of the fourth billing resource; generating a second billing request according to the first billing request, and sending the second billing request to the primary CHF entity, the second billing request being used to request creation of a second billing resource for billing interaction between the first R-CHF entity and the primary CHF entity, and the second billing request carrying the identifier of the third billing resource; receiving a second billing response message from the primary CHF entity in response to the second billing request, the second billing response message carrying the identifier of the second billing resource; generating a first billing response message for responding to the first billing request according to the second billing response message; and sending the first billing response message to the CTF entity.

[0058] In a second aspect, embodiments of the present application provide another method for handling billing exceptions. The method is applied to a primary CHF entity. The primary CHF entity provides online quota management and billing call record generation. The method includes:

[0059] Receive relevant billing information cached by the first R-CHF entity, where the cached relevant billing information is carried in a billing call record or a billing message, and the cached relevant billing information includes billing information and a corresponding quota suspension identifier or quota consumption identifier; and perform billing processing according to the quota suspension identifier or the quota consumption identifier.

[0060] In conjunction with the second aspect, in one possible implementation, performing billing processing based on the quota suspension identifier or the quota consumption identifier includes:

[0061] The service usage in the billing information is directly deducted from the corresponding account balance in the billing resource of the main CHF entity;

[0062] The method of this embodiment further includes:

[0063] If the cached billing information has a corresponding quota consumption identifier, the service usage in the billing information is directly deducted from the corresponding account of the first billing resource, and the locked account balance is released at the same time; or, if the cached billing information includes billing information without quota management, the billing information without quota management is written into the main CHF call record.

[0064] In a third aspect, an embodiment of the present application provides a first R-CHF entity, which includes a transceiver unit and a processing unit.

[0065] a transceiver unit, configured to receive a first charging request sent by a CTF entity,

[0066] a processing unit, configured to detect an abnormal interaction with a target CHF entity related to the first charging request and perform abnormal charging processing;

[0067] The target CHF entity is the main CHF entity or the second R-CHF entity. The main CHF entity provides online quota management and billing call record generation. The second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

[0068] In conjunction with the third aspect, in one possible implementation, the target CHF entity is a primary CHF entity corresponding to the first charging request, the first charging request is a charging resource creation request for establishing a convergent charging session, and is used to request establishment of a charging interaction session between the CTF entity and the first R-CHF entity. The processing unit is specifically configured to:

[0069] Generate a first charging resource for charging interaction between the CTF entity and the first R-CHF entity; cache charging information in the first charging request;

[0070] The transceiver unit is further configured to send a first charging response message for responding to the first charging request to the CTF entity, where the first charging response message includes an identifier of the first charging resource.

[0071] In combination with the third aspect, in one possible implementation, if the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0072] In combination with the third aspect, in one possible implementation, the first billing response message includes the granted quota, and the CTF entity receives usage of the granted quota, and the cached billing information includes a quota suspension identifier corresponding to the usage of the granted quota.

[0073] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information in the first billing request, the processing unit is specifically configured to:

[0074] The charging information in the first charging request is written into the first R-CHF bill or stored in the first charging resource.

[0075] In conjunction with the third aspect, in one possible implementation, the transceiver unit is further configured to:

[0076] When it is detected that the target CHF entity interaction related to the first charging request is normal, a second charging request is sent to the primary CHF entity, where the second charging request is a second charging resource creation request, used to request the creation of a second charging resource for the charging interaction between the first R-CHF entity and the primary CHF entity, or the second charging request is a third charging resource update or release request, used to request the update or release of the third charging resource for the charging interaction between the CTF and the primary CHF entity.

[0077] In conjunction with the third aspect, in one possible implementation, the second billing request carries cached billing information.

[0078] Optionally, the cached billing information includes billing information, or includes billing information and a corresponding quota suspension identifier.

[0079] In conjunction with the third aspect, in one possible implementation, the transceiver unit is further configured to:

[0080] When the processing unit detects that the target CHF entity related to the first charging request interacts normally, the processing unit sends a first R-CHF call record to the primary CHF entity. Here, the target CHF entity related to the first charging request is the primary CHF entity.

[0081] In conjunction with the third aspect, in a possible implementation,

[0082] The transceiver unit is further used to send a notification message to the CTF entity before generating the second billing request, where the notification message is used to instruct the CTF entity to restore quota management; receive a third billing request sent by the CTF entity, where the third billing request carries a quota request and usage for resuming quota management; and the second billing request includes the quota request and usage carried by the third billing request.

[0083] In conjunction with the third aspect, in one possible implementation, the target CHF is a primary CHF entity corresponding to the first charging request, the first charging request is a first charging resource update request or a first charging resource release request, used to request updating or releasing a first charging resource for a charging interaction between a first R-CHF entity and a CTF entity, and the processing unit is specifically configured to: cache charging information for the first charging request;

[0084] The transceiver unit is further configured to send a first charging response message in response to the first charging request to the CTF entity.

[0085] In combination with the third aspect, in one possible implementation, if the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0086] In conjunction with the third aspect, in one possible implementation, the cached billing information includes first billing information and a corresponding quota consumption identifier, or second billing information and a corresponding quota suspension identifier, the first billing information is the billing information in which the available quota granted by the primary CHF entity is used, and the second billing information is the billing information in which the available quota granted by the primary CHF entity is not used.

[0087] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information of the first billing request, the processing unit is further configured to:

[0088] The first billing information and the corresponding quota consumption identifier, or the second billing information and the corresponding quota suspension identifier are written into the first R-CHF call record or saved in the first billing resource.

[0089] In conjunction with the third aspect, in one possible implementation, the transceiver unit is further configured to:

[0090] When it is detected that the target CHF interaction related to the first charging request is normal, a second charging request is sent to the primary CHF entity. The second charging request is a second charging resource update request or a second charging resource release request, which is used to request to update or release the second charging resource of the charging interaction between the first R-CHF entity and the primary CHF entity.

[0091] In conjunction with the third aspect, in one possible implementation, the transceiver unit is further configured to:

[0092] When the processing unit detects that the target CHF interaction related to the first charging request is normal, the processing unit sends a first R-CHF call record to the primary CHF entity.

[0093] In conjunction with the third aspect, in one possible implementation, the second billing request carries billing information and a corresponding quota suspension identifier or quota consumption identifier.

[0094] In conjunction with the third aspect, in one possible implementation, the transceiver unit is further configured to:

[0095] Before generating the second charging request, a notification message is sent to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; a third charging request is received from the CTF entity, where the third charging request carries the quota request and usage for resuming quota management; and the second charging request includes the quota request and usage carried in the third charging request.

[0096] In conjunction with the third aspect, in one possible implementation, the target CHF entity is a primary CHF entity corresponding to the first billing request, the first billing request is a one-time event billing request for online direct deduction or offline one-time event billing, and the processing unit is further configured to: cache billing information of the first billing request;

[0097] The transceiver unit is further configured to send a first charging response message in response to the first charging request to the CTF entity.

[0098] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information of the first billing request, the processing unit is specifically configured to: write the billing information and corresponding online direct deduction indication information or offline one-time event billing indication information into the first R-CHF call record;

[0099] The transceiver unit is further configured to send a first R-CHF call record to the primary CHF entity when detecting that the target CHF interaction related to the first charging request is normal.

[0100] In conjunction with the third aspect, in one possible implementation, the processing unit is specifically configured to:

[0101] Saving the billing information of the first billing request and the corresponding online direct deduction indication information or offline one-time event billing indication information in the first billing resource;

[0102] When it is detected that the target CHF interaction related to the first billing request is normal, a second billing request is generated. The second billing request is a one-time event billing request. The second billing request carries billing information and corresponding online direct deduction indication information or offline one-time event billing indication information;

[0103] The transceiver unit is further configured to send a second charging request to the primary CHF entity.

[0104] In conjunction with the third aspect, in one possible implementation, the target CHF entity is a second R-CHF entity, the first charging request is a first charging resource update request or a first charging resource release request, used to request updating or releasing a first charging resource for charging interaction between the second R-CHF entity and the CTF entity; and the processing unit is specifically configured to:

[0105] generating, based on the first charging request, a fourth charging resource between the CTF entity and the first R-CHF entity, and using the first charging resource identifier as an identifier of the fourth charging resource; generating, based on the first charging request, a second charging request, wherein the second charging request is used to request creation of a second charging resource for a charging interaction between the first R-CHF entity and the primary CHF entity, and the second charging request carries an identifier of the third charging resource;

[0106] The transceiver unit is further configured to send a second charging request to the primary CHF entity and receive a second charging response message from the primary CHF entity in response to the second charging request; the second charging response message carries an identifier of the second charging resource;

[0107] The processing unit is further configured to generate a first accounting response message for responding to the first accounting request based on the second accounting response message;

[0108] The transceiver unit is further configured to send a first charging response message to the CTF entity.

[0109] In a fourth aspect, an embodiment of the present application provides a main CHF entity, including a transceiver unit and a processing unit. The main CHF entity provides online quota management and billing record generation.

[0110] The transceiver unit is further configured to receive relevant billing information cached by the first R-CHF entity, where the cached relevant billing information is carried in a billing call record or a billing message, and the cached relevant billing information includes billing information and a corresponding quota suspension identifier or quota consumption identifier;

[0111] The processing unit is used to perform billing processing according to the quota suspension identifier or the quota consumption identifier.

[0112] In conjunction with the fourth aspect, in one possible implementation, the processing unit is specifically configured to:

[0113] The service usage in the billing information is directly deducted from the corresponding account balance in the billing resource of the main CHF entity;

[0114] If the cached billing information has a corresponding quota consumption identifier, the service usage in the billing information is directly deducted from the corresponding account of the first billing resource, and the locked account balance is released at the same time; or,

[0115] If the cached billing information includes billing information without quota management, the billing information without quota management is written into the main CHF call record.

[0116] In a fifth aspect, embodiments of the present application provide a first R-CHF entity, comprising a processor and a memory. The memory is configured to store program code. The processor is configured to invoke the program code stored in the memory to execute the method provided in the first aspect or any possible implementation of the first aspect.

[0117] In a sixth aspect, embodiments of the present application provide a master CHF entity, comprising a processor and a memory. The memory is configured to store program code. The processor is configured to invoke the program code stored in the memory to execute the method provided in the second aspect or any possible implementation of the second aspect.

[0118] In the seventh aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the method provided in any possible implementation of the first aspect, or the method provided in any possible implementation of the second aspect.

[0119] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the method provided in any possible implementation of the first aspect, or the method provided in any possible implementation of the second aspect.

[0120] In a ninth aspect, an embodiment of the present application provides a method for handling billing exceptions, the method being applied to a billing system, the billing system including a first R-CHF entity, a second R-CHF entity, a CTF entity, and a primary CHF entity, the method comprising:

[0121] The CTF entity sends a first charging request to the first R-CHF entity;

[0122] The first R-CHF entity determines that the target CHF entity interaction related to the first charging request is abnormal, and performs abnormal charging processing;

[0123] The target CHF entity is the main CHF entity or the second R-CHF entity. The main CHF entity provides online quota management and billing call record generation. The second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

[0124] In a tenth aspect, an embodiment of the present application provides a billing system, the billing system including a first R-CHF entity, a second R-CHF entity, a CTF entity and a main CHF entity.

[0125] The CTF entity is configured to send a first charging request to the first R-CHF entity;

[0126] The first R-CHF entity is configured to determine that interaction with a target CHF entity related to the first charging request is abnormal, and perform abnormal charging processing;

[0127] The target CHF entity is the main CHF entity or the second R-CHF entity. The main CHF entity provides online quota management and billing call record generation. The second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

[0128] It is understood that the detailed description of the CTF entity, the first R-CHF entity, and the master CHF entity described in the ninth or tenth aspects can be found in the method described in any one of the first and second aspects, and will not be repeated here. The first R-CHF entity described in the third or fifth aspects is used to perform any of the methods provided in the first aspect, the master CHF entity described in the fourth or sixth aspects is used to perform any of the methods provided in the second aspect, and the computer storage medium described in the seventh aspect and the computer program product described in the eighth aspect are both used to implement any of the methods provided in the first or second aspects. Therefore, the beneficial effects that can be achieved can be referenced to the beneficial effects of the corresponding methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0129] Figure 1 is a schematic diagram of a system architecture;

[0130] FIG2 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0131] FIG3 is a flow chart of a method for handling billing exceptions according to an embodiment of the present application;

[0132] FIG4 is a flow chart of another method for handling billing exceptions provided in an embodiment of the present application;

[0133] FIG5 is a schematic diagram of an interactive flow of a method for handling billing exceptions provided in an embodiment of the present application;

[0134] FIG6 is a schematic diagram of an interactive flow of another method for handling billing exceptions provided in an embodiment of the present application;

[0135] FIG7 is a schematic diagram of an interactive flow of another method for handling billing exceptions provided in an embodiment of the present application;

[0136] FIG8 is a schematic diagram of an interactive flow of another method for handling billing exceptions provided in an embodiment of the present application;

[0137] FIG9 is a schematic diagram of an interactive flow of another method for handling billing exceptions provided in an embodiment of the present application;

[0138] FIG10 is a schematic structural diagram of a first R-CHF entity provided in an embodiment of the present application;

[0139] FIG11 is a schematic structural diagram of a main CHF entity provided in an embodiment of the present application;

[0140] FIG12 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0141] The terms "first", "second", "third" and "fourth" in the specification, claims and drawings of this application are used to distinguish different objects rather than to describe a specific order.

[0142] "Multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating the existence of three relationships. For example, "A and / or B" means: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0143] The embodiments of the present application are described below with reference to the accompanying drawings.

[0144] 2 is a schematic diagram of a system architecture provided by an embodiment of the present application. As shown in FIG2 , the system includes a CTF entity 201 , an R-CHF entity 202 , a main CHF entity 203 , an ABMF entity 204 , a CGF entity 205 and an RF entity 206 .

[0145] Optionally, the relay R-CHF is a local CHF, an edge CHF, or a service CHF.

[0146] The CHF entity that provides online quota management and / or billing records for a particular user device is called the primary CHF entity 203 for that user device. The primary CHF entity 203 interfaces with the ABMF entity 204, RF entity 206, and CGF entity 205 to perform quota management, call record generation, and account balance management. Based on the user device's subscription information, the primary CHF entity 203 interfaces with the CRM, recharge center, billing capability provisioning system, and accounting system to manage the user device's account and subscription information. The primary CHF entity 203 remains unchanged regardless of the user device's location.

[0147] For a user device, if the service used by the user exceeds the processing scope of the primary CHF entity 203 of the user device, the primary CHF entity 203 cannot provide billing. The R-CHF entity generates a first billing resource for the CTF entity, establishes and maintains an association between a second billing resource generated by the primary CHF entity and the first billing resource, and uses the first and second billing resources to enable the primary CHF entity to bill for the services provided by the CTF entity. R-CHF entity 202 is a CHF entity located close to the user device and provides billing for the user device. R-CHF entity 202 and primary CHF entity 203 may belong to the same operator or different operators. The R-CHF entity 202 may change as the user moves or changes in the services the user accesses.

[0148] In one example, the functions of the R-CHF entity 202 include, but are not limited to, discovery of the primary CHF entity 203, forwarding of billing information, generation of R-CHF billing records, and the ability to handle abnormal billing when the primary CHF entity 203 is abnormal, such as abnormal billing handling when the primary CHF entity 203 is congested, unreachable, or when communication quality with the primary CHF entity 203 degrades (e.g., increased transmission delay or jitter). The R-CHF entity 202 implements abnormality perception and abnormal billing handling through a series of methods (e.g., billing retransmission, billing information caching, billing method conversion, congestion control, abnormality recovery, and billing information processing during abnormal periods). Furthermore, the R-CHF entity after switching provides abnormal billing handling capabilities when the original R-CHF entity is abnormal.

[0149] The implementation process of this application is described in detail below.

[0150] Referring to FIG. 3 , FIG. 3 is a flow chart illustrating a method for handling billing exceptions provided in an embodiment of the present application. The method is applied to a first R-CHF entity. The first R-CHF entity may be R-CHF entity 202 in FIG. 2 . As shown in FIG. 3 , the method includes:

[0151] S301: A first R-CHF entity receives a first charging request sent by a CTF entity.

[0152] In one example, the first billing request is sent by the CTF entity in a scenario where no billing session is established between the CTF entity and the first R-CHF entity, and no billing session is established between the first R-CHF entity and the primary CHF entity. At this time, the first billing request is a first billing resource creation request, which is used to request the creation of a first billing resource for billing interaction between the CTF entity and the first R-CHF entity.

[0153] In another example, the first charging request is sent by the CTF entity in a scenario where a charging session has been established between the CTF entity and the first R-CHF entity, and a charging session has been established between the first R-CHF entity and the primary CHF entity. At this time, the first charging request is a second charging resource update request or a second charging resource release request, which is used to request to update or release the second charging resource for the charging interaction between the first R-CHF entity and the CTF entity.

[0154] In another example, the first charging request is a one-time event charging request for online direct deduction or offline one-time event charging sent by the CTF entity in a scenario where a charging session has been established between the CTF entity and the first R-CHF entity, and a charging session has been established between the first R-CHF entity and the main CHF entity.

[0155] In another example, the first charging request is a first charging resource update request or a first charging resource release request sent by the CTF entity to the first R-CHF in a scenario where a charging session has been established between the CTF entity and the second R-CHF entity and a charging session has been established between the second R-CHF entity and the main CHF entity, and is used to request to update or release the first charging resource of the converged billing interaction between the first R-CHF entity and the CTF entity.

[0156] In another example, the first charging request is a scenario in which a charging session has been established between the CTF entity and the primary CHF entity. The CTF entity sends a first charging resource creation request to the first R-CHF entity. The first charging request is used to request the creation of a first charging resource for charging interaction between the CTF entity and the first R-CHF entity.

[0157] S302: When the first R-CHF entity determines that the interaction with the target CHF entity related to the first charging request is abnormal, the first R-CHF entity performs abnormal charging processing.

[0158] In one possible implementation, the target CHF entity is the primary CHF entity corresponding to the first charging request, and the first charging request is a first charging resource creation request, which is used to request the establishment of a charging interaction session between the CTF entity and the first R-CHF entity. This situation applies to two scenarios: Scenario 1: No charging session has been established between the CTF entity and the first R-CHF entity, and no charging session has been established between the first R-CHF entity and the primary CHF entity; Scenario 2: A charging session has been established between the CTF entity and the primary CHF entity.

[0159] For the above two scenarios, the first R-CHF entity performs abnormal charging processing, including:

[0160] The first R-CHF entity generates a first billing resource corresponding to the first billing request and allocates a billing resource identifier for the first billing resource. The first R-CHF entity caches the billing information in the first billing request and sends a first billing response message to the CTF entity in response to the first billing request. The first billing response message includes the identifier of the first billing resource. Optionally, the first billing response message includes suspended quota indication information or a granted quota. The suspended quota indication information may be determined based on first indication information carried in the first billing request. The first indication information is used to indicate whether the CTF entity supports suspended quota management capabilities. The suspended quota indication information is used to instruct the CTF entity to continue service in accordance with the suspended quota management mode.

[0161] Specifically, for scenario 1: after receiving the first charging request, the first R-CHF entity generates a first charging resource identifier. The charging information in the first charging request includes charging information with quota management and / or charging information without quota management.

[0162] For non-quota managed billing information, the first R-CHF entity caches the non-quota managed billing information. The cached billing information includes offline one-time event billing information, such as service type and service start time. In one example, the first R-CHF entity directly caches the non-quota managed billing information in a first billing resource locally (e.g., local memory or local storage); or the first R-CHF entity generates a first R-CHF call record, which includes the non-quota managed billing information.

[0163] For quota-managed billing information, since the first R-CHF entity has not established a billing session with the primary CHF entity, that is, the primary CHF entity has not allocated a quota to the user, the quota-managed billing information includes a quota application. In this case:

[0164] If the CTF entity supports the suspended quota management capability, the first R-CHF entity suspends the quota management of the service and caches the billing information with quota management. In one example, the first R-CHF entity directly caches the billing information with quota management in a first billing resource locally (such as local memory or local storage); or the first R-CHF entity generates a first R-CHF call record, and the first R-CHF entity call record includes the billing information with quota management. At this time, the first billing response message also includes suspended quota indication information, and the suspended quota indication information is used to instruct the CTF entity to continue the service in accordance with the suspended quota management mode. After the subsequent CTF entity reports the usage of the service after the quota is suspended to the first R-CHF entity, the first R-CHF entity caches the billing information of the suspended quota (such as: service usage) and the corresponding quota suspension identifier.

[0165] If the CTF entity does not support the suspended quota management capability, the first R-CHF entity performs a quota grant operation. Since the first R-CHF entity does not have the user's account information, the granted quota is a virtual granted quota, and the billing information with quota management is cached. In one example, the first R-CHF entity directly caches the billing information with quota management in a first billing resource locally (such as local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, and the first R-CHF entity call record includes the billing information with quota management. In this case, the first billing response message also includes the granted quota. After receiving the first billing response message, the CTF entity manages services based on the granted quota and collects quota usage information. After the CTF entity subsequently reports the collected quota usage information to the first R-CHF entity, the first R-CHF caches the billing information with quota management (e.g., quota usage) and the quota suspension flag. For example, the quota granted by the first R-CHF entity is 30M. After the CTF entity uses up the granted 30M quota (the collected quota usage is 30M at this time), it reports the quota usage of 30M to the first R-CHF entity; after receiving the quota usage reported by the CTF, the first R-CHF entity saves the usage of 30M and the corresponding quota suspension flag in the cached billing information.

[0166] For Scenario 2: The first billing request also carries information related to a third billing resource generated by the primary CHF entity for the CTF entity, such as a third billing resource identifier. After receiving the first billing request, the first R-CHF entity establishes a first billing resource between the CTF entity and the first R-CHF entity based on the information carried in the first billing request, and caches the information related to the third billing resource generated by the primary CHF entity and carried in the first billing request. The billing information in the first billing request includes billing information with quota management and / or billing information without quota management.

[0167] For non-quota managed billing information, the first R-CHF entity caches the non-quota managed billing information. The cached billing information includes offline one-time event billing information, such as offline service usage and offline service information. In one example, the first R-CHF entity directly caches the non-quota managed billing information in a first local billing resource (e.g., local memory or local storage); or the first R-CHF entity generates a first R-CHF call record.

[0168] For the billing information with quota management, since the CTF entity has established a billing session with the main CHF entity, that is, the main CHF entity may have allocated a quota to the user, the billing information with quota management includes quota application and / or quota usage. The first R-CHF entity caches the billing information with quota management, and the corresponding quota consumption identifier or quota suspension identifier. If the corresponding quota suspension identifier is cached, the main CHF entity needs to be notified to release the granted quota later. In one example, the first R-CHF entity directly caches the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier in a first billing resource locally (such as local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, and the first R-CHF entity call record includes the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier. At the same time,

[0169] If the CTF entity supports the suspended quota management capability, the first R-CHF entity suspends the quota management of the service. In this case, the first billing response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue the service in accordance with the suspended quota management mode. After the CTF entity subsequently reports the usage of the service after the quota is suspended to the first R-CHF entity, the first R-CHF entity caches the billing information of the suspended quota (such as service usage) and the corresponding quota suspension flag.

[0170] If the CTF entity does not support the suspended quota management capability, the first R-CHF entity performs a quota grant operation. Since the first R-CHF entity does not have the user's account information, the granted quota is a virtual granted quota. After receiving the first billing response message, the CTF entity manages services based on the granted quota and collects quota usage information. After the CTF entity subsequently reports the collected quota usage information to the first R-CHF entity, the first R-CHF caches the quota-managed billing information (e.g., quota usage) and the quota suspension flag.

[0171] In another possible implementation, the target CHF entity is the primary CHF entity corresponding to the first charging request, and the first charging request is sent by the CTF entity in a scenario where a charging session has been established between the CTF entity and the first R-CHF entity, and a charging session has been established between the first R-CHF entity and the primary CHF entity. In this case, the first charging request is a first charging resource update request or a first charging resource release request, which is used to request to update or release the first charging resource for the charging interaction between the first R-CHF entity and the CTF entity.

[0172] The first R-CHF entity performs abnormal charging processing, including:

[0173] For non-quota managed billing information, the first R-CHF entity caches the non-quota managed billing information. The cached billing information includes offline one-time event billing information, such as offline service usage and offline service information. In one example, the first R-CHF entity directly caches the non-quota managed billing information in a first local billing resource (e.g., local memory or local storage); or the first R-CHF entity generates a first R-CHF call record.

[0174] For the billing information with quota management, since a billing session has been established with the main CHF entity, that is, the main CHF entity may have allocated a quota to the user, the billing information with quota management includes quota application and / or quota usage. The first R-CHF entity caches the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier. If the corresponding quota suspension identifier is cached, the CHF needs to be notified to release the granted quota later. In one example, the first R-CHF entity directly caches the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier in a first billing resource locally (such as local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, and the first R-CHF entity call record includes the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier. At the same time,

[0175] If the first R-CHF entity has no available quota and the CTF entity supports the suspended quota management capability, the first R-CHF entity suspends the quota management of the service. In this case, the first charging response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue the service in the suspended quota management mode. After the CTF entity subsequently reports the usage of the service after the quota is suspended to the first R-CHF entity, the first R-CHF entity caches the billing information of the suspended quota (e.g., service usage) and the corresponding quota suspension flag.

[0176] If the first R-CHF entity has no available quota and the CTF entity does not support the suspended quota management capability, the first R-CHF entity performs a quota grant operation. Since the first R-CHF entity does not have the user's account information, the granted quota is a virtual granted quota. After receiving the first billing response message, the CTF entity manages services based on the granted quota and collects quota usage information. After the CTF entity subsequently reports the collected quota usage information to the first R-CHF entity, the first R-CHF caches the quota-managed billing information (e.g., quota usage) and the quota suspension flag.

[0177] In the case where the first R-CHF entity has available quota, if the CTF entity supports the suspended quota management capability, the first R-CHF entity can handle it in the following manner:

[0178] Method 1: The first R-CHF entity suspends quota management for the service. This means that the currently available quota is not used. After the primary CHF entity is restored, the primary CHF entity is notified to release the quota. The exception handling for the first R-CHF entity in this scenario is the same as the case where the first R-CHF entity has no available quota.

[0179] Method 2: The first R-CHF entity grants and deducts quota for the service based on the available quota; suspends quota management for the service after the available quota is used up; billing information with quota management includes two parts: first billing information and second billing information, wherein the first billing information is billing information for using the available quota granted by the primary CHF entity, and the second billing information is billing information for not using the available quota granted by the primary CHF entity; the first R-CHF entity caches the billing information with quota management, including: caching the first billing information and the corresponding quota consumption identifier, and caching the second billing information and the corresponding quota suspension identifier.

[0180] In the case where the first R-CHF entity has available quota, if the CTF entity does not support the suspended quota management capability, the first R-CHF entity can handle it in the following manner:

[0181] Method 1: The first R-CHF entity grants a virtual quota, i.e., the current available quota is not used, and the primary CHF entity is notified to release the quota after it is restored. In this scenario, after receiving the usage information of the virtual quota reported by the subsequent CTF entity, the first R-CHF entity caches the usage information and the corresponding quota consumption identifier;

[0182] Mode 2: The first R-CHF entity provides quota granting and deduction for services based on the available quota; grants a virtual quota after the available quota is used up; the billing information with quota management includes two parts: first billing information and second billing information, wherein the first billing information is billing information for using the available quota granted by the primary CHF entity, and the second billing information is billing information for not using the available quota granted by the primary CHF entity (corresponding to the virtual quota); the first R-CHF entity caches the billing information with quota management, including: caching the first billing information and the corresponding quota consumption identifier, and caching the second billing information and the corresponding quota suspension identifier.

[0183] It should be understood that the available quota of the first R-CHF entity is the quota granted by the main CHF entity before the exception.

[0184] In one possible implementation, the manner in which the first R-CHF entity detects abnormal interaction with the target CHF entity (i.e., the main CHF entity) includes:

[0185] 1. The first R-CHF entity determines that the interaction between the first R-CHF entity and the primary CHF entity is abnormal based on the application layer congestion indication returned by the primary CHF entity or when detecting that the delay of the primary CHF entity returning the charging response message increases, that is, when detecting congestion of the primary CHF entity.

[0186] 2. When the first R-CHF entity detects that the transport layer connection between itself and the main CHF entity is interrupted, that is, when it detects that the main CHF entity is unreachable, it determines that the interaction between the first R-CHF entity and the main CHF entity is abnormal.

[0187] 3. The first R-CHF entity determines, based on the transport layer congestion control mechanism or jitter, that the transport layer of the first R-CHF entity and the transport layer of the main CHF entity are congested, that is, the communication quality between the first R-CHF entity and the main CHF entity is degraded, and further determines that the interaction between the first R-CHF entity and the main CHF entity is abnormal.

[0188] It should be understood that the abnormal interaction between the first R-CHF entity and the main CHF entity means that after the above situation occurs, there is no backup main CHF.

[0189] Before performing abnormal billing processing, if the CTF entity and the first R-CHF entity belong to different operators, the first R-CHF entity determines whether to authorize the user equipment to use the current service based on the operator configuration information. If it determines that the user equipment is authorized to use the current service, the abnormal billing processing described above is performed; if it determines that the user equipment is not authorized to use the current service, the abnormal billing processing described above is not performed.

[0190] In one possible implementation, the method of this embodiment further includes:

[0191] When the first R-CHF entity detects that the interaction with the target CHF entity related to the first charging request is normal, the first R-CHF entity generates a second charging request and sends the second charging request to the primary CHF entity. The second charging request is a first charging resource creation request for requesting the creation of a first charging resource for the charging interaction between the first R-CHF entity and the primary CHF entity, or a charging resource update request or release request for requesting the update or release of a third charging resource for the charging interaction between the CTF entity and the primary CHF entity.

[0192] Optionally, if the cached billing information is cached in a first billing resource locally within the first R-CHF entity, the second billing request includes the cached billing information, i.e., the second billing request carries the cached billing information and the corresponding quota consumption identifier or quota suspension identifier. Optionally, if the first R-CHF entity has available quota allocated by the master CHF entity during the abnormal period but has not used it, the second billing request also includes release indication information, used to instruct the master CHF entity to release the quota granted by the master CHF entity to the first R-CHF entity; optionally, if the first R-CHF entity has a quota application for a CTF, the second billing request also includes the quota application.

[0193] In a possible implementation, this embodiment further includes:

[0194] When the first R-CHF entity detects that the interaction with the target CHF entity related to the first charging request is normal, if the cached charging information is cached in the first R-CHF call record, then:

[0195] Method 1: The first R-CHF entity sends a second charging request to the primary CHF, where the second charging request carries the charging information stored in the first R-CHF call record.

[0196] Method 2: The first R-CHF entity sends the first R-CHF call record to the primary CHF entity independently regardless of whether it sends the second charging request to the primary CHF entity.

[0197] Specifically, the first R-CHF entity sends the first R-CHF call record to the primary CHF entity through a file transfer protocol (FTP) or other means. The first R-CHF entity may also carry a storage address of the first R-CHF call record in a charging request sent to the primary CHF entity, so that the primary CHF entity obtains the first R-CHF call record based on the storage address.

[0198] In one possible implementation, the method of this embodiment further includes:

[0199] Before generating the second charging request, the first R-CHF entity sends a notification message to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; the first R-CHF entity receives a third charging request sent by the CTF entity, where the third charging request carries a quota request and usage amount for resuming quota management; and the second charging request includes the quota request and usage amount carried in the third charging request.

[0200] It should be noted that the usage here refers to the usage of the pending quota or the usage of the granted quota.

[0201] In one possible implementation, the target CHF entity is a primary CHF entity corresponding to a first charging request, the first charging request is an online direct deduction (i.e., Immediate Event Charging (IEC)) request or an offline one-time event charging (i.e., Post Event Charging (PEC)) request, and the first R-CHF entity performs abnormal charging processing, including:

[0202] The first R-CHF entity buffers the charging information of the first charging request; and sends a first charging response message in response to the first charging request to the CTF entity.

[0203] In a possible implementation, the first R-CHF entity caches the charging information of the first charging request, including:

[0204] The first R-CHF entity writes the billing information and the corresponding online direct billing indication information or offline one-time event billing indication information into a first R-CHF call record. Upon detecting that the target CHF interaction associated with the first billing request is normal, the first R-CHF entity sends the first R-CHF call record to the primary CHF entity. The first R-CHF call record includes the billing information and the corresponding online direct billing indication information or offline one-time event billing indication information.

[0205] The first R-CHF entity sends the first R-CHF call record to the primary CHF entity via FTP or other means. The first R-CHF entity may also include a storage address of the first R-CHF call record in a charging request sent to the primary CHF entity, so that the primary CHF entity obtains the first R-CHF call record based on the storage address.

[0206] In one possible implementation, the method of this embodiment further includes:

[0207] The first R-CHF entity stores the billing information and the corresponding online direct debit indication information or the offline one-time event billing indication information in the first billing resource; when detecting that the target CHF interaction related to the first billing request is normal, the first R-CHF entity generates a second billing request, which is a one-time event billing request and carries the billing information and the corresponding online direct debit indication information or the offline one-time event billing indication information; the first R-CHF entity sends the second billing request to the primary CHF entity.

[0208] After receiving the second billing request, if the second billing request includes online direct deduction indication information, the primary CHF entity deducts the account balance according to the online usage of the billing information; if the second billing information includes offline one-time event billing indication information, the primary CHF entity writes the offline one-time event billing information in the billing information into the primary CHF call record.

[0209] In one possible implementation, the target CHF entity is a second R-CHF entity corresponding to the first charging request, the second R-CHF entity is a CHF entity that provides relaying between the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity; the first charging request is a first charging resource update request or a first charging resource release request, which is used to request updating or releasing a first charging resource for charging interaction between the second R-CHF entity and the CTF entity, and the first charging request carries an identifier of the first charging resource; and the first R-CHF entity performs abnormal charging processing, including:

[0210] The first R-CHF entity creates a fourth charging resource between the CTF entity and the first R-CHF entity according to the first charging request, and uses the identifier of the first charging resource as the identifier of the fourth charging resource; the first R-CHF entity generates a second charging request according to the first charging request; and sends the second charging request to the main CHF entity. Since the first R-CHF entity cannot interact with the second R-CHF entity to obtain the charging resource identifier allocated by the main CHF for the user charging on the second R-CHF entity, the second charging request is a second charging resource creation request, using The first R-CHF entity requests the creation of a second billing resource for billing interaction between the first R-CHF entity and the primary CHF entity, the second billing resource creation request carrying quota management billing information or non-quota management billing information. The primary CHF determines an existing billing resource identifier (i.e., the billing resource identifier allocated by the primary CHF for billing of the user on the second R-CHF) based on information such as the user identifier and billing ID in the second billing request, performs billing processing (such as granting quota, deducting quota usage, writing to the primary CHF call record, etc.), and returns the existing billing resource identifier. The first R-CHF entity receives a second billing response message from the primary CHF entity in response to the second billing request; generates a first billing response message in response to the first billing request based on the second billing response message; and the first R-CHF entity sends the first billing response message to the CTF entity.

[0211] When the interaction between the CTF entity and the second R-CHF entity is abnormal, switching from the second R-CHF entity to the first R-CHF entity is achieved in the above manner, which can ensure normal billing.

[0212] In one possible implementation, the method of this embodiment further includes:

[0213] If the first R-CHF entity detects that the billing resource identifier between the CTF entity and the second R-CHF entity is not a unique resource identifier locally, that is, the billing resource identifier between the CTF entity and the second R-CHF entity conflicts with other billing resource identifiers in the first R-CHF entity, the first R-CHF entity generates a new billing resource identifier, uses the new billing resource identifier as the identifier of the third billing resource, and returns it to the CTF entity to replace the current billing resource identifier to avoid conflict.

[0214] It can be seen that in the solution of the present application, for the abnormal interaction between the first R-CHF entity and the target CHF entity, different abnormal billing processing methods are adopted to ensure normal billing and avoid losses to the operator.

[0215] Referring to FIG4 , FIG4 is a flow chart illustrating another method for handling billing exceptions provided in an embodiment of the present application. The method is applied to a master CHF entity. The master CHF entity provides online quota management and billing call record generation. As shown in FIG4 , the method further includes:

[0216] S401: A primary CHF entity receives cached charging related information sent by a first R-CHF entity.

[0217] The cached billing-related information is sent to the primary CHF entity in the form of a call record or carried in a billing request to the primary CHF. The cached billing-related information includes billing information and a corresponding quota suspension indicator or quota consumption indicator. The billing information includes billing information with quota management and / or billing information without quota management.

[0218] Specifically, when the cached billing-related information is sent to the primary CHF entity in the form of a call record, the call record is sent to the primary CHF entity via FTP or other means, or the first R-CHF entity may further carry the storage address of the first R-CHF call record in the billing request sent to the primary CHF entity, so that the primary CHF entity obtains the call record based on the storage address.

[0219] S402: The main CHF entity performs billing processing according to the quota suspension identifier or the quota consumption identifier.

[0220] Specifically, for quota-managed billing information cached by the first R-CHF entity via a call record or a second billing request, if the billing information has a quota suspension indicator, the primary CHF entity directly deducts the service usage in the billing information from the account balance corresponding to the first billing resource. For billing information with a quota consumption indicator, the primary CHF entity performs a quota consumption deduction operation (e.g., deducting the balance, releasing a locked quota, etc.). It should be understood that the account balance locked by the primary CHF entity is the quota granted by the primary CHF entity to the first R-CHF entity before the interaction anomaly. In one example, when the cached billing information includes release indication information, the primary CHF entity also releases the locked account balance. The release indication information is used to instruct the primary CHF entity to release the locked account balance, i.e., to instruct the primary CHF entity to release the quota granted to the first R-CHF entity before the interaction anomaly.

[0221] For the billing information without quota management, the primary CHF entity writes the billing information without quota management into the primary CHF call record.

[0222] In one example, when the second billing request is a second billing resource creation request, used to request the creation of a second billing resource for the billing interaction between the first R-CHF entity and the primary CHF entity, the primary CHF entity, when performing the above operation, also creates a second billing resource or binds it to an existing billing resource, and sends an identifier of the second billing resource to the first R-CHF entity.

[0223] It can be seen that in the solution of the present application, in the case of abnormal interaction between the first R-CHF entity and the main CHF entity, the main CHF entity can ensure normal billing by adopting the above processing method to avoid losses to the operator.

[0224] See Figure 5, which is a schematic diagram of an interactive flow of a method for handling billing exceptions provided in an embodiment of the present application. The embodiment shown in Figure 5 is for scenarios where a billing session is not established between a CTF entity and a first R-CHF entity, and a billing session is not established between the first R-CHF entity and a primary CHF entity. As shown in Figure 5, the method includes:

[0225] S501. A CTF entity sends a first charging request to a first R-CHF entity.

[0226] The first charging request is a charging resource creation request for establishing a converged charging session, and is used to request establishment of a charging interaction session between the CTF entity and the first R-CHF entity. The first charging request includes charging information and first indication information. The first indication information is used to indicate whether the CTF entity supports the suspended quota management capability.

[0227] In one example, the billing information is billing information with quota management or billing information without quota management. In another example, the billing information includes billing information with quota management and billing information without quota management.

[0228] S502: The first R-CHF entity detects that the main CHF entity is abnormal, and performs abnormal charging processing.

[0229] In one possible implementation, the manner in which the first R-CHF entity detects abnormal interaction with the target CHF entity (i.e., the main CHF entity) includes:

[0230] 1. The first R-CHF entity determines that the interaction between the first R-CHF entity and the primary CHF entity is abnormal based on the application layer congestion indication returned by the primary CHF entity or when detecting that the delay of the primary CHF entity returning the charging response message increases, that is, when detecting congestion of the primary CHF entity.

[0231] 2. When the first R-CHF entity detects that the transport layer connection between itself and the main CHF entity is interrupted, that is, when it detects that the main CHF entity is unreachable, it determines that the interaction between the first R-CHF entity and the main CHF entity is abnormal.

[0232] 3. The first R-CHF entity determines, based on the transport layer congestion control mechanism or jitter, that the transport layer of the first R-CHF entity and the transport layer of the main CHF entity are congested, that is, the communication quality between the first R-CHF entity and the main CHF entity is degraded, and further determines that the interaction between the first R-CHF entity and the main CHF entity is abnormal.

[0233] It should be understood that the abnormal interaction between the first R-CHF entity and the main CHF entity means that after the above situation occurs, there is no backup main CHF.

[0234] If the CTF entity and the first R-CHF entity belong to different operators, the first R-CHF entity determines whether to authorize the user equipment to use the current service based on the operator configuration information. If the user equipment is authorized to use the current service, the first R-CHF entity generates a charging resource identifier for the CTF entity and performs the following abnormal billing process. If the user equipment is not authorized to use the current service, the following abnormal billing process is not performed.

[0235] Specifically, the first R-CHF entity performs abnormal billing processing, which specifically includes:

[0236] For non-quota managed billing information, the first R-CHF entity caches the non-quota managed billing information. The cached billing information includes offline one-time event billing information, such as offline service usage and offline service information. In one example, the first R-CHF entity directly caches the non-quota managed billing information in a first billing resource locally (e.g., local memory or local storage); or the first R-CHF entity generates a first R-CHF call record, which includes the non-quota managed billing information.

[0237] For billing information subject to quota management, if the CTF entity supports the ability to suspend quota management, the first R-CHF entity suspends quota management for the service and caches the billing information subject to quota management. In one example, the first R-CHF entity directly caches the billing information subject to quota management in a first billing resource locally (e.g., local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, which includes the billing information subject to quota management.

[0238] If the CTF entity does not support the suspended quota management capability, the first R-CHF entity performs a quota grant operation and caches the quota-managed billing information. In one example, the first R-CHF entity directly caches the quota-managed billing information in a first billing resource locally (e.g., a local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, where the first R-CHF entity call record includes the quota-managed billing information.

[0239] After receiving the first billing response message, the CTF entity collects the usage of the granted quota. Upon receiving the usage reported by the CTF entity, the first R-CHF entity caches information that also includes the quota suspension flag corresponding to the usage. For example, if the quota granted by the first R-CHF entity is 30MB and the usage collected by the CTF entity is 20MB, the CTF entity transmits information indicating the usage of 20MB to the first R-CHF entity. Upon receiving the usage of 20MB, the first R-CHF entity marks the billing information corresponding to 20MB as quota suspended in its cached billing information using the quota suspension flag.

[0240] S503: The first R-CHF entity sends a first charging response message to the CTF entity.

[0241] The first billing response message is used to respond to the first billing request. The first billing response message includes an identifier of a first billing resource generated by the first R-CHF entity for the CTF entity. Optionally, for billing information with quota management in the billing information, if the CTF entity supports the suspended quota management capability, the first billing response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue processing services in accordance with the suspended quota management mode; if the CTF entity does not support the suspended quota management capability, the first billing response message also includes the quota granted by the first R-CHF entity.

[0242] S504: The CTF entity processes the service according to the first charging response message.

[0243] The processing service includes collecting offline one-time event billing information. Optionally, if the first billing response message includes quota suspension indication information, the CTF collects the usage of the suspended quota. Optionally, if the first billing response message includes the quota granted by the first R-CHF entity, the CTF entity monitors the usage of the granted quota and records the quota usage.

[0244] S505: The first R-CHF entity detects that the main CHF entity is normal.

[0245] S506: The first R-CHF entity sends a charging message to the CTF entity.

[0246] The charging message is used to instruct the CTF entity to resume suspended quota management. Optionally, the charging message is sent via a charging notification message or a charging response. It should be understood that the charging notification message is proactively sent by the first R-CHF entity to the CTF entity. The charging message is sent via a charging response, meaning that the charging message is included in the charging response sent by the first R-CHF entity to the CTF entity.

[0247] S507: The CTF entity sends a third charging request to the first R-CHF entity.

[0248] The third billing request is for a quota request, and includes the requested quota amount. Optionally, the third billing request also includes the quota usage when the quota is suspended.

[0249] S508: The first R-CHF entity sends a second charging request to the primary CHF entity.

[0250] Among them, the second billing request is a billing resource creation request for creating a converged billing session, which is used to request the establishment of a billing interaction session between the first R-CHF entity and the main CHF entity. If the first R-CHF entity caches the billing information and the corresponding quota suspension identifier in the first billing resource, then the second billing request also includes the billing information cached by the first R-CHF entity, that is, the billing information and the corresponding quota suspension identifier. If the first R-CHF entity receives a third billing request sent by the CTF entity after resuming the suspended quota management, then the second billing request also includes the quota request and usage carried by the third billing request. It should be pointed out that the usage here refers to the usage of the suspended quota, or the usage of the granted quota.

[0251] Since the main CHF entity is unreachable, the first R-CHF entity needs to obtain the address of the main CHF entity to interact with the main CHF entity.

[0252] Optionally, the first R-CHF entity determines the address of the main CHF entity in the following manner:

[0253] Method 1: The first R-CHF entity determines the address of the primary CHF entity based on the identifier of the CTF entity. In one example, the first R-CHF entity queries a correspondence table based on the identifier of the CTF entity to determine the address of the primary CHF entity. The correspondence table is a correspondence table of the identifier of the CTF entity, the identifier of the primary CHF entity, and the address of the primary CHF entity.

[0254] Method 2: The first R-CHF entity determines the address of the primary CHF entity based on the user equipment's location information. In one example, the first R-CHF entity determines the user equipment's location based on the user equipment's location information, then determines the primary CHF entity that provides billing for the area to which the user equipment's location belongs, and obtains the address of the primary CHF entity.

[0255] Mode 3: The first R-CHF entity determines the address of the primary CHF according to the service information used by the user equipment; the primary CHF is the CHF entity that provides billing for the service used by the user equipment.

[0256] It should be understood that the above correspondence table, CHF coverage area, and CHF-provided billable service information are stored in a network resource function (NRF) entity or in the billing configuration information of a CTF entity.

[0257] S509: The main CHF entity performs charging processing.

[0258] Specifically, the primary CHF entity generates a second billing resource and an identifier of the second billing resource for the first R-CHF entity. Optionally, the second billing request includes billing information cached in the first billing resource of the first R-CHF entity. If the cached billing information includes billing information and a corresponding quota suspension identifier, the primary CHF entity directly deducts the service usage in the billing information from the account balance corresponding to the second billing resource based on the billing information corresponding to the quota suspension identifier. If the billing information cached by the first R-CHF entity includes offline service usage, the primary CHF entity writes the offline service usage into the primary CHF call record.

[0259] Optionally, if the second charging request includes a third charging request, the primary CHF entity performs quota granting according to the applied quota amount in the third charging request.

[0260] S510: The primary CHF entity sends a second charging response message to the first R-CHF entity.

[0261] The second charging response message includes a second charging resource identifier generated by the primary CHF entity for the first R-CHF entity and a charging processing result, wherein the charging processing result includes an online charging processing result and an offline one-time event charging processing result.

[0262] S511. The first R-CHF entity sends a third charging response message to the CTF entity.

[0263] The third billing response message is used to respond to the third billing request. The third billing response message includes the content included in the second billing response message and the capability information fed back by the first R-CHF. The capability information includes at least one of the following: the payload size of the billing message for the first billing resource, the idle time for billing information collection by the CTF entity for the first billing resource, billing characteristics, or trigger condition settings for the first billing resource. The trigger condition settings include trigger conditions for reporting billing information, such as whether billing information is reported, whether reporting of billing information is delayed, and reporting when parameter values ​​of billing information meet preset values.

[0264] S512: The first R-CHF entity sends the cached first R-CHF call record to the master CHF entity.

[0265] Specifically, if the first R-CHF entity caches the billing information in the form of a first R-CHF call record, the first R-CHF entity sends the cached first R-CHF call record to the primary CHF entity. Optionally, the first R-CHF entity sends the cached first R-CHF call record to the primary CHF entity via FTP or other means; or the first R-CHF entity sends a message (which may be a resource update message or a billing request) to the primary CHF entity through a billing session between the first R-CHF entity and the primary CHF entity. The message carries the address of the space for storing the first R-CHF call record, so that the primary CHF entity obtains the first R-CHF call record based on the address, associates it with a corresponding billing resource identifier or billing resource, and performs billing processing based on the billing resource corresponding to the associated billing resource identifier or the associated billing resource.

[0266] S513: The primary CHF entity performs billing processing according to the first R-CHF call record.

[0267] Specifically, the primary CHF entity associates the first R-CHF bill with the user account, or the primary CHF entity generates billing resources indicated by the billing resource identifier. The first R-CHF bill includes billing information cached by the first R-CHF entity. If the cached billing information includes billing information corresponding to the quota suspension identifier, the primary CHF entity deducts the account balance based on the billing information corresponding to the quota suspension identifier. If the cached billing information includes offline service usage, the primary CHF entity writes the offline service usage into the primary CHF bill.

[0268] It should be noted that S506-S507 and S511 are optional. Alternatively, S506-S507 can be executed first, followed by S508-S511, or S508-S510 can be executed directly. There is no clear order for executing S512-S513 and S509-S511. Alternatively, S512-S513 can be executed first, followed by S509-S511; alternatively, S509-S511 can be executed first, followed by S512-S513; or alternatively, S512-S513 and S509-S511 can be executed simultaneously.

[0269] In the case where a charging session is not established between the CTF entity and the first R-CHF entity and a charging session is not established between the first R-CHF entity and the primary CHF entity, when the interaction between the first R-CHF entity and the primary CHF entity is abnormal, the above process can enable the charging process to proceed normally.

[0270] Referring to Figure 6, Figure 6 is a schematic diagram of an interactive flow of another method for handling billing exceptions provided in an embodiment of the present application. The embodiment shown in Figure 6 is for a scenario where a billing session has been established between a CTF entity and a first R-CHF entity, and a billing session has been established between the first R-CHF entity and a primary CHF entity. As shown in Figure 6, the method includes:

[0271] S601: A CTF entity sends a first charging request to a first R-CHF entity.

[0272] The first charging request is a charging resource update request or a charging resource release request, and is used to request an update or release of a converged charging session between the first R-CHF entity and the CTF entity. It should be understood that the intermediate charging request herein refers to a charging request sent after a charging session has been established between the CTF entity and the first R-CHF entity, and a charging session has been established between the first R-CHF entity and the primary CHF entity.

[0273] The first charging request includes charging information and first indication information. The first indication information is used to indicate whether the CTF entity supports the suspended quota management capability.

[0274] In one example, the billing information is billing information with quota management or billing information without quota management. In another example, the billing information includes billing information with quota management and billing information without quota management.

[0275] S602: The first R-CHF entity detects that the main CHF entity is abnormal, and performs abnormal billing processing.

[0276] It should be noted that the specific manner in which the first R-CHF entity determines that the main CHF entity is abnormal can be found in the relevant description of S502 and will not be described again here.

[0277] Specifically, the first R-CHF entity performs abnormal billing processing, which specifically includes:

[0278] For non-quota managed billing information, the first R-CHF entity caches the non-quota managed billing information. The cached billing information includes offline one-time event billing information, such as offline service usage and offline service information. In one example, the first R-CHF entity directly caches the non-quota managed billing information in a first local billing resource (e.g., local memory or local storage); or the first R-CHF entity generates a first R-CHF call record.

[0279] For the billing information with quota management, since a billing session has been established with the main CHF entity, that is, the main CHF entity may have allocated a quota to the user, the billing information with quota management includes quota application and / or quota usage. The first R-CHF entity caches the billing information with quota management and identifies it as quota usage or quota suspension usage. If it is identified as quota suspension usage, CHF needs to be notified to release the granted quota later. In one example, the first R-CHF entity directly caches the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier in the first billing resource locally (such as local memory or local storage), or the first R-CHF entity generates a first R-CHF call record, and the first R-CHF entity call record includes the billing information with quota management and the corresponding quota consumption identifier or quota suspension identifier. At the same time,

[0280] If the first R-CHF entity has no available quota and the CTF entity supports the suspended quota management capability, the first R-CHF entity suspends the quota management of the service. In this case, the first charging response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue the service in the suspended quota management mode. After the CTF entity subsequently reports the usage of the service after the quota is suspended to the first R-CHF entity, the first R-CHF entity caches the billing information of the suspended quota (e.g., service usage) and the corresponding quota suspension flag.

[0281] If the first R-CHF entity has no available quota and the CTF entity does not support the suspended quota management capability, the first R-CHF entity performs a quota grant operation. Since the first R-CHF entity does not have the user's account information, the granted quota is a virtual granted quota. After receiving the first billing response message, the CTF entity manages services based on the granted quota and collects quota usage information. After the CTF entity subsequently reports the collected quota usage information to the first R-CHF entity, the first R-CHF caches the quota-managed billing information (e.g., quota usage) and the quota suspension flag.

[0282] In the case where the first R-CHF entity has available quota, if the CTF entity supports the suspended quota management capability, the first R-CHF entity can handle it in the following manner:

[0283] Method 1: The first R-CHF entity suspends quota management for the service. This means that the currently available quota is not used. After the primary CHF entity is restored, the primary CHF entity is notified to release the quota. The exception handling for the first R-CHF entity in this scenario is the same as the case where the first R-CHF entity has no available quota.

[0284] Method 2: The first R-CHF entity grants and deducts quota for the service based on the available quota; suspends quota management for the service after the available quota is used up; billing information with quota management includes two parts: first billing information and second billing information, wherein the first billing information is billing information for using the available quota granted by the primary CHF entity, and the second billing information is billing information for not using the available quota granted by the primary CHF entity; the first R-CHF entity caches the billing information with quota management, including: caching the first billing information and the corresponding quota consumption identifier, and caching the second billing information and the corresponding quota suspension identifier.

[0285] In the case where the first R-CHF entity has available quota, if the CTF entity does not support the suspended quota management capability, the first R-CHF entity can handle it in the following manner:

[0286] Method 1: The first R-CHF entity grants a virtual quota, i.e., the currently available quota is not used, and the primary CHF entity is notified to release the quota after it is restored. In this scenario, after receiving the usage information of the virtual quota reported by the subsequent CTF entity, the first R-CHF entity caches the usage information and marks it as the quota pending usage;

[0287] Mode 2: The first R-CHF entity provides quota granting and deduction for services based on the available quota; grants a virtual quota after the available quota is used up; the billing information with quota management includes two parts: first billing information and second billing information, wherein the first billing information is billing information for using the available quota granted by the primary CHF entity, and the second billing information is billing information for not using the available quota granted by the primary CHF entity (corresponding to the virtual quota); the first R-CHF entity caches the billing information with quota management, including: caching the first billing information and the corresponding quota consumption identifier, and caching the second billing information and the corresponding quota suspension identifier.

[0288] It should be understood that the available quota of the first R-CHF entity is the quota granted by the main CHF entity before the exception.

[0289] S603: The first R-CHF entity sends a first charging response message to the CTF entity.

[0290] The first charging response message is used to respond to the first charging request. Optionally, if the CTF entity supports the suspended quota management capability, the first charging response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue the service in accordance with the suspended quota management mode; if the first R-CHF entity performs a quota granting operation, the first charging response message also includes the quota granted by the first R-CHF entity.

[0291] S604: The CTF entity processes the service according to the first charging response message.

[0292] S605: The first R-CHF entity detects that the main CHF entity is normal.

[0293] S606: The first R-CHF entity sends a charging message to the CTF entity.

[0294] S607: The CTF entity sends a third charging request to the first R-CHF entity.

[0295] S608: The first R-CHF entity sends a second charging request to the primary CHF entity.

[0296] S609: The main CHF entity performs charging processing.

[0297] Optionally, the second billing request includes the first billing information cached in the first billing resource. If the cached billing information includes billing information corresponding to the quota suspension identifier, the primary CHF entity directly deducts the service usage in the billing information from the corresponding account balance in the second billing resource based on the billing information corresponding to the quota suspension identifier. If the cached billing information includes offline service usage, the primary CHF entity writes the offline service usage into the primary CHF call record. If the cached billing information also includes release indication information, the primary CHF entity releases the quota granted by the primary CHF entity before the primary CHF entity experienced an abnormality. If the cached billing information also includes usage information for the quota granted by the primary CHF entity before the primary CHF entity experienced an abnormality, the primary CHF entity deducts the corresponding quota usage from the corresponding account balance in the second billing resource based on the usage information.

[0298] Optionally, if the second charging request includes a quota application for the third charging request, the primary CHF entity also includes a granted quota.

[0299] S610: The primary CHF entity sends a second charging response message to the first R-CHF entity.

[0300] S611. The first R-CHF entity sends a third charging response message to the CTF entity.

[0301] S612: The first R-CHF entity sends the cached first R-CHF call record to the master CHF entity.

[0302] S613: The primary CHF entity performs billing processing according to the first R-CHF call record.

[0303] It should be noted that the specific implementation process of S604-S608 can refer to the relevant description of S504-S508, and the specific implementation process of S610-S613 can refer to the relevant description of S510-S513, which will not be described again here.

[0304] It should be noted that S606-S607 and S611 are optional. Alternatively, S606-S607 may be executed first, followed by S608-S611; alternatively, S608-S610 may be executed directly. There is no clear order for executing S612-S613 and S609-S611. Alternatively, S612-S613 may be executed first, followed by S609-S611; alternatively, S609-S611 may be executed first, followed by S612-S613; or alternatively, S612-S613 and S609-S611 may be executed simultaneously.

[0305] In the case where a charging session has been established between the CTF entity and the first R-CHF entity and a charging session has been established between the first R-CHF entity and the primary CHF entity, when the interaction between the first R-CHF entity and the primary CHF entity is abnormal, the above process can enable the charging process to proceed normally.

[0306] See Figure 7, which is an interactive flow diagram of a method for handling billing exceptions provided by an embodiment of the present application. The embodiment shown in Figure 7 is a billing scenario for executing a one-time billing event. As shown in Figure 7, the method includes:

[0307] S701. A CTF entity sends a first charging request to a first R-CHF entity.

[0308] The first charging request is a one-time event charging request for online direct charging or offline one-time event charging. The first charging request is an online direct charging (ie, IEC) or offline one-time event charging (ie, PEC) request.

[0309] S702: The first R-CHF entity detects that the main CHF entity is abnormal, and performs abnormal billing processing.

[0310] It should be noted that the specific manner in which the first R-CHF entity determines that the main CHF entity is abnormal can be found in the relevant description of S502 and will not be described again here.

[0311] Specifically, the processing after the first R-CHF entity detects that the main CHF entity is abnormal includes:

[0312] Optionally, if the CTF entity and the first R-CHF entity belong to different operators, the first R-CHF entity determines whether to authorize the user equipment to use the current service based on the operator configuration information. If the first R-CHF entity determines that the user equipment is authorized to use the current service, it generates a charging resource identifier for the CTF entity and performs the following abnormal billing processing. If the first R-CHF entity determines that the user equipment is not authorized to use the current service, it does not perform the following abnormal billing processing.

[0313] S703: The first R-CHF entity sends a first charging response message to the CTF entity.

[0314] The first billing response message includes a billing processing result. The billing processing result includes billing success or billing failure. If the billing processing result is billing failure, the billing processing result also includes the reason for the billing failure, such as billing information format error, missing information, etc.

[0315] S704: The CTF entity processes the service according to the first charging response message.

[0316] Specifically, when the billing processing result is billing failure, the CTF entity retransmits the billing information or terminates the service; when the billing processing result is billing success, the CTF entity continues to collect offline one-time event billing information, online billing information, etc.

[0317] S705: The first R-CHF entity detects that the main CHF entity is normal.

[0318] S706: The first R-CHF entity sends a second charging request to the primary CHF entity.

[0319] If the second charging request is used to request one-time event charging, the second charging request includes the charging information cached by the first R-CHF entity.

[0320] S707: The main CHF entity performs charging processing.

[0321] Specifically, online charging processing is performed based on the online charging indication information in the cached charging information, the charging information with quota management and the corresponding consumption quota identifier, such as deducting the account balance; for offline service usage, the offline service usage is written into the main CHF call record.

[0322] S708: The primary CHF entity sends a second charging response message to the first R-CHF entity.

[0323] The second accounting response message is used to respond to the second accounting request.

[0324] S709: The first R-CHF entity sends the cached first R-CHF call record to the primary CHF entity.

[0325] Specifically, if the first R-CHF entity caches the billing information in the form of a first R-CHF call record, the first R-CHF entity sends the cached first R-CHF call record to the primary CHF entity. Optionally, the first R-CHF entity sends the cached first R-CHF call record to the primary CHF entity via FTP or other means; or the first R-CHF entity sends a message (which may be a resource update message or a billing request) to the primary CHF entity through a billing session between the first R-CHF entity and the primary CHF entity. The message carries the address of the space for storing the first R-CHF call record, so that the primary CHF entity obtains the first R-CHF call record based on the address, associates it with a corresponding billing resource identifier or billing resource, and performs billing processing based on the billing resource corresponding to the associated billing resource identifier or the associated billing resource.

[0326] S710: The primary CHF entity performs billing processing according to the first R-CHF call record.

[0327] Specifically, online charging processing is performed based on the online charging indication information in the cached charging information, the charging information with quota management and the corresponding consumption quota identifier, such as deducting the account balance; for offline service usage, the offline service usage is written into the main CHF call record.

[0328] It should be noted that, for S706-S708 and S709-S710, either one is executed.

[0329] In the case of one-time billing, when the interaction between the first R-CHF entity and the main CHF entity is abnormal, the above process can enable the billing process to proceed normally.

[0330] See Figure 8, which is a schematic diagram of an interactive flow of another method for handling billing exceptions provided by an embodiment of the present application. The embodiment shown in Figure 8 is for a scenario where a billing session has been established between a CTF entity and a second R-CHF entity, and a billing session has been established between a first R-CHF entity and a primary CHF entity. As shown in Figure 8, the method includes:

[0331] S801: The CTF entity detects that the second R-CHF entity is abnormal, and determines the address of the first R-CHF entity.

[0332] Optionally, the CTF entity can determine that the second R-CHF entity is abnormal in the following manner:

[0333] 1. The CTF entity determines that the interaction between the CTF entity and the second R-CHF entity is abnormal when, based on the application layer congestion indication returned by the second R-CHF entity or when detecting an increased delay in the second R-CHF entity returning a charging response message, that is, when detecting congestion of the second R-CHF entity.

[0334] 2. When the CTF entity detects that the transport layer connection between itself and the second R-CHF entity is interrupted, that is, when it detects that the second R-CHF entity is unreachable, it determines that the interaction between the CTF entity and the second R-CHF entity is abnormal.

[0335] 3. The CTF entity determines that the transport layer of the CTF entity and the transport layer of the second R-CHF entity are congested based on the transport layer congestion control mechanism or jitter, that is, the communication quality between the CTF entity and the second R-CHF entity is degraded, and further determines that the interaction between the CTFF entity and the second R-CHF entity is abnormal.

[0336] Optionally, the CTF entity determines the address of the first R-CHF entity in the following manner:

[0337] Method 1: The CTF entity determines the address of the R-CHF entity based on the CTF entity identifier. In one example, the CTF queries a correspondence table based on the CTF entity identifier to determine the address of the first R-CHF entity, where the correspondence table is a correspondence table between the CTF entity identifier, the R-CHF entity identifier, and the R-CHF entity address.

[0338] Method 2: The CTF entity determines the address of the first R-CHF entity based on the location information of the user equipment. In one example, the CTF entity determines the location of the user equipment based on the location information of the user equipment, then determines the CHF entity that provides billing for the area to which the user equipment belongs, identifies the CHF entity as the first R-CHF entity, and obtains the address of the first R-CHF entity.

[0339] Method 3: The CTF entity determines the address of the first R-CHF entity based on the service information used by the user equipment. The R-CHF is the CHF entity that provides billing for the services used by the user equipment. If there are multiple CHF entities that provide billing for the services used by the user equipment, the CTF entity selects the CHF entity with the shortest distance between its coverage area and the user equipment as the first R-CHF entity.

[0340] It should be understood that the above correspondence table, CHF coverage area, and CHF-provided billable service information are stored in a network resource function (NRF) entity or in the billing configuration information of a CTF entity.

[0341] S802: The CTF entity sends a first charging request to the first R-CHF entity.

[0342] The first charging request is a first charging resource update request or a first charging resource release request, used to request the update or release of the first charging resource between the second R-CHF entity and the CTF entity. The first charging request carries a first charging resource identifier between the CTF entity and the second R-CHF entity. The first charging request includes charging information, a charging resource identifier, and user information. The charging resource identifier is generated by the second R-CHF entity for the CTF entity.

[0343] S803: The first R-CHF entity performs abnormal charging processing and generates a second charging request.

[0344] Because the second R-CHF entity is unreachable, the first R-CHF entity cannot obtain the first charging resource between the CTF entity and the second CHF entity from the second R-CHF entity, nor can it obtain the second charging resource between the second R-CHF entity and the primary CHF entity. Therefore, the first R-CHF entity performs abnormal charging processing, including:

[0345] The first R-CHF entity creates a third billing resource based on the first billing resource identifier and user information included in the first billing request, uses the identifier of the first billing resource as the identifier of the third billing resource, and performs a billing operation based on the third billing resource and the billing information, such as opening the first R-CHF call record. It should be understood that opening the first R-CHF call record refers to creating the first R-CHF call record to facilitate writing billing data.

[0346] Because the first R-CHF entity cannot obtain the second billing resource between the second R-CHF entity and the primary CHF entity, the first R-CHF entity generates a second billing request, which is used to request the establishment of a converged billing session between the first R-CHF entity and the primary CHF entity. The second billing request includes the billing information and user identifier in the first billing request. Optionally, the second billing request also includes capability information determined by the first R-CHF entity. This capability information represents the capabilities for interaction between the primary CHF entity and the first R-CHF entity. This capability information is determined by the first R-CHF entity based on capability information supported by the CTF entity. The capability information supported by the CTF entity is capability information provided by the CTF entity and can be used for interaction between the first R-CHF entity and the CTF entity.

[0347] The capability information determined by the first R-CHF entity includes at least one of a payload size of a charging message for a second charging resource supported by the first R-CHF entity, an idle time duration for charging information collection of the first R-CHF entity for the second charging resource, or a charging characteristic.

[0348] The capability information supported by the CTF entity includes at least one of a payload size of a charging message for the first charging resource supported by the CTF entity, an idle time duration for charging information collection of the CTF entity for the first charging resource, or a charging feature.

[0349] S804: The first R-CHF entity sends a second charging request to the primary CHF entity.

[0350] S805: The main CHF entity performs charging processing.

[0351] Specifically, the primary CHF determines the existing billing resource (i.e., the billing resource identifier allocated by the primary CHF for billing the user on the second R-CHF) based on the user identifier, billing ID, and other information in the second billing request, performs billing processing (such as granting quota, deducting quota usage, writing to the primary CHF call record, etc.), and returns the existing billing resource identifier.

[0352] It should be understood that each user has its own billing resources. The second billing request includes a user identifier. The billing resources corresponding to the second billing request refer to the billing resources corresponding to the user indicated by the user identifier in the second billing request.

[0353] S806: The primary CHF entity sends a second charging response message to the first R-CHF entity.

[0354] The second charging response message is used to respond to the second charging request. The second charging response message includes a charging processing result and an identifier of a charging resource corresponding to the second charging request.

[0355] S807: The first R-CHF entity generates a first charging response message.

[0356] The first billing response message includes the content of the second billing response message and trigger configuration information. The trigger configuration information includes trigger conditions for reporting billing information, such as whether billing information is reported, whether billing information is delayed in reporting, and whether billing information is reported when parameter values ​​meet preset values.

[0357] S808. The first R-CHF entity sends a first charging response message to the CTF entity.

[0358] S809. The CTF entity processes the service according to the first charging response message.

[0359] Specifically, when the billing processing result is billing failure, the CTF entity retransmits the billing information or terminates the service; when the billing processing result is billing success, the CTF entity continues to collect offline one-time event billing information, online billing information, etc.

[0360] Optionally, after the first R-CHF entity detects that the second R-CHF entity is restored, the first R-CHF entity sends a charging resource migration notification to the second R-CHF entity to instruct the second R-CHF entity to delete the locally stored first charging resource of the user generated for the CTF.

[0361] In the case where a charging session has been established between the CTF entity and the second R-CHF entity and a charging session has been established between the first R-CHF entity and the primary CHF entity, when the interaction between the first R-CHF entity and the second R-CHF entity is abnormal, the above processing can enable the charging process to proceed normally.

[0362] See Figure 9, which is an interactive flow diagram of another method for handling billing exceptions provided by an embodiment of the present application. The embodiment shown in Figure 9 is for a scenario where a billing session has been established between a CTF entity and a primary CHF entity. As shown in Figure 9, the method includes:

[0363] S901: The CTF entity detects that the main CHF entity is abnormal, and determines the address of the first R-CHF entity.

[0364] It should be noted that the specific implementation process of the CTF entity detecting the abnormality of the main CHF entity can be referred to the relevant description of S501 and will not be described here. The specific process of the CTF entity determining the first R-CHF entity can be referred to the relevant description of S801 and will not be described here.

[0365] S902: The CTF entity sends a first charging request to the first R-CHF entity.

[0366] The first charging request is a first charging resource creation request, which is used to request the creation of a first charging resource for charging interaction between the CTF entity and the first R-CHF entity. The first charging request includes charging resource-related information generated by the primary CHF entity for the CTF entity. The charging resource-related information is used by the first R-CHF to send a second charging request to the primary CHF.

[0367] S903: The first R-CHF entity performs abnormal charging processing and generates a second charging request.

[0368] The first R-CHF entity performs abnormal charging processing, including:

[0369] The first R-CHF entity generates, according to the first charging request, an identifier of a first charging resource used for charging interaction between the CTF entity and the first R-CHF entity.

[0370] Since the main CHF entity is abnormally unreachable, the first R-CHF entity performs abnormal billing processing. For the specific process, please refer to the relevant description of S602 for the billing information including billing information without quota management and for the billing information including billing information with quota management and no available quota, which will not be described again here.

[0371] S904: The first R-CHF entity sends a first charging response message to the CTF entity.

[0372] The first billing response message is used to respond to the first billing request. Optionally, if the CTF entity supports the suspended quota management capability, the first billing response message also includes suspended quota indication information, which is used to instruct the CTF entity to continue the service in accordance with the suspended quota management mode; if the first R-CHF entity performs a quota granting operation, the first billing response message also includes the quota granted by the first R-CHF entity. Optionally, if the first R-CHF assigns a new billing resource identifier to the first billing resource generated above to replace the billing resource identifier included in the first billing request, the first billing response message also includes the new billing resource identifier.

[0373] S905. The CTF entity processes the service according to the first charging response message.

[0374] The processing service includes collecting offline one-time event billing information. Optionally, if the first billing response message includes quota suspension indication information, the CTF collects the online quota usage of the quota suspension. Optionally, if the first billing response message includes the quota granted by the first R-CHF entity, the CTF entity monitors the usage of the granted quota.

[0375] S906: The first R-CHF entity detects that the main CHF entity is normal.

[0376] After detecting that the main CHF entity is normal, the first R-CHF entity gradually resumes sending according to the congestion control mechanism to avoid new congestion.

[0377] S907: The first R-CHF entity sends a charging message to the CTF entity.

[0378] The charging message is used to instruct the CTF entity to resume suspended quota management. Optionally, the charging message is sent via a charging notification message or a charging response. It should be understood that the charging notification message is proactively sent by the first R-CHF entity to the CTF entity. The charging message is sent via a charging response, meaning that the charging message is included in the charging response sent by the first R-CHF entity to the CTF entity.

[0379] S908. The CTF entity sends a third charging request to the first R-CHF entity.

[0380] The first billing request is for a quota request, and the third billing request includes the requested quota amount. Optionally, the third billing request also includes the quota usage when the quota is suspended.

[0381] S909: The first R-CHF entity sends a second charging request to the primary CHF entity.

[0382] The second billing request is a third billing resource update or release request, used to request the update or release of third billing resources for billing interactions between the CTF entity and the primary CHF entity. The second billing request may also include billing information cached by the first R-CHF entity, namely, the billing information and the corresponding quota suspension indicator or quota consumption indicator. If the first R-CHF entity receives a third billing request sent by the CTF entity after resuming suspended quota management, the second billing request also includes the quota request and usage amount carried in the third billing request.

[0383] Optionally, the second charging request further includes capability information sent by the first R-CHF entity. The capability information includes at least one of a payload size of a charging message for a second charging resource supported by the first R-CHF entity, a second idle duration for charging information collection by the first R-CHF entity for the second charging resource, or a second charging characteristic.

[0384] Since the main CHF entity is unreachable, the first R-CHF entity needs to obtain the address of the main CHF entity to interact with the main CHF entity.

[0385] It should be noted that the specific process of the first R-CHF entity determining the address of the main CHF entity can be found in the relevant content of S508 and will not be described again here.

[0386] S910: The main CHF entity performs charging processing.

[0387] Specifically, the second charging request includes charging information cached by the first R-CHF entity. If the cached charging information includes charging information and a corresponding quota suspension indicator, the primary CHF entity directly deducts the service usage in the charging information from the account balance corresponding to the second charging resource based on the charging information corresponding to the quota suspension indicator. If the cached charging information includes charging information and a corresponding quota consumption indicator, the primary CHF entity deducts the charging information from the account balance corresponding to the second charging resource based on the charging information corresponding to the quota consumption indicator and releases the locked quota. If the charging information cached by the first R-CHF entity includes offline service usage, the primary CHF entity writes the offline service usage into the primary CHF call record. Optionally, if the second charging request includes the requested quota amount, the primary CHF entity performs quota granting based on the requested quota amount.

[0388] S911. The primary CHF entity sends a second charging response message to the first R-CHF entity.

[0389] Optionally, when the second charging request is a charging resource creation request, the second charging response message includes an identifier of the charging resource bound to the second charging request. Optionally, the second charging response message also includes capability information fed back by the primary CHF entity.

[0390] The capability information fed back by the primary CHF entity includes at least one of the following: a payload size of a charging message for the second charging resource, an idle time for charging information collection by the first R-CHF entity for the second charging resource, a third charging characteristic, or a trigger condition setting for the second charging resource. The trigger condition setting includes trigger conditions for reporting charging information, such as whether to report the charging information, whether to delay reporting the charging information, and reporting when a parameter value of the charging information meets a preset value.

[0391] S912: The first R-CHF entity sends a third charging response message to the CTF entity.

[0392] The third charging response message includes the content in the second charging response message and the content supplemented or modified by the first R-CHF entity, such as trigger configuration information.

[0393] S913: The first R-CHF entity sends the cached first R-CHF call record to the master CHF entity.

[0394] S914: The primary CHF entity performs billing processing according to the first R-CHF call record.

[0395] It should be pointed out here that the specific implementation process of S913-S914 can be found in the relevant description of S510-S513 and will not be described again here.

[0396] It should be noted that steps S907-S908 and S912 are optional. Alternatively, steps S907-S908 may be executed first, followed by steps S909-S912; alternatively, steps S909-S911 may be executed directly. There is no clear order for executing steps S909-S911 and S913-S914. Alternatively, steps S909-S911 may be executed first, followed by steps S913-S914; alternatively, steps S913-S914 may be executed first, followed by steps S909-S911; alternatively, steps S909-S911 and S913-S914 may be executed simultaneously.

[0397] In the case where a charging session has been established between the CTF entity and the primary CHF entity, when the interaction between the first R-CHF entity and the primary CHF entity is abnormal, the above process can enable the charging process to proceed normally.

[0398] 10 is a schematic diagram of the structure of a first R-CHF entity provided in an embodiment of the present application. The first R-CHF entity is the R-CHF entity 202 in FIG2 . As shown in FIG10 , the first R-CHF entity 1000 includes a transceiver unit 1001 and a processing unit 1002 .

[0399] The transceiver unit 1001 is configured to receive a first charging request sent by a CTF entity,

[0400] The processing unit 1002 is configured to detect that the target CHF entity interaction related to the first charging request is abnormal and perform abnormal charging processing;

[0401] The target CHF entity is the main CHF entity or the second R-CHF entity. The main CHF entity provides online quota management and billing call record generation. The second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

[0402] In conjunction with the third aspect, in one possible implementation, the target CHF entity is a primary CHF entity corresponding to the first charging request, the first charging request is a charging resource creation request for establishing a convergent charging session, and is used to request establishment of a charging interaction session between the CTF entity and the first R-CHF entity. The processing unit 1002 is specifically configured to:

[0403] Generate a first charging resource for charging interaction between the CTF entity and the first R-CHF entity; cache charging information in the first charging request;

[0404] The transceiver unit is further configured to send a first charging response message for responding to the first charging request to the CTF entity, where the first charging response message includes an identifier of the first charging resource.

[0405] In combination with the third aspect, in one possible implementation, if the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0406] In combination with the third aspect, in one possible implementation, the first billing response message includes the granted quota, and the CTF entity receives usage of the granted quota, and the cached billing information includes a quota suspension identifier corresponding to the usage of the granted quota.

[0407] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information in the first billing request, the processing unit 1002 is specifically configured to:

[0408] The charging information in the first charging request is written into the first R-CHF bill or stored in the first charging resource.

[0409] In conjunction with the third aspect, in one possible implementation, the transceiver unit 1001 is further configured to:

[0410] When it is detected that the target CHF entity interaction related to the first charging request is normal, a second charging request is sent to the primary CHF entity, where the second charging request is a second charging resource creation request, used to request the creation of a second charging resource for the charging interaction between the first R-CHF entity and the primary CHF entity, or the second charging request is a third charging resource update or release request, used to request the update or release of the third charging resource for the charging interaction between the CTF and the primary CHF entity.

[0411] In conjunction with the third aspect, in one possible implementation, the second billing request carries cached billing information.

[0412] In conjunction with the third aspect, in one possible implementation, the transceiver unit 1001 is further configured to:

[0413] When the processing unit 1002 detects that the target CHF entity related to the first charging request interacts normally, it sends a first R-CHF call record to the primary CHF entity. Here, the target CHF entity related to the first charging request is the primary CHF entity.

[0414] In conjunction with the third aspect, in a possible implementation,

[0415] The transceiver unit 1001 is also used to send a notification message to the CTF entity before generating the second billing request, where the notification message is used to instruct the CTF entity to restore quota management; receive a third billing request sent by the CTF entity, where the third billing request carries a quota request and usage for resuming quota management; and the second billing request includes the quota request and usage carried by the third billing request.

[0416] In conjunction with the third aspect, in one possible implementation, the target CHF is a primary CHF entity corresponding to the first charging request, the first charging request is a first charging resource update request or a first charging resource release request, and is used to request updating or releasing a first charging resource for a charging interaction between the first R-CHF entity and the CTF entity. The processing unit 1002 is specifically configured to: cache charging information for the first charging request;

[0417] The transceiver unit 1001 is further configured to send a first charging response message in response to the first charging request to the CTF entity.

[0418] In combination with the third aspect, in one possible implementation, if the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to the suspended quota management mode.

[0419] In conjunction with the third aspect, in one possible implementation, the cached billing information includes first billing information and a corresponding quota consumption identifier, or second billing information and a corresponding quota suspension identifier, the first billing information is the billing information in which the available quota granted by the primary CHF entity is used, and the second billing information is the billing information in which the available quota granted by the primary CHF entity is not used.

[0420] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information of the first billing request, the processing unit 1002 is further configured to:

[0421] The first billing information and the corresponding quota consumption identifier, or the second billing information and the corresponding quota suspension identifier are written into the first R-CHF call record or saved in the first billing resource.

[0422] In conjunction with the third aspect, in one possible implementation, the transceiver unit 1001 is further configured to:

[0423] When it is detected that the target CHF interaction related to the first charging request is normal, a second charging request is sent to the primary CHF entity. The second charging request is a second charging resource update request or a second charging resource release request, which is used to request to update or release the second charging resource of the charging interaction between the first R-CHF entity and the primary CHF entity.

[0424] In conjunction with the third aspect, in one possible implementation, the transceiver unit 1001 is further configured to:

[0425] When the processing unit 1002 detects that the target CHF interaction related to the first charging request is normal, it sends a first R-CHF call record to the primary CHF entity.

[0426] In conjunction with the third aspect, in one possible implementation, the second billing request carries billing information and a corresponding quota suspension identifier or quota consumption identifier.

[0427] In conjunction with the third aspect, in one possible implementation, the transceiver unit 1001 is further configured to:

[0428] Before generating the second charging request, a notification message is sent to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; a third charging request is received from the CTF entity, where the third charging request carries the quota request and usage for resuming quota management; and the second charging request includes the quota request and usage carried in the third charging request.

[0429] In conjunction with the third aspect, in one possible implementation, the target CHF entity is a primary CHF entity corresponding to the first billing request, the first billing request is a one-time event billing request for online direct deduction or offline one-time event billing, and the processing unit 1002 is further configured to: cache billing information of the first billing request;

[0430] The transceiver unit 1001 is further configured to send a first charging response message in response to the first charging request to the CTF entity.

[0431] In conjunction with the third aspect, in one possible implementation, in terms of caching the billing information of the first billing request, the processing unit 1002 is specifically configured to: write the billing information and corresponding online direct debit indication information or offline one-time event billing indication information into the first R-CHF call record;

[0432] The transceiver unit 1001 is further configured to send a first R-CHF call record to the primary CHF entity when detecting that the target CHF interaction related to the first charging request is normal.

[0433] In conjunction with the third aspect, in one possible implementation, the processing unit 1002 is specifically configured to:

[0434] Saving the billing information of the first billing request and the corresponding online direct deduction indication information or offline one-time event billing indication information in the first billing resource;

[0435] When it is detected that the target CHF interaction related to the first billing request is normal, a second billing request is generated. The second billing request is a one-time event billing request. The second billing request carries billing information and corresponding online direct deduction indication information or offline one-time event billing indication information;

[0436] The transceiver unit 1001 is further configured to send a second charging request to the primary CHF entity.

[0437] With reference to the third aspect, in one possible implementation, the target CHF entity is a second R-CHF entity, and the first charging request is a first charging resource update request or a first charging resource release request, which is used to request updating or releasing a first charging resource for charging interaction between the second R-CHF entity and the CTF entity; and the processing unit 1002 is specifically configured to:

[0438] generating, based on the first charging request, a fourth charging resource between the CTF entity and the first R-CHF entity, and using the first charging resource identifier as an identifier of the fourth charging resource; generating, based on the first charging request, a second charging request, wherein the second charging request is used to request creation of a second charging resource for a charging interaction between the first R-CHF entity and the primary CHF entity, and the second charging request carries an identifier of the third charging resource;

[0439] The transceiver unit 1001 is further configured to send a second charging request to the primary CHF entity and receive a second charging response message from the primary CHF entity in response to the second charging request; the second charging response message carries an identifier of a second charging resource;

[0440] The processing unit 1002 is further configured to generate a first accounting response message for responding to the first accounting request according to the second accounting response message;

[0441] The transceiver unit 1001 is further configured to send a first charging response message to the CTF entity.

[0442] It is worth noting that the specific functional implementation of the first R-CHF entity 1000 is described in the description of the above-mentioned billing exception handling method. For example, the transceiver unit 1001 and the processing unit 1002 are used to execute the relevant contents of S301 and S302. Each unit or module in the first R-CHF entity 1000 can be individually or completely combined into one or more other units or modules, or one or more of the units or modules can be further divided into multiple functionally smaller units or modules to achieve the same operation without affecting the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), and the functions of multiple units (or modules) are implemented by one unit (or module).

[0443] FIG11 shows a schematic diagram of the structure of a master CHF entity provided in an embodiment of the present application. The master CHF entity provides online quota management and billing record generation. The master CHF entity is the master CHF entity 203 in FIG2 . The master CHF entity 1100 includes:

[0444] The transceiver unit 1101 is further configured to receive relevant billing information cached by the first R-CHF entity, where the cached relevant billing information is carried in a billing call record or a billing message, and the cached relevant billing information includes the billing information and a corresponding quota suspension identifier or quota consumption identifier;

[0445] The processing unit 1102 is configured to perform billing processing according to the quota suspension identifier or the quota consumption identifier.

[0446] In one possible implementation, the processing unit 1102 is specifically configured to:

[0447] The service usage in the billing information is directly deducted from the corresponding account balance in the billing resource of the main CHF entity;

[0448] The processing unit is also used to:

[0449] If the cached billing information has a corresponding quota consumption identifier, the service usage in the billing information is directly deducted from the corresponding account of the first billing resource, and the locked account balance is released at the same time; or

[0450] If the cached billing information includes billing information without quota management, the billing information without quota management is written into the main CHF call record.

[0451] It is worth noting that the specific functional implementation of the main CHF entity 1100 is described in the description of the above-mentioned billing exception handling method. For example, the transceiver unit 1101 is used to execute the relevant content of S401, and the processing unit 1102 is used to execute the relevant content of S402. Each unit or module in the main CHF entity 1100 can be individually or completely combined into one or more other units or modules, or one or more of the units or modules can be further divided into multiple functionally smaller units or modules to achieve the same operation without affecting the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), and the functions of multiple units (or modules) are implemented by one unit (or module).

[0452] Based on the description of the above method embodiments and related device embodiments, please refer to Figure 12, which shows a schematic diagram of the structure of an electronic device 1200 provided in an embodiment of the present invention. The electronic device 1200 can be the R-CHF entity 202 or the master CHF entity 203 in Figure 2, or the first R-CHF entity 1000 shown in Figure 10, or the master CHF entity 1100 shown in Figure 11. The electronic device 1200 shown in Figure 12 (specifically, the electronic device 1200 is a computer device) includes a memory 1201, a processor 1202, a communication interface 1203, and a bus 1204. The memory 1201, the processor 1202, and the communication interface 1203 are connected to each other via the bus 1204.

[0453] Optionally, the memory 1201 is a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).

[0454] The memory 1201 can store programs. When the program stored in the memory 1201 is executed by the processor 1202, the processor 1202 and the communication interface 1203 are used to execute the various steps of the billing exception processing method of the embodiment shown in Figure 3 or Figure 4.

[0455] The processor 1202 uses a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the R-CHF entity 202 or the main CHF entity 203 in the embodiment of the present application, or to execute the billing exception handling method in the method embodiment of the present application.

[0456] Processor 1202 can also be an integrated circuit chip with signal processing capabilities. During implementation, each step of the billing exception handling method of the present application can be completed by hardware integrated logic circuits or software instructions in processor 1202. Optionally, processor 1202 is a general-purpose processor, a digital signal processor (DSP), an ASIC, a field programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. Processor 1202 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module is located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 1201. The processor 1202 reads the information in the memory 1201 and, in combination with its hardware, completes the functions required to be performed by the units included in the R-CHF entity 202 or the main CHF entity 203 of the embodiment of the present application, or executes the billing exception handling method of the embodiment shown in Figure 3 or Figure 4.

[0457] The communication interface 1203 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the electronic device 1200 and other devices or a communication network.

[0458] The bus 1204 may include a path for transmitting information between various components of the electronic device 1200 (eg, the memory 1201 , the processor 1202 , and the communication interface 1203 ).

[0459] It should be noted that although the electronic device 1200 shown in FIG12 only shows a memory, a processor, and a communication interface, in the specific implementation process, those skilled in the art should understand that the electronic device 1200 also includes other components necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 1200 may also include hardware components for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 1200 may also include only the components necessary to implement the embodiments of the present application, and does not necessarily include all the components shown in FIG12.

[0460] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the billing exception handling method of the embodiment of the present application.

[0461] Optionally, as an implementation method, the chip further includes a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the billing exception handling method.

[0462] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or processor executes one or more steps in any of the above methods.

[0463] The present application also provides a computer program product comprising instructions, which, when executed on a computer or processor, causes the computer or processor to execute one or more steps in any of the above methods.

[0464] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented by hardware, software, firmware, or any combination thereof. If implemented in software, the functions described by the various illustrative logic blocks, modules, and steps may be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any media that facilitates the transfer of computer programs from one place to another (e.g., based on a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.

[0465] By way of example, and not limitation, such computer-readable storage media include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are actually directed to non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and Blu-ray disc. Disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above are also intended to be included within the scope of computer-readable media.

[0466] Instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Thus, the term "processor," as used herein, may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described by the various illustrative logical blocks, modules, and steps described herein is provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements.

[0467] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there are other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Optionally, the mutual coupling, direct coupling, or communication connection shown or discussed is an indirect coupling or communication connection through some interfaces, devices or units, such as electrical, mechanical or other forms.

[0468] Optionally, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., located in one place, or distributed across multiple network units. Some or all of the units may be selected based on actual needs to achieve the purpose of the solution of this embodiment.

[0469] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.

[0470] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for handling billing exceptions, characterized in that: Applied to a first relay charging function R-CHF entity, the method comprises: Receiving a first charging request sent by a charging trigger function CTF entity; Determine that the target CHF entity interaction related to the first charging request is abnormal, and perform abnormal charging processing; the target CHF entity is a main CHF entity or a second R-CHF entity, and the main CHF entity provides online quota management and billing call record generation; the second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

2. The method according to claim 1, characterized in that When the target CHF is the primary CHF entity, the first charging request is a first charging resource creation request for requesting to create a first charging resource for charging interaction between the CTF entity and the first R-CHF entity, and the performing abnormal charging processing includes: generating a first charging resource for a charging interaction between the CTF entity and the first R-CHF entity; caching the billing information in the first billing request; A first charging response message for responding to the first charging request is sent to the CTF entity, where the first charging response message includes an identifier of the first charging resource.

3. The method according to claim 2, characterized in that If the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to a suspended quota management mode.

4. The method according to claim 3, characterized in that When the first charging response message includes the granted quota and the usage of the granted quota by the CTF entity is received, the cached charging information includes a quota suspension identifier corresponding to the usage.

5. The method according to any one of claims 2 to 4, characterized in that: The caching the billing information in the first billing request includes: The billing information is written into the first R-CHF call record or saved in the first billing resource.

6. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: When it is detected that the target CHF entity interaction related to the first charging request is normal, a second charging request is sent to the main CHF entity, wherein the second charging request is a second charging resource creation request, which is used to request the creation of a second charging resource for the charging interaction between the first R-CHF entity and the main CHF entity, or the second charging request is a third charging resource update or release request, which is used to request the update or release of the third charging resource for the charging interaction between the CTF entity and the main CHF entity.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: When it is detected that the target CHF entity interaction related to the first charging request is normal, the first R-CHF call record is sent to the main CHF entity.

8. The method according to claim 6, characterized in that The second charging request carries the cached charging information.

9. The method according to any one of claims 6 to 8, characterized in that: The method further comprises: Before generating the second charging request, sending a notification message to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; A third charging request sent by the CTF entity is received, where the third charging request carries a quota request for resuming quota management and a usage amount; and the second charging request includes the quota request and the usage amount carried by the third charging request.

10. The method according to claim 1, characterized in that The target CHF is a primary CHF entity corresponding to the first charging request, the first charging request is a first charging resource update request or a first charging resource release request, which is used to request to update or release a first charging resource for charging interaction between the first R-CHF entity and the CTF entity, and the performing abnormal charging processing includes: caching the billing information of the first billing request; Sending a first charging response message in response to the first charging request to the CTF entity.

11. The method according to claim 10, characterized in that If the first charging request includes a quota request, the first response message includes suspended quota indication information or a granted quota, and the suspended quota indication information is used to instruct the CTF entity to continue the service according to a suspended quota management mode.

12. The method according to claim 10 or 11, characterized in that: The cached billing information includes first billing information and a corresponding quota consumption identifier, or second billing information and a corresponding quota suspension identifier, wherein the first billing information is the billing information in which the available quota granted by the main CHF entity is used, and the second billing information is the billing information in which the available quota granted by the main CHF entity is not used.

13. The method according to claim 12, characterized in that The caching the billing information of the first billing request includes: The first billing information and the corresponding quota consumption identifier, or the second billing information and the corresponding quota suspension identifier are written into the first R-CHF call record or saved in the first billing resource.

14. The method according to any one of claims 10 to 13, characterized in that: The method further comprises: When it is detected that the target CHF interaction related to the first charging request is normal, a second charging request is sent to the main CHF entity, where the second charging request is a second charging resource update request or a second charging resource release request, which is used to request to update or release the second charging resource of the charging interaction between the first R-CHF entity and the main CHF entity.

15. The method according to claim 13 or 14, characterized in that The method further comprises: When it is detected that the target CHF interaction related to the first charging request is normal, the first R-CHF call record is sent to the main CHF entity.

16. The method according to claim 14, characterized in that The second charging request carries the charging information and a corresponding quota suspension identifier or a quota consumption identifier.

17. The method according to claim 14, characterized in that The method further comprises: Before generating the second charging request, sending a notification message to the CTF entity, where the notification message is used to instruct the CTF entity to resume quota management; A third charging request sent by the CTF entity is received, where the third charging request carries a quota request for resuming quota management and a usage amount; and the second charging request includes the quota request and the usage amount carried by the third charging request.

18. The method according to claim 1, characterized in that The target CHF entity is a primary CHF entity corresponding to the first charging request, the first charging request is a one-time event charging request for online direct deduction or offline one-time event charging, and the performing abnormal charging processing includes: caching the billing information of the first billing request; Sending a first charging response message in response to the first charging request to the CTF entity.

19. The method according to claim 18, characterized in that The caching the billing information of the first billing request includes: Writing the charging information and corresponding online direct deduction indication information or offline one-time event charging indication information into the first R-CHF call record; The method further comprises: When it is detected that the target CHF interaction related to the first charging request is normal, the first R-CHF call record is sent to the main CHF entity.

20. The method according to claim 18, characterized in that The caching the billing information of the first billing request includes: The charging information and the corresponding online direct deduction indication information or offline one-time event charging indication information are stored in the first charging resource middle; The method further comprises: When it is detected that the target CHF interaction related to the first billing request is normal, the second billing request is sent to the main CHF entity, where the second billing request is a one-time event billing request, and the second billing request carries the billing information and corresponding online direct deduction indication information or offline one-time event billing indication information.

21. The method according to claim 1, characterized in that The target CHF entity is the second R-CHF entity, and the first charging request is a first charging resource update request or a first charging resource release request, which is used to request to update or release a first charging resource for charging interaction between the second R-CHF entity and the CTF entity; The performing of abnormal billing processing includes: generating a fourth charging resource between the CTF entity and the first R-CHF entity according to the first charging request, and using the first charging resource identifier as an identifier of the fourth charging resource; generating a second charging request according to the first charging request, and sending the second charging request to the primary CHF entity, wherein the second charging request is used to request creation of a second charging resource for charging interaction between the first R-CHF entity and the primary CHF entity, and the second charging request carries an identifier of the third charging resource; receiving a second charging response message from the primary CHF entity in response to the second charging request; generating a first charging response message for responding to the first charging request according to the second charging response message; the second charging response message carrying an identifier of the second charging resource; Sending the first charging response message to the CTF entity.

22. A method for handling billing exceptions, characterized in that: The method is applied to a main charging function CHF entity, and the main CHF entity provides online quota management and billing call record generation, and the method includes: Receiving relevant billing information cached by the first R-CHF entity, where the cached relevant billing information is carried in a billing call bill or a billing message, and the cached relevant billing information includes billing information and a corresponding quota suspension identifier or quota consumption identifier; Billing processing is performed according to the quota suspension identifier or the quota consumption identifier.

23. The method according to claim 22, characterized in that The billing process is performed according to the quota suspension identifier or the quota consumption identifier, including: Directly deducting the service usage in the billing information from the corresponding account balance in the billing resource of the primary CHF entity; The method further comprises: If the cached billing information has a corresponding quota consumption identifier, the service usage in the billing information is directly deducted from the corresponding account of the second billing resource, and the locked account balance is released at the same time; or, If the cached billing information includes billing information without quota management, the billing information without quota management is written into the main CHF bill.

24. A method for handling billing exceptions, characterized in that: The method is applied to a charging system, the charging system comprising a first relay charging function R-CHF entity, a second R-CHF entity, a charging trigger function CTF entity and a main CHF entity, and the method further comprises: The CTF entity sends a first charging request to the first R-CHF entity; The first R-CHF entity determines that the target CHF entity interaction related to the first charging request is abnormal, and performs abnormal charging processing; The target CHF entity is the main CHF entity or the second R-CHF entity, the main CHF entity provides online quota management and billing call record generation; the second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

25. A billing system, characterized in that: The charging system comprises a first relay charging function R-CHF entity, a second R-CHF entity, a charging trigger function CTF entity and a main CHF entity, The CTF entity is used to send a first charging request to the first R-CHF entity; The first R-CHF entity is used to determine that the target CHF entity interaction related to the first charging request is abnormal, and perform abnormal charging processing; The target CHF entity is the main CHF entity or the second R-CHF entity, the main CHF entity provides online quota management and billing call record generation; the second R-CHF entity is a CHF entity that provides relay for the CTF entity and the main CHF entity before the first R-CHF entity acts as a relay CHF entity.

26. A first relay charging function R-CHF entity, characterized in that: The method comprises a functional unit for implementing the method according to any one of claims 1 to 21.

27. A CHF entity, characterized in that: It comprises a functional unit for implementing the method according to any one of claims 22-23.

28. A first relay charging function R-CHF entity, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store program codes, and the processor is used to execute the program codes to implement the method according to any one of claims 1 to 21.

29. A home charging function CHF entity, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store program codes, and the processor is used to execute the program codes to implement the method according to any one of claims 22 to 23.

30. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 23 is implemented.

Citation Information

Patent Citations

  • Charging exception processing method and related equipment

    CN119497051A

  • Charging mode switching method, SMF module and converged charging system

    CN112351396A

  • Mobile network operator and mobile virtual network operator with cooperative charging functions which record service related intended actions and indications of success

    WO2023041151A1

  • Charging functions and methods for updating charging resources

    WO2023059234A1