Patent Description:
As wireless communications technologies are rapidly developed, a fifth generation (Fifth Generation, <NUM>) mobile communications technology emerges. At an early stage of network deployment, when a location of the terminal changes, a terminal may be handed over between a <NUM> network and a fourth generation (Fourth Generation, <NUM>) network due to limited coverage of the <NUM> network.

Handover between the <NUM> system and an evolved packet system (evolved packets system, EPS) may be performed between a mobility management entity (Mobile Management Entity, MME) and an access and mobility management function (Access and Mobility Management Function, AMF) entity through an N26 interface. The <NUM> system may be referred to as a 5GS, and the evolved packet system (evolved packets system, EPS) may be referred to as a 4GS.

A current <NUM> charging system includes an online charging system and an offline charging system. Online charging and offline charging are controlled by two sets of interfaces, and an online charging session and an offline charging session are separated. Therefore, when an operator deploys both a <NUM> system and the <NUM> system, there are different charging interfaces, protocols, and charging systems. As a result, it is complex to deploy the charging systems in an existing architecture. Document "<NPL>, discloses PDU session charging for interworking with EPC. Document "<NPL>) discloses procedures for the <NUM> system.

The above mentioned objects are solved by the features of the independent claims.

Embodiments of this application provide a charging method and apparatus, so that a charging session established for a terminal can adapt to different charging manners and charging systems, thereby simplifying charging system deployment.

Network interworking indicates that different networks can communicate with each other. In a network interworking scenario, terminal access can be handed over between different networks. The network interworking also indicates handover between different network data connections. Handover between different networks in the network interworking scenario may be: network handover performed by a terminal when a location of the terminal changes, handover of terminal access between the different networks due to a change of signal strength of the different networks, or network handover because a user actively chooses to gain access to a different network. Network handover may be handover between a <NUM> network and a <NUM> network. The <NUM> network may also be referred to as an evolved packet system (evolved packet system, EPS).

The network architecture and the service scenario described in the embodiments of the present invention are intended to describe the technical solutions in the embodiments of the present invention more clearly, and do not constitute a limitation on the technical solutions provided in the embodiments of the present invention. A person of ordinary skill in the art may know that: With the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present invention are also applicable to similar technical problems.

Embodiments of the present invention provide a charging method and an apparatus, to perform charging in a <NUM> data connection, and perform charging in a scenario in which handover is performed between a first network and a second network. The first network may be a <NUM> network, and the second network may be a <NUM> network. In another optional manner, the first network may be a <NUM> network, and the second network is a <NUM> network.

Embodiments of the present invention provide a charging method and an apparatus, applicable to a system <NUM> in an interworking architecture shown in <FIG>. It should be noted that the embodiments of the present invention are similarly applicable to interworking between another conventional network and a network based on a service-based architecture.

Alternatively, as shown in <FIG>, the system <NUM> includes a user plane function entity <NUM>, a control plane function entity <NUM>, a policy control function entity <NUM>, and a user subscription database <NUM> that are integrated in a <NUM> network and a <NUM> network. The integrated control plane function entity <NUM> includes a packet data network (packet data network, PDN) gateway control plane function (PDN gateway control plane function, PGW-C) in the <NUM> network and a session management function (session management function, SMF) in the <NUM> network. The integrated user plane function entity <NUM> includes a user plane function (user plane function, UPF) and a PDN gateway control plane function (PGW-U). The integrated policy control function entity <NUM> includes a policy control function (policy control function, PCF) and a policy and charging rules function (policy and charging rules function, PCRF). The integrated user subscription database <NUM> includes a home subscriber server (Home Subscriber Server, HSS) and unified data management (unified data management, UDM). The system <NUM> further includes an SBI-based charging function (Charging Function, CHF) entity <NUM> in the <NUM> network. The system <NUM> further includes a <NUM> online charging system (not shown in the figure) and a <NUM> offline charging system (not shown in the figure).

In the foregoing integrated entity, the UPF entity is a user plane function entity in the <NUM> network, and the PGW-U entity is a gateway user plane function in the <NUM> network. The SMF entity is a session management function entity in the <NUM> network, and the PGW-C entity is a control plane function entity of a data gateway in the <NUM> network. The PCF entity is a policy control function entity in the <NUM> network. The PCRF entity is a policy and charging rules function entity in the <NUM> network. "Integrated" herein indicates that a same device has functions of both a network entity in the <NUM> network and a corresponding entity in the <NUM> network. Therefore, an integrated entity may support the <NUM> network and the <NUM> network.

The integrated user plane function entity <NUM> may be referred to as a user plane function entity for short. The integrated control plane function entity <NUM> may be referred to as a control plane function entity for short. The integrated policy control function entity <NUM> may be referred to as a policy control function entity <NUM> for short. The integrated user subscription database <NUM> may be referred to as a user subscription database <NUM> for short. The foregoing network devices obtained after the integrated configuration may also use other names. This is not specifically limited in this embodiment of this application.

In addition, the system <NUM> shown in <FIG> may further include a mobility management entity (Mobility Management Entity, MME) <NUM> and a serving gateway (Serving Gateway, SGW) <NUM> in the <NUM> network, and an access and mobility management function (Access and Mobility Management Function, AMF) entity <NUM> in the <NUM> network.

A terminal <NUM> gains access to the <NUM> network by using an evolved universal terrestrial radio access network (evolved universal terrestrial radio access network, E-UTRAN) device <NUM>, and the terminal <NUM> gains access to the <NUM> network by using a next generation radio access network (next generation radio access network, NG-RAN) device <NUM>. The E-UTRAN device <NUM> communicates with the MME <NUM> through an S1-MME interface.

It should be noted that names of interfaces between network elements in <FIG> are only examples, and the interfaces may have other names during specific implementation. This is not specifically limited in this embodiment of this application.

Certainly, there may be another network element in the <NUM> network and the <NUM> network. For example, the <NUM> network may further include an authentication server function (authentication server function, AUSF) entity, a network slice selection function (network slice selection function, NSSF) entity, and the like, this is not specifically limited in this embodiment of this application.

A PDN connection or an IP connectivity access network (IP connectivity access network session, IP-CAN session) connection in the <NUM> network is supported by the PGW-C in the network element <NUM> integrated by the PGW-C and the SMF and the PGW-U in the network element <NUM> integrated by the PGW-U and the UPF. The PDN connection or the IP-CAN session may be referred to as a <NUM> data connection. After terminal access is handed over from the <NUM> network to the <NUM> network, a PDU session obtained after the handover is supported by the SMF in the control plane function entity <NUM> and the UPF in the integrated user plane function entity <NUM>.

The terminal (terminal) <NUM> in this embodiment of this application includes a device that supports only to gain access to the <NUM> network, or may include a device that supports to gain access to both the <NUM> network and the <NUM> network. These devices may include various handheld devices, in-vehicle devices, wearable devices, or computing devices that have a wireless communication function, or other processing devices connected to a wireless modem, may further include a cellular phone (cellular phone), a smartphone (smart phone), a wireless data card, a personal digital assistant (personal digital assistant, PDA) computer, a tablet computer, a wireless modem (modem), a laptop computer (laptop computer), a machine type communication (machine type communication, MTC) terminal, user equipment (user equipment, UE), or the like. For ease of description, the foregoing devices are collectively referred to as a terminal in this application.

In the descriptions of this application, unless otherwise specified, "a plurality of" means two or more than two. In addition, for convenience of clear description of the technical solutions in the embodiments of this application, in the embodiments of this application, terms such as "first" and "second" are used to distinguish between same objects or similar objects whose functions and purposes are basically the same. A person skilled in the art may understand that the terms, such as "first" and "second", are not intended to limit a quantity or an execution sequence; and the terms, such as "first" and "second", do not indicate a definite difference. "A and/or B" in the present invention may be explained as any one of A or B, or include A and B.

As shown in <FIG>, the network element or the device shown in <FIG>, for example, the terminal <NUM>, the MME <NUM>, the AMF <NUM>, the control plane function entity <NUM>, the policy control function entity <NUM>, the user subscription database <NUM>, the E-UTRAN <NUM>, or the NG-RAN <NUM>, may be implemented in a communications device (or system) in <FIG>.

<FIG> is a schematic diagram of a hardware structure of the communications device according to an embodiment of this application. The communications device <NUM> includes at least one processor <NUM>, a communications line <NUM>, a memory <NUM>, and at least one communications interface <NUM>.

The processor <NUM> may be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, an application-specific integrated circuit (application-specific integrated circuit, ASIC), or one or more integrated circuits that are configured to control execution of a program in a solution of this application.

The communications line <NUM> may include a path for transmitting information between the foregoing components.

The communications interface <NUM> uses any apparatus such as a transceiver, to communicate with another device or a communications network, for example, the Ethernet, a radio access network (radio access network, RAN), or wireless local area networks (wireless local area networks, WLAN).

