WO2008067758A1 - Method, device and system for network traffic statistics - Google Patents

Method, device and system for network traffic statistics Download PDF

Info

Publication number
WO2008067758A1
WO2008067758A1 PCT/CN2007/071163 CN2007071163W WO2008067758A1 WO 2008067758 A1 WO2008067758 A1 WO 2008067758A1 CN 2007071163 W CN2007071163 W CN 2007071163W WO 2008067758 A1 WO2008067758 A1 WO 2008067758A1
Authority
WO
WIPO (PCT)
Prior art keywords
network traffic
traffic statistics
sip
statistics
message
Prior art date
Application number
PCT/CN2007/071163
Other languages
French (fr)
Chinese (zh)
Inventor
Aijuan Feng
Jun Zuo
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2008067758A1 publication Critical patent/WO2008067758A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, device, and system for network traffic statistics.
  • the Next Generation Net adopts a structure in which bearers are separated from service control, separating the softswitch and the media gateway into two different entities.
  • the softswitch is connected to the end user through a media gateway, such as an Access Media Gateway (AMG) or an Integrated Access Device (IAD), or through a media gateway, such as a trunk media gateway. , TMG), Universal Media Gateway (UMG), etc. are connected with the exchange.
  • AMG Access Media Gateway
  • IAD Integrated Access Device
  • TMG Transmission Media Gateway
  • UMG Universal Media Gateway
  • the softswitch cannot know the traffic of the media gateway because the architecture of the control bearer is separated. However, the traffic has the traffic for the operator. Important role, according to the flow results, you can calculate the specific cost of each user or relay in a period of time or a certain call, timely grasp the customer's consumption data, and take corresponding service measures.
  • SIP Session Initiation Protocol
  • the softswitch sends an audit command message to the media gateway to which the calling party belongs to the MGCP or H.248 protocol to request statistical network traffic.
  • the media gateway passes the audit response of the MGCP or H.248 protocol.
  • the message sends back the number of inbound and outbound bytes for a single call count.
  • the operator charges the data through the statistics of the packet traffic.
  • the prior art network traffic statistics method has the following disadvantages: 1.
  • the data packet traffic can only be counted based on the MGCP/H.248 protocol, and cannot be counted for the SIP terminal or the media gateway;
  • the technical problem to be solved by the embodiments of the present invention is to provide a method, a device, and a system for collecting network traffic statistics, so as to solve the problem that a SIP server or a soft switch acquires data of a SIP terminal or a media gateway in a long time or a single call or a certain period. Packet traffic and/or signaling traffic issues.
  • the embodiment of the present invention provides a statistical method for network traffic, which includes the following steps:
  • the network traffic statistics result is fed back.
  • an embodiment of the present invention further provides a network traffic statistics system, including:
  • a network traffic subscription device configured to initiate a SIP subscription message requesting subscription to network traffic, and receive a SIP message returned by the network to obtain a network traffic statistics result;
  • the network traffic statistics device is configured to perform corresponding traffic statistics according to the SIP subscription message, and return the corresponding network traffic statistics result to the network traffic subscription device.
  • the embodiment of the invention further provides a network traffic statistics device, including:
  • a message receiving unit configured to receive a SIP subscription message requesting subscription to network traffic
  • a traffic statistics unit configured to perform network traffic statistics according to the SIP subscription message
  • the statistics result feedback unit is configured to feed back the network traffic statistics result.
  • the embodiment of the present invention sends a SIP subscription message requesting subscription to network traffic by receiving a network traffic subscription device; and then performing network traffic statistics according to the SIP subscription message; and then returning the network traffic statistics result to the network.
  • Traffic subscription device that is, the embodiment of the present invention expands by using the Event Notification Notification (SIP) described in SIP RFC3265 and performs the corresponding Extensible Markup Language (XML), and the SIP server or the soft exchange can acquire the SIP.
  • SIP Event Notification Notification
  • XML Extensible Markup Language
  • FIG. 1 is a schematic diagram of the composition of an embodiment of a network traffic statistics system according to the present invention
  • FIG. 2 is a schematic flow chart of a first embodiment of a network traffic statistics method according to the present invention
  • FIG. 3 is a schematic flow chart of a second embodiment of a network traffic statistics method according to the present invention.
  • FIG. 4 is a schematic flow chart of a third embodiment of a network traffic statistics method according to the present invention.
  • the embodiment of the present invention performs the corresponding XML extension based on the SIP-based event notification mechanism, which effectively solves the problem that the softswitch can only collect statistics packet traffic based on the MGCP or the H.248 protocol, but cannot count the SIP terminal or the media.
  • the network traffic of the gateway cannot also count the problem of packet traffic and signaling traffic over a period of time. It can be seen that the embodiment of the present invention enables the SIP server or the soft switch to collect the data packet traffic and the signaling traffic of the SIP terminal or the media gateway, so that the operator can perform charging and provide corresponding service measures through the statistical network traffic.
  • FIG. 1 is a schematic structural diagram of an embodiment of a network traffic statistics system according to the present invention.
  • the network traffic subscription device 1 may be a soft switch or a SIP server, such as a call control function network element in the IP Multimedia Subsystem (IMS) domain (Server-Calling session Controlling). Function, S-CSCF) or other network element, the network traffic subscribing device 1 obtains a SIP subscription message requesting subscription of network traffic to the network traffic statistics device 2 and receives the SIP response message and SIP notification message returned thereto to obtain network traffic statistics.
  • IMS IP Multimedia Subsystem
  • S-CSCF Serving Call Control Function
  • the network traffic statistics device 2 may be an existing network element such as a SIP terminal and an IAD or a newly added network element, and the network traffic statistics device 2 is configured to perform corresponding traffic statistics according to the SIP subscription message, and pass the The SIP notification message returns the network traffic statistics result to the network traffic subscription device 1.
  • the network traffic subscription device 1 specifically includes:
  • the traffic subscribing unit 10 is configured to send a SIP subscription message and a SIP response message for subscribing network traffic to the network traffic statistics device 2, and receive a SIP response message and a SIP notification message returned by the network traffic statistics device 2;
  • the traffic processing unit 11 is configured to perform corresponding charging, upper network management, storage processing, and the like on the traffic statistics carried in the SIP notification message.
  • the traffic processing unit specifically includes:
  • the traffic storage module 110 is configured to store traffic statistics for subsequent network planning.
  • the traffic reporting module 111 is configured to report the traffic statistics to the network management system, so that the network management can observe and manage the network traffic.
  • the flow rate module 112 is configured to store network traffic statistics results and perform charging processing on the results.
  • the network traffic statistics device 2 specifically includes:
  • the information transceiving unit 20 is configured to receive a SIP subscription request message from the network traffic subscribing device 1, and return a SIP response message indicating acceptance or rejection of the subscription network traffic, and send a SIP notification message including the traffic statistics result to the network traffic subscribing device. ;
  • the determining unit 21 is configured to analyze the SIP subscription message received by the message sending and receiving unit 20, and determine whether the SIP subscription message supports the corresponding traffic statistics function, and send the SIP subscription message that supports the traffic statistics function. Giving a traffic statistics unit; if not, returning a SIP response message that cannot accept the subscription request;
  • the traffic statistics unit 22 when the determining unit 21 determines that the network traffic statistics device 2 supports the traffic statistics function corresponding to the extended message body content, starts network traffic statistics according to the traffic statistics start time of the SIP subscription message, and the network
  • the traffic statistics are: statistics on fixed duration of data packets and/or signaling packets, periodic statistics on data packets and/or signaling packets, single call statistics on data packets and/or signaling packets, and The traffic statistics time expires and the network traffic statistics are terminated.
  • FIG. 2 is a schematic flowchart of a first embodiment of a network traffic statistics method according to the present invention.
  • the SIP server or the softswitch needs to subscribe to the data packet or signaling traffic of the SIP terminal or the media gateway for a period of time.
  • the specific implementation process is as follows:
  • the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to subscribe to the network traffic.
  • the Expire header field in the Subscribe message is valid for a long time, and the effective duration in this embodiment is 3600 seconds.
  • the event is a traffic statistics event. In this embodiment, it is defined as a flux-stat.
  • the Content-Type message carries the name of the XML message body. In this embodiment, it is defined as Content-Type: application/x-flux-stat-request+xml.
  • the XML content of the Subscribe message includes:
  • A statistical mode (stat type), including fixed-time long-term statistics, periodic statistics, single call
  • the flow rate in this embodiment, is a fixed length of time.
  • the statistics of the flux stat type including packet statistics, signaling packet statistics, and statistics of packets and signaling packets.
  • count type including the number of statistics sent/received packets and the total size of the transmitted/received packets (bite number).
  • total time for stat indicates the time when the terminal or gateway performs statistics, which may be different from the time of Expire, which is the effective time to subscribe to network traffic.
  • the code of the specific SIP Subscribe sample message is as follows:
  • step S101 after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, then the SIP is sent to the SIP.
  • the server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the Event event, it should reply to the SIP 489 corresponding message, indicating that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription message.
  • the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and the corresponding statistics function is started at the startup time defined in the XML message body, and the Notify message reports the initial statistical status to the SIP server or the soft exchange.
  • the Subscription-State header field uses the Subscription-State: active or pengding to indicate the start, and the terminated header field value can be used. The other indicators are all 0.
  • step S103 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway.
  • step S104 after the traffic statistics time defined in the XML message body expires, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch, and the specific SIP Notify.
  • the subscription-state header field is carried, indicating that the statistics are ended.
  • the statistics include: statistics mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes One or more of the number of signaling bytes and the number of received signaling bytes.
  • the SIP server or the softswitch can send a SIP termination message, that is, a Subscribe message, to the SIP terminal or the media gateway at any time, where the Expire of the Subscribe message is 0, indicating that the statistical task is terminated.
  • the SIP terminal or the media gateway may terminate the network traffic statistics after receiving the SIP termination message, and send a SIP Notify message to the SIP server or the softswitch, and report the final statistical result to the SIP server. Or soft swap.
  • step S105 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received.
  • the SIP server or the softswitch can save the information to the CDRs and perform the user accounting.
  • the network management can also report the traffic to the network management system.
  • FIG. 3 it is a schematic flowchart of a second embodiment of a network traffic statistics method according to the present invention.
  • the SIP server or the softswitch needs to subscribe to the data packet or signaling traffic when the SIP terminal or the media gateway makes a single call.
  • the specific implementation process is as follows:
  • step S200 the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to request to subscribe to the network traffic.
  • the Expire header field in the Subscribe message is valid for a long time, and the Event is a traffic statistics event, where the Subscribe message carries The statistic type in the XML message body is single call traffic statistics.
  • the specific code is as follows:
  • step S201 after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, the SIP terminal The server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the Event event, the SIP 489 response message should be replied to indicate that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription.
  • step S202 the SIP terminal or the media gateway is used.
  • the SIP Notify message is sent to the SIP server or the softswitch, and the startup time defined in the XML message body is started.
  • the Notify message reports the initial statistics status to the SIP server or softswitch.
  • the Subscription-State header field uses Subscription-State: active or pengding to indicate the start date, and further uses the transit header field value; all other indicators are 0.
  • step S203 the SIP server or softswitch receives the SIP Notify message to the SIP terminal or the media.
  • the gateway returns a SIP 200 response message;
  • step S204 the SIP server or the softswitch sends a SIP Invite message indicating that the calling user is off-hook to the SIP terminal or the media gateway, requesting to establish a call connection;
  • step S205 the SIP terminal or the media gateway returns a SIP 180 ringback tone message to the SIP server or the softswitch, indicating that the called user rings;
  • step S206 the SIP terminal or the media gateway returns a SIP 200 response message to the SIP server or the softswitch, indicating that the called user picks up the phone;
  • step S207 the SIP server or the softswitch sends a SIP ACK message to the SIP terminal or the media gateway, confirms that the off-hook message of the called user is received, and the calling party establishes a call connection and performs a call;
  • step S208 the SIP terminal or the media gateway returns a SIP BYE message to the SIP server or the softswitch, indicating that the called user hangs up;
  • step S209 the SIP server or the softswitch sends a SIP 200 response message to the SIP terminal or the media gateway, indicating that the on-hook message of the called user is received, and the call connection is terminated, and the call ends;
  • step S210 after the call ends, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch.
  • the specific SIP Notify message carries the Subscription-State header.
  • the field indicates the end of statistics.
  • the statistics include: statistical mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes, sending signaling bytes, receiving One or more of the number of signaling bytes.
  • the SIP server or softswitch can be always available.
  • the SIP terminal or the media gateway sends a SIP termination message, that is, a Subscribe message, where the Expire in the Subscribe message is 0, indicating that the statistics task is terminated.
  • a SIP termination message that is, a Subscribe message, where the Expire in the Subscribe message is 0, indicating that the statistics task is terminated.
  • the SIP terminal or the media gateway can receive the SIP. After the message is terminated, the network traffic statistics are terminated, and the SIP Notify message is sent to the SIP server or the softswitch, and the final statistics are reported to the SIP server or the softswitch.
  • step S211 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received.
  • the SIP server or the softswitch can save the metrics to the CDRs for user billing.
  • FIG. 4 it is a schematic flowchart of a third embodiment of a network traffic statistics method according to the present invention.
  • the SIP server or the softswitch needs to periodically collect statistics on the data packets or signaling traffic of the SIP terminal or the media gateway.
  • This type of traffic statistics is generally applicable to the traffic statistics of the SIP media gateway.
  • the specific implementation process of the traffic within the segment is as follows:
  • the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to subscribe to the network traffic.
  • the Expire header field in the Subscribe message is valid.
  • the effective duration in this embodiment needs to be larger than the XML message body.
  • the duration of the duration is usually an integer multiple of the length of the XML message body.
  • the event is a traffic statistics event.
  • the name of the XML message body is the flux-stat.
  • the content is the Content-Type. : application/x-flux-stat-request+xml.
  • the type of the statistics here is periodic statistics.
  • the subscription duration is 24 hours, and the reporting time is 1 hour. However, the time is not limited to this.
  • the type of the statistics may be real-time or irregular, and the subscription duration may be 12 hours. The above time may also be other time and the like.
  • the message code of the XML in the Subscribe message is as follows:
  • step S301 after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, the SIP is sent to the SIP.
  • the server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the extended XML message body, it should reply to the SIP 489 response message, indicating that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription message.
  • step S302 the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and the corresponding statistics function is started at the startup time defined in the XML message body, and the Notify message reports the initial statistical status to the SIP server or the soft exchange.
  • the Subscription-State header field uses the Subscription-State: active or pengding to indicate the start date, and the terminated header field value can be further used; all other indicators are 0.
  • step S303 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway.
  • step S304 after the traffic statistics time defined in the XML message body expires, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch, and the specific SIP Notify.
  • the subscription-state header field is carried, indicating that the statistics are ended.
  • the statistics include: statistics mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes , one or more of the number of signaling bytes and the number of received signaling bytes.
  • the SIP server or the softswitch can send a SIP termination message, that is, a Subscribe message, to the SIP terminal or the media gateway at any time, where the Expire of the Subscribe message is 0, indicating that the statistical task is terminated.
  • the SIP terminal or the media gateway may terminate the network traffic statistics after receiving the SIP termination message, and send a SIP Notify message to the SIP server or the softswitch, and report the final statistical result to the SIP server. Or soft swap.
  • step S305 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received.
  • the SIP server or the softswitch can save the metrics to the CDRs for user billing.
  • step S306 after the first statistics result is sent, the SIP terminal or the media gateway restarts the traffic statistics, and the traffic statistics result is reported again after the traffic statistics time, that is, the traffic statistics result is sent once every hour;
  • step S307 the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received.
  • the embodiment of the present invention further provides a network traffic statistics device, including: a message receiving unit, a traffic statistics unit, and a statistical result feedback unit.
  • the message receiving unit is configured to receive a SIP subscription message that requests to subscribe to network traffic
  • the traffic statistics unit is configured to perform network traffic statistics according to the SIP subscription message, where the statistical result feedback unit is used to feed back The network traffic statistics result.
  • the traffic statistics unit includes at least one of the following: a fixed duration statistics subunit, a single call statistics subunit, and a periodic statistical subunit.
  • the fixed duration statistics sub-unit is configured to start a fixed-time network traffic statistics according to a startup time in the SIP subscription message, when the SIP subscription is eliminated.
  • the network traffic statistics are terminated when the traffic statistics time expires;
  • the single call statistics sub-unit is configured to start network traffic statistics of a single call according to the startup time in the SIP subscription message;
  • the periodic statistics sub-unit is configured to start periodic network traffic statistics according to the startup time of the SIP subscription message; and traffic statistics in each SIP subscription message.
  • the network traffic is counted in the time, and the network traffic statistics are terminated when the valid statistics time in the SIP subscription message expires.
  • the network traffic statistics device further includes at least one of the following units:
  • the determining unit the unit is connected to the receiving unit and the traffic statistics unit, and is configured to determine whether the corresponding traffic statistics function is supported after receiving the SIP subscription message, and send the SIP subscription message that supports the traffic statistics function to the traffic.
  • the statistical unit if not supported, returns a SIP response message that cannot accept the subscription request.
  • the network traffic statistics unit is connected to the traffic statistics unit and the statistics result feedback unit, and is configured to notify the traffic statistics unit to terminate the traffic statistics when receiving the SIP termination message sent by the network traffic subscribing device, and notify the statistical result feedback unit to pass the SIP.
  • the notification message feeds back the final traffic statistics.

