Background
The Evolved Packet System (EPS) of the third Generation Partnership Project (3 GPP) is composed of an Evolved Universal mobile telecommunications System Terrestrial Radio Access Network (E-UTRAN), a Mobility Management unit (MME), a Mobility Management Entity (Mobility Management Entity), a serving gateway (S-GW), a Packet Data Network gateway (P-GW or PDN GW, Packet Data Network gateway), a Home terminal Server (HSS), an Authentication Authorization and Accounting (AAA, Authentication, Authorization and Accounting) Server of the 3GPP, a Policy and Charging Rules Function Entity (PCRF), and other support nodes.
Fig. 1 is a schematic diagram of an EPS system architecture according to the related art, in which Policy and Charging Control (PCC) is a part of the architecture, and functional entities of the PCC in the EPS architecture may be distributed as follows: the PCRF is a Policy and Charging rules Function entity, a Policy and Charging Enforcement Function entity (PCEF) exists in the P-GW, a Bearer Binding and Event reporting Function entity (BBERF) may exist in the S-GW, an Application Function entity (AF) of a service exists in an operator network Protocol (IP) service network, and a Subscription Profile Repository (SPR) may be integrated with the HSS.
In 3GPP, a corresponding PDN network can be found through an Access Point Name (APN). One connection of a UE to a PDN Network is commonly referred to as an IP Connectivity Access Network (IP-CAN) session.
The PCC is applicable to all 3GPP IP-CAN, and its architecture is shown in fig. 2, the PCRF is mainly responsible for formulating policy and charging rules, and issues the formulated PCC policy and charging rules to the PCEF through the Gx interface, and the PCEF installs and executes the PCC policy, and reports related events, and interacts charging information with the charging system.
The PCRF issues a Quality of service (QoS) rule to the BBERF through the Gxx interface, and the BBERF does not interact charging information with the charging system and is only responsible for bearing binding and reporting of related events. The AF provides service information to the PCRF through the Rx interface, the SPR stores service information signed by the terminal, and the PCRF can inquire the service information signed by the terminal from the SPR through the Sp interface. The PCEF sends the Online Charging information to an Online Charging System (OCS) through a Gy interface for Online Charging statistics, and sends the Offline Charging information to an Offline Charging System (OFCS) through a Gz interface.
Currently, in a PCC architecture, a PCRF may dynamically issue a PCC policy to a PCEF, where policy information includes QoS and charging information. And the PCRF formulates a PCC strategy according to the service related information provided by the AF, the bearing related information reported by the PCEF and the service information signed by the terminal in the SPR.
When a terminal initiates a certain data service, after receiving a first data packet of the uplink or downlink service data flow, gw (pcef) obtains a service identifier of the service data flow through a DPI (deep packet inspection) function inspection, initiates a request message to PCRF, carries the service identifier, and requests a PCC rule of the service data flow. Receiving a response message of the PCRF, terminating the service data flow if the PCC rule request is failed to be issued, and not performing relevant flow statistics on a data packet in the rule application response period; and if the valid PCC rule is issued, the GW (PCEF) executes the installation. If the offline charging function is executed on the data flow, the offline charging flow statistics is executed on the data flow from the effective PCC rule, and the related flow statistics is not executed on the data packet during the response period of the rule application. If the charging is online, after the PCC rule takes effect, the GW sends a request message to the OCS to request the flow quota. After receiving the response message of the OCS, if the effective quota is issued, performing online charging flow statistics on the data stream from the successful quota issuing, and performing relevant flow statistics on the data packet in the period of the rule application response and the quota application response; if no effective quota exists in the response message, the service data stream is terminated, and relevant flow statistics are not carried out on the data packets in the period of the rule application response and the quota application response. As can be seen, in the flow statistics of gw (pcef), there is a flow loss certainly for the service data flows that need to apply for the dynamic PCC rule to the PCRF and/or need to apply for the resource to the OCS. And the traffic statistics of the S-GW, all the data packets are included in the traffic statistics.
This inevitably results in inconsistent traffic control between the S-GW and the P-GW. And the traffic comparison between the S-GW and the OCS may not be consistent if the online charging function is performed.
Disclosure of Invention
The invention aims to solve the technical problem of providing a gateway, a system and a method for counting the flow in the resource application process, which can count the flow discarded due to resource application, thereby solving the problem of flow comparison.
In order to solve the above problems, the present invention provides a method for counting the flow in the resource application process,
when a terminal or a network initiates a data service, for each service data flow of the terminal, a gateway counts flow in a policy control and charging control (PCC) rule application and response process and/or flow in an Online Charging System (OCS) resource application and response process.
Further, the gateway creates a service data container for recording the traffic in the resource application process, and when the traffic occurs in the resource application process, the gateway records the traffic into the service data container.
Further, the method for the gateway to count the traffic in the PCC rule application and response process includes, for each service data flow of the terminal, when the gateway receives a first data packet of the service data flow, starting to request a PCC rule for the service data flow, and starting to record the traffic in the PCC rule application and response process until the gateway receives a PCC policy issued by the policy and charging control function entity, the traffic in the PCC rule application and response process is counted;
the method for the gateway to count the flow in the OCS resource application and response process is that for the service data stream of the terminal executing online charging, the gateway starts to record the flow in the OCS resource application and response process when initiating the resource application to the OCS until the gateway receives the credit quota issued by the OCS, and the flow counting in the OCS resource application and response process is completed.
Further, if the statistic granularity is a terminal, when a first IP-CAN session of the terminal starts to be created, the gateway generates a traffic service identifier for identifying a service data container for the terminal, and traffic of service data streams of all IP-CAN sessions using the terminal in a resource application process is recorded in the service data container;
if the statistic granularity is an IP-CAN session, when the IP-CAN session of the terminal is started to be established, a gateway generates a flow service identifier for identifying a service data container for the established IP-CAN session, and the flow of all service data streams using the IP-CAN session in the resource application process is recorded in the service data container;
if the statistic granularity is a service data stream, generating a flow service identifier for identifying a service data container for the service data stream when a gateway receives a first data packet of the service data stream, wherein the flow of the service data stream in the resource application process is recorded in the service data container;
if the statistic granularity is the access point, when the terminal starts to create through the first IP-CAN session of the access point, the gateway creates a flow service identifier for identifying a service data container for the access point, and the flow of service data streams of all IP-CAN sessions passing through the access point in the resource application process is recorded in the service data container.
Further, the method is suitable for an evolved packet system and a universal mobile telecommunications system;
in the evolved packet system, the gateway for counting the traffic is a packet data network gateway;
in the universal mobile communication system, the gateway for counting the flow is GGSN.
Further, the service data stream includes an uplink data stream initiated by the terminal and a downlink data stream initiated by the network side.
The invention also provides a gateway for counting the flow in the resource application process, which is used for counting the flow in the policy control and charging control (PCC) rule application and response process and/or the flow in the resource application and response process of an Online Charging System (OCS) for each service data flow of the terminal after the terminal or the network initiates the data service.
Further, the gateway is further configured to create a service data container for recording traffic in the resource application process, and when traffic occurs in the resource application process, the gateway records the traffic into the service data container.
Further, the gateway counting the traffic in the PCC rule application and response process means that, for each service data flow of the terminal, when the gateway receives a first data packet of the service data flow, the gateway starts to request a PCC rule for the service data flow and starts to record the traffic in the PCC rule application and response process until the gateway receives a PCC policy issued by a policy and charging control function entity PCRF, the traffic in the PCC rule application and response process is counted;
the gateway counting the flow in the OCS resource application and response process means that for the service data stream of the terminal executing online charging, the gateway starts to record the flow in the OCS resource application and response process when initiating the resource application to the OCS, and the flow counting in the OCS resource application and response process is completed until the gateway receives the credit quota issued by the OCS.
Further, if the statistic granularity is a terminal, when a first IP-CAN session of the terminal starts to be created, the gateway generates a traffic service identifier for identifying a service data container for the terminal, and traffic of service data streams of all IP-CAN sessions using the terminal in a resource application process is recorded in the service data container;
if the statistic granularity is an IP-CAN session, when the IP-CAN session of the terminal is started to be established, a gateway generates a flow service identifier for identifying a service data container for the established IP-CAN session, and the flow of all service data streams using the IP-CAN session in the resource application process is recorded in the service data container;
if the statistic granularity is a service data stream, generating a flow service identifier for identifying a service data container for the service data stream when a gateway receives a first data packet of the service data stream, wherein the flow of the service data stream in the resource application process is recorded in the service data container;
if the statistic granularity is the access point, when the terminal starts to create through the first IP-CAN session of the access point, the gateway creates a flow service identifier for identifying a service data container for the access point, and the flow of service data streams of all IP-CAN sessions passing through the access point in the resource application process is recorded in the service data container.
Further, the gateway is suitable for an evolved packet system and a universal mobile telecommunications system;
in the evolved packet system, the gateway for counting the traffic is a packet data network gateway;
in the universal mobile communication system, the gateway for counting the flow is GGSN.
The invention also provides a system for counting the flow in the resource application process, which comprises a gateway, wherein the gateway is used for counting the flow in the process of applying and responding the policy control and charging control (PCC) rule and/or the flow in the process of applying and responding the resource of an Online Charging System (OCS) for each service data flow of the terminal after the terminal or the network initiates the data service.
Further, the system is an evolved packet system and a universal mobile telecommunications system;
in the evolved packet system, the gateway for counting the traffic is a packet data network gateway;
in the universal mobile communication system, the gateway for counting the flow is GGSN.
The invention provides a gateway, a system and a method for counting the flow in the resource application process, which can count the flow discarded due to resource application and solve the flow comparison problem in an EPS system and a UMTS (universal mobile telecommunications system) system; and the realization mode is simple and easy.
Detailed Description
In order to solve the problem of traffic comparison, the discarded traffic caused by the resource application needs to be counted, and meanwhile, the relevant charging is performed on the part of traffic according to the need.
The embodiment provides a gateway for counting the flow in the resource application process, which is used for counting the flow of the data service of a terminal in the resource application process after the terminal or a network initiates the data service;
specifically, the gateway creates a service data container for recording traffic in the resource application process, and when traffic occurs in the resource application process, the gateway records the traffic into the service data container.
The flow in the resource application process comprises the following steps: flow in the PCC rule application and response process and/or flow in the OCS resource application and response process;
for each service data flow of the terminal, when receiving a first data packet of the service data flow, the gateway starts to request a PCC rule for the service data flow and starts to record the flow in the PCC rule application and response process until the gateway receives a PCC policy issued by the PCRF, and the flow statistics in the PCC rule application and response process is completed;
for the service data stream of the terminal executing online charging, when the gateway initiates a resource application to the OCS, the gateway starts to record the flow in the OCS resource application and response process until the gateway receives the credit quota issued by the OCS, the flow statistics in the OCS resource application and response process is completed.
The statistical granularity of the flow CAN be a terminal, an IP-CAN session, an APN (access point), and a service data stream; the statistical granularity may be set as desired, and the present invention is not limited thereto.
If the statistic granularity is a terminal, when the first IP-CAN session of the terminal starts to be established, the gateway generates a flow service identifier for identifying a service data container for the terminal, and the flow of service data streams of all IP-CAN sessions using the terminal in the resource application process is recorded in the service data container;
if the statistic granularity is an IP-CAN session, when the IP-CAN session of the terminal starts to be established, the gateway generates a flow service identifier for identifying a service data container for the established IP-CAN session, and the flow of all service data streams using the IP-CAN session in the resource application process is recorded in the service data container;
if the statistic granularity is the service data stream, generating a flow service identifier for identifying a service data container for the service data stream when the gateway receives a first data packet of the service data stream, wherein the flow of the service data stream in the resource application process is recorded in the service data container;
if the statistic granularity is the access point, when the terminal starts to create through the first IP-CAN session of the access point, the gateway creates a flow service identifier for identifying a service data container for the access point, and the flow of service data flows of all IP-CAN sessions passing through the access point in the resource application process is recorded in the service data container.
The service data flow may be an uplink data flow initiated by a terminal or a downlink data flow initiated by a network side, and for the flow statistics of the GW in the resource application process, the processing flows are consistent, but the former is the flow statistics for the uplink service data flow, and the latter is the flow statistics for the downlink service data flow.
The gateway is used in an EPS system and a UMTS system, wherein in the EPS system, the gateway for counting the flow is P-GW, and in the UMTS system, the gateway for counting the flow is GGSN.
The embodiment provides a system for counting flow in a resource application process, which comprises: a gateway, a PCRF and an OCS;
the gateway is used for counting the flow of the data service of the terminal in the resource application process after the terminal initiates the data service, wherein the flow comprises the flow in the PCC rule application and response process and/or the flow in the OCS resource application and response process; the specific manner is as described in the above-described gateway embodiment;
the gateway may also be configured to send the recorded traffic in the resource application process to the network element when other network elements (such as an OCS) obtain the traffic in the resource application process, or actively send the recorded traffic in the resource application process to the relevant network element when statistics is finished.
The embodiment provides a method for counting flow in a resource application process, which comprises the following steps: when the terminal initiates the data service, the gateway counts the flow of the data service of the terminal in the resource application process.
Specifically, the gateway creates a service data container for recording traffic in the resource application process, and when traffic occurs in the resource application process, the gateway records the traffic into the service data container.
The flow in the resource application process comprises the following steps: the flow in the PCC rule application and response process and/or the flow in the OCS resource application and response process.
The statistical granularity of the flow CAN be set as a terminal, an IP-CAN session, an APN or a service data stream and the like according to needs, and the invention is not limited to the method;
if the statistic granularity is a terminal, when the first IP-CAN session of the terminal starts to be established, the gateway generates a flow service identifier for identifying a service data container for the terminal, and the flow of service data streams of all IP-CAN sessions using the terminal in the resource application process is recorded in the service data container;
if the statistic granularity is an IP-CAN session, when the IP-CAN session of the terminal starts to be established, the gateway generates a flow service identifier for identifying a service data container for the established IP-CAN session, and the flow of all service data streams using the IP-CAN session in the resource application process is recorded in the service data container;
if the statistic granularity is the service data stream, generating a flow service identifier for identifying a service data container for the service data stream when the gateway receives a first data packet of the service data stream, wherein the flow of the service data stream in the resource application process is recorded in the service data container;
if the statistic granularity is the access point, when the terminal starts to create through the first IP-CAN session of the access point, the gateway creates a flow service identifier for identifying a service data container for the access point, and the flow of service data streams of all IP-CAN sessions passing through the access point in the resource application process is recorded in the service data container.
The method for GW to make flow statistics on the data packet received in the resource application process is the same as the flow statistics method in other processes.
The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings and application examples so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not limited to the present invention.
Application example 1
The application example takes the statistical granularity as a terminal and uses the online charging data flow as an example for explanation;
when UE initiates a certain service, PCEF initiates IP-CAN session establishment to PCRF, when a first IP-CAN session is established for the UE, GW establishes a service data container for recording flow in the resource application process, and the service data container records the flow in the PCC rule application and response process and the flow in the OCS resource application and response process; the specific flow is shown in fig. 3:
step 301: the first IP-CAN session of the terminal is established, GW establishes a service data container for recording the flow in the resource application process for the terminal, and flow service identification for identifying the service data container;
step 302: GW receives the first data packet of a certain service data flow of the terminal, PCEF sends a request message to PCRF, dynamically requests PCC rules and requests PCC rules of the service data flow;
after receiving the first data packet of the service data flow, the GW starts to perform flow statistics on the data packet during the service PCC rule application and response, and records the flow during this period to the service data container.
Step 303: after receiving the request message, the PCRF may initiate a subscription information acquisition process to the SPR as required, sends a subscription information request message to the SPR, and the SPR returns the relevant subscription information to the PCRF.
Step 304: and the PCRF stores the received subscription information and formulates a PCC policy.
Step 305: and the PCRF returns a response message to the PCEF and issues a PCC policy to the PCEF.
At this point, the flow statistics in the service data flow PCC rule application and response process is completed; and executing the operations from step 302 to step 305 for the flow statistics of other service data flows of the terminal in the PCC rule application and response processes.
Step 306: after receiving the PCC rule, the GW performs installation and execution, and if the online charging function is performed on the service data flow, the GW needs to initiate an OCS resource application procedure as shown in step 307.
Step 307: GW (PCEF) sends a request message to OCS to apply for credit quota;
the GW starts to perform traffic statistics of the special service data flow for the data packet during the OCS resource application and response, and counts the traffic during this period into the service data container.
Step 308: after receiving the request message, the OCS returns a response message to the gw (pcef), carrying the credit quota.
Step 309: after receiving the response message, gw (pcef) determines that the issued credit quota is valid, and performs online charging traffic statistics on subsequent data packets of the service data stream;
at this point, the flow statistics in the application and response process of the OCS resources of the service data stream is completed; and performing the operations from step 307 to step 309 on the flow statistics of other service data flows of the terminal in the OCS resource application and response processes.
Step 310: and continuing the subsequent service.
The service data stream comprises an uplink data stream initiated by the terminal and a downlink data stream initiated by the network side.
Application example two
The application example takes the statistical granularity as an IP-CAN session and uses an offline charging data stream as an example for explanation;
when UE initiates a certain service, PCEF initiates IP-CAN session creation to PCRF. When an IP-CAN session is established for the UE, the GW establishes a service data container for recording the flow in the resource application process for the IP-CAN session, and the service data container records the flow in the PCC rule application and response process; the specific flow is shown in fig. 4:
step 401: when an IP-CAN session is established for a certain terminal, GW establishes a service data container for recording the flow in the resource application process and a flow service identifier for identifying the service data container for the IP-CAN session;
step 402: when GW receives the first data packet of a certain service data flow of the terminal, PCEF sends a request message to PCRF, dynamically requests PCC rules and requests the PCC rules of the service data flow;
after receiving the first data packet of the service data flow, GW performs flow statistics on the data packet during the service PCC rule application and response period, and counts the flow during this period into the service data container.
Step 403: after receiving the request message, the PCRF may initiate a subscription information acquisition process to the SPR as required, sends a subscription information request message to the SPR, and the SPR returns the relevant subscription information to the PCRF.
Step 404: and the PCRF stores the received subscription information and formulates a PCC policy.
Step 405: and the PCRF returns a response message to the PCEF and issues a PCC policy to the PCEF.
At this point, the flow statistics in the service data flow PCC rule application and response process is completed; and executing the operations from step 402 to step 405 for the flow statistics of other service data flows in the PCC rule application and response process when the IP-CAN session is used.
Step 406: after receiving the PCC rule, the GW installs and executes the PCC rule; and determines that an offline charging function needs to be performed.
Step 407: and performing offline charging flow statistics on subsequent data packets of the service data flow.
Step 408: and continuing the subsequent service.
The service data stream comprises an uplink data stream initiated by the terminal and a downlink data stream initiated by the network side.
Application example three
For a system without using a PCC architecture, when an online charging function is executed, the flow statistics in the resource application process executes the same processing. The application example takes the statistical granularity as a terminal and uses the online charging data flow as an example for explanation;
when UE initiates a certain service, GW initiates IP-CAN session establishment, when the first IP-CAN session is established for the UE, GW establishes a service data container for recording the flow in the resource application process, and the service data container records the flow in the OCS resource application and response process; the specific flow is shown in fig. 5:
step 501: the first IP-CAN session of the terminal is established, GW establishes a service data container for recording the flow in the resource application process for the terminal, and flow service identification for identifying the service data container;
GW receives the first data packet of a certain service data flow of the terminal, and executes an online charging function for the service data flow, and then needs to initiate an OCS resource application procedure as shown in step 502.
Step 502: GW sends request message to OCS, applies credit quota;
the GW starts to perform traffic statistics of the special service data flow for the data packet during the OCS resource application and response, and counts the traffic during this period into the service data container.
Step 503: and after receiving the request message, the OCS returns a response message to the GW, and carries the credit quota.
Step 504: after receiving the response message, the GW judges that the issued credit quota is valid, and performs online charging flow statistics on subsequent data packets of the service data stream;
at this point, the flow statistics in the application and response process of the OCS resources of the service data stream is completed; the operations from step 502 to step 504 are performed for the traffic statistics of other service data flows of the terminal in the OCS resource application and response processes.
Step 505: and continuing the subsequent service.
The service data stream comprises an uplink data stream initiated by the terminal and a downlink data stream initiated by the network side.
The method is suitable for the flow comparison problem of S-GW, P-GW and OCS in the EPS system, and also suitable for the flow comparison problem of SGSN, GGSN and OCS in the UMTS system; the GW for counting the flow in the EPS system is P-GW, and the GW for counting the flow in the UMTS system is GGSN.