The memory <NUM> may be a read-only memory (read-only memory, ROM) or another type of static storage device that can store static information and instructions, or random access memory (random access memory, RAM) or another type of dynamic storage device that can store information and instructions. The memory <NUM> may alternatively be an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM) and a compact disc read-only memory (compact disc read-only memory, CD-ROM) or another compact disc storage, optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray optical disc, and the like) and a magnetic disk storage medium or another magnetic storage device. The memory <NUM> may alternatively be any other medium that can be used to carry or store expected program code in a form of an instruction or a data structure and that can be accessed by a computer, but is not limited thereto. The memory may exist independently, and is connected to the processor through the communications line <NUM>. The memory may alternatively be integrated with the processor.

The memory <NUM> is configured to store a computer execution instruction for executing the solutions of this application, and the processor <NUM> controls the execution. The processor <NUM> is configured to execute the computer execution instruction stored in the memory <NUM>, to implement a session establishment method provided in the following embodiments of this application.

Optionally, the computer execution instructions in this embodiment of this application may also be referred to as application program code. This is not specifically limited in this embodiment of this application.

During specific implementation, in an embodiment, the processor <NUM> may include one or more CPUs.

During specific implementation, in an embodiment, the communications device <NUM> may include a plurality of processors, for example, the processor <NUM> and a processor <NUM> in <FIG>. Each of the processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor herein may be one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).

During specific implementation, in an embodiment, the communications device <NUM> may further include an output device <NUM> and an input device <NUM>. The output device <NUM> communicates with the processor <NUM>, and may display information in a plurality of manners. For example, the output device <NUM> may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, a projector (projector), or the like. The input device <NUM> communicates with the processor <NUM>, and may receive input from a user in a plurality of manners. For example, the input device <NUM> may be a mouse, a keyboard, a touchscreen device, or a sensing device.

The foregoing communications device <NUM> may be a general-purpose device or a dedicated device. During specific implementation, the communications device <NUM> may be a desktop computer, a portable computer, a network server, a single-chip microcomputer, a blade server, a palmtop computer (personal digital assistant, PDA), a mobile phone, a tablet computer, a wireless terminal device, an embedded device, any network entity, or a device having a structure similar to that in <FIG>. A type of the communications device <NUM> is not limited in this embodiment of this application.

The following describes in detail a session establishment method provided in the embodiments of this application with reference to <FIG>.

<FIG> is a schematic flowchart of a charging method for a <NUM> data connection according to an embodiment of this application. In this embodiment, a terminal <NUM> may be a <NUM> terminal that supports a <NUM> network, or may be a terminal that supports both a <NUM> network and a <NUM> network. The charging method in this embodiment includes the following steps.

Step <NUM>: A control plane function entity <NUM> determines to request a charging function entity <NUM> to establish a service-based interface SBI charging session for the <NUM> data connection.

The <NUM> data connection may be a <NUM> data connection that is being established, or may be an established <NUM> data connection. The <NUM> data connection that is being established is a <NUM> data connection that is established by the control plane function entity based on a request for establishing the <NUM> data connection after receiving the request for establishing the <NUM> data connection.

Step <NUM>: The control plane function entity <NUM> and the charging function entity <NUM> establish the service-based interface (service basic interface, SBI) charging session for the <NUM> data connection.

Specifically, the control plane function entity <NUM> may send a charging service establishment message to the charging function entity <NUM>, to request to establish the SBI charging session for the <NUM> data connection. The charging function entity <NUM> returns a charging session establishment response message to the control plane function entity <NUM> to complete establishment of the SBI charging session.

Step <NUM>: The control plane function entity <NUM> and the charging function entity <NUM> perform online charging and/or offline charging in the <NUM> data connection by using the SBI charging session.

According to the method, the SBI charging session that is established by the control plane function entity <NUM> and the charging function entity <NUM> for the <NUM> data connection may support the online charging in the <NUM> data connection, and support the offline charging in the <NUM> data connection. Therefore, this simplifies a procedure of charging online data and offline data in the <NUM> data connection in the <NUM> network by using different charging sessions.

<FIG> is a schematic flowchart of a charging method when a terminal is handed over from a <NUM> data connection to a <NUM> data connection according to an embodiment of this application. In this embodiment, a <NUM> network is first accessed, and the <NUM> connection is established in the <NUM> network. Subsequently, a terminal <NUM> gains access to a <NUM> network, and establishes the <NUM> data connection in the <NUM> network.

Step <NUM>: Acontrol plane function entity <NUM> and a charging function entity <NUM> establish a service-based interface (service basic interface, SBI) charging session for the <NUM> data connection.

The establishing an SBI charging session includes: The control plane function entity <NUM> sends a charging service establishment message to the charging function entity <NUM> through an SBI. The charging service establishment request message is used to request to establish the SBI charging session for the <NUM> data connection. The charging function entity <NUM> returns a charging session establishment response message to the control plane function entity <NUM> to complete establishment of the SBI charging session.

Specifically, the control plane function entity <NUM> requests, through the SBI charging session, to perform the online charging and/or the offline charging in the <NUM> data connection. The charging function entity <NUM> performs the online charging and/or the offline charging in the <NUM> data connection based on the request of the control plane function entity <NUM>.

Step <NUM>: The terminal <NUM> is handed over from the <NUM> data connection to the <NUM> data connection.

Step <NUM>: After the handover from the <NUM> data connection the <NUM> data connection, the control plane function entity <NUM> and the charging function entity <NUM> perform online charging and/or offline charging in the <NUM> data connection by using the SBI charging session.

Optionally, the control plane function entity <NUM> may perform processing performed by a control plane function entity <NUM> in <FIG> and <FIG>. The charging function entity <NUM> may perform processing performed by a charging function entity <NUM> in <FIG> and <FIG>.

According to the foregoing method, the control plane function entity <NUM> may charge, by using the SBI charging session established for the <NUM> data connection, network usage of the <NUM> data connection after the handover. In this way, there is no need to re-establish a charging session for the <NUM> data connection after the handover, thereby simplifying a network handover and charging procedure.

Optionally, the control plane function entity <NUM> in <FIG> may perform steps performed by a control plane function entity <NUM> in <FIG>. The charging function entity <NUM> may perform steps performed by a charging function entity <NUM> in <FIG>. Therefore, the method provided in <FIG> may be further applicable to a scenario in which charging is performed when the terminal <NUM> is handed over from <NUM> data connection to <NUM> data connection.

<FIG> is a schematic flowchart of a charging method when first network data connection is handed over to second network data connection according to an embodiment of this application. In this embodiment, a terminal <NUM> first gains access to a first network, and establishes the first network connection in the first network. Subsequently, the terminal <NUM> gains access to the second network. The first network may be a <NUM> network, and the second network may be a <NUM> network. Alternatively, the second network may be a <NUM> network, and the first network may be a <NUM> network.

Step <NUM>: A control plane function entity <NUM> and a charging function entity <NUM> establish a charging session for the first network data connection.

The establishing a charging session includes: The control plane function entity <NUM> sends a charging creation message to the charging function entity <NUM>. The charging creation request message is used to request to establish the charging session for the first network data connection. The charging function entity <NUM> returns a charging session creation response message to the control plane function entity <NUM> to complete establishment of the charging session.

Step <NUM>: The control plane function entity <NUM> and the charging function entity <NUM> perform online charging and/or offline charging in the first network data connection by using the charging session.

Specifically, the control plane function entity <NUM> requests, through the charging session, to perform the online charging and/or the offline charging in the first network data connection. The charging function entity <NUM> performs the online charging and/or the offline charging in the first network data connection based on the request of the control plane function entity <NUM>.

Step <NUM>: The terminal <NUM> is handed over from the first network data connection to the second network data connection.

Step <NUM>: After the handover from the first network data connection to the second network data connection, the control plane function entity <NUM> and the charging function entity <NUM> perform online charging and/or offline charging in the second network data connection by using the charging session.

Specifically, the control plane function entity <NUM> requests, through the charging session, to perform the online charging and/or the offline charging in the second network data connection after the handover. The charging function entity <NUM> performs the online charging and/or the offline charging in the second network data connection based on the request of the control plane function entity <NUM>.

In an optional manner, the first network is the <NUM> network, and the second network may be the <NUM> network. The control plane function entity <NUM> may perform processing performed by a control plane function entity <NUM> in <FIG>. The charging function entity <NUM> may perform processing performed by a charging function entity <NUM> in <FIG>.

In an optional manner, the first network is the <NUM> network, and the second network is the <NUM> network. The control plane function entity <NUM> may perform processing performed by a control plane function entity <NUM> in <FIG> and <FIG>. The charging function entity <NUM> may perform processing performed by a charging function entity <NUM> in <FIG> and <FIG>.

In an optional manner, the charging session may be a <NUM> charging session, or may be a <NUM> charging session. A charging session established for the <NUM> data connection is the <NUM> charging session, and a charging session established for the <NUM> data connection is the <NUM> charging session.