Abstract

A method for network traffic statistics is provided, comprising the steps of receiving the SIP subscribing message used for requesting for subscribing to the network traffic; doing the network traffic statistics based on the SIP subscribing message; feeding the result of the network traffic statistics back. A device and a system for the network traffic statistics are disclosed. Using the solution, it is convenient for the soft switch and SIP servers to get the traffic information of the SIP terminals and the media gateway, such that the providers can provide the corresponding services for users according to the statistical data packets and signaling traffic.

Description

一种网络流量统计的方法、 设备及***  Method, device and system for network traffic statistics
本申请要求于 2006年 12月 4日提交中国专利局、 申请号为 200610124026.2、 发明名称为"一种网络流量统计的方法及***"的中国专利申请的优先权, 其全部内 容通过引用结合在本申请中。  This application claims priority to Chinese Patent Application No. 200610124026.2, entitled "Method and System for Network Traffic Statistics", filed on December 4, 2006, the entire contents of which is incorporated herein by reference. In the application.
技术领域 本发明涉及通信领域, 尤其涉及一种网络流量统计的方法、 设备及***。 The present invention relates to the field of communications, and in particular, to a method, device, and system for network traffic statistics.
背景技术 Background technique
下一代网络( Next Generation Net, NGN )采用承载与业务控制分离的结构, 将软交换与媒体网关分离为两个不同的实体。 软交换通过媒体网关, 例如接入媒体 网关 ( Access Media Gateway, AMG )、 综合接入设备 ( Integrated Access Device , IAD )等与终端用户相连; 或者通过媒体网关, 例如中继媒体网关 (Trunk Media Gateway, TMG )、 通用媒体网关( Universal Media Gateway, UMG )等与交换才 目 连。 由于软交换采用承载与业务控制分离的架构, 软交换无法自动获取信令流量信 户的呼叫的流量统计或者软交换对入出中继网关进行流量统计,从而达到良好的计 费效果。  The Next Generation Net (NGN) adopts a structure in which bearers are separated from service control, separating the softswitch and the media gateway into two different entities. The softswitch is connected to the end user through a media gateway, such as an Access Media Gateway (AMG) or an Integrated Access Device (IAD), or through a media gateway, such as a trunk media gateway. , TMG), Universal Media Gateway (UMG), etc. are connected with the exchange. Because the softswitch adopts a separate architecture from the bearer and the service control, the softswitch cannot automatically obtain the traffic statistics of the call of the signaling traffic user or the softswitch performs traffic statistics on the incoming and outgoing trunk gateways, thereby achieving a good accounting effect.
如果软交换与媒体网关或者终端间采用会话初始协议( Session Initiation Protocol, SIP )互通时, 由于使用控制承载分离的架构, 软交换就无法得知媒体网 关的流量, 但流量对于运营商而言具有重要作用, 根据流量结果, 可以计算出每一 个用户或中继在一段时间内或某次呼叫的具体费用, 及时掌握客户消费资料, 采取 相应服务措施。  If the Session Initiation Protocol (SIP) is interworked between the softswitch and the media gateway or the terminal, the softswitch cannot know the traffic of the media gateway because the architecture of the control bearer is separated. However, the traffic has the traffic for the operator. Important role, according to the flow results, you can calculate the specific cost of each user or relay in a period of time or a certain call, timely grasp the customer's consumption data, and take corresponding service measures.
在基于分组交换的 IP电信网下,已经可以实现在基于媒体网关控制协议( Media Gateway Control Protocol, MGCP )或 H.248协议的交换机或媒体网关处统计每次 呼叫的数据包流量,即在一次呼叫结束时,如果需要统计流量,软交换就通过 MGCP 或者 H.248 协议向主被叫的用户归属的媒体网关发出审计命令消息请求统计网络 流量, 媒体网关通过 MGCP或者 H.248协议的审计响应消息发回针对单次呼叫统 计的呼入呼出字节数。 运营商通过统计出的数据包流量进行计费。  Under the packet-switched IP telecom network, it is possible to calculate the packet traffic of each call at the switch or media gateway based on the Media Gateway Control Protocol (MGCP) or H.248 protocol, that is, once At the end of the call, if the traffic needs to be collected, the softswitch sends an audit command message to the media gateway to which the calling party belongs to the MGCP or H.248 protocol to request statistical network traffic. The media gateway passes the audit response of the MGCP or H.248 protocol. The message sends back the number of inbound and outbound bytes for a single call count. The operator charges the data through the statistics of the packet traffic.
由此可见, 现有技术的网络流量统计方法存在以下缺点: 1、 只能基于 MGCP/H.248协议统计数据包流量, 对于 SIP终端或媒体网关则无 法统计; It can be seen that the prior art network traffic statistics method has the following disadvantages: 1. The data packet traffic can only be counted based on the MGCP/H.248 protocol, and cannot be counted for the SIP terminal or the media gateway;
2、 无法统计用户终端或者媒体网关在一段时间内的数据包流量;  2. It is impossible to count the packet traffic of the user terminal or the media gateway in a period of time;
3、 无法统计用户终端或者媒体网关的信令流量。  3. The signaling traffic of the user terminal or media gateway cannot be counted.
发明内容 Summary of the invention
本发明实施例所要解决的技术问题在于, 提供一种网络流量统计的方法、设备 及***, 以解决 SIP服务器或软交换获取 SIP终端或者媒体网关在一定时长或者单 次通话或者一定周期内的数据包流量和 /或信令流量的问题。  The technical problem to be solved by the embodiments of the present invention is to provide a method, a device, and a system for collecting network traffic statistics, so as to solve the problem that a SIP server or a soft switch acquires data of a SIP terminal or a media gateway in a long time or a single call or a certain period. Packet traffic and/or signaling traffic issues.
为了解决上述技术问题, 本发明实施例提出一种网络流量的统计方法, 包括以 下步骤:  In order to solve the above technical problem, the embodiment of the present invention provides a statistical method for network traffic, which includes the following steps:
接收请求订阅网络流量的 SIP订阅消息;  Receiving a SIP subscription message requesting subscription to network traffic;
根据所述 SIP订阅消息进行网络流量统计;  Performing network traffic statistics according to the SIP subscription message;
反馈所述网络流量统计结果。 The network traffic statistics result is fed back.
相应地, 本发明实施例还提供一种网络流量统计***, 包括:  Correspondingly, an embodiment of the present invention further provides a network traffic statistics system, including:
网络流量订阅设备,用于发起请求订阅网络流量的 SIP订阅消息并接收其返回 的 SIP消息, 获取网络流量统计结果;  a network traffic subscription device, configured to initiate a SIP subscription message requesting subscription to network traffic, and receive a SIP message returned by the network to obtain a network traffic statistics result;
网络流量统计设备, 用于根据所述 SIP订阅消息进行相应的流量统计, 并将对 应的网络流量统计结果返回给网络流量订阅设备。  The network traffic statistics device is configured to perform corresponding traffic statistics according to the SIP subscription message, and return the corresponding network traffic statistics result to the network traffic subscription device.
本发明实施例再提供一种网络流量统计设备, 包括:  The embodiment of the invention further provides a network traffic statistics device, including:
消息接收单元, 用于接收请求订阅网络流量的 SIP订阅消息;  a message receiving unit, configured to receive a SIP subscription message requesting subscription to network traffic;
流量统计单元, 用于才 据所述 SIP订阅消息进行网络流量统计;  a traffic statistics unit, configured to perform network traffic statistics according to the SIP subscription message;
统计结果反馈单元, 用于反馈所述网络流量统计结果。  The statistics result feedback unit is configured to feed back the network traffic statistics result.
由上述技术方案可知,本发明实施例通过接收网络流量订阅设备发送请求订阅 网络流量的 SIP订阅消息; 再才 据所述 SIP订阅消息进行网络流量统计; 然后将所 述网络流量统计结果返回给网络流量订阅设备。 也就是说, 本发明实施例通过使用 SIP RFC3265描述的事件通知机制(Specific Event Notification, SIP )并进行相应 的可扩展标记语言 (Extensible Markup Language, XML )进行扩展, SIP服务器 或软交换可以获取 SIP终端或者媒体网关的数据包流量和 /或信令流量的统计信息, 从而使得运营商可以根据统计出来的数据包、信令流量数据进行分析, 掌握用户的 详细信息和费用情况, 以提供相应的服务措施。 According to the foregoing technical solution, the embodiment of the present invention sends a SIP subscription message requesting subscription to network traffic by receiving a network traffic subscription device; and then performing network traffic statistics according to the SIP subscription message; and then returning the network traffic statistics result to the network. Traffic subscription device. That is, the embodiment of the present invention expands by using the Event Notification Notification (SIP) described in SIP RFC3265 and performs the corresponding Extensible Markup Language (XML), and the SIP server or the soft exchange can acquire the SIP. Statistics of packet traffic and/or signaling traffic of the terminal or media gateway, Therefore, the operator can analyze according to the statistical data packet and signaling traffic data, and grasp the detailed information and cost of the user to provide corresponding service measures.
附图说明 图 1是本发明网络流量统计***实施例的组成示意图; BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic diagram of the composition of an embodiment of a network traffic statistics system according to the present invention;
图 2是本发明网络流量统计方法的第一实施例流程示意图;  2 is a schematic flow chart of a first embodiment of a network traffic statistics method according to the present invention;
图 3是本发明网络流量统计方法的第二实施例流程示意图;  3 is a schematic flow chart of a second embodiment of a network traffic statistics method according to the present invention;
图 4是本发明网络流量统计方法的第三实施例流程示意图。  4 is a schematic flow chart of a third embodiment of a network traffic statistics method according to the present invention.
具体实施方式 detailed description
本发明实施例基于 SIP协议的事件通知机制( Specific Event Notification )进行 相应的 XML扩展,有效解决现有技术中软交换只能基于 MGCP或 H.248协议统计 数据包流量, 而不能统计 SIP终端或媒体网关的网络流量, 也不能统计一段时间内 的数据包流量和信令流量的问题。 由此可见, 本发明实施例使得 SIP服务器或软交 换可以统计 SIP终端或者媒体网关的数据包流量和信令流量,方便运营商通过统计 的网络流量进行计费和提供相应的服务措施。  The embodiment of the present invention performs the corresponding XML extension based on the SIP-based event notification mechanism, which effectively solves the problem that the softswitch can only collect statistics packet traffic based on the MGCP or the H.248 protocol, but cannot count the SIP terminal or the media. The network traffic of the gateway cannot also count the problem of packet traffic and signaling traffic over a period of time. It can be seen that the embodiment of the present invention enables the SIP server or the soft switch to collect the data packet traffic and the signaling traffic of the SIP terminal or the media gateway, so that the operator can perform charging and provide corresponding service measures through the statistical network traffic.
参见图 1, 为本发明网络流量统计***实施例的组成示意图。  FIG. 1 is a schematic structural diagram of an embodiment of a network traffic statistics system according to the present invention.
本发明实施例提供的网络流量统计***, 包括:  The network traffic statistics system provided by the embodiment of the present invention includes:
网络流量订阅设备 1 , 具体实现的时候, 可以是软交换, 也可以是 SIP服务器, 如 IP多媒体子***( IP Multimedia Subsystem, IMS )域中的呼叫 ^舌控制功能网 元 ( Server-Calling session Controlling function, S-CSCF )或其他网元, 网络流量订 阅设备 1通过向网络流量统计设备 2发起请求订阅网络流量的 SIP订阅消息并接收 其返回的 SIP响应消息以及 SIP通知消息, 以获取网络流量统计结果;  The network traffic subscription device 1 may be a soft switch or a SIP server, such as a call control function network element in the IP Multimedia Subsystem (IMS) domain (Server-Calling session Controlling). Function, S-CSCF) or other network element, the network traffic subscribing device 1 obtains a SIP subscription message requesting subscription of network traffic to the network traffic statistics device 2 and receives the SIP response message and SIP notification message returned thereto to obtain network traffic statistics. Result
网络流量统计设备 2, 在具体实现的时候, 可以是 SIP终端和 IAD等现有网元 或新增网元, 网络流量统计设备 2 用于根据所述 SIP订阅消息进行相应的流量统 计, 并通过 SIP通知消息将网络流量统计结果返回给网络流量订阅设备 1。  The network traffic statistics device 2, in the specific implementation, may be an existing network element such as a SIP terminal and an IAD or a newly added network element, and the network traffic statistics device 2 is configured to perform corresponding traffic statistics according to the SIP subscription message, and pass the The SIP notification message returns the network traffic statistics result to the network traffic subscription device 1.
所述网络流量订阅设备 1具体包括:  The network traffic subscription device 1 specifically includes:
流量订阅单元 10,用于向网络流量统计设备 2发送订阅网络流量的 SIP订阅消 息和 SIP响应消息 , 以及接收网络流量统计设备 2向其返回的 SIP响应消息和 SIP 通知消息; 流量处理单元 11, 用于将 SIP通知消息中携带的流量统计结果进行相应的计 费、 上4艮网管、 存储处理等; The traffic subscribing unit 10 is configured to send a SIP subscription message and a SIP response message for subscribing network traffic to the network traffic statistics device 2, and receive a SIP response message and a SIP notification message returned by the network traffic statistics device 2; The traffic processing unit 11 is configured to perform corresponding charging, upper network management, storage processing, and the like on the traffic statistics carried in the SIP notification message.
其中流量处理单元具体还包括:  The traffic processing unit specifically includes:
流量存储模块 110, 用于存储流量统计结果, 以便后续的网络规划;  The traffic storage module 110 is configured to store traffic statistics for subsequent network planning.
流量上报模块 111 , 用于将流量统计结果上报给网管, 以便网管进行网络流量 的观察和管理;  The traffic reporting module 111 is configured to report the traffic statistics to the network management system, so that the network management can observe and manage the network traffic.
流量计费模块 112,用于存储网络流量统计结果,并对所述结果进行计费处理。 所述网络流量统计设备 2具体包括:  The flow rate module 112 is configured to store network traffic statistics results and perform charging processing on the results. The network traffic statistics device 2 specifically includes:
信息收发单元 20,用于接收来自网络流量订阅设备 1的 SIP订阅请求消息,并 向其返回表示接受或者拒绝订阅网络流量的 SIP响应消息以及向网络流量订阅设备 发送包含流量统计结果的 SIP通知消息;  The information transceiving unit 20 is configured to receive a SIP subscription request message from the network traffic subscribing device 1, and return a SIP response message indicating acceptance or rejection of the subscription network traffic, and send a SIP notification message including the traffic statistics result to the network traffic subscribing device. ;
判定单元 21 , 用于对消息收发单元 20接收到的所述 SIP订阅消息进行分析 , 并判定所述 SIP订阅消息是否支持对应的流量统计功能 ,并将支持流量统计功能的 所述 SIP订阅消息发送给流量统计单元; 若不支持, 则返回不能接受所述订阅请求 的 SIP响应消息;  The determining unit 21 is configured to analyze the SIP subscription message received by the message sending and receiving unit 20, and determine whether the SIP subscription message supports the corresponding traffic statistics function, and send the SIP subscription message that supports the traffic statistics function. Giving a traffic statistics unit; if not, returning a SIP response message that cannot accept the subscription request;
流量统计单元 22 , 当判定单元 21判定网络流量统计设备 2支持所述扩展的消 息体内容相应的流量统计功能时, 据所述 SIP订阅消息的流量统计启动时间, 启 动网络流量统计, 所述网络流量统计为: 对数据包和 /或信令包进行固定时长的统 计、 对数据包和 /或信令包进行周期性统计、 对数据包和 /或信令包进行单次呼叫统 计, 并在流量统计时间到时终止网络流量统计。  The traffic statistics unit 22, when the determining unit 21 determines that the network traffic statistics device 2 supports the traffic statistics function corresponding to the extended message body content, starts network traffic statistics according to the traffic statistics start time of the SIP subscription message, and the network The traffic statistics are: statistics on fixed duration of data packets and/or signaling packets, periodic statistics on data packets and/or signaling packets, single call statistics on data packets and/or signaling packets, and The traffic statistics time expires and the network traffic statistics are terminated.
参见图 2, 是本发明网络流量统计方法的第一实施例的流程示意图。  2 is a schematic flowchart of a first embodiment of a network traffic statistics method according to the present invention.
在本实施中 , SIP服务器或软交换需要订阅 SIP终端或者媒体网关在一段时间 内的数据包或者信令流量 , 具体的实现流程如下:  In this implementation, the SIP server or the softswitch needs to subscribe to the data packet or signaling traffic of the SIP terminal or the media gateway for a period of time. The specific implementation process is as follows:
在 S100步骤, SIP服务器或软交换向 SIP终端或者媒体网关发送 SIP Subscribe 消息, 请求订阅网络流量, Subscribe消息中带有的 Expire头域为有效时间长, 本 实施例中的有效时长为 3600秒, Event为流量统计事件,本实施例中定义为 flux-stat, Content-Type消息中携带 XML消息体的名称, 本实施例中定义为 Content-Type: application/x-flux-stat-request+xml。 Subscribe消息的 XML具体内容包括:  In the step S100, the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to subscribe to the network traffic. The Expire header field in the Subscribe message is valid for a long time, and the effective duration in this embodiment is 3600 seconds. The event is a traffic statistics event. In this embodiment, it is defined as a flux-stat. The Content-Type message carries the name of the XML message body. In this embodiment, it is defined as Content-Type: application/x-flux-stat-request+xml. The XML content of the Subscribe message includes:
A、 统计方式(stat type ) , 包括固定时长时间的统计、 周期性统计、 单次通话 的流量, 在本实施例里面是固定时长。 A, statistical mode (stat type), including fixed-time long-term statistics, periodic statistics, single call The flow rate, in this embodiment, is a fixed length of time.
B、 统计的包类型 ( flux stat type ) , 包括数据包统计、 信令包统计、 数据包与 信令包一块统计。  B. The statistics of the flux stat type, including packet statistics, signaling packet statistics, and statistics of packets and signaling packets.
C、 统计计数方式(count type ) , 包括统计发送 /接收包的个数、 发送 /接收包 的总大小 (bite数)。  C. Count type (count type), including the number of statistics sent/received packets and the total size of the transmitted/received packets (bite number).
D、 启动绝对时间 ( start real time ) , 告知启动的绝对时间。  D. Start real time, telling the absolute time of the start.
Ε、 流量统计时间 (total time for stat ) , 指示终端或者网关进行统计的时间, 可以不同于 Expire的时间 , Expire的时间是表示订阅网络流量的有效时间。  To, total time for stat, indicates the time when the terminal or gateway performs statistics, which may be different from the time of Expire, which is the effective time to subscribe to network traffic.
具体的 SIP Subscribe示例消息的代码如下:  The code of the specific SIP Subscribe sample message is as follows:
SUBSCRIBE sip: 191.178.1.1 :5061 SIP/2.0  SUBSCRIBE sip: 191.178.1.1 :5061 SIP/2.0
Via: SIP/2.0/UDP 191.178.99.101 :5060;branch=z9hG4bKc3faa9eb2f24al0f483; orig-sub  Via: SIP/2.0/UDP 191.178.99.101:5060;branch=z9hG4bKc3faa9eb2f24al0f483; orig-sub
Max-Forwards: 70  Max-Forwards: 70
Route: <sip:191.178.1. l :5061;lr>  Route: <sip:191.178.1. l :5061;lr>
P-Asserted-Identity: <sip: 191.178.99.101>  P-Asserted-Identity: <sip: 191.178.99.101>
P-Charging- Vector:  P-Charging- Vector:
cid-value=173SX-20060822165427-02224868;orig-ioi=sub.pccw.com;term-ioi=sub.pcc w.com;icid-generated-at= 191.178.99.101 Cid-value=173SX-20060822165427-02224868; orig-ioi=sub.pccw.com; term-ioi=sub.pcc w.com;icid-generated-at= 191.178.99.101
Privacy: none  Privacy: none
From: <sip:191.178.99.101>;tag=ded66c7393d8b7e29fe25cf851 TOe60  From: <sip:191.178.99.101>;tag=ded66c7393d8b7e29fe25cf851 TOe60
To: <sip:191.178.1.1>  To: <sip:191.178.1.1>
Call-ID: 3bcd5«)ecffl 8de2e8c34202d5515al8  Call-ID: 3bcd5«)ecffl 8de2e8c34202d5515al8
CSeq: 13992 SUBSCRIBE  CSeq: 13992 SUBSCRIBE
Event: flux-stat  Event: flux-stat
Expires: 3600  Expires: 3600
Contact: <sip: 191.178.99.101 :5060>  Contact: <sip: 191.178.99.101 :5060>
Content-Length: XXX  Content-Length: XXX
Content-Type: application/x-flux-stat-request+xml  Content-Type: application/x-flux-stat-request+xml
<?xml version=" 1.0"?> <flux-stat-request ref="aps 1 -2234543 "> <?xml version="1.0"?> <flux-stat-request ref="aps 1 -2234543 ">
<stat type=fix-timer/>  <stat type=fix-timer/>
<count type=packet-number-and-total-bytes/>  <count type=packet-number-and-total-bytes/>
<start real time=2006-07-23- 12-00-00/>  <start real time=2006-07-23- 12-00-00/>
<flux stat type=rtp-packets-and-siginal-packets/>  <flux stat type=rtp-packets-and-siginal-packets/>
<total time for stat=1800/>  <total time for stat=1800/>
</ flux-stat-request>  </ flux-stat-request>
在步骤 S101 , SIP终端或媒体网关收到 SIP服务器或软交换的 SIP Subscribe流 量订阅消息后, SIP终端或媒体网关对其进行分析, 如果 SIP终端或媒体网关支持 相应的流量统计功能, 则向 SIP服务器或软交换返回 SIP 200响应消息, 指示已经 接受该订阅请求。若 SIP终端或者媒体网关不支持 Event事件,此时应该回复 SIP 489 相应消息,表示不能接收该订阅,此时软交换或者其他的 SIP服务器不再发送流量 订阅消息。  In step S101, after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, then the SIP is sent to the SIP. The server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the Event event, it should reply to the SIP 489 corresponding message, indicating that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription message.
在步骤 S102, SIP终端或者媒体网关向 SIP服务器或软交换发送 SIP Notify消息, 同时在 XML消息体中定义的启动时间启动相应的统计功能, Notify消息将起始的统 计状态上报给 SIP服务器或软交换。具体的 SIP Notify消息中, Subscription-State头域 使用 Subscription- State: active或 pengding表示开始夕卜 , 进一步还可以使用 terminated 头域值; 其他的各项指标都是 0。  In the step S102, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and the corresponding statistics function is started at the startup time defined in the XML message body, and the Notify message reports the initial statistical status to the SIP server or the soft exchange. In the specific SIP Notify message, the Subscription-State header field uses the Subscription-State: active or pengding to indicate the start, and the terminated header field value can be used. The other indicators are all 0.
在步骤 S103, SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体 网关返回 SIP 200响应消息;  In step S103, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway.
在步骤 S104, 在 XML消息体中定义的流量统计时间到了以后, SIP终端或者 媒体网关向 SIP服务器或软交换发送 SIP Notify消息 ,将最终的统计结果上报给 SIP 服务器或软交换, 具体的 SIP Notify消息中, 要携带 Subscription-State头域, 表示 统计结束, 统计的结果包括: 统计方式、 发送数据包、 接收数据包、 发送信令、 接 收信令、 发送数据字节数、 接收数据字节数、 发送信令字节数、 接收信令字节数的 一个或多个。  In step S104, after the traffic statistics time defined in the XML message body expires, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch, and the specific SIP Notify. In the message, the subscription-state header field is carried, indicating that the statistics are ended. The statistics include: statistics mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes One or more of the number of signaling bytes and the number of received signaling bytes.
具体的 SIP Notify示例消息的代码如下:  The code for the specific SIP Notify sample message is as follows:
NOTIFY sip:191.178.99.101 :5060 SIP/2.0  NOTIFY sip:191.178.99.101 :5060 SIP/2.0
Via: SIP/2.0/UDP 191.178.1.1 :5061;branch=z9hG4bK280716337 Call-ID: 3bcd5f0ecffl 8de2e8c34202d5515al8 Via: SIP/2.0/UDP 191.178.1.1 :5061;branch=z9hG4bK280716337 Call-ID: 3bcd5f0ecffl 8de2e8c34202d5515al8
From: <sip :191.178.1.1 >;tag=44b23 fac  From: <sip :191.178.1.1 >;tag=44b23 fac
To: <sip: 191.178.99.101 >;tag=ded66c7393d8b7e29fe25cf 51 ffl)e60  To: <sip: 191.178.99.101 >;tag=ded66c7393d8b7e29fe25cf 51 ffl)e60
CSeq: 1 NOTIFY  CSeq: 1 NOTIFY
Contact: <sip:191.178.1.1 :5061>  Contact: <sip:191.178.1.1 :5061>
Subscription- State: terminated;reason=completed  Subscription- State: terminated; reason=completed
Max-Forwards: 70  Max-Forwards: 70
Accept: application/sdp  Accept: application/sdp
Event: flux-stat  Event: flux-stat
Supported: 100rel, timer  Supported: 100rel, timer
Content-Length: XXX  Content-Length: XXX
Content-Type: application/x-flux-stat-result+xml  Content-Type: application/x-flux-stat-result+xml
<?xml version- ' 1.0"?>  <?xml version- ' 1.0"?>
<flux-stat-result ref="aps 1 -2234543 ">  <flux-stat-result ref="aps 1 -2234543 ">
<stat type=fix-timer/>  <stat type=fix-timer/>
<sent rtp packets=1000/>  <sent rtp packets=1000/>
<receive rtp packets=1200/>  <receive rtp packets=1200/>
<sent siginal packets=10/>  <sent siginal packets=10/>
<receive siginal packets=12/>  <receive siginal packets=12/>
<sent total rtp btis=1000000/>  <sent total rtp btis=1000000/>
<receive total rtp bits=1200000/>  <receive total rtp bits=1200000/>
<sent total siginal bits=10000/>  <sent total siginal bits=10000/>
<receive total siginal bits=12000/>  <receive total siginal bits=12000/>
</ flux-stat-result>  </ flux-stat-result>
需要说明的是, 在启动流量统计任务以后, SIP服务器或者软交换可以随时向 SIP终端或者媒体网关发送 SIP终止消息, 即 Subscribe消息, 其中, Subscribe消 息的 Expire中 0, 表示终止统计任务, 则作为另一种实施方式, 在步骤 S104, SIP 终端或者媒体网关可以在接收到 SIP终止消息后, 终止网络流量统计, 并向 SIP服 务器或软交换发送 SIP Notify消息,将最终的统计结果上报给 SIP服务器或软交换。 在步骤 S105 , SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体网 关返回 SIP 200响应消息, 确认已经收到流量统计结果。 SIP服务器或软交换收到流 量统计结果后, 可以保存到话单当中, 进行用户计费, 也可以上报给网管, 供网管 观察网上流量。 It should be noted that, after the traffic statistics task is started, the SIP server or the softswitch can send a SIP termination message, that is, a Subscribe message, to the SIP terminal or the media gateway at any time, where the Expire of the Subscribe message is 0, indicating that the statistical task is terminated, In another embodiment, in step S104, the SIP terminal or the media gateway may terminate the network traffic statistics after receiving the SIP termination message, and send a SIP Notify message to the SIP server or the softswitch, and report the final statistical result to the SIP server. Or soft swap. In step S105, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received. After receiving the statistics of the traffic statistics, the SIP server or the softswitch can save the information to the CDRs and perform the user accounting. The network management can also report the traffic to the network management system.
参见图 3 , 是本发明网络流量统计方法的第二实施例的流程示意图。  Referring to FIG. 3, it is a schematic flowchart of a second embodiment of a network traffic statistics method according to the present invention.
在本实施中, SIP服务器或软交换需要订阅 SIP终端或者媒体网关单次呼叫时 的数据包或者信令流量, 具体的实现流程如下:  In this implementation, the SIP server or the softswitch needs to subscribe to the data packet or signaling traffic when the SIP terminal or the media gateway makes a single call. The specific implementation process is as follows:
在 S200步骤, SIP服务器或软交换向 SIP终端或者媒体网关发送 SIP Subscribe 消息,请求订阅网络流量, Subscribe消息中带有的 Expire头域为有效时间长, Event 为流量统计事件,其中 Subscribe消息中携带的 XML消息体中的统计类型为单次呼 叫流量统计, 具体代码如下:  In step S200, the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to request to subscribe to the network traffic. The Expire header field in the Subscribe message is valid for a long time, and the Event is a traffic statistics event, where the Subscribe message carries The statistic type in the XML message body is single call traffic statistics. The specific code is as follows:
<?xml version="1.0"?>  <?xml version="1.0"?>
<flux-stat-request ref="aps 1 -2234543 ">  <flux-stat-request ref="aps 1 -2234543 ">
<stat type=next-call/>  <stat type=next-call/>
<count type=packet-number-and-total-bytes/>  <count type=packet-number-and-total-bytes/>
<flux stat type=rtp-packets-and-siginal-packets/>  <flux stat type=rtp-packets-and-siginal-packets/>
</ flux-stat-request>  </ flux-stat-request>
在步骤 S201 , SIP终端或媒体网关收到 SIP服务器或软交换的 SIP Subscribe流量 订阅消息后, SIP终端或媒体网关对其进行分析, 如果 SIP终端或媒体网关支持相应 的流量统计功能, 则向 SIP服务器或软交换返回 SIP 200响应消息, 指示已经接受该 订阅请求。 若 SIP终端或者媒体网关不支持 Event事件, 此时应该回复 SIP 489响应消 息, 表示不能接收该订阅, 此时软交换或者其他的 SIP服务器不再发送流量订阅消 在步骤 S202, SIP终端或者媒体网关向 SIP服务器或软交换发送 SIP Notify消息, 同时在 XML消息体中定义的启动时间已启动, Notify消息将起始的统计状态上报给 SIP服务器或软交换。 具体的 SIP Notify消息中 , Subscription-State头域使用 Subscription-State: active或 pengding表示开始夕卜, 进一步还可以使用 terminated头域 值; 其他的各项指标都是 0。  In step S201, after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, the SIP terminal The server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the Event event, the SIP 489 response message should be replied to indicate that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription. In step S202, the SIP terminal or the media gateway is used. The SIP Notify message is sent to the SIP server or the softswitch, and the startup time defined in the XML message body is started. The Notify message reports the initial statistics status to the SIP server or softswitch. In the specific SIP Notify message, the Subscription-State header field uses Subscription-State: active or pengding to indicate the start date, and further uses the transit header field value; all other indicators are 0.
在步骤 S203 , SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体 网关返回 SIP 200响应消息; In step S203, the SIP server or softswitch receives the SIP Notify message to the SIP terminal or the media. The gateway returns a SIP 200 response message;
在步骤 S204, SIP服务器或者软交换向 SIP终端或者媒体网关发送表示主叫用 户的摘机的 SIP Invite 消息 , 请求建立呼叫连接;  In step S204, the SIP server or the softswitch sends a SIP Invite message indicating that the calling user is off-hook to the SIP terminal or the media gateway, requesting to establish a call connection;
在步骤 S205, SIP终端或者媒体网关向 SIP服务器或者软交换返回 SIP 180回 铃音消息, 表示被叫用户振铃;  In step S205, the SIP terminal or the media gateway returns a SIP 180 ringback tone message to the SIP server or the softswitch, indicating that the called user rings;
在步骤 S206, SIP终端或者媒体网关向 SIP服务器或者软交换返回 SIP 200响 应消息, 表示被叫用户摘机;  In step S206, the SIP terminal or the media gateway returns a SIP 200 response message to the SIP server or the softswitch, indicating that the called user picks up the phone;
在步骤 S207, SIP服务器或者软交换向 SIP终端或者媒体网关发送 SIP ACK 消息, 确认收到被叫用户的摘机消息, 主被叫建立起呼叫连接, 进行通话;  In step S207, the SIP server or the softswitch sends a SIP ACK message to the SIP terminal or the media gateway, confirms that the off-hook message of the called user is received, and the calling party establishes a call connection and performs a call;
在步骤 S208, SIP终端或者媒体网关向 SIP服务器或者软交换返回 SIP BYE消 息, 表示被叫用户挂机;  In step S208, the SIP terminal or the media gateway returns a SIP BYE message to the SIP server or the softswitch, indicating that the called user hangs up;
在步骤 S209, SIP服务器或者软交换向 SIP终端或者媒体网关发送 SIP 200响 应消息, 表示收到被叫用户的挂机消息, 呼叫连接终断, 至此通话结束;  In step S209, the SIP server or the softswitch sends a SIP 200 response message to the SIP terminal or the media gateway, indicating that the on-hook message of the called user is received, and the call connection is terminated, and the call ends;
需要说明的是, SIP终端或者媒体网关进行的流量统计贯穿于步骤 S207至 S209 整个过程中;  It should be noted that the traffic statistics performed by the SIP terminal or the media gateway are throughout the process of steps S207 to S209;
在步骤 S210, 通话结束后, SIP终端或者媒体网关向 SIP服务器或软交换发送 SIP Notify消息, 将最终的统计结果上报给 SIP服务器或软交换, 具体的 SIP Notify 消息中, 要携带 Subscription-State头域, 表示统计结束, 统计的结果包括: 统计方 式、 发送数据包、 接收数据包、 发送信令、 接收信令、 发送数据字节数、 接收数据 字节数、 发送信令字节数、 接收信令字节数的一个或多个。  In step S210, after the call ends, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch. The specific SIP Notify message carries the Subscription-State header. The field indicates the end of statistics. The statistics include: statistical mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes, sending signaling bytes, receiving One or more of the number of signaling bytes.
具体的 XML示例消息的代码如下:  The code for the specific XML sample message is as follows:
<?xml version=" 1.0"?>  <?xml version=" 1.0"?>
<flux-stat-result ref="apsl-2234543">  <flux-stat-result ref="apsl-2234543">
<stat type=next-call/>  <stat type=next-call/>
<sent rtp packets: 1000/>  <sent rtp packets: 1000/>
<receive rtp packets=1200/>  <receive rtp packets=1200/>
<sent siginal packets=10/>  <sent siginal packets=10/>
<receive siginal packets=12/>  <receive siginal packets=12/>
<sent total rtp btis=1000000/> <receive total rtp bits=1200000/> <sent total rtp btis=1000000/> <receive total rtp bits=1200000/>
<sent total siginal bits=10000/>  <sent total siginal bits=10000/>
<receive total siginal bits=12000/>  <receive total siginal bits=12000/>
</ flux- stat-result>  </ flux- stat-result>
需要说明的是, 在启动流量统计任务以后, SIP服务器或者软交换可以随时向 It should be noted that after starting the traffic statistics task, the SIP server or softswitch can be always available.
SIP终端或者媒体网关发送 SIP终止消息, 即 Subscribe消息, 其中, Subscribe消 息的 Expire中 0, 表示终止统计任务, 则作为另一种实施方式, 在步骤 S210, SIP 终端或者媒体网关可以在接收到 SIP终止消息后, 终止网络流量统计, 并向 SIP服 务器或软交换发送 SIP Notify消息 ,将最终的统计结果上报给 SIP服务器或软交换。 The SIP terminal or the media gateway sends a SIP termination message, that is, a Subscribe message, where the Expire in the Subscribe message is 0, indicating that the statistics task is terminated. As another implementation manner, in step S210, the SIP terminal or the media gateway can receive the SIP. After the message is terminated, the network traffic statistics are terminated, and the SIP Notify message is sent to the SIP server or the softswitch, and the final statistics are reported to the SIP server or the softswitch.
在步骤 S211 , SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体网 关返回 SIP 200响应消息, 确认已经收到流量统计结果。 SIP服务器或软交换收到流 量统计结果后, 可以保存到话单当中, 进行用户计费, 也可以上报给网管, 供网管 观察网上流量。  In step S211, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received. After receiving the statistics of the traffic statistics, the SIP server or the softswitch can save the metrics to the CDRs for user billing.
参见图 4, 是本发明网络流量统计方法的第三实施例的流程示意图。  Referring to FIG. 4, it is a schematic flowchart of a third embodiment of a network traffic statistics method according to the present invention.
在本实施中 , SIP服务器或软交换需要周期性的统计 SIP终端或者媒体网关的 数据包或者信令流量, 这种流量统计一般是对 SIP媒体网关进行流量统计才适用, 用于统计某个时间段内的流量, 具体的实现流程如下:  In this implementation, the SIP server or the softswitch needs to periodically collect statistics on the data packets or signaling traffic of the SIP terminal or the media gateway. This type of traffic statistics is generally applicable to the traffic statistics of the SIP media gateway. The specific implementation process of the traffic within the segment is as follows:
在 S300步骤, SIP服务器或软交换向 SIP终端或者媒体网关发送 SIP Subscribe 消息, 请求订阅网络流量, Subscribe消息中带有的 Expire头域为有效时长, 本实 施例中的有效时长需要大于 XML消息体中的时长, 通常是 XML消息体中时长的 整数倍, Event为流量统计事件, 本实施例中为 flux-stat, Content-Type消息中携带 XML 消 息 体 的 名 称 , 本 实 施 例 中 为 Content-Type: application/x-flux-stat-request+xml。 这里统计的类型为周期性统计 , 订阅时长是 24 小时, 上报时间是 1小时, 但并不限于此, 所述统计的类型也可以是实时或不定期 等, 订阅时长也可以是 12小时等, 上述时间也可以是其它时间等。  In step S300, the SIP server or the softswitch sends a SIP Subscribe message to the SIP terminal or the media gateway to subscribe to the network traffic. The Expire header field in the Subscribe message is valid. The effective duration in this embodiment needs to be larger than the XML message body. The duration of the duration is usually an integer multiple of the length of the XML message body. The event is a traffic statistics event. In this embodiment, the name of the XML message body is the flux-stat. In this embodiment, the content is the Content-Type. : application/x-flux-stat-request+xml. The type of the statistics here is periodic statistics. The subscription duration is 24 hours, and the reporting time is 1 hour. However, the time is not limited to this. The type of the statistics may be real-time or irregular, and the subscription duration may be 12 hours. The above time may also be other time and the like.
Subscribe消息中的 XML的消息代码具体如下:  The message code of the XML in the Subscribe message is as follows:
<?xml version=" 1.0"?>  <?xml version=" 1.0"?>
<flux-stat-request ref="aps 1 -2234543 ">  <flux-stat-request ref="aps 1 -2234543 ">
<stat type=circle-stat/> <count type=packet-number-and-total-bytes/> <stat type=circle-stat/> <count type=packet-number-and-total-bytes/>
<start real time=2006-07-23- 12-00-00/>  <start real time=2006-07-23- 12-00-00/>
<flux stat type=rtp-packets-and-siginal-packets/>  <flux stat type=rtp-packets-and-siginal-packets/>
<total time for stat=3600/>  <total time for stat=3600/>
</ flux-stat-request>  </ flux-stat-request>
在步骤 S301 , SIP终端或媒体网关收到 SIP服务器或软交换的 SIP Subscribe流 量订阅消息后, SIP终端或媒体网关对其进行分析, 如果 SIP终端或媒体网关支持 相应的流量统计功能, 则向 SIP服务器或软交换返回 SIP 200响应消息, 指示已经 接受该订阅请求。 若 SIP终端或者媒体网关不支持扩展的 XML消息体, 此时应该 回复 SIP 489响应消息, 表示不能接收该订阅, 此时软交换或者其他的 SIP服务器 不再发送流量订阅消息。  In step S301, after the SIP terminal or the media gateway receives the SIP Subscribe traffic subscription message of the SIP server or the softswitch, the SIP terminal or the media gateway analyzes the SIP terminal or the media gateway, and if the SIP terminal or the media gateway supports the corresponding traffic statistics function, the SIP is sent to the SIP. The server or softswitch returns a SIP 200 response message indicating that the subscription request has been accepted. If the SIP terminal or the media gateway does not support the extended XML message body, it should reply to the SIP 489 response message, indicating that the subscription cannot be received. At this time, the softswitch or other SIP server no longer sends the traffic subscription message.
在步骤 S302, SIP终端或者媒体网关向 SIP服务器或软交换发送 SIP Notify消息, 同时在 XML消息体中定义的启动时间启动相应的统计功能, Notify消息将起始的统 计状态上报给 SIP服务器或软交换。具体的 SIP Notify消息中, Subscription-State头域 使用 Subscription- State: active或 pengding表示开始夕卜, 进一步还可以使用 terminated 头域值; 其他的各项指标都是 0。  In step S302, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and the corresponding statistics function is started at the startup time defined in the XML message body, and the Notify message reports the initial statistical status to the SIP server or the soft exchange. In the specific SIP Notify message, the Subscription-State header field uses the Subscription-State: active or pengding to indicate the start date, and the terminated header field value can be further used; all other indicators are 0.
在步骤 S303 , SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体 网关返回 SIP 200响应消息;  In step S303, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway.
在步骤 S304, 在 XML消息体中定义的流量统计时间到了以后, SIP终端或者 媒体网关向 SIP服务器或软交换发送 SIP Notify消息 ,将最终的统计结果上报给 SIP 服务器或软交换, 具体的 SIP Notify消息中, 要携带 Subscription-State头域, 表示 统计结束, 统计的结果包括: 统计方式、 发送数据包、 接收数据包、 发送信令、 接 收信令、 发送数据字节数、 接收数据字节数、 发送信令字节数、 接收信令字节数一 种或多种。  In step S304, after the traffic statistics time defined in the XML message body expires, the SIP terminal or the media gateway sends a SIP Notify message to the SIP server or the softswitch, and reports the final statistical result to the SIP server or the softswitch, and the specific SIP Notify. In the message, the subscription-state header field is carried, indicating that the statistics are ended. The statistics include: statistics mode, sending data packets, receiving data packets, sending signaling, receiving signaling, sending data bytes, receiving data bytes , one or more of the number of signaling bytes and the number of received signaling bytes.
具体的 SIP Notify示例消息的代码如下:  The code for the specific SIP Notify sample message is as follows:
<?xml version=" 1.0"?>  <?xml version=" 1.0"?>
<flux-stat-result ref="aps 1 -2234543 ">  <flux-stat-result ref="aps 1 -2234543 ">
<stat type=circle-stat/>  <stat type=circle-stat/>
<sent rtp packets=1000/> <receive rtp packets=1200/> <sent rtp packets=1000/> <receive rtp packets=1200/>
<sent siginal packets=10/>  <sent siginal packets=10/>
<receive siginal packets=12/>  <receive siginal packets=12/>
<sent total rtp btis=1000000/>  <sent total rtp btis=1000000/>
<receive total rtp bits= 1200000/>  <receive total rtp bits= 1200000/>
<sent total siginal bits=10000/>  <sent total siginal bits=10000/>
<receive total siginal bits=12000/>  <receive total siginal bits=12000/>
</ flux-stat-result>  </ flux-stat-result>
需要说明的是, 在启动流量统计任务以后, SIP服务器或者软交换可以随时向 SIP终端或者媒体网关发送 SIP终止消息, 即 Subscribe消息, 其中, Subscribe消 息的 Expire中 0, 表示终止统计任务, 则作为另一种实施方式, 在步骤 S304, SIP 终端或者媒体网关可以在接收到 SIP终止消息后, 终止网络流量统计, 并向 SIP服 务器或软交换发送 SIP Notify消息 ,将最终的统计结果上报给 SIP服务器或软交换。  It should be noted that, after the traffic statistics task is started, the SIP server or the softswitch can send a SIP termination message, that is, a Subscribe message, to the SIP terminal or the media gateway at any time, where the Expire of the Subscribe message is 0, indicating that the statistical task is terminated, In another embodiment, in step S304, the SIP terminal or the media gateway may terminate the network traffic statistics after receiving the SIP termination message, and send a SIP Notify message to the SIP server or the softswitch, and report the final statistical result to the SIP server. Or soft swap.
在步骤 S305 , SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体网 关返回 SIP 200响应消息, 确认已经收到流量统计结果。 SIP服务器或软交换收到流 量统计结果后, 可以保存到话单当中, 进行用户计费, 也可以上报给网管, 供网管 观察网上流量。  In step S305, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received. After receiving the statistics of the traffic statistics, the SIP server or the softswitch can save the metrics to the CDRs for user billing.
在步骤 S306, 当第一次统计结果发送后, SIP终端或者媒体网关重新开始流量 统计, 流量统计时间到以后再次上报流量统计结果, 也即一小时发送一次流量统计 结果;  In step S306, after the first statistics result is sent, the SIP terminal or the media gateway restarts the traffic statistics, and the traffic statistics result is reported again after the traffic statistics time, that is, the traffic statistics result is sent once every hour;
在步骤 S307, SIP服务器或软交换收到 SIP Notify消息, 向 SIP终端或者媒体网 关返回 SIP 200响应消息, 确认已经收到流量统计结果。  In step S307, the SIP server or the softswitch receives the SIP Notify message, and returns a SIP 200 response message to the SIP terminal or the media gateway to confirm that the traffic statistics result has been received.
另外, 本发明实施例还提供一种网络流量统计设备, 包括: 消息接收单元、 流 量统计单元和统计结果反馈单元。 其中, 所述消息接收单元, 用于接收请求订阅网 络流量的 SIP订阅消息; 所述流量统计单元, 用于 据所述 SIP订阅消息进行网络 流量统计; 所述统计结果反馈单元, 用于反馈所述网络流量统计结果。  In addition, the embodiment of the present invention further provides a network traffic statistics device, including: a message receiving unit, a traffic statistics unit, and a statistical result feedback unit. The message receiving unit is configured to receive a SIP subscription message that requests to subscribe to network traffic, and the traffic statistics unit is configured to perform network traffic statistics according to the SIP subscription message, where the statistical result feedback unit is used to feed back The network traffic statistics result.
优选的, 所述流量统计单元至少包括下述之一: 固定时长统计子单元、 单次呼 叫统计子单元和周期性统计子单元。 其中, 所述固定时长统计子单元, 用于根据所 述 SIP订阅消息中的启动时间, 启动固定时长的网络流量统计, 当所述 SIP订阅消 息中的流量统计时间到时时终止所述网络流量统计; 所述单次呼叫统计子单元, 用 于才 据所述 SIP订阅消息中的启动时间, 启动单次呼叫的网络流量统计; 并当所述 呼叫结束时, 终止所述网络流量统计; 所述周期性统计子单元, 用于 据所述 SIP 订阅消息的启动时间, 启动周期性的网络流量统计; 在每次 SIP订阅消息中的流量 统计时间内统计网络流量 , 并在 SIP订阅消息中的有效统计时间到时 , 终止网络流 量统计。 Preferably, the traffic statistics unit includes at least one of the following: a fixed duration statistics subunit, a single call statistics subunit, and a periodic statistical subunit. The fixed duration statistics sub-unit is configured to start a fixed-time network traffic statistics according to a startup time in the SIP subscription message, when the SIP subscription is eliminated. The network traffic statistics are terminated when the traffic statistics time expires; the single call statistics sub-unit is configured to start network traffic statistics of a single call according to the startup time in the SIP subscription message; When the call ends, the network traffic statistics are terminated; the periodic statistics sub-unit is configured to start periodic network traffic statistics according to the startup time of the SIP subscription message; and traffic statistics in each SIP subscription message. The network traffic is counted in the time, and the network traffic statistics are terminated when the valid statistics time in the SIP subscription message expires.
优选的, 所述网络流量统计设备还至少包括下述单元之一:  Preferably, the network traffic statistics device further includes at least one of the following units:
判断单元, 元分别与接收单元与流量统计单元相连, 用于在接收到所述 SIP订 阅消息后, 判断是否支持对应的流量统计功能, 并将支持流量统计功能的所述 SIP 订阅消息发送给流量统计单元; 若不支持, 则返回不能接受所述订阅请求的 SIP响 应消息。  The determining unit, the unit is connected to the receiving unit and the traffic statistics unit, and is configured to determine whether the corresponding traffic statistics function is supported after receiving the SIP subscription message, and send the SIP subscription message that supports the traffic statistics function to the traffic. The statistical unit; if not supported, returns a SIP response message that cannot accept the subscription request.
终止网络流量统计单元, 分别与流量统计单元和统计结果反馈单元相连, 用于 在接收到网络流量订阅设备发送的 SIP终止消息时,通知流量统计单元终止流量统 计, 并通知统计结果反馈单元通过 SIP通知消息反馈最终的流量统计结果。  The network traffic statistics unit is connected to the traffic statistics unit and the statistics result feedback unit, and is configured to notify the traffic statistics unit to terminate the traffic statistics when receiving the SIP termination message sent by the network traffic subscribing device, and notify the statistical result feedback unit to pass the SIP. The notification message feeds back the final traffic statistics.
上述设备中各个单元的功能和作用详见上述***中对应单元的功能和作用,以 及上述方法中对应步骤的实现过程, 在此不在赘述。  For the function and function of each unit in the above device, refer to the function and function of the corresponding unit in the above system, and the implementation process of the corresponding steps in the above method, and details are not described herein.
以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限定本发明之 权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖的范围。  The above is only a preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种网络流量的统计方法, 其特征在于, 包括步骤:  A statistical method for network traffic, characterized in that it comprises the steps of:
接收请求订阅网络流量的 SIP订阅消息;  Receiving a SIP subscription message requesting subscription to network traffic;
根据所述 SIP订阅消息进行网络流量统计;  Performing network traffic statistics according to the SIP subscription message;
反馈所述网络流量统计结果。  The network traffic statistics result is fed back.
2、 如权利要求 1所述的网络流量统计方法, 其特征在于, 所述根据 SIP订阅 消息进行网络流量统计的过程为:  2. The network traffic statistics method according to claim 1, wherein the process of performing network traffic statistics according to the SIP subscription message is:
才艮据所述 SIP订阅消息中的启动时间, 启动固定时长的网络流量统计, 当所述 SIP订阅消息中的流量统计时间到时终止所述网络流量统计。  The network traffic statistics of the fixed duration is started according to the startup time in the SIP subscription message, and the network traffic statistics are terminated when the traffic statistics time in the SIP subscription message expires.
3、 如权利要求 1所述的网络流量统计方法, 其特征在于, 所述根据 SIP订阅 消息进行网络流量统计的过程为:  The network traffic statistics method according to claim 1, wherein the process of performing network traffic statistics according to the SIP subscription message is:
才艮据所述 SIP订阅消息中的启动时间, 启动单次呼叫的网络流量统计; 当所述呼叫结束时, 终止所述网络流量统计。  The network traffic statistics of a single call are initiated according to the startup time in the SIP subscription message; when the call ends, the network traffic statistics are terminated.
4、 如权利要求 1所述的网络流量统计方法, 其特征在于, 所述根据 SIP订阅 消息进行网络流量统计的过程为:  The network traffic statistics method according to claim 1, wherein the process of performing network traffic statistics according to the SIP subscription message is:
才艮据所述 SIP订阅消息的启动时间, 启动周期性的网络流量统计;  The periodic network traffic statistics are started according to the startup time of the SIP subscription message;
在每次 SIP订阅消息中的流量统计时间内统计网络流量, 并在 SIP订阅消息中 的有效统计时间到时, 终止网络流量统计。  The network traffic is counted in the traffic statistics time in each SIP subscription message, and the network traffic statistics are terminated when the effective statistics time in the SIP subscription message expires.
5、 如权利要求 1至 4中任一项所述的网络流量统计方法, 其特征在于, 所述 网络流量统计为数据包和 /或信令包流量统计。  The network traffic statistics method according to any one of claims 1 to 4, wherein the network traffic statistics are data packet and/or signaling packet traffic statistics.
6、 如权利要求 1至 4所述的网络流量统计方法, 其特征在于, 所述方法还包 括:  The network traffic statistics method according to any one of claims 1 to 4, wherein the method further comprises:
在接收到所述 SIP订阅消息后, 判断是否支持对应的流量统计功能, 若是, 则 进行相应的网络流量统计; 否则, 返回不能接受所述订阅请求的 SIP响应消息。  After receiving the SIP subscription message, it is determined whether the corresponding traffic statistics function is supported. If yes, the corresponding network traffic statistics are performed; otherwise, the SIP response message that cannot accept the subscription request is returned.
7、如权利要求 1至 4任一项所述的网络流量统计方法, 其特征在于, 通过 SIP 通知消息反馈所述网络流量统计结果。  The network traffic statistics method according to any one of claims 1 to 4, wherein the network traffic statistics result is fed back through a SIP notification message.
8、 如权利要求 1所述的网络流量统计方法, 其特征在于, 所述方法还包括: 接收网络流量订阅设备发送的 SIP终止消息; 根据所述 SIP终止消息终止网络流量统计, 并通过 SIP通知消息反馈最终的流 量统计结果。 The method for collecting network traffic statistics according to claim 1, wherein the method further comprises: receiving a SIP termination message sent by the network traffic subscribing device; The network traffic statistics are terminated according to the SIP termination message, and the final traffic statistics result is fed back through the SIP notification message.
9、 一种网络流量统计设备, 其特征在于, 包括:  9. A network traffic statistics device, comprising:
消息接收单元, 用于接收请求订阅网络流量的 SIP订阅消息;  a message receiving unit, configured to receive a SIP subscription message requesting subscription to network traffic;
流量统计单元, 用于 据所述 SIP订阅消息进行网络流量统计;  a traffic statistics unit, configured to perform network traffic statistics according to the SIP subscription message;
统计结果反馈单元, 用于反馈所述网络流量统计结果。  The statistics result feedback unit is configured to feed back the network traffic statistics result.
10、 如权利要求 9所述的网络流量统计设备, 其特征在于, 所述流量统计单元 至少包括下述之一:  The network traffic statistics device according to claim 9, wherein the traffic statistics unit comprises at least one of the following:
固定时长统计子单元, 用于 据所述 SIP订阅消息中的启动时间, 启动固定时 长的网络流量统计, 当所述 SIP订阅消息中的流量统计时间到时时终止所述网络流 量统计;  a fixed-time statistics sub-unit, configured to start a fixed-time network traffic statistics according to a startup time in the SIP subscription message, and terminate the network traffic statistics when a traffic statistics time in the SIP subscription message expires;
单次呼叫统计子单元, 用于根据所述 SIP订阅消息中的启动时间, 启动单次呼 叫的网络流量统计; 并当所述呼叫结束时, 终止所述网络流量统计;  a single call statistics subunit, configured to start network traffic statistics of a single call according to a startup time in the SIP subscription message; and terminate the network traffic statistics when the call ends;
周期性统计子单元, 用于 据所述 SIP订阅消息的启动时间, 启动周期性的网 络流量统计; 在每次 SIP订阅消息中的流量统计时间内统计网络流量, 并在 SIP订 阅消息中的有效统计时间到时 , 终止网络流量统计。  a periodic statistics sub-unit, configured to start periodic network traffic statistics according to the startup time of the SIP subscription message; collect network traffic in a traffic statistics time in each SIP subscription message, and valid in the SIP subscription message When the statistics time is up, the network traffic statistics are terminated.
11、 如权利要求 9所述的网络流量统计设备, 其特征在于, 所述网络流量统计 设备还包括:  The network traffic statistics device of claim 9, wherein the network traffic statistics device further comprises:
判断单元 , 用于在接收到所述 SIP订阅消息后 , 判断是否支持对应的流量统计 功能,并将支持流量统计功能的所述 SIP订阅消息发送给流量统计单元;若不支持, 则返回不能接受所述订阅请求的 SIP响应消息。  The determining unit is configured to: after receiving the SIP subscription message, determine whether the corresponding traffic statistics function is supported, and send the SIP subscription message that supports the traffic statistics function to the traffic statistics unit; if not, the return cannot be accepted. The SIP response message of the subscription request.
12、 如权利要求 9或 11所述的网络流量统计设备, 其特征在于, 所述网络流 量统计设备还包括:  The network traffic statistics device according to claim 9 or 11, wherein the network traffic statistics device further comprises:
终止网络流量统计单元, 用于在接收到发送的 SIP终止消息时, 通知流量统计 单元终止流量统计,并通知统计结果反馈单元将最终的流量统计结果通过 SIP通知 消息反馈。  The terminating network traffic statistics unit is configured to notify the traffic statistics unit to terminate the traffic statistics when receiving the sent SIP termination message, and notify the statistical result feedback unit to feed back the final traffic statistics result by using the SIP notification message.
13、 一种网络流量统计***, 其特征在于, 包括:  13. A network traffic statistics system, comprising:
网络流量订阅设备,用于发起请求订阅网络流量的 SIP订阅消息并接收其返回 的 SIP消息, 获取网络流量统计结果; A network traffic subscription device for initiating a SIP subscription message requesting subscription to network traffic and receiving its return SIP message, obtaining network traffic statistics results;
网络流量统计设备, 用于根据所述 SIP订阅消息进行相应的流量统计, 并将对 应的网络流量统计结果返回给网络流量订阅设备。  The network traffic statistics device is configured to perform corresponding traffic statistics according to the SIP subscription message, and return the corresponding network traffic statistics result to the network traffic subscription device.
14、 如权利要求 13所述的网络流量统计***, 其特征在于, 所述网络流量订 阅设备具体包括:  The network traffic accounting system according to claim 13, wherein the network traffic subscription device specifically includes:
流量订阅单元,用于向网络流量统计设备发送订阅网络流量的 SIP订阅消息或 终止网络流量统计的 SIP终止消息, 接收网络流量统计设备向其返回的 SIP消息; 流量处理单元,用于将网络流量统计设备返回的 SIP通知消息中所携带的流量 统计结果进行相应的处理。  a traffic subscribing unit, configured to send a SIP subscription message for subscribing network traffic or a SIP termination message for terminating network traffic statistics to the network traffic statistics device, receiving a SIP message returned by the network traffic statistics device, and a traffic processing unit, configured to use the network traffic The traffic statistics carried in the SIP notification message returned by the statistics device are processed accordingly.
15、 如权利要求 13所述的网络流量统计***, 其特征在于, 所述网络流量统 计设备包括:  The network traffic statistics system of claim 13, wherein the network traffic statistics device comprises:
消息收发单元, 用于接收来自网络流量订阅设备的 SIP订阅请求消息, 并向其 返回表示接受或者拒绝订阅网络流量的 SIP响应消息以及向网络流量订阅设备发送 包含流量统计结果的 SIP通知消息;  a messaging unit, configured to receive a SIP subscription request message from the network traffic subscribing device, and return a SIP response message indicating acceptance or rejection of the subscribed network traffic, and send a SIP notification message including the traffic statistics result to the network traffic subscribing device;
流量统计单元, 据所述 SIP订阅消息的流量统计启动时间, 启动网络流量统 计, 所述网络流量统计为: 对数据包和 /或信令包进行固定时长的统计、 对数据包 和 /或信令包进行周期性统计、 对数据包和 /或信令包进行单次呼叫统计, 并在流量 统计时间到时终止网络流量统计。  The traffic statistics unit starts the network traffic statistics according to the traffic statistics start time of the SIP subscription message, where the network traffic statistics are: performing fixed time statistics, data packets, and/or information on the data packet and/or the signaling packet. The packet is periodically counted, a single call is counted for the data packet and/or the signaling packet, and the network traffic statistics are terminated when the traffic statistics time expires.
16、 如权利要求 15所述的网络流量统计***, 其特征在于, 所述网络流量统 计设备还包括:  The network traffic statistics system of claim 15, wherein the network traffic statistics device further comprises:
判定单元, 用于对消息收发单元接收到的所述 SIP订阅消息进行分析, 判定是 否支持相应的流量统计功能。  The determining unit is configured to analyze the SIP subscription message received by the messaging unit to determine whether the corresponding traffic statistics function is supported.
PCT/CN2007/071163 2006-12-04 2007-12-04 Method, device and system for network traffic statistics WO2008067758A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2006101240262A CN101197687B (en) 2006-12-04 2006-12-04 Method and system for network flux statistics
CN200610124026.2 2006-12-04

