METHOD FOR CALCULATING DURATION OF CONNECTIONS, ESPECIALLY IN CONNECTION WITH PACKET SWITCHED NETWORKS

Abstract: The present invention relates to a method for calculating duration of connections, especially in connection with packet switched network, for thereby arriving at i.e. a charge for such connections, based on time and volume of the respective connection, said method comprising time counter means, and in order to provide a more simple and reliable method which can be used not only in connection oriented networks but also in connection less networks, and independently of related protocols, it is according to the present invention suggested a method which is characterized by using a time counter means comprising a first timer counter ( DELTA t) measuring the time between successive arriving packets, as well as a second timer (Ttot) which is updated by the value of said first timer counter ( DELTA t) when a new packet arrives.

Description: METHOD FOR CALCULATING DURATION OF CONNECTIONS, ESPECIALLY IN CONNECTION WITH PACKET SWITCHED NETWORKS Field of the invention The present invention relates to a method for calculating duration of connections, especially in connection with packet switched network, for thereby arriving at i.e. a charge for such connections, based on time and volume of the respective connection. Although the present invention has been developed in connection with measuring duration of connections for for example charging according to volume and time in packet switched networks, it is to be understood that the basic idea behind the present invention can find other applications wherein duration of connections is measured. Background of the invention When a charge for a connection in a packet switched network is based on time and volume, it is necessary to calculate the total volume of transmitted data and the duration of the connection. The formula for charge based on volume and time may be written as follows: Ch arge = α * Volume + β * Time + γ wherein α and β are weight factors for respectively volume and time, and wherein γ is the fixed cost for establishing a connection. The equipment for measuring the time and volume will be located between the source and the destination of the connection in question, said location being in a router, switch or a stand-alone unit. The metering equipment should not effect the data sent on this connection, and it should only do measurements. The process of effecting measurements will involve some delay in the traffic, and this delay should be as small as possible, possibly not effecting the total performance to any larger degree. In order to calculate the total charge a charging manager will usually retrieve data from the measuring or metering equipment, such a charging manager being connected to said metering equipment for example as illustrate in Fig. 1. From Fig. 1 it appears that the metering equipment is placed between the source and the destination, and the calculated volume and time are collected by the charging manager wherein the total charge is calculated. The fixed cost γ for establishing a connection is added to the charge at the beginning of the connection. Depending on the type of network, there are usually two different methods for obtaining the total volume. If the size of each packet is fixed, i.e. in an ATM network, only the number of packets needs to be counted. This counter can then be multiplied by the fixed packet length to obtain the total volume. If the size of packets is variable, i.e. in an IP net- work, it will be necessary to compute the total length of each packet on the connection in order to obtain the total volume . Known solutions of calculating duration of connections In the following there will be given a description of how the duration for the connection is calculated according to prior art . If the network uses a connection oriented protocol, the duration of each connection can be computed by recognising the setup and disconnect messages . The time counter will then be started when the setup message is sent, and stopped when disconnect message is sent. Recognising the setup and disconnect messages is not possible in a connection less network, because no such messages exist. In a connection less network, the timer has to be started when the metering equipment notices the first packet on the connection. A policy has to be used for stopping the timer, i.e. the timer is stopped after a fixed amount of time. Problems related to prior art There are two problems with the first solution outlined above . First, to recognise the setup and disconnect messages, some part of the protocol must be implemented in the metering equipment. This will introduce more delay in the metering equipment, or the metering equipment itself has to take an active role in the establishment of the connection. It is to be understood that the metering equipment can remove the setup message from the network, and on behalf of the originator send a new setup message. The second problem is that the counter is only stopped when the disconnect message is received, which situation is illustrated in Fig. 2. More specifically, Fig. 2 illustrates the problem with measuring the duration of con- nections in connection oriented networks by relying on the setup and disconnect messages occurring if the disconnect packet is lost or corrupted. If one of the stations terminate for some reason, it is not certain that a disconnect signal will ever be sent. To avoid the time counter to go on forever, a policy for when a connection is considered to be broken, has to be implemented. The problem with the second method is that if one reads the timer after the last packet, but before time-out, this will give a wrong value for the length of the call, a condition which is illustrated schematically in Fig. 3. More specifically, Fig. 3 illustrates the problem in connection less networks, i.e. to determine which is the last packet. If the duration timer is read before the predefined time-out, it will provide the wrong value for the actual duration. Objects of the invention An object of the present invention is to provide a method for a more easy and accurate calculation of duration of connections. Another object of the present invention is to implement the time counter for a connection in a metering equipment . A still further object of the present invention is to provide a method solving the problem of measuring duration of connections in both connection oriented and connection less networks . A further object of the present invention is to provide a method for calculating duration of connections which is independent of the protocol used for the measured connections. Yet another object of the present invention is to provide a method for calculating duration of connections wherein no decision on time-outs has to be made. Summary of the invention The above objects are achieved in a method as stated in the preamble, which according to the present invention is characterized by using a time counter means comprising a first timer counter measuring the time between successive arriving packets, as well as a second timer which is updated by the value of said first timer counter when a new packet arrives. The timer counter according to the present invention will always present the time between the first and last arrived packet, and it will only be updated if a new packet arrives. Consequently, the present method for implementing the timer will provide the exact value for the duration of the connection. This will be true not only after the connection is finished, but also before and at all time the connection is active. Further, because the present timer counter does not rely on understanding the protocol used for the connection, it can work for both connection oriented, as well as for connection less networks. Further features and advantages of the present invention will appear from the following description taken in connection with the appending drawings, as well as from the attached patent claims. Brief disclosure of the drawings Fig. 1 is a block diagram illustrating metering equipment placed between a source and destination, the calculated volume and time being collected by a charging manager wherein the total charge is calculated. Fig. 2 is a time diagram illustrating the problem with measuring the duration of connections in connection oriented networks relaying on setup and disconnect messages . Fig. 3 is a time schedule illustrating the problem with measuring the duration of connections in connection less networks, especially if the duration timer is read before the predefined time-out. Fig. 4 is a schematic time diagram, or a time line illustrating the time between each arriving packet, and further illustrates the operation of a timer according to the present invention. Fig. 5 is a state diagram illustrating the method for measuring time for connections in accordance with an embodiment of the present method. Fig. 6 is a schematical representation of how the invention can be realised, and wherein the state diagram according to Fig. 5 can be implemented. Fig. 7 is a block diagram illustrating the metering equipment and the data connection operating in accordance with the present method, the schematical representation according to Fig. 6 being implemented therein. Detailed description of the invention This invention is a solution for implementing the time counter for a connection in metering equipment . It solves the problem of measuring duration of connections in both connection oriented and connection less networks. This timer counter will always give you the time between the first and last arrived packet, and it will only be updated if a new packet arrives. This method for implement- ing the timer will therefore provide the exact value for the duration of the connection. This is true not only after the connection is finished, but also before and at all time the connection is active. Because it does not rely on understanding the protocol used for the connection, it works for both connection oriented, and connection less networks. The idea for this method is a follows: • One timer counter (Δt) measures the time between successive arriving packets . • Another timer (T tot ) is updated with the value of Δt when a new packet arrives . • It is the value of the second timer (T tot ) that is given when the metering equipment gets a request for the current duration of the connection. In Fig. 4 there is illustrated a time line, wherein Δt is the time between each arriving packet, and T tot is the timer that is provided from the system according to the present invention. More specifically, Fig. 4 comprises the following symbols: Δt ;ι -The time between each arriving packet. m 7^, = Δt H - The total timer is the sum of all the Δt„ from n=l n=l to m, where m is the number of arrived packets starting with the first packet as 0. In Fig. 4 there is illustrated a point of time s, at which point of time a metering request arrives. If the method for determining the duration of connection described with reference to Fig. 2 is used, the method according to the present invention will present a value equal to the time between the first packet (0) , as illustrated in Fig. 4, and the time s when the duration re- quest arrives, it being noted that the last packet m will arrive at a point of time t, whereby t < s. Consequently, if this interval method is used it will provide the time from the first packet 0 and to the last packet m arriving at time t. Another way of using the present method is to start T tot when the first packet arrives, whereby Δt will operate as illustrated in the other Figures measuring the time be- tween successively arriving packets. When answering a request for duration, the value T tot - the current value of Δt will be given. This way of implementing the time measurement will give the same accuracy as the one illustrated previously, but one problem of this implementation is the necessity of two running timers per connection. Fig. 5 illustrates in a state diagram the method according to the present invention for measuring time for connections. In Fig. 6 it is schematically illustrated how the invention can be realised. The state diagram according to Fig. 5 can be located in the block designated "calculate new T tot unit" and the connection table illustrated therein. Fig. 7 is a block diagram illustrating the metering equipment and the data connection in an embodiment according to the present invention. Here, the elements according to Fig. 6 could be located inside the block designated "calculate time" together with the block designated "detect new packet". Advantages With this invention, the total time for a given connection will always be the time from the first to the last packet. At any point in time when the equipment is asked for the duration of the connection the duration will provide the time from the first to last packet . This works for both for connection oriented and connection less protocols . Other advantages involve that some form of under- standing of the protocol used for the measured connections is not needed, and no decision on time-outs has to be made . Broadening This method for implementing a duration timer can be used for not only for charging, but for any other situation where duration for connections is measured.