According to the method provided in <FIG>, the charging function entity may charge, by using the charging session established for the first network data connection, network usage of the second network data connection after the handover. In this way, there is no need to re-establish a charging session for the <NUM> data connection after the handover, thereby simplifying a network handover procedure.

<FIG> is a schematic flowchart of a charging method when a terminal <NUM> is handed over from a <NUM> network to a <NUM> network according to an embodiment of this application. In this embodiment, the terminal <NUM> first gains access to the <NUM> network by using an E-UTRAN device, and establishes a PDN connection or an IP-CAN session connection in the <NUM> network. The following uses the IP-CAN session connection as an example. After gaining access to the <NUM> network, the terminal <NUM> gains access to the <NUM> network by using an NG-RAN device.

Step <NUM>: A serving gateway <NUM> initiates, to a control plane function entity <NUM>, a request for establishing an IP-CAN session.

The request for establishing the IP-CAN session is referred to as a request for establishing a <NUM> data connection. A packet data network gateway control plane function of the control plane function entity <NUM> receives, from the serving gateway <NUM>, the request for establishing the <NUM> data connection. The request for establishing the <NUM> data connection is used to request to establish the <NUM> data connection for the terminal <NUM>.

After the terminal <NUM> initiates establishment of the <NUM> data connection, the serving gateway <NUM> may initiate, to the control plane function entity <NUM>, the request for establishing the <NUM> data connection.

The <NUM> data connection may be established by the terminal <NUM> in an attach process, or may be established by the terminal <NUM> after the terminal <NUM> is attached. For a process of establishing the IP-CAN session connection, refer to an existing protocol (for example, 3GPP TS <NUM><NUM>).

Step <NUM>: The control plane function entity <NUM> determines to request a charging function entity <NUM> to establish an SBI charging session for the <NUM> data connection. The <NUM> data connection may be an IP-CAN session connection that is being established, or an established IP-CAN session connection.

After the control plane function entity <NUM> receives the request for establishing the IP-CAN session from the serving gateway <NUM>, or after a charging session of the IP-CAN session is released in a life cycle of the IP-CAN session, when the control plane function entity <NUM> determines to re-establish a charging session, step <NUM> is performed.

After receiving the request for establishing the <NUM> data connection, the control plane function entity <NUM> determines that the terminal <NUM> may be subsequently handed over to the <NUM> network, and determines to request the charging function entity <NUM> to establish the SBI charging session. It should be noted that the terminal <NUM> may establish one or more IP-CAN session connections in the <NUM> network, and the one or more IP-CAN session connections may be supported by one or more control plane function entities <NUM>. This is not limited in this embodiment of this application. For ease of description, in this embodiment of this application, only an example in which the terminal <NUM> establishes the IP-CAN session connection by using one control plane function entity is used.

The control plane function entity <NUM> requests to establish the SBI charging session with an IP-CAN session granularity for the IP-CAN session. The SBI charging session is used to send a charging update message of online and/or offline (for example, online, or offline, or online and offline) charging content of the IP-CAN Session. That the charging session granularity is an IP-CAN session means that one IP-CAN session corresponds to one charging session.

After receiving the request for establishing the IP-CAN session connection, the control plane function entity <NUM> determines to request the charging function entity to establish the SBI charging session, which may be that shown in <FIG>.

Step <NUM>: The control plane function entity <NUM> sends a charging service establishment message to the charging function entity <NUM> through an SBI, to request to establish the SBI charging session for the <NUM> data connection.

Because the SBI charging session is established for the <NUM> data connection, a PGW-C of the control plane function entity <NUM> sends the charging service establishment message to the charging function entity <NUM>. The SBI charging session established based on the charging service establishment message supports performing online charging and/or performing offline charging in the <NUM> data connection. The SBI charging session established for the <NUM> data connection refers to a <NUM> charging session.

The <NUM> charging session that the control plane function entity <NUM> requests to establish interacts with the charging session entity <NUM> by using an SBI message. Therefore, a service provided by the charging session entity <NUM> is invoked to create and update a charging resource. The charging session entity may complete charging processing on all data flows of the <NUM> data connection in one <NUM> charging session, and the charging processing includes charging processing such as online charging and/or offline charging on the data flows.

After determining to send the charging service establishment message to the charging function entity <NUM> through the SBI, the control plane function entity <NUM> obtains an address of the charging function entity <NUM>, and sends the charging service establishment message through the SBI to the charging function entity <NUM> based on the obtained address to request to establish the <NUM> charging session with the charging function entity <NUM>.

If the control plane function entity <NUM> determines not to send the charging function entity <NUM> the charging service establishment message through the SBI, the control plane function entity <NUM> obtains an address of a <NUM> online charging system or a <NUM> offline charging system. The control plane function entity <NUM> initiates, to the <NUM>-OCS, a request for establishing a diameter online charging session for an online charging data flow in the IP-CAN session, and initiates, to the <NUM>-OFCS, a request for establishing a diameter offline charging session for an offline charging data flow in the IP-CAN session. That the control plane function entity <NUM> determines not to send the charging function entity <NUM> the charging service establishment message through the SBI may be: The control plane function entity <NUM> determines that the IP-CAN session connection does not need to support interworking, the control plane function entity <NUM> is not an integrated entity of a PGW-C entity and an SM entity, or others.

In the foregoing optional manner, the control plane function entity <NUM> may obtain the address of the charging function entity <NUM> in any one of the following manners. For example, the control plane function entity <NUM> obtains the address of the charging function entity <NUM> from a PCC rule, the control plane function entity <NUM> obtains the address of the charging function entity <NUM> from a unified data management entity, or the control plane function entity <NUM> obtains the address of the charging function entity <NUM> through query from a network repository function (Network Repository Function, NRF) entity.

Step <NUM>: The charging function entity <NUM> sends a charging session establishment response message for the <NUM> data connection (the IP-CAN session) to the control plane function entity <NUM>.

The charging session establishment response message includes a charging parameter for the <NUM> data connection (the IP-CAN session connection). The charging parameter for the <NUM> data connection includes a quota granted to a rate group in the <NUM> data connection, a data reporting threshold, a <NUM> charging trigger event trigger, and the like. The rate group includes one or more rates corresponding to online data (for example, a rate corresponding to use of an app A, and a rate corresponding to use of an app B), and/or one or more rates corresponding to offline data (for example, a rate corresponding to use of an app A, and a rate corresponding to use of an app B).

Referring to <FIG>, the <NUM> charging trigger event trigger includes a <NUM> online charging trigger and a <NUM> offline charging trigger. The <NUM> online charging trigger is used to trigger quota application or quota usage reporting. The <NUM> online charging trigger may include one or more triggers, for example, a location change trigger, a QoS change trigger, a <NUM> online handover trigger, or another trigger. The <NUM> offline charging trigger is used to trigger disabling or reporting of an offline charging data record. The <NUM> offline charging trigger may include one or more triggers, for example, a location change trigger, a <NUM> offline handover trigger, or another trigger.

Because the charging trigger is obtained by the terminal <NUM> after the terminal <NUM> gains access to the <NUM> network, the charging trigger is referred to as a <NUM> charging trigger. A handover trigger of the <NUM> online charging trigger is referred to as the <NUM> online handover trigger for short. A handover trigger of the <NUM> offline charging trigger is referred to as the <NUM> offline handover trigger for short. The <NUM> online handover trigger and the <NUM> offline handover trigger event trigger are collectively referred to as a <NUM> handover trigger.

A type of the <NUM> handover trigger is immediate reporting trigger by default. The charging function entity <NUM> may activate the <NUM> handover trigger as default immediate reporting, or may specify the <NUM> handover trigger as deferred reporting. The charging function entity <NUM> may further deactivate the <NUM> handover trigger.

The control plane function entity <NUM> stores the <NUM> charging trigger delivered by the charging function entity <NUM>, and the <NUM> charging trigger includes the <NUM> online charging trigger and/or the <NUM> offline charging trigger.

Step <NUM>: The control plane function entity <NUM> requests the charging function entity <NUM> to perform online charging and/or offline charging in the <NUM> data connection (for example, the IP-CAN session).

Specifically, the control plane function entity <NUM> sends the charging update message of the IP-CAN session to the charging function entity based on the charging parameter in the charging session response message for the <NUM> data connection (the IP-CAN session).

The charging parameter includes an active charging trigger and other charging information, such as a quota. The control plane function entity <NUM> monitors the active charging trigger in the <NUM> data connection, and sends the charging update message of the IP-CAN session to the charging session entity <NUM> when the <NUM> charging trigger is satisfied.

After the control plane function entity <NUM> and the charging function entity <NUM> establish the SBI charging session for the <NUM> data connection (for example, the IP-CAN session connection), the charging function entity <NUM> may further deliver the update message to update a type of the <NUM> online handover trigger and/or the <NUM> offline handover trigger to delayed reporting.