Publications (1)

Publication Number Publication Date
WO2008067758A1 true WO2008067758A1 (en) 2008-06-12

Family

ID=39491678

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/071163 WO2008067758A1 (en) 2006-12-04 2007-12-04 Method, device and system for network traffic statistics

Country Status (2)

Country Link
CN (1) CN101197687B (en)
WO (1) WO2008067758A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480711A (en) * 2010-11-30 2012-05-30 中国电信股份有限公司 Flow accounting method and packet data service node
US20120278851A1 (en) * 2010-10-29 2012-11-01 F5 Networks, Inc. Automated policy builder
US8737204B2 (en) 2011-05-02 2014-05-27 Telefonaktiebolaget Lm Ericsson (Publ) Creating and using multiple packet traffic profiling models to profile packet flows
US8817655B2 (en) 2011-10-20 2014-08-26 Telefonaktiebolaget Lm Ericsson (Publ) Creating and using multiple packet traffic profiling models to profile packet flows
US9124528B2 (en) 2011-10-24 2015-09-01 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement for data clustering
US10015286B1 (en) 2010-06-23 2018-07-03 F5 Networks, Inc. System and method for proxying HTTP single sign on across network domains

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101600186B (en) 2009-06-12 2013-11-06 中兴通讯股份有限公司 Method and device for traffic statistics and automatic computation of network charge
CN102509251A (en) * 2011-09-27 2012-06-20 宇龙计算机通信科技(深圳)有限公司 Data statistics method and device
CN104378749B (en) 2013-08-12 2020-03-10 中兴通讯股份有限公司 Charging implementation method and system based on SDN EPC network
CN104684003B (en) * 2015-02-12 2017-12-26 洛阳市质量技术监督检验测试中心 A kind of mobile network's flow-measuring method
CN104683967A (en) * 2015-02-12 2015-06-03 洛阳市质量技术监督检验测试中心 Mobile network flow measurement system
CN106407636B (en) * 2015-07-31 2020-02-14 腾讯科技(深圳)有限公司 Integration result statistical method and device
CN108632478B (en) * 2017-03-24 2021-01-26 北京京东尚科信息技术有限公司 Method and device for counting call details, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0837578A2 (en) * 1996-09-20 1998-04-22 International Business Machines Corporation System and method for measuring and accounting for data traffic on networks
US6108782A (en) * 1996-12-13 2000-08-22 3Com Corporation Distributed remote monitoring (dRMON) for networks
CN1501622A (en) * 2002-11-14 2004-06-02 ��Ϊ�������޹�˾ Network traffic statistical method of IP device
EP1487152A1 (en) * 2003-06-12 2004-12-15 Avaya Technology Corp. Distributed monitoring and analysis system for network traffic
CN1674532A (en) * 2004-03-23 2005-09-28 富士通株式会社 Estimating and managing network traffic

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1199392C (en) * 2002-02-05 2005-04-27 华为技术有限公司 Charge method based on data flow quantity
CN1225862C (en) * 2002-08-09 2005-11-02 华为技术有限公司 Method for realizing charge informing of network terminal based on initial conversation protocol
GB0317124D0 (en) * 2003-07-22 2003-08-27 Nokia Corp Charging in a communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0837578A2 (en) * 1996-09-20 1998-04-22 International Business Machines Corporation System and method for measuring and accounting for data traffic on networks
US6108782A (en) * 1996-12-13 2000-08-22 3Com Corporation Distributed remote monitoring (dRMON) for networks
CN1501622A (en) * 2002-11-14 2004-06-02 ��Ϊ�������޹�˾ Network traffic statistical method of IP device
EP1487152A1 (en) * 2003-06-12 2004-12-15 Avaya Technology Corp. Distributed monitoring and analysis system for network traffic
CN1674532A (en) * 2004-03-23 2005-09-28 富士通株式会社 Estimating and managing network traffic

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10015286B1 (en) 2010-06-23 2018-07-03 F5 Networks, Inc. System and method for proxying HTTP single sign on across network domains
US20120278851A1 (en) * 2010-10-29 2012-11-01 F5 Networks, Inc. Automated policy builder
US8959571B2 (en) * 2010-10-29 2015-02-17 F5 Networks, Inc. Automated policy builder
CN102480711A (en) * 2010-11-30 2012-05-30 中国电信股份有限公司 Flow accounting method and packet data service node
CN102480711B (en) * 2010-11-30 2016-04-20 中国电信股份有限公司 Charge on traffic method and packet data serving node
US8737204B2 (en) 2011-05-02 2014-05-27 Telefonaktiebolaget Lm Ericsson (Publ) Creating and using multiple packet traffic profiling models to profile packet flows
US8817655B2 (en) 2011-10-20 2014-08-26 Telefonaktiebolaget Lm Ericsson (Publ) Creating and using multiple packet traffic profiling models to profile packet flows
US9124528B2 (en) 2011-10-24 2015-09-01 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement for data clustering