Claims: P a t e n t c l a i m s 1. Method for calculating duration of connections, especially in connection with packet switched network, for thereby arriving at i.e. a charge for such connections, based on time and volume of the respective connection, said method comprising time counter means, c h a r a c t e r i z e d by using a time counter means comprising a first timer counter (Δt) measuring the time between successive arriving packets, as well as a second timer (T tot ) which is updated by the value of said first timer counter (Δt) when a new packet arrives. 2. Method as claimed in claim 1, c h a r a c t e r i z e d i n that said first timer counter (Δt) and said second timer (T tot ) are implemented in a metering equipment, said metering equipment informing about the value of said second timer (T tot ) when receiving a request for a current duration of a connection. 3. Method as claimed in claim 1 or 2 , c h a r a c t e r i z e d i n that when a metering request arrives at a request time s, then a value is given equal to the time between the first packet (0) and said request time s, i.e. where m is the last packet arriving at time t, t<s. 4. Method as claimed in claim 1 or 2 , c h a r a c t e r i z e d i n that when a metering request arrives at a request time s then a value is given equal to the time from the first packet (0) to the last packet (m) . 5. Method as claimed in claim 1 or 2 , c h a r a c t e r i z e d i n that said timer (T tot ) is started when the first packet (0) arrives, whereafter the time (Δt) between successive arriving packets is measured, the current value of said time (Δt) being given by answering a request for duration. 6. Method as claimed in any of the preceding claims, c h a r a c t e r i z e d i n that the duration of time from the first packet (0) to the last packet (m) is given independent of any protocol, i.e. whether there is used a connection oriented protocol or a connection less protocol. 7. Method as claimed in any of the preceding claims, c h a r a c t e r i z e d i n that the calculation is implemented without deciding on any time-outs. 8. Method as claimed in any of the preceding claims, c h a r a c t e r i z e d i n that said timer units (Δt, T tot ) are adapted to communicated with appropriate connections tables, which in turn are adapted to cooper- ate with other equipment through appropriate interface (s) .

Inventors: CORNELIUSSEN KNUT SNORRE BACH, CORNELIUSSEN, KNUT, SNORRE, BACH
Applicants: CORNELIUSSEN KNUT SNORRE BACH, ERICSSON TELEFON AB L M, CORNELIUSSEN, KNUT, SNORRE, BACH, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 1999
Main classification: H04L12
IPC codes: H04L12, H04Q11