Step <NUM>: The serving gateway <NUM> sends a network handover request to the control plane function entity <NUM>, where the network handover request is used to request the terminal <NUM> to hand over from the <NUM> data connection to the <NUM> data connection.

After the terminal <NUM> initiates to hand over from the accessed <NUM> network to the <NUM> network, the serving gateway <NUM> sends the network handover request to the control plane function entity <NUM>. The handover from the <NUM> network to the <NUM> network indicates handover from the <NUM> data connection to the <NUM> data connection in the <NUM> network, or handover of a service data flow of the terminal <NUM> from the <NUM> data connection to the <NUM> data connection in the <NUM> network.

After the control plane function entity <NUM> receives the network handover request sent by the serving gateway <NUM>, the control plane function entity <NUM> performs step <NUM> of charging processing. For a specific processing procedure, refer to <FIG>.

<FIG> is a schematic flowchart of charging processing after a network handover request for handlling over a <NUM> data connection to <NUM> data connection is received according to an embodiment of this application. Step <NUM> in <FIG> includes step <NUM> and all procedures after step <NUM> in <FIG>.

Step <NUM>: A serving gateway <NUM> sends the network handover request to a control plane function entity <NUM>, where the network handover request is used to request a terminal <NUM> to hand over from the <NUM> data connection to the <NUM> data connection.

Step <NUM>: During handover from the <NUM> data connection to the <NUM> data connection, the control plane function entity <NUM> determines whether a state of a <NUM> handover trigger is an active state. If the <NUM> handover trigger is in the active state, step <NUM> is performed. If the <NUM> handover trigger is not in the active state, step <NUM> and step <NUM> are performed.

The handover from the <NUM> data connection to the <NUM> data connection is performed after the control plane function entity <NUM> receives the network handover message. The network handover message may be sent to the control plane function entity <NUM> by another network entity such as the serving gateway <NUM> after the terminal <NUM> initiates network handover.

The state of the <NUM> handover trigger may be configured on the control plane function entity <NUM>, or may be obtained by the control plane function entity <NUM> from another network entity such as a policy control entity <NUM>, or may be updated and delivered by a charging function entity <NUM>.

Step <NUM>: After the handover from the <NUM> data connection to the <NUM> data connection, the control plane function entity <NUM> combines and records network usage information of the <NUM> data connection and network usage information of the <NUM> data connection.

That the <NUM> handover trigger is in an inactive state may be determining that there is no active <NUM> handover trigger event trigger. For example, if the <NUM> handover trigger is disabled by the charging function entity <NUM>, the <NUM> handover trigger is in the inactive state.

Further, for the <NUM> data connection on which online charging is performed, the control plane function entity <NUM> continues to use a quota that is applied for the <NUM> data connection for the <NUM> data connection after the handover. The control plane function entity <NUM> disables a <NUM> service usage counter, buffers charging information of the <NUM> data connection, and starts to collect charging information of a <NUM> QoS flow.

Step <NUM>: The control plane function entity <NUM> determines whether a type of the <NUM> handover trigger is immediate reporting. If the type of the <NUM> handover trigger is immediate reporting, step <NUM> is performed; otherwise, step <NUM> is performed.

The determining that the <NUM> handover trigger does not need immediate reporting includes that the type of the <NUM> handover trigger event trigger is deferred reporting.

Step <NUM>: The control plane function entity <NUM> sends a charging update message to the charging function entity <NUM>. The charging update message is used to report the usage information of the <NUM> data connection network. The charging update message is sent through the <NUM> charging session.

The usage information in the <NUM> network includes <NUM> data usage, <NUM> network usage duration, and/or <NUM> data connection information (such as QoS and a user location). The <NUM> data usage includes <NUM> online charging data flow usage and/or <NUM> offline charging data flow usage.

After determining that the type of the <NUM> handover trigger is immediate reporting, when the <NUM> handover trigger is satisfied, the control plane function entity <NUM> sends the charging update message to the charging function entity <NUM> to report the network usage information of the <NUM> data connection. Generally, after receiving the network handover request, the control plane function entity <NUM> determines that the <NUM> handover trigger is satisfied. The <NUM> charging trigger may be preconfigured in the control plane function entity <NUM>, or may be a <NUM> charging trigger carried in the update message delivered by the charging function entity <NUM>.

Step <NUM>: The control plane function entity <NUM> receives a charging update response message sent by the charging function entity <NUM>.

After the control plane function entity <NUM> determines that the type of the <NUM> handover trigger is immediate reporting, and reports the usage information of the <NUM> network of a rate group corresponding to the <NUM> handover trigger, the charging function entity <NUM> re-delivers a <NUM> charging trigger for the <NUM> handover trigger. The control plane function entity <NUM> uses the <NUM> charging trigger in the <NUM> network. For content included in the <NUM> charging trigger, refer to <FIG>.

The charging update response message includes the <NUM> charging trigger, a quota for <NUM> network access, and/or the like.

Step <NUM>: The control plane function entity <NUM> stops recording the usage information of the <NUM> data connection in the <NUM> network, and re-records the usage information of the <NUM> data connection in the <NUM> network.

For example, the control plane function entity <NUM> disables the service usage counter and buffers the network usage information of the IP-CAN session connection of the terminal <NUM> in the <NUM> network, and starts to record the network usage information of the quota in the <NUM> network by using a new service usage counter. For the data flow on which the online charging is performed, the control plane function entity <NUM> continues to use the quota applied for the <NUM> data connection for the <NUM> data connection of the terminal <NUM>.

Step <NUM>: The control plane function entity <NUM> determines whether the <NUM> network supports the active <NUM> charging trigger in the <NUM> data connection. If the <NUM> network supports the activated <NUM> charging trigger in the <NUM> data connection, step <NUM> is performed; otherwise, step <NUM> is performed.

That the control plane function entity <NUM> determines whether to support the active <NUM> charging trigger in the <NUM> data connection includes: The control plane function entity <NUM> determines that the <NUM> charging trigger includes the <NUM> charging trigger; or the control plane function entity <NUM> determines whether the <NUM> charging trigger may be mapped to the <NUM> charging trigger. If the <NUM> charging trigger includes the <NUM> charging trigger, or the <NUM> charging trigger may be mapped to the <NUM> charging trigger, the <NUM> network supports the active <NUM> charging trigger in the <NUM> data connection.

The control plane function entity <NUM> may determine, based on a charging trigger mapping table shown in <FIG>, whether the active <NUM> charging trigger in the <NUM> data connection may be mapped to the <NUM> charging trigger. The charging trigger mapping table may be preconfigured in the control plane function entity <NUM>, or may be obtained by the control plane function entity <NUM> from another network entity. For example, the control plane function entity <NUM> obtains the charging trigger mapping table from a policy control entity <NUM>, or obtains the charging trigger mapping table from the charging function entity <NUM>.

<FIG> is a charging trigger mapping table in which a <NUM> charging trigger is mapped to a <NUM> charging trigger. The mapping table lists a <NUM> charging trigger and a <NUM> charging trigger that can be mapped. In an example, if a <NUM> charging trigger value CHANGE_IN_SERVING_NODE may be mapped to a <NUM> charging trigger value SERVING_NODE_CHANGE, the <NUM> charging trigger may be mapped to the <NUM> charging trigger.

It should be noted that the <NUM> charging trigger and the <NUM> charging trigger that can be mapped and that are listed in <FIG> are merely examples. <FIG> may further include another <NUM> charging trigger value that can be mapped to another <NUM> charging trigger.

Step <NUM>: The control plane function entity <NUM> requests to perform charging by using the <NUM> charging trigger or the mapped <NUM> charging trigger.

If the <NUM> network includes the <NUM> charging trigger, the control plane function entity <NUM> continues to use the <NUM> charging trigger in the <NUM> data connection.

If the control plane function entity <NUM> determines that the <NUM> charging trigger may be mapped to the <NUM> charging trigger, the control plane function entity <NUM> uses the mapped <NUM> charging trigger in the <NUM> data connection.

Step <NUM>: The control plane function entity <NUM> ignores the <NUM> charging trigger in the <NUM> data connection.

If the control plane function entity <NUM> determines that the <NUM> network does not include the <NUM> charging trigger, and the <NUM> charging trigger cannot be mapped to the <NUM> charging trigger, the control plane function entity <NUM> ignores the <NUM> charging trigger in the <NUM> data connection.

It should be noted that, in the foregoing method, steps <NUM> and <NUM> are selectively performed based on the active state and the type of the <NUM> handover trigger, but have no sequence. There is no sequence between step <NUM> and step <NUM>, and between step <NUM> and step <NUM>.