Also Published As

Publication number Publication date
CN101197687B (en) 2011-04-27
CN101197687A (en) 2008-06-11

Similar Documents

Publication Publication Date Title
WO2008067758A1 (en) Method, device and system for network traffic statistics
US9477561B2 (en) Gateway for the survivability of an enterprise network using SIP
KR101548140B1 (en) Method and system for selective call forwarding based on media attributes in telecommunication network
JP2002208968A (en) Data network
US20030129962A1 (en) System and method of billing based on the reported traffic load in a telecommunications network
CA2729799A1 (en) System and methods for quality of experience reporting
CN1941783B (en) Intelligent border element
WO2007098714A1 (en) Apparatus and method for session control
KR100794416B1 (en) Method of obtaining the packet charge data for the voice over internet protocol call using session initiation protocol
WO2012174904A1 (en) Ims conference access method, device and system
US20090055879A1 (en) System and method for implementing streaming service
US7899040B2 (en) Synchronization of event processing at a media gateway
WO2007109950A1 (en) A method and system for realizing speech interaction
US7283624B1 (en) Idle detection for answer supervision
WO2008040216A1 (en) Method for call charging and charging system and device
US8180330B2 (en) Method for collecting user behavior during run-time in a mobile 3GPP IP-based multimedia subsystem (IMS)
JP2003249945A (en) Method for guaranteeing voice quality in internet telephone service
KR100907612B1 (en) Method and system for charging after session termination in IP multimedia subsystem
CN100486254C (en) Method and system for control conversation timer in conversation iniatial protocol network
KR100475187B1 (en) key phone system for enable session initiation protocol and method for call setup
CN102668487A (en) Method and system for implementing call by media gateway
WO2019208433A1 (en) Rtp monitoring device and rtp monitoring method
KR100740387B1 (en) Method and Devices for Transmitting Data in VoIP Key-Phone System
Laskovic et al. ENSC 835: High-Performance Networks CMPT835: Special Topics: High-Performance Networks Project Title: Analysis and Trace Driven Simulation of H. 323 VoIP Traffic Fall 2003
WO2007107074A1 (en) A method, apparatus and system for communication service processing

Legal Events

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

Ref document number: 07817353

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07817353

Country of ref document: EP

Kind code of ref document: A1