Title of Invention | "A METHOD OF CALCULATING BROADBAND ACCESS SERVER DHCP USERS ON-LINE TIME" |
---|---|
Abstract | A method of calculating broadband access server DHCP user's on-line time, includes these steps: (a) setting the inner time, outer time and traffic threshold for said access server calculating user's data traffic, and the inner time is shorter than the outer time; (b) user accesses the said access server, after authenticated successfully, the access server notifies starting to charge the user's online time; (c) according to each user, said access server establishes a ring list to record data traffic; (d) said access server sets the number of ring list elements as multiple of said outer time to said inner time; (e) said access server inspects the said user's data traffic according to inner time, fills it in content indicated by top element index of ring list, until current data traffic inspected and value recorded by top index are not more than said traffic threshold. The advantage of the invention is that timing is precise and error is small. |
Full Text | A method of time charging to DHCP online users in a broadband access server FIELD OF THE INVENTION The present invention relates to a method of time charging for online user in a server in communication technology, especially relates to an improvement of a method time charging for DHCP online user in a broadband access server. BACKGROUND OF THE INVENTION With popularization of data services, the requirement of Internet user's knowledge degree also increasingly lowers. An access mode of DHCP+WEB+RADIUS with a friendly interface does not require rich network technique knowledge at client terminals, and, therefore, this access mode is a more popular mode for numerous telecom service providers. DHCP, an abbreviation of Dynamic Host Configuration Protocol, allows servers to dynamically assign IP address and other configure information to client terminals. DHCP clients can obtain and occupancy IP address as starting up, so this access mode occupies mass address resources of telecom service providers. Furthermore, DHCP access mode is unlike narrowband access that can supply a man-machine interface with a perfect connection and disconnection mechanism, so there is no a flat Rate mode launched in market, and at present only monthly flat rate is used. On one hand it wastes communication resources, and on the other hand service providers, with concerns on service level and return on investment, demand urgently a technology of accurate timing to realize flat rate for accessing DHCP users. Furthermore, many Service Providers desires that, when a DHCP user has been idle for a period of time, namely, when the user's communication data flow has been lower than an assigned value for a period of time, he might be considered as having been offline, and time charging for him should be stopped. In other words, it needs to detect a user's idle state. Once the user is detected in the idle state, the user's connection with the network should be should be disconnected, and meanwhile time charging of user online should be ceased. Therefore, login timing accuracy to DHCP users relies on timeliness and accuracy on detecting IDLE state. Conventional detection methods of IDLE state all are in such way that directly configuring a timer, detecting periodically at each intervals, deciding whether an increment between user's data flow and the last check point is less than a threshold (assigned value); if not more than, considering user already offline; if more than, considering user normal online or downloading. The current technology, however, has the following defects : 1. Due to inaccuracy of charging method, a user in idle state may be considered as in normal online state. As shown in FIG. 1A, a time interval for idle detection is supposed as 5 minutes, a user has a great deal flow at first one minute, and then flow does not exceed a threshold. According to a traditional algorithm, the user will be forced to login off at the tenth minute. Such detection error is certainly too large, and also can make a waste in communication resources. To solve the above problem, a traditional method for idle state detection usually adopts simply reducing intervals for detecting to decrease errors. 2. Time intervals are fixed and often results may distort. As shown in FIG. IB, if the user's flows are relatively large at the fourth and the sixth minute, but such flows are not large enough to exceed the threshold, the user will be forced to logoff at the tenth minute. In fact, his flow at an interval of five minutes exceeds the threshold, so the result distorts. To solve the problem above, a traditional method of idle state detection usually adopts increasing testing time to decrease frequency of results distorted. It can be seen that there is a conflict here, and a conventional method is difficult to attain a desirable precision for time charging to DHCP users. SUMMARY OF INVENTION The technical problem solved in the present invention is to provide a method of time charging to DHCP users in a broadband access server, which can reduce detection error, solve the problem in detecting idle state and satisfy the accuracy required. In order to solve the problem above, the present invention provides a method of time charging to DHCP online users in a broadband access server, wherein the broadband access server detects data flow of an authenticated user by using an inner time interval shorter than an outer time interval and a flow threshold, and producing a circular linked list corresponding to the user, and decides whether the user is in IDLE state; if not, the server records the present flow value in the circular link list and goes on to detect the data flow; if yes, the server decides the user in IDLE state. By reducing the time unit for detecting, the detection error is demoted, the problem of detecting IDLE state is solved, and the required precision is satisfied. For better solving the above problem, the present invention provides a method of time charging to DHCP online users in a broadband access server, which comprises the following steps of: a) setting an inner time, an outer time and a flow threshold for counting data flow of users in the broadband access server, and the inner time being shorter than the outer time; b) starting time charging to a user by instruction of the access server after the user accesses the access server and is authenticated successfully, c) establishing a circular link list to each user for recording data flow of the user in the access server; d) defining a number of elements in the circular link list as a multiple of the outer time to the inner time in the access server; e) detecting data flow of the user according to the inner time in the access server, and recording the data flow as a content of a head pointer of the circular link list in turn, until data flow newly detected and the content recorded in the head pointer are not more than the flow threshold. The above method is characterized that, while operating step e), when the circular link list is not full, the method further comprises the following step: el) examining data flow newly detected and the content of the head pointer, when the flow threshold is exceeded, saving the data flow newly detected as the content of the head pointer, and, meanwhile, moving the head and tail pointers down a position. The above method is characterized that, while operating step e), when the circular link list is full, the method further comprises the following step: e2) examining data flow newly detected and the content of the head pointer element, when exceeds the flow threshold, saving the data flow newly detected as the content of the head pointer, and, meanwhile, moving the head and tail pointers down a position. The above method is characterized that the method further comprises steps of: f) deciding the user in an idle state in the access server when the data flow newly detected and the content recorded in the head pointer does not exceed the flow threshold; g) stopping time charging to the user by instruction of the access server The above method is characterized that, in step f), the method further comprises setting the user in unauthenticated state. The above method is characterized that, in step b), the method further comprises setting a charging server for time charging to online users. The above method is characterized that, the time for the charging server to stop time charging is before an outer time corresponding to the inner time at which the idle state is detected. The above method is characterized that, the inner time is 30 seconds and/or the outer time is 5 minutes. According to the present invention, the access server configures a circular link list corresponding to a login user, regarding each element in the circular link list, the content of the head pointer records data flow that is detected in turn and when the assigned threshold is exceeded, and the tail pointer points to next element, so that data flow of the user can be monitored dynamically. In such way, the time precision in detection is based on the inner time, and therefore detection precision is enhanced and detection error is reduced. The technical solution and its advantage effects of the present invention will be obvious through describing of the preferred embodiments of the present invention in details below in combination with drawings attached. DESCRIPTION OF THE DRAWINGS FIG. 1A and IB are schematic diagrams of data flow detection according to a prior art; FIG. 2 shows a main flow chart for a method of time charging to DHCP online users in broadband access server according to the present invention; FIG. 3 is a flow chart of detection for each inner detection period in the method according to the present invention; and FIG 4 is a schematic diagram of data structure realized by software of the method according to the present invention. DETAILED DESCRIPTION OF THE INVENTION A method of time charging to DHCP online users in a broadband access server according to the present invention comprises the following steps: Firstly, an outer time and an inner time need to be configured in a broadband access server for detecting idle state, since a idle mode is used to detect a logout state of the user. In general, the broadband access server always monitors user flow, in which a unit of an interval (inner time) for monitoring in broadband server is second, and a unit of an interval (outer time) for detecting idle state at outside of the system is minute. In the present invention, an interval for monitoring user flow must be smaller than a time set for outside idle state detection. For example, an outer detection time may be set as 5 minutes, a threshold is 10k, a time set for detecting flow within the system, namely inner time, is 30 seconds. Referring to FIG. 2, the time charging method for DHCP users is described as below. Step 110: A user automatically obtains IP address by DHCP, is authenticated successfully, and then accesses the Internet; and the access server timely informs a charging service to start time charging to the user accessed. Step 120: The time charging starts from the time when the user is authenticated successfully. In general, the user's passing through authentication denotes that the user starts to accept service provided by the service provider. Step 130: The broadband access server calculates a number of elements in a circular link list according to the inner time and the outer time configured. The number of elements equals to the ratio of the outer time to the inner time. For example, in this embodiment, the number of elements is the ratio of 5 to 0.5 and equals to 10. The broadband access server records the result calculated. Step 140: The information on the user flow is timely updated. Step 150: Idle state of the user is detected. Step 160: The user in idle state is forced to logoff. Referring to FIG. 3, the flow chart of the circular link list is shown. Each accessed and authenticated user is corresponding to a circular link list. In a process of recording the corresponding user's data flow, a pointer is used to point a head pointer of the circular link list. The content of an element of the head pointer is flow value before an idle detection interval, and the content of an element pointed by a tail pointer is the latest flow result detected, The user's circular link list is not full when the user just passes the authentication. Then, at first, whether the number of elements in the circular link list is up to 10 or not is checked. If not up to 10, an element is added at each interval of the inner time, the content of the head pointer is filled with data flow result reported, the element newly added is added to the tail of the circular link list, and the tail pointer points to the element new added. Particularly, each new data flow value is compared with the content of the head pointer in the circular link list, after compared, if the user is not in idle state, such new data flow value is saved in the content of the head pointer. At the same time, the head and tail pointers move down one position, so as to ensure that the content of the element of the head pointer still is flow value before one idle detecting interval and the content of the element pointed by the tail pointer still is the latest data flow result detected. If the circular link list is full (up to 10), new data flow value detected is compared with the content of the element of the head pointer; if the comparing result exceeds the assigned threshold, the new data flow value overwrites the content of the head pointer, and, meanwhile, the head and tail pointers move down one position, so as to ensure that the content of an element of the head pointer still is flow value before one IDLE detecting interval and the content of the element pointed by the tail pointer still is newly data flow result detected. If the comparing value does not exceed the assigned threshold 10k, the user is considered being offline; and then the broadband access server sets the user in unauthenticated state, that is to say, the user is forced to logoff. Meanwhile, the broadband access server informs RADIUS Serve of user being offline and stopping time charging. The time when the user logs off is considered as the time before 5 minutes. The flow chart of the method according to the present invention is shown in FIGS. 2 and 3. The broadband access server starts to query the user's data flow. Firstly, step 300 is performed to work out the number of elements in the corresponding circular link list, and, while detecting the user's data flow, step 310 is performed to compare with the number of elements in the current circular link list. Then step 320 is performed to decide whether a desirable number of elements is achieved. If not, step 340 is performed to fill the detection result to the content of the head pointer and make the tail pointer point to the new element, meanwhile, the head and tail pointers move down one position, and data flow is detected for a next inner time. If the number of elements in the circular link list exceeds a desirable number, step 330 is performed to decide whether a value of comparing the element of the tail pointer and the content of the head pointer exceeds the assigned threshold (step 350). If exceeds, step 360 is performed to move the head and tail pointers down one position, and the new data flow is filled to the content of the head pointer. If not exceeds, step 370 is performed and the broadband access server sets the user in 5 unauthenticated state and forces the user offline. In the system of the present invention, the results of detecting on data flow of the user in late period of time are saved one by one, which corresponds to that a queue of the user's flow data is observed through a data window, and the width of the window is width of the inner time for detecting flow assigned for the user. In this window, multiple detecting results are saved, the interval of each result is the inner time for detecting flow in the system, as shown is FIG. 4. In the system of the present invention, when data flow of the user is queried once, the data window goes forward a position. While moving, the flow results at the two ends of the window are compared; if a value of comparing does not exceeds the threshold, the user is considered in an idle state and forced to be offline; otherwise, new data detected is filled into the content of the head pointer. Industrial applicability According to conventional algorithms for realizing IDLE detection, in general, the granularity of detection is the interval assigned for detecting, such as 5 minutes. However, according to the algorithm of the present invention, the detection granularity is the inner time for querying user data flow in the system, such as 30 seconds, so the detection is more accurate. It should be noted that the inner time and the outer time in the method of the present invention could be assigned. The specific value mentioned above is one embodiment of the present invention, which can not be used to limit the protection scope of the present invention. It should be noted that, the person skilled in the art should understand that, the technical solutions of the present invention can be modified or substituted, without departing from the spirit and scope of the present invention, and all the modification and substitution fall in the scope of claims in the present invention. We claim 1. A method of time charging to DHCP online users in a broadband access server, comprising the following steps: a) setting an inner time, an outer time and a flow threshold for counting data flow of users using the broadband access server, and the inner time being shorter than the outer time; b) starting time charging to users by instruction of the access server using a charging server after users access the access server and are authenticated successfully, c) establishing a circular link list to each user for recording data flow of the user using the access server; d) defining a number of elements in the circular link list as a multiple of the outer time to the inner time using the access server; e) detecting data flow of the user according to the inner time using the access server, and recording the data flow as a content of a head pointer of the circular link list in turn, until a difference of comparing data flow newly detected and the content rerecorded in the head pointer are not more than the flow threshold; and f) deciding the user in an idle state in the access server when a difference of comparing the data flow newly detected and the content recorded in the head pointer does not exceed the flow threshold. 2. The method as claimed in claim 1, wherein, when the circular link list is not full, the method further comprises the following step in step e): el) examining data flow newly detected and the content of the head pointer, when a difference of comparing data flow newly detected and the content of the head pointer exceeds the flow threshold, saving the data flow newly detected as the content of the head pointer, and, meanwhile, moving the head and tail pointers down a position. 3. The method as claimed in claim 1, wherein, when the circular link list is full, the method further comprises the following step in step e): e2) examining data flow newly detected and the content of the head pointer element, when a difference of comparing data flow newly detected and the content of the head pointer exceeds the flow threshold, saving the data flow newly detected as the content of the head pointer, and moving the head and tail pointers down a position. 4. The method as claimed in claim 2 or 3, wherein the method further comprises: f) stopping time charging to the user by instruction of the access server. 5. The method as claimed in claim 4, wherein the method further comprises setting the user in unauthenticated state in step f). 6. The method as claimed in claim 4 or 5, wherein the charging server stops time charging before an outer time corresponding to the inner time when the idle state is detected. 7.The method as claimed in claim 5, wherein the inner time is 30 seconds and/or the outer time is 5 minutes. 8. A method of time charging to DHCP online users in a broadband access server, wherein the method comprises: setting an inner time interval, an outer time interval and a flow threshold in the broadband access server, the inner time interval being shorter than the outer time interval; detecting data flow of an authenticated user by using the inner time interval, the outer time interval and the flow threshold using the broadband access server; producing a circular link list corresponding each user using the broadband access server, and recording the data flow as a content of a head pointer of the circular link list in turn, until a difference of comparing data flow newly detected and the content rerecorded in the head pointer is not more than the flow threshold; and deciding whether the user is in idle state by comparing the difference and the flow threshold using the broadband access server; if not, recording current flow in the circular link list and going on detecting the data flow using the broadband access server; if yes, deciding the user in idle state using the broadband access server. 9. The method as claimed in time charging to DHCP online users in a broadband access server of claim 8, wherein the method further comprises the following steps: obtaining IP address through the broadband access server by a user and authenticating the user; starting time charging to the user from the time when the user is authenticated successfully; calculating a number of elements in a circular link list according to the inner time and the outer time configured; updating the information of the user flow timely; detecting idle state of the user; and forcing the user in IDLE state to login off. 10. A method of time charging to DHCP online users in a broadband access server, substantially as herein described with reference to the accompanied specifications, drawings and examples. |
---|
503-delnp-2006-Claims (20-11-2009).pdf
503-DELNP-2006-Correscpondence-Others-1.pdf
503-delnp-2006-Correspondence-Others (20-11-2009).pdf
503-DELNP-2006-Correspondence-Others-(12-07-2006).pdf
503-delnp-2006-correspondence-others.pdf
503-delnp-2006-description (complete).pdf
503-DELNP-2006-Form-18-(12-07-2006).pdf
503-delnp-2006-Form-3 (20-11-2009).pdf
Patent Number | 241009 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Indian Patent Application Number | 503/DELNP/2006 | ||||||||
PG Journal Number | 25/2010 | ||||||||
Publication Date | 18-Jun-2010 | ||||||||
Grant Date | 15-Jun-2010 | ||||||||
Date of Filing | 31-Jan-2006 | ||||||||
Name of Patentee | ZTE CORPORATION, a legal entity under the laws of P.R.China, whose address is, ZTE Plaza, Keji Road South, Hi-tech Industrial Park, Nanshan District, Shenzhen City, Guangdong Province 518057, P.R. China | ||||||||
Applicant Address | ZTE PLAZA, KEJI ROAD SOUTH HI-TECH INDUSTRIAL PARK, NANSHAN DISTRICT, SHENZHEN, GUANGDONG 518057, CHINA. | ||||||||
Inventors:
|
|||||||||
PCT International Classification Number | H04L 12/14 | ||||||||
PCT International Application Number | PCT/CN2004/000669 | ||||||||
PCT International Filing date | 2004-06-22 | ||||||||
PCT Conventions:
|