In this embodiment of this application, the control plane function entity <NUM> requests the charging function entity <NUM> to establish the SBI charging session for the <NUM> data connection (for example, the IP-CAN session connection) of the terminal <NUM> in the <NUM> network. The SBI charging session may support performing the online charging in the <NUM> data connection, and support performing the offline charging in the <NUM> data connection. In this way, when the handover is performed on a data connection, the charging session remains unchanged. The control plane function entity <NUM> may perform, based on a charging requirement of the charging function entity, corresponding charging processing on the <NUM> data connection after the handover, to ensure charging continuity and accuracy in a process in which the terminal <NUM> is handed over from the <NUM> network to the <NUM> network, and improve service experience of a user.

<FIG> is a schematic diagram of performing, by a control plane function entity <NUM>, the step <NUM>, in <FIG>, of determining to request the charging function entity <NUM> to establish the SBI charging session for the <NUM> data connection according to an embodiment of the present invention. As shown in <FIG>, the control plane function entity <NUM> may determine to request the charging function entity <NUM> to establish the SBI charging session in the following five optional methods.

The control plane function entity <NUM> determines that the IP-CAN session needs a network system to support handover of the terminal <NUM> from the <NUM> network to the <NUM> network. The control plane function entity <NUM> determines to request to establish the SBI charging session for the <NUM> data connection.

That the control plane function entity <NUM> determines that the IP-CAN session needs the network system to support the handover of the terminal <NUM> from the <NUM> network to the <NUM> network includes: Based on a <NUM> system interworking indication parameter in the request for establishing the <NUM> data connection, the control plane function entity <NUM> determines that the terminal <NUM> supports gaining access to the <NUM> network, and/or determines that the <NUM> system interworking indication (5GS Interworking Indication) parameter allows the terminal <NUM> to be handed over to the <NUM> network. For example, if the <NUM> system interworking indication parameter indicates that the terminal <NUM> supports an N1 mode, it may be determined that the terminal <NUM> supports gaining access to the <NUM> network. The <NUM> system interworking indication parameter may be different values of one parameter to indicate that the terminal <NUM> supports gaining access to the <NUM> network and/or allow the terminal <NUM> to be handed over to the <NUM> network.

In another optional manner in the optional method <NUM>, the control plane function entity <NUM> may further determine, based on the user information, to allow the terminal <NUM> of the user to be handed over between the <NUM> network and the <NUM> network. The control plane function entity <NUM> may obtain the user information from a home subscriber server, a user information library (Subscription Profile Repository, SPR), or a user data repository (User Data Repository, UDR).

Optional method <NUM>: After receiving the request for establishing the IP-CAN session, if the control plane function entity <NUM> determines to communicate with the policy function entity <NUM> through an SBI message, the control plane function entity <NUM> determines to request to establish the SBI charging session for the <NUM> data connection. For example, the control plane function entity <NUM> initiates a policy control session to the policy function entity <NUM> through the SBI message. If the control plane function entity <NUM> does not use the SBI message to initiate the policy control session to the policy function entity <NUM>, the control plane function entity <NUM> initiates a request for establishing an Ro charging session or a request for establishing an Rf charging session to a <NUM> online charging system (<NUM> online charging system, <NUM> OCS) or a <NUM> offline charging system (<NUM> offline charging system, <NUM>-OFCS) respectively.

Optional method <NUM>: The control plane function entity <NUM> determines, based on a parameter in a policy and charging control rule (policy and charging control rule, PCC rule) delivered (installed) by a policy function entity <NUM>, to request the charging function entity <NUM> to establish the SBI charging session for the <NUM> data connection. Alternatively, the control plane function entity <NUM> determines, based on a parameter in a PCC rule that is configured and activated by a policy function entity <NUM>, to request the charging function entity <NUM> to establish the SBI charging session for the <NUM> data connection. For example, the control plane function entity <NUM> determines, based on indication information, for sending a service charging creation message to the charging function entity <NUM>, included in the PCC rule, or an address, of the charging session entity <NUM>, included in the PCC rule, to request the charging function entity <NUM> to establish the SBI charging session. If the PCC rule includes an address of the <NUM> online charging system entity or an address of the <NUM> offline charging system, the control plane function entity <NUM> initiates a request for establishing an Ro charging session or a request for establishing an Rf charging session to the <NUM> online charging system or the <NUM> offline charging system entity by using a diameter respectively.

When the optional method <NUM> is performed, the control plane function entity <NUM> determines, based on a data type of the address included in the PCC rule, whether the address is an address of the charging function entity <NUM>. For example, if the address included in the PCC rule is defined in a domain name manner, for example, http://domain:port, the address is the address of the charging function entity <NUM>.

Optional method <NUM>: When the control plane function entity <NUM> re-establishes a charging session for an established IP-CAN session connection, the control plane function entity <NUM> determines, based on that a previous charging session of the IP-CAN session is a charging session established with the charging session entity <NUM>, to request the charging session entity to establish the SBI charging session. For example, the control plane function entity <NUM> determines, based on a usage parameter (for example, an address, an interface, and a charging function entity that are used by the charging session) of a previously established charging session, that the previous charging session of the <NUM> data connection is the charging session established with the charging session entity.

Optional method <NUM>: If the control plane function entity <NUM> determines that the control plane function entity <NUM> includes the PGW-C function and the SMF function, the control plane function entity <NUM> determines to request to establish SBI charging sessions for all IP-CAN session connections.

The foregoing optional methods may be used independently, or may be used in combination to determine whether to establish the session with the charging function entity <NUM> for the terminal <NUM>. For example, the optional method <NUM> and the optional method <NUM> are used together. In addition, there is no priority relationship between the foregoing optional methods. A system may configure which method is used by the control plane function entity <NUM> during determining. If configuration of the system is determined, the control plane function entity <NUM> performs determining in a method configured by the system.

The foregoing optional methods provide sufficient flexibility for the control plane function entity <NUM> to determine to request to establish the SBI charging session. The foregoing optional methods can be used in more application scenarios to meet service requirements.

<FIG> is a schematic flowchart of a charging method when a terminal <NUM> is handed over from a <NUM> network to a <NUM> network according to an embodiment of this application. In this embodiment, the terminal <NUM> first gains access to the <NUM> network by using the NG-RAN device <NUM>, and establishes a protocol data unit session (Protocol Data Unit, PDU session) connection in the <NUM> network. Subsequently, the terminal <NUM> gains access to the <NUM> network by using an E-UTAN device <NUM> because a location of the terminal <NUM> moves to a <NUM> service range, a signal of the <NUM> network is stronger than a signal of the <NUM> network at a location, or a user actively selects to use the <NUM> network.

Step <NUM>: A mobility management function entity <NUM> initiates a request for establishing a <NUM> data connection to a control plane function entity <NUM>. A session management function of the control plane function entity <NUM> receives from the mobility management function entity <NUM>, the request for establishing the <NUM> data connection, to request to establish the <NUM> data connection for the terminal <NUM>. The <NUM> data connection may be a PDU session connection.

The mobility management function entity <NUM> may initiate the request for establishing the <NUM> data connection to the control plane function entity <NUM> after the terminal <NUM> initiates establishment of the <NUM> data connection. The PDU session connection may be established by the terminal <NUM> in an attach process, or may be established by the terminal <NUM> after the terminal <NUM> is attached. For a process of establishing the PDU session connection, refer to an existing protocol (for example, 3GPP TS <NUM>).

Step <NUM>: The control plane function entity <NUM> requests a charging function entity <NUM> to establish an SBI charging session for the <NUM> data connection. The <NUM> data connection may be a <NUM> data connection that is being established, or an established <NUM> data connection.

The control plane function entity <NUM> sends a charging service establishment message to the charging function entity <NUM> through a service-based interface (service based interface, SBI), to request to establish a <NUM> charging session for the <NUM> data connection. The <NUM> charging session is a charging session established for the <NUM> data connection.

The control plane function entity <NUM> establishes the <NUM> charging session for the PDU session after receiving the request, for establishing the PDU session, sent by the mobility management function entity <NUM> or within a life cycle of the PDU session. In the life cycle of the PDU session, the <NUM> charging session may be released. When the PDU session connection has a data flow that needs to be charged, and the control plane function entity <NUM> needs to re-establish a charging session, step <NUM> is performed.

The control plane function entity <NUM> obtains an address of the charging function entity <NUM>, and sends the charging service establishment message to the charging function entity <NUM> based on the obtained address, to request to establish the charging session.

After receiving the request, for establishing the PDU session, sent by the mobility management function entity <NUM>, the control plane function entity <NUM> obtains a policy and charging control rule (policy and charging control rule, PCC rule) from a policy control entity <NUM>. The PCC rule includes address information of the charging function entity <NUM>. In another possible manner, the control plane function entity <NUM> obtains the address of the charging function entity <NUM> based on a charging characteristic (charging characteristic) parameter included in the request for establishing the PDU session. The charging service establishment message carries an online charging parameter and/or an offline charging parameter.

Step <NUM>: The charging function entity <NUM> sends a charging session establishment response message for the <NUM> data connection (the PDU session) to the control plane function entity <NUM>.

