A kind of concurrency control method and device
Technical field
The invention belongs to data communication field, particularly relate to a kind of concurrency control method and device.
Background technology
Along with the development of data corresponding technology, Level 2 Tunnel Protocol (Layer2TunnelingProtocol is called for short L2TP) is commonly used and recognizes, and especially in the arrival of G mobile communication, L2TP agreement is obtained and applies widely. Given this, L2TP is accessed L2TP LAC (L2TPAccessConcentrator by client, it is called for short LAC) and the L2TP webserver (L2TPNetworkSerer, be called for short LNS) service performance more pay close attention to, it is generally the corresponding LNS equipment of multiple LAC or dial-up client end in actual applications, so LNS device processes concurrent connectivity can be required just higher, because this relates to the convergency of LNS equipment L2TP protocol integrated test system under big concurrent connection.
The method of current existing control LNS equipment concurrent connectivity energy is the transmit queue window size limiting L2TP Tunnel at L2TP surface, although transmit queue window size has certain control action kou to conversation establishing is concurrent, but the method for this control concurrent processing is in the rear end of agreement flow processing, therefore it can not alleviate the problem that the connection request exceeding its concurrent processing performance is caused the wasting of resources by L2TP surface, thus have impact on the efficiency of LNS equipment concurrent processing, cause the concurrent processing degradation of whole LNS equipment. And the concurrent of tunnel does not have controlling mechanism in agreement face, depend on that lower end LAC equipment initiates speed and the L2TP its own processing capabilities that tunnel creates, if forwarding face at L2TP just can control the concurrent in a large number of L2TP, it is to increase the handling property in agreement face, then there is actual significance.
Summary of the invention
The present invention is that the method solving L2TP control concurrent processing in prior art is in the rear end of agreement flow processing, the request process exceeding concurrent processing performance is caused the wasting of resources, affects the problem of LNS equipment concurrent processing efficiency, thering is provided a kind of and hold identifying processing in face of L2TP forwards, the message reducing by more than L2TP surface concurrent processing performance impacts the method for L2TP surface.
It is an object of the invention to provide a kind of concurrency control method, the method comprises:
A, an establishment virtual input queue, set the maximum concurrent number of queue length by LNS equipment L2TP surface treatable request message of described virtual input queue; Described request message comprises opens control linkage request SCCRQ message or session request ICRQ message;
B, forward in the message that receives of face at LNS equipment L2TP, identify SCCRQ message or ICRQ message;
C, judge now virtual input queue in the quantity of SCCRQ message and ICRQ message whether reach the queue length of virtual input queue, if now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then virtual input queue of described SCCRQ message or ICRQ message being joined the team to;
L2TP surface processes by being sent to successively for the described SCCRQ message of D, virtual input queue of joining the team or ICRQ message.
Further, the queue length of described virtual input queue can be revised.
Further, in described step C, if now the quantity of SCCRQ message and ICRQ message reaches the queue length of virtual input queue in virtual input queue, then abandon described SCCRQ message or ICRQ message.
Further, described method also comprises: the SCCRQ message that is dropped or ICRQ message retransmit to LNS equipment L2TP next time when forwarding face, now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then can continue the SCCRQ message being dropped described in re-transmission or ICRQ message are performed enqueue operations.
Further, described method also comprises: when occurring abnormal in tunnel or session establishment successful connection or treating processes, from described virtual input queue, SCCRQ message corresponding to described tunnel or session or ICRQ message are gone out team.
Another object of the present invention also is to provide a kind of con current control device, and described device comprises:
Module is set, for creating a virtual input queue, sets the maximum concurrent number of queue length by LNS equipment L2TP surface treatable request message of described virtual input queue; Described request message comprises opens control linkage request SCCRQ message or session request ICRQ message;
Message identification module, for forwarding in the message that face receives at LNS equipment L2TP, identifies SCCRQ message or ICRQ message;
Join the team processing module, judge whether the quantity of SCCRQ message and ICRQ message in now virtual input queue reaches the queue length of virtual input queue, if now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then described virtual input queue of described SCCRQ message or ICRQ message being joined the team to;
Go out group processing module, for the described SCCRQ message of virtual input queue of joining the team or ICRQ message being sent to successively the process of L2TP surface.
Further, described module is set, also for the queue length of described virtual input queue being modified.
Further, described in join the team processing module, if also reaching the queue length of virtual input queue for the quantity of SCCRQ message and ICRQ message in now virtual input queue, then abandon described SCCRQ message or ICRQ message.
Further, described processing module of joining the team, also for the SCCRQ message being dropped or ICRQ message retransmit to next time LNS equipment L2TP forward face time, now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then can continue the SCCRQ message being dropped described in re-transmission or ICRQ message are performed enqueue operations.
Further, described in go out group processing module, also for when tunnel or session establishment successful connection or treating processes occur abnormal, SCCRQ message corresponding to described tunnel or session or ICRQ message being gone out team from described virtual input queue.
The useful effect of the present invention is: in the present invention, employing virtual input queue mechanism, make L2TP Tunnel or SCCRQ message corresponding to session or ICRQ message forward face at LNS equipment L2TP to join the team virtual input queue, the message avoiding exceeding L2TP surface concurrent processing performance impacts L2TP surface, reduce the load of L2TP surface, ensure effective operation of L2TP surface, it is to increase the efficiency of LNS equipment concurrent processing.
Accompanying drawing explanation
Accompanying drawing 1 is the method flow diagram of the embodiment of the present invention;
Accompanying drawing 2 is the device block diagram of the embodiment of the present invention.
Embodiment
For making the technical scheme of the present invention clearly understand, now by reference to the accompanying drawings the present invention is described in further details:
The embodiment of the present invention provides a kind of concurrency control method, and the method adopts virtual input queue to queue up all tunnels or session request message realizes the con current control on LNS equipment. The application scene of the embodiment of the present invention comprises multiple stage LAC equipment and a LNS equipment, and as shown in Figure 1, the specific implementation step of the method comprises:
S101, an establishment virtual input queue, set the maximum concurrent number of queue length by LNS equipment L2TP surface treatable request message of described virtual input queue; And the queue length of described virtual input queue can revise. Described request message comprises opens control linkage request SCCRQ (StartControlConnectionRequest) message or session request ICRQ (IncomingCallRequest) message; Wherein, described queue length is the numerical value of an optimization reached according to system and test, and can according to the condition of loading of system, and manual configuration is revised, the scope of the queue length of the virtual input queue that can revise to be 0 to N, N be greater than 0 integer. When needing the queue length of manual configuration amendment virtual input queue, existing message amount in former virtual input queue need to be inherited, then change the queue length of virtual input queue. Such as: in embodiments of the present invention, the queue length of setting virtual input queue is 1000, if now needing the queue length of manual configuration virtual input queue to be 2000 according to condition of loading, and now virtual input queue has existed 300 pending SCCRQ messages or ICRQ message, then new virtual input queue can also hold 1700 concurrent SCCRQ messages or ICRQ message.
S102, forward in the message that receives of face at LNS equipment L2TP, identify SCCRQ message or ICRQ message. specifically comprise: after LNS equipment L2TP forwarding face receives message, identify that the message that receives is after being sent to the message of this equipment, enter L2TP treatment scheme, whether L2TP processing and identification message is L2TP message, the foundation of identification L2TP message first identifies the UDP message that port numbers is 1701, if L2TP message, then continue whether analytic message is control message, if control message, then resolve the type of message of this control message, if SCCRQ message or ICRQ message, SCCRQ message or ICRQ message is then needed to join the team virtual input queue, increase the concurrent processing amount of L2TP surface.
S103, judge now virtual input queue in the quantity of SCCRQ message and ICRQ message whether reach the queue length of virtual input queue, if now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then virtual input queue of described SCCRQ message or ICRQ message being joined the team to;If now in virtual input queue, the quantity of SCCRQ message and ICRQ message reaches the queue length of virtual input queue, then abandon described SCCRQ message or ICRQ message, to alleviate the processing pressure of L2TP surface, the SCCRQ message that is dropped or ICRQ message retransmit to LNS equipment L2TP next time when forwarding face, now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then can continue the SCCRQ message being dropped described in re-transmission or ICRQ message are performed enqueue operations. It is specially: the SCCRQ message being dropped or ICRQ message be not owing to being replied, opposite end equipment meeting Retransmission timeout, when SCCRQ message or the ICRQ message arrival LNS equipment L2TP forwarding face of re-transmission next time, if the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue in virtual input queue, then can continue the SCCRQ message abandoned above or ICRQ message are performed enqueue operations.
L2TP surface processes by being sent to successively for the described SCCRQ message of S104, virtual input queue of joining the team or ICRQ message.
When tunnel or session establishment successful connection or treating processes occurring extremely need to delete, SCCRQ message corresponding to described tunnel or session or ICRQ message are gone out team from described virtual input queue, reduces the concurrent processing amount of L2TP surface.
Below in conjunction with specific embodiment, specific implementation of the present invention is described further,
In embodiments of the present invention, the queue length of virtual input queue is set to 1000, LNS equipment L2TP forwards face and identifies SCCRQ message or ICRQ message in the message received, after the message judging to receive is SCCRQ message or ICRQ message, then virtual input queue of described SCCRQ message or ICRQ message being joined the team to; Judge whether the number of SCCRQ message and ICRQ message in now virtual input queue reaches 1000 of setting, if now in virtual input queue, the number of SCCRQ message and ICRQ message does not reach 1000, then described SCCRQ message or ICRQ message being joined the team to virtual input queue, the current queue length of virtual input queue subtracts one; If now the number of SCCRQ message and ICRQ message reaches 1000 in virtual input queue, then abandon this SCCRQ message or ICRQ message; The SCCRQ message being dropped or ICRQ message be not owing to being replied, opposite end equipment meeting Retransmission timeout, when SCCRQ message or the ICRQ message arrival LNS equipment L2TP forwarding face of re-transmission next time, if the number of SCCRQ message and ICRQ message does not reach 1000 in virtual input queue, then can continue to process this SCCRQ message or ICRQ message, join the team the SCCRQ message of virtual input queue or ICRQ message, being sent to the process of L2TP surface successively by socket, the current queue length of virtual input queue adds one. When a certain tunnel or session establishment successful connection or treating processes occurring extremely need to delete, SCCRQ message corresponding to described tunnel or session or ICRQ message are gone out team from described virtual input queue, now the current queue length of virtual input queue is added one, reduce the concurrent processing amount of L2TP surface.
The embodiment of the present invention also provides a kind of con current control device, and described device comprises:
Module 11 is set, for creating a virtual input queue, sets the maximum concurrent number of queue length by LNS equipment L2TP surface treatable request message of described virtual input queue;Described request message comprises opens control linkage request SCCRQ message or session request ICRQ message; Also for the queue length of described virtual input queue is modified.
Message identification module 12, for forwarding in the message that face receives at LNS equipment L2TP, identifies SCCRQ message or ICRQ message;
Join the team processing module 13, judge whether the quantity of SCCRQ message and ICRQ message in now virtual input queue reaches the queue length of virtual input queue, if now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then described virtual input queue of described SCCRQ message or ICRQ message being joined the team to; If now the quantity of SCCRQ message and ICRQ message reaches the queue length of virtual input queue in virtual input queue, then abandon described SCCRQ message or ICRQ message.
Go out group processing module 14, for the described SCCRQ message of virtual input queue of joining the team or ICRQ message being sent to successively the process of L2TP surface.
Further, described processing module 13 of joining the team, also for the SCCRQ message being dropped or ICRQ message retransmit to next time LNS equipment L2TP forward face time, now in virtual input queue, the quantity of SCCRQ message and ICRQ message does not reach the queue length of described virtual input queue, then can continue the SCCRQ message being dropped described in re-transmission or ICRQ message are performed enqueue operations.
Further, described in go out group processing module 14, also for when tunnel or session establishment successful connection or treating processes occur abnormal, SCCRQ message corresponding to described tunnel or session or ICRQ message being gone out team from described virtual input queue.
The foregoing is only the better embodiment of the application; not in order to limit the protection domain of the application; within all spirit in technical scheme and principle, any amendment of making, equivalent replacements, improvement etc., all should be included within the scope that the application protects. Therefore protection scope of the present invention should described be as the criterion with the protection domain of claim.