The charging session establishment response message carries a charging parameter for the PDU session connection. The charging parameter for the <NUM> data connection includes a <NUM> charging trigger event trigger granted to a rate group in the <NUM> data connection, for example, a quota granted to the rate group in the <NUM> data connection or a data reporting threshold.

Referring to <FIG>, the <NUM> charging trigger event trigger includes a <NUM> online charging trigger and a <NUM> offline charging trigger. The <NUM> online charging trigger is used to trigger quota application or quota usage reporting. The <NUM> online charging trigger may include one or more triggers, for example, a location change trigger, a QoS change trigger, a <NUM> online handover trigger, or another trigger. The <NUM> offline charging trigger is used to trigger disabling or reporting of an offline charging data record. The <NUM> offline charging trigger may include one or more triggers, for example, a location change trigger, a <NUM> offline handover trigger, a <NUM> offline reporting threshold trigger, and/or another trigger.

The <NUM> charging trigger is a charging trigger of the <NUM> data connection after the terminal <NUM> gains access to the <NUM> network. A handover trigger of the <NUM> online charging trigger is referred to as the <NUM> online handover trigger for short. A handover trigger of the <NUM> offline charging trigger is referred to as the <NUM> offline handover trigger for short. The <NUM> online handover trigger and the <NUM> offline handover trigger event trigger are collectively referred to as a <NUM> handover trigger. In other words, the <NUM> handover trigger includes the <NUM> online handover trigger and/or the <NUM> offline handover trigger event trigger.

The <NUM> charging trigger may be preconfigured in the control plane function entity <NUM>, or may be an update <NUM> charging trigger carried in a trigger update message delivered by the charging function entity <NUM>. The control plane function entity <NUM> may obtain the <NUM> online charging trigger and/or the <NUM> offline charging trigger, of the PDU connection, delivered by the charging function entity <NUM>.

Step <NUM>: The control plane function entity <NUM> requests the charging function entity <NUM> to perform online charging and/or offline charging in the <NUM> data connection (for example, the PDU session).

For example, the control plane function entity <NUM> monitors an active charging trigger, and sends a charging update message of the PDU session to the charging function entity <NUM> when the <NUM> charging trigger is satisfied. The charging function entity <NUM> performs the online charging and/or the offline charging on the PDU session based on the charging update message of the PDU session.

Further, after the control plane function entity <NUM> establishes the <NUM> charging session with the charging function entity <NUM>, the charging function entity <NUM> may deliver an update message to update a type of the <NUM> online handover trigger and/or a type of the <NUM> offline handover trigger in the control plane function entity <NUM> to deferred reporting.

Step <NUM>: The mobility management entity <NUM> sends a network handover request to the control plane function entity <NUM>, where the network handover request is used to request the terminal <NUM> to hand over from the <NUM> data connection to the <NUM> data connection.

After the terminal <NUM> initiates the handover from the accessed <NUM> network to the <NUM> network, the mobility management entity <NUM> initiates the network handover to the control plane function entity <NUM>. The handover from the <NUM> network to the <NUM> network indicates handover from the <NUM> data connection to the <NUM> data connection in the <NUM> network, or handover of a service data flow of the terminal <NUM> from the <NUM> data connection to the <NUM> data connection in the <NUM> network.

After the control plane function entity receives the network handover request sent by the mobility management entity <NUM>, the control plane function entity <NUM> performs step <NUM> of charging processing. For a specific processing procedure, refer to <FIG>.

Step <NUM>: A mobility management entity <NUM> sends a network handover request to a control plane function entity <NUM>, where the network handover request is used to request a terminal <NUM> to hand over from the <NUM> data connection to the <NUM> data connection.

After receiving the network handover request, the control plane function entity <NUM> performs the handover from the <NUM> data connection to the <NUM> data connection, for example, determines a type and a state of a <NUM> handover trigger, and/or requests to perform charging processing for the <NUM> data connection.

The handover from the <NUM> data connection to the <NUM> data connection is performed after the control plane function entity <NUM> receives the network handover request. The network handover request may be sent to the control plane function entity <NUM> by another network entity such as the mobility management entity <NUM> after the terminal <NUM> initiates the network handover. During the handover from the <NUM> data connection to the <NUM> data connection, the control plane function entity <NUM> performs the handover from the <NUM> data connection to the <NUM> data connection. For example, the control plane function entity <NUM> obtains a <NUM> charging parameter after the handover, and/or applies for a <NUM> online charging quota.

For example, the control plane function entity <NUM> combines the usage information of a <NUM> online charging data flow and/or a <NUM> offline charging data flow in the <NUM> network with the usage information of a <NUM> online charging data flow and/or a <NUM> offline charging data flow in the <NUM> network. For a data flow on which online charging is performed, the control plane function entity <NUM> continues to use a quota requested for the <NUM> data connection for the terminal <NUM>. The control plane function entity <NUM> disables a service usage counter of a QoS flow, buffers charging information of the QoS flow of the <NUM> data connection, and starts to collect charging information of a <NUM> bearer.

That the <NUM> handover trigger is in the inactive state may further be that the control plane function entity <NUM> determines that there is no active <NUM> handover trigger event trigger. For example, if the <NUM> handover trigger is disabled by the charging function entity <NUM>, the <NUM> handover trigger is in the inactive state.

Step <NUM>: The control plane function entity <NUM> sends a charging update message to the charging function entity <NUM>. The charging update message is used to report network usage information of the PDU session connection of the terminal <NUM> in a <NUM> network access process.

The network usage information includes <NUM> data usage, <NUM> network use duration, and/or the like. The <NUM> data usage includes <NUM> online charging data flow usage and/or <NUM> offline charging data flow usage. The charging update message is sent through the <NUM> charging session.

Further, after the control plane function entity <NUM> determines that the type of the <NUM> handover trigger is immediate reporting, the control plane function entity <NUM> reports <NUM> network usage information of a rate group corresponding to the <NUM> handover trigger. The <NUM> charging trigger includes a <NUM> online charging trigger and/or a <NUM> offline charging trigger. The <NUM> handover trigger includes the <NUM> online handover trigger and/or the <NUM> offline handover trigger.

The charging update response message includes the update <NUM> charging trigger, a quota for <NUM> network access, and/or the like. The charging function entity <NUM> re-delivers the <NUM> charging trigger for the rate group corresponding to the <NUM> handover trigger. The control plane function entity <NUM> uses, in the <NUM> network, the <NUM> charging trigger redelivered by the charging function entity <NUM>.

Specifically, the control plane function entity <NUM> disables the service usage counter and buffers the network usage information of the PDU session connection of the terminal <NUM> in the <NUM> network, and starts to record the network usage information of the quota in the <NUM> network by using a new service usage counter. For the data flow on which the online charging is performed, the control plane function entity <NUM> continues to use the quota requested for the <NUM> connection for the <NUM> data connection of the terminal <NUM>.

The control plane function entity <NUM> may determine, based on a charging trigger mapping table shown in <FIG>, whether the active <NUM> charging trigger in the <NUM> data connection may be mapped to the <NUM> charging trigger. The charging trigger mapping table may be preconfigured in the control plane function entity <NUM>, or may be obtained by the control plane function entity <NUM> from another network entity. For example, the control plane function entity <NUM> obtains the charging trigger mapping table from a policy control entity <NUM>, or obtains the charging trigger mapping table from the charging function entity <NUM>.

If the <NUM> network includes the <NUM> charging trigger, the control plane function entity <NUM> continues to use the <NUM> charging trigger in the <NUM> data connection. If the control plane function entity <NUM> determines that the <NUM> charging trigger may be mapped to the <NUM> charging trigger, the control plane function entity <NUM> uses the mapped <NUM> charging trigger in the <NUM> data connection.

If the control plane function entity determines that the <NUM> network does not include the <NUM> charging trigger, and the <NUM> charging trigger cannot be mapped to the <NUM> charging trigger, the control plane function entity <NUM> ignores the <NUM> charging trigger in the <NUM> data connection.

In another optional manner, during the handover from the <NUM> data connection to the <NUM> data connection, that is, when step <NUM> is being performed, the control plane function entity <NUM> further determines whether to support processing on a type of the <NUM> charging trigger in the <NUM> network. If the processing on the type of the <NUM> charging trigger is supported, the type of the <NUM> charging trigger remains unchanged. If the processing on the type of the <NUM> charging trigger is not supported, the control plane function entity <NUM> configures the type of the charging trigger as immediate reporting.

For example, the control plane function entity <NUM> determines that release of an online charging data flow is not supported in the <NUM> network before a quota granted by the charging function entity <NUM> is obtained, and the control plane entity <NUM> releases the online charging data flow after receiving the quota granted by the charging function entity <NUM>. For example, when the terminal <NUM> gains access to a <NUM> network, a PCC rule delivered or activated by a policy control entity <NUM> indicates that a non-blocking non-blocking manner is used for some service data flows. After the handover to the <NUM> data connection, if a PGW-C in the <NUM> network supports the non-blocking manner, the control plane function entity <NUM> processes, based on the non-blocking manner specified in the PCC rule, quota application and data flow release. If the PGW-C in the <NUM> network does not support releasing the data flow (namely, does not support the non-blocking manner) before obtaining the quota granted by the charging session entity, the control plane entity <NUM> releases the data line after receiving the quota granted by the charging function entity <NUM>. The non-blocking manner is releasing the data flow when there is no quota.

It should be noted that, in the foregoing method, step <NUM>, step <NUM>, step <NUM>, and step <NUM> are selectively performed based on the active state and the type of the <NUM> handover trigger, and do not indicate that the steps are performed in sequence.

In this embodiment, the control plane function entity <NUM> establishes, in the <NUM> network, the SBI charging session for the <NUM> data connection of the terminal <NUM>, and performs charging on network usage of the <NUM> data connection after the handover. There is no need to re-establish a charging session for the <NUM> data connection of the terminal <NUM> after the terminal <NUM> is handed over to the <NUM> network, thereby simplifying a network handover and charging procedure. Further, in this embodiment, after the terminal <NUM> is handed over from the <NUM> data connection to the <NUM> data connection, targeted processing is performed on different charging parameters (for example, the quota, the trigger, and the charging parameter), so that in a process of the handover from the <NUM> data connection to the <NUM> data connection, charging continuity and accuracy can be ensured and user experience is improved.

The foregoing mainly describes the solutions provided in the embodiments of this application from a perspective of interaction between network elements. It may be understood that to implement the foregoing functions, the foregoing terminal, the AMF, and the control plane function entity include corresponding hardware structures and/or software modules for performing the functions. A person skilled in the art should easily be aware that, in combination with units and algorithm steps of the examples described in the embodiments disclosed in this specification, this application may be implemented by hardware or a combination of hardware and computer software. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions.

In the embodiments of this application, the devices such as the terminal <NUM> and the control plane function entity <NUM> may be divided into function modules based on the foregoing method examples. For example, each function module may be obtained through division based on each corresponding function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module. It should be noted that, in this embodiment of this application, division into modules is an example, and is merely a logical function division. In actual implementation, another division manner may be used.

For example, when the function modules are obtained through division in an integrated manner, <FIG> is a schematic diagram of a structure of an apparatus <NUM>. The apparatus <NUM> may be the charging function entity <NUM> in the foregoing embodiments, or may be a chip in the charging function entity <NUM>. This is not specifically limited in this embodiment of this application. As shown in <FIG>, the apparatus includes a receiving module <NUM>, a processing module <NUM>, and a sending module <NUM>.

The receiving module <NUM> is configured to receive a charging service creation message sent by a control plane function entity <NUM>. The charging service creation message is used to request to establish a charging session for a first network data connection. The sending module <NUM> is configured to send a charging session response message for the first network data connection to the control plane function entity <NUM>. The receiving module <NUM> is further configured to receive, through the charging session, a charging session update message sent by the control plane function entity <NUM>. The charging session update message carries an identifier of a second network data connection and network usage information of the first network data connection. The processing module <NUM> is configured to: after a terminal <NUM> is handed over from the accessed first network to a second network, charge, by using the charging session, the second network data connection established for the terminal <NUM>.

Optionally, when the first network is a <NUM> network, and the second network is a <NUM> network, the receiving module <NUM> in the apparatus in <FIG> may be further configured to perform any receiving step performed by the charging function entity <NUM> in the method procedures in <FIG>, <FIG> and <FIG> to <FIG>. The processing module <NUM> in the apparatus in <FIG> may be further configured to perform processing steps performed by the charging function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>. The sending module <NUM> in the apparatus in <FIG> may be further configured to perform sending steps performed by the charging function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>.

Optionally, when the first network is a <NUM> network, and the second network is a <NUM> network, the receiving module <NUM> in the apparatus in <FIG> may be further configured to perform receiving steps performed by the charging function entity <NUM> in the method procedures in <FIG>, and <FIG> and <FIG>. The sending module <NUM> in the apparatus in <FIG> may be further configured to perform sending steps performed by the charging function entity <NUM> in the method procedures in <FIG>, and <FIG> and <FIG>. The processing module <NUM> in the apparatus in <FIG> may be further configured to perform processing steps performed by the charging function entity <NUM> in the method procedures in <FIG>, and <FIG> and <FIG>.

In another optional manner, the receiving module <NUM> in the apparatus <NUM> is configured to receive a charging service establishment message sent by a control plane function entity <NUM> through an SBI. The charging service establishment message sent through the SBI is used to request to establish, for a <NUM> data connection, an SBI charging session supporting performing online charging and offline charging in the <NUM> data connection. The sending module <NUM> in the apparatus <NUM> is configured to send a charging session response message for the <NUM> data connection to the control plane function entity <NUM>. The charging session response message includes a <NUM> charging trigger event trigger in the <NUM> network.

Optionally, the receiving module <NUM> in the apparatus <NUM> is further configured to receive a charging session update message through the SBI charging session. The charging session update message carries an identifier of a <NUM> data connection after handover.

Optionally, the charging session update message carries usage of the <NUM> data connection in the <NUM> network and/or a quota request of the <NUM> data connection in the <NUM> network. The processing module <NUM> charges the usage of the <NUM> data connection in the <NUM> network based on the charging session update message; and/or the processing module <NUM> grants a pre-quota to the <NUM> data connection in the <NUM> network.

<FIG> is a schematic diagram of a structure of an apparatus <NUM>. The apparatus <NUM> may be the control plane function entity <NUM> in the foregoing embodiments, or may be a chip in the control plane function entity <NUM>. This is not specifically limited in this embodiment of this application. As shown in <FIG>, the apparatus includes a receiving module <NUM>, a determining module <NUM>, a processing module <NUM>, and a sending module <NUM>. The determining module <NUM> is configured to determine to request a charging function entity <NUM> to establish a service-based interface SBI charging session for a <NUM> data connection. The sending module <NUM> is configured to request, through the SBI charging session, to perform online charging and/or offline charging in the <NUM> data connection.

Optionally, the control plane function entity <NUM> includes a packet data network gateway control plane function. The determining module <NUM> is further configured to determine that the control plane function entity <NUM> further includes a session management function. The determining module <NUM> determines that a policy and charging control rule PCC rule includes indication of requesting the charging function entity to establish the SBI charging session, or includes: an address of a charging system designated for the <NUM> data connection is an address of the charging function entity <NUM> using the SBI. The determining module <NUM> determines that a previous charging session of the <NUM> data connection is the SBI charging session established with the charging function entity <NUM>. Alternatively, the control plane function entity <NUM> determines to communicate with a policy function entity through the SBI message.

Optionally, the control plane function entity <NUM> includes a packet data network gateway control plane function. That the determining module <NUM> determines to request the charging function entity <NUM> to establish the SBI charging session includes: The determining module <NUM> determines that the control plane function entity <NUM> further includes a session management function, and determines that a terminal needs to support handover from a <NUM> network to a <NUM> network.

Optionally, the apparatus further includes the receiving module <NUM>, configured to receive a request for establishing the <NUM> data connection. The determining module <NUM> is further configured to determine, based on a <NUM> system interworking indication parameter in the request for establishing the <NUM> data connection, that the terminal <NUM> supports gaining access to the <NUM> network and/or to allow the <NUM> data connection to interwork with the <NUM> network.

Optionally, the apparatus further includes the receiving module <NUM>, configured to receive a request for establishing the <NUM> data connection. The apparatus includes a packet data network gateway control plane function. The determining module <NUM> is specifically configured to determine that the control plane function entity <NUM> further includes a session management function; and the determining module <NUM> determines, based on a <NUM> system interworking indication parameter in the request for establishing the <NUM> data connection, that the terminal <NUM> supports gaining access to the <NUM> network and/or to allow the <NUM> data connection to interwork with the <NUM> network.

Optionally, during handover from the <NUM> data connection to a <NUM> data connection, the determining module <NUM> is further configured to determine that a <NUM> handover trigger event trigger is in an active state and a type of the <NUM> handover trigger event trigger is an immediate reporting trigger. The sending module <NUM> is further configured to send a charging update message to the charging function entity through the SBI charging session. The charging update message includes network usage information of the <NUM> data connection and/or a quota request of the <NUM> data connection after the handover.

Optionally, during handover from the <NUM> data connection to a <NUM> data connection, the determining module <NUM> is further configured to determine that a <NUM> handover trigger event trigger is in an active state and that a type of the <NUM> handover trigger event trigger is a deferred reporting trigger. The processing module is <NUM> is configured to stop recording network usage information of the <NUM> data connection, and re-record network usage information of the <NUM> data connection after the handover.

Optionally, during handover from the <NUM> data connection to a <NUM> data connection, the determining module <NUM> is further configured to determine that there is no active <NUM> handover trigger event trigger after receiving a network handover request for the <NUM> data connection. The processing module <NUM> is configured to combine and record network usage information of the <NUM> data connection and network usage information of the <NUM> data connection after the handover.

Optionally, the processing module <NUM> is configured to use, for the <NUM> data connection in the <NUM> network, a quota obtained from the <NUM> data connection.

Optionally, the processing module <NUM> is configured to process an activated <NUM> charging trigger event trigger in the <NUM> data connection.

Optionally, the determining module <NUM> is further configured to determine that the <NUM> network after handover does not support the activated <NUM> charging trigger event trigger in the <NUM> data connection, and the control plane function entity <NUM> ignores the <NUM> charging trigger event trigger in the <NUM> data connection after the handover.

Optionally, the determining module <NUM> is further configured to determine that the <NUM> network after handover supports the activated <NUM> charging trigger event trigger in the <NUM> data connection, and the control plane function entity <NUM> uses the <NUM> charging trigger event trigger in the <NUM> data connection after the handover.

Optionally, the processing module <NUM> is further configured to map the activated <NUM> charging trigger event trigger in the <NUM> data connection to a <NUM> charging trigger event trigger in the <NUM> network, and use the mapped <NUM> charging trigger event trigger in the <NUM> data connection after the handover.

In another optional manner, the modules in the apparatus in <FIG> may be further configured to perform steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>.

<FIG> is a schematic diagram of a structure of an apparatus <NUM>. The apparatus <NUM> may be the control plane function entity <NUM> in the foregoing embodiments, or may be a chip in the control plane function entity <NUM>. This is not specifically limited in this embodiment of this application. As shown in <FIG>, the apparatus includes a receiving module <NUM>, a determining module <NUM>, a processing module <NUM>, and a sending module <NUM>.

The sending module <NUM> is configured to send a charging service establishment message for a first network data connection to a charging function entity, to request to establish a charging session for the first network data connection. The processing module <NUM> is configured to request to perform, by using the charging session, online charging and/or offline charging on network usage information of the first network data connection. After handover from the first network data connection to a second network data connection, the processing module <NUM> is further configured to perform, by using the charging session, the online charging and/or the offline charging in the second network data connection established for a terminal <NUM>.

Specifically, the receiving module <NUM> in the apparatus in <FIG> may be further configured to perform receiving steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, <FIG>, and <FIG> and <FIG>. The determining module <NUM> in the apparatus in <FIG> may be further configured to perform determining steps performed by the control plane function entity <NUM> in the method procedures in <FIG> and <FIG> and <FIG>, for example, step <NUM>, step <NUM>, and/or step <NUM>. The sending module <NUM> in the apparatus in <FIG> may be further configured to perform sending steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> and <FIG>, for example, step <NUM>, and/or step <NUM>. The processing module <NUM> in the apparatus in <FIG> may be further configured to perform processing steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, and <FIG> and <FIG>.

In another optional manner, the receiving module <NUM> is configured to receive a request for establishing the first network data connection for the terminal. The sending module sends a charging service establishment message to a charging function entity <NUM> to request to establish the charging session for the first network data connection. The processing module requests to perform the online charging and/or the offline charging in the first network data connection in the charging session, and is configured to: after the terminal <NUM> is handed over from the accessed first network to a second network, request to perform, by using the charging session, online charging and/or offline charging in the second network data connection established for the terminal <NUM>.

Specifically, when the first network is a <NUM> network, and the second network is a <NUM> network, the receiving module <NUM> in the apparatus in <FIG> may be further configured to perform the receiving steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> and <FIG>. The determining module <NUM> in the apparatus in <FIG> may be further configured to perform the determining steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> and <FIG>, for example, step <NUM> and/or step <NUM>. The sending module <NUM> in the apparatus in <FIG> may be further configured to perform sending steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> and <FIG>. The processing module <NUM> in the apparatus in <FIG> may be further configured to perform the processing steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> and <FIG>.

Specifically, when the first network is a <NUM> network, and the second network is a <NUM> network, the receiving module <NUM> in the apparatus in <FIG> may be further configured to perform the receiving steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>. The determining module <NUM> in the apparatus in <FIG> may be further configured to perform the determining steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>. The sending module <NUM> in the apparatus in <FIG> may be further configured to perform the sending steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>. The processing module <NUM> in the apparatus in <FIG> may be further configured to perform the processing steps performed by the control plane function entity <NUM> in the method procedures in <FIG>, <FIG>, and <FIG> to <FIG>.

In this embodiment, the apparatus <NUM>, <NUM> and/or <NUM> are presented in a form of function modules obtained through division in an integrated manner. The "module" herein may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), a circuit, a processor and a memory for executing one or more software or firmware programs, an integrated logic circuit, and/or another device that can provide the foregoing function. In a simple embodiment, a person skilled in the art may figure out that the apparatus <NUM>, <NUM> and/or <NUM> may use a form shown in <FIG>.

For example, the processor <NUM> in <FIG> may invoke a computer execution instruction stored in the memory <NUM>, so that the apparatus <NUM>, and/or the apparatus <NUM> performs the session establishment method in the foregoing method embodiments.

Specifically, functions/implementation processes of the receiving module <NUM>, the sending module <NUM>, the determining module <NUM>, and the processing module <NUM> in <FIG>, the receiving module <NUM>, the sending module <NUM>, the determining module <NUM>, and the processing module <NUM> in <FIG>, and the receiving module <NUM>, the processing module <NUM>, and the sending module <NUM> in <FIG> may be implemented by the processor <NUM> in <FIG> by invoking the computer execution instruction stored in the memory <NUM>.

Optionally, when the apparatus <NUM>, <NUM> and/or <NUM> are chips, a function/implementation process of each module may be further implemented by using software, a circuit, or the like. Optionally, when the apparatus <NUM>, <NUM> and/or <NUM> are chips, the memory <NUM> may be a storage unit in the chip, for example, a register or a cache. Certainly, this is not specifically limited in the embodiments of this application.

The apparatuses provided in the embodiments of this application may be configured to perform the foregoing charging method. Therefore, for technical effects that can be obtained by the apparatuses, refer to the foregoing method embodiments.

The control plane function entity <NUM>, <NUM>, and/or <NUM> may be implemented on an integrated circuit, a radio frequency integrated circuit, a printed circuit board, and the like. In addition, the apparatus may be a self-supporting device, or may be a part of a larger device. In this embodiment, the control plane function entity <NUM>, <NUM>, and/or <NUM> are presented in a form of function modules obtained through division in an integrated manner. The "module" herein may be a specific ASIC, a circuit, a processor and a memory that execute one or more software or firmware programs, an integrated logic circuit, and/or another component that can provide the foregoing functions.

<FIG> is a schematic diagram of a structure of a system <NUM>. The apparatus system includes the charging function entity <NUM> in the foregoing embodiments and the control plane function entity <NUM> in the foregoing entities.

The charging function entity <NUM> may perform the foregoing embodiments and any step performed by the charging function entity <NUM> in <FIG>. The control plane function entity <NUM> may perform the foregoing embodiments and any step performed by the control plane function entity <NUM> in <FIG>. In this embodiment of the present invention, details are not described herein again.

All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When a software program is used to implement the embodiments, all or some of the embodiments may be implemented in a 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 the computer, the procedure or functions according to the embodiments of this application are all or partially generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (digital subscriber line, DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid-state drive (solid state disk, SSD)), or the like.

Claim 1:
A charging method, comprising:
determining (<NUM>), by a control plane function entity, to request a charging function entity to establish a service-based interface, SBI, charging session for a <NUM> data connection that is established for a terminal; and
requesting (<NUM>), by the control plane function entity through the SBI charging session, to perform online charging or offline charging in the <NUM> data connection; characterized in that:
during a handover of the terminal from the <NUM> data connection to a <NUM> data connection, the method further comprises:
determining (S414, <NUM>), by the control plane function entity, that a <NUM> handover trigger is in an active state, and that a type of the <NUM> handover trigger is an immediate reporting trigger; and
sending (S420), by the control plane function entity, a charging update message to the charging function entity through the SBI charging session, wherein the charging update message comprises network usage information of the <NUM> data connection or a quota request of the <NUM> data connection after the handover; or
determining (S414, <NUM>), by the control plane function entity, that a <NUM> handover trigger event trigger is in an active state, and that a type of the <NUM> handover trigger event trigger is a deferred reporting trigger; and stopping (S424), by the control plane function entity, recording network usage information of the <NUM> data connection, and re-recording network usage information of the <NUM> data connection after the handover; or
determining (S414), by the control plane function entity, that there is no active <NUM> handover trigger; and combining and recording (S414), by the control plane function entity, network usage information of the <NUM> data connection and network usage information of the <NUM> data connection after the handover.