WO2016206299A1 - Session keep-alive method and device - Google Patents

Session keep-alive method and device Download PDF

Info

Publication number
WO2016206299A1
WO2016206299A1 PCT/CN2015/095326 CN2015095326W WO2016206299A1 WO 2016206299 A1 WO2016206299 A1 WO 2016206299A1 CN 2015095326 W CN2015095326 W CN 2015095326W WO 2016206299 A1 WO2016206299 A1 WO 2016206299A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
server
message
intermediate node
session
Prior art date
Application number
PCT/CN2015/095326
Other languages
French (fr)
Chinese (zh)
Inventor
宋大猛
王寿林
张锦
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016206299A1 publication Critical patent/WO2016206299A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a session keep-alive method and apparatus.
  • Diameter protocol family is a new generation of AAA technology. With the development of LTE technology, the Diameter protocol is used in more and more networks. More and more telecom operators choose Diameter as their authentication, authorization, and accounting. Basic agreement.
  • the primary nodes include a Diameter client, a Diameter server, a Diameter relay agent, etc., which are collectively referred to as Diameter nodes.
  • Diameter nodes In the initial stage of the development of the Diameter protocol, the network structure is simple. Usually there are only two nodes, the Diameter client and the Diameter server. In the Diameter basic protocol, it is recommended to use the Origin-State-Id (Attribute-Value-Pair) AVP (Attribute-Value-Pair) to identify the device status. This AVP is sent and received between two directly connected Diameter nodes. It is used to facilitate the receiver to know the sender's device status. If the sender restarts, the receiver can determine that the sender's status changes, and then clear the local session resources associated with the sender to achieve the purpose of session preservation.
  • Origin-State-Id Attribute-Value-Pair
  • AVP Attribute-Value-Pair
  • This method is effective in the case of a simple network structure, and only the client and the server are directly connected.
  • the network structure becomes more complicated, and a Diameter Relay/Proxy is introduced. /Proxy)
  • the client and the server are no longer directly connected, and the traditional session keepalive mode will have a big problem.
  • the client when the client is directly connected to the server through the Diameter Proxy node, the client initiates a large number of sessions (such as a charging session) to the server.
  • the session is generally a stateful session, and the session lifetime exists.
  • the technical problem to be solved by the present invention is to provide a method and a device for maintaining a session to solve the problem that the ineffective session resources between non-directly connected nodes cannot be released in time and affect the service capability.
  • the present invention provides a session keep-alive method, including: an intermediate node acquires device state information of a client; and if the state of the device of the client changes, the intermediate node changes the device after the client changes The status informs the server to cause the server to release an invalid session resource with the client.
  • the intermediate node notifying the server status of the changed device status of the client includes: the intermediate node restarting the client by using a link keep-alive message with the server The device status notifies the server.
  • the link keep-alive message includes a link handshake message DWR message, and the changed device status of the client The information is carried in the extended attribute value pair AVP of the DWR message.
  • the intermediate node after the intermediate node acquires the device status information of the client, in a case that the device status of the client changes, the intermediate node notifies the server status after the changed device status of the client.
  • the method further includes: the intermediate node determining, according to the acquired device state information, whether the device state of the client changes.
  • the device status of the client changes, where the device status after the restart of the client is different from the device status before the restart.
  • the intermediate node includes a relay node or a proxy node.
  • the present invention further provides a session keep-alive device, comprising: an obtaining unit, configured to acquire device state information of a client; and a notification unit, configured to: when the device state of the client changes, The device status of the client after the change is notified to the server, so that the server releases the invalid session resource with the client.
  • a session keep-alive device comprising: an obtaining unit, configured to acquire device state information of a client; and a notification unit, configured to: when the device state of the client changes, The device status of the client after the change is notified to the server, so that the server releases the invalid session resource with the client.
  • the notification unit is specifically configured to notify the server end of the device status after the restart of the client by using a link keep-alive message with the server.
  • the link keep-alive message includes a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
  • the device further includes: a determining unit, configured to: after the obtaining unit acquires device state information of the client, the notification unit notifies the server state after the changed device state of the client, according to the The device status information acquired by the obtaining unit determines whether the device status of the client changes.
  • a determining unit configured to: after the obtaining unit acquires device state information of the client, the notification unit notifies the server state after the changed device state of the client, according to the The device status information acquired by the obtaining unit determines whether the device status of the client changes.
  • the intermediate node can obtain the device state information of the client, and learn the device state of the client according to the device state information.
  • the intermediate node can The device status of the client is notified to the server, so that the server releases the invalid session resources with the client in time, which effectively improves the processing capability and reliability of the node.
  • FIG. 1 is a flowchart of a session keep-alive method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a communication relationship of a device that performs a diameter session in an embodiment of the present invention
  • FIG. 3 is a detailed flowchart of a session keep-alive method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a session keep-alive device according to an embodiment of the present invention.
  • an embodiment of the present invention provides a session keep-alive method, including:
  • the intermediate node acquires device status information of the client.
  • the intermediate node If the status of the device of the client changes, the intermediate node notifies the server of the changed device status of the client, so that the server releases the invalid session resource with the client.
  • the intermediate node can obtain the device state information of the client, and learn the device state of the client according to the device state information.
  • the intermediate node can The changed device status notifies the server, so that the server releases the invalid session resources with the client in time, thereby effectively improving the processing capability and reliability of the node.
  • the server, the client, and the intermediate node may all be common nodes in the system based on the diameter protocol. Depending on the initiator of the session and the receiver, the roles of the nodes may be different. The same node may be the client in one session, but may be the intermediate node or the server in other sessions. In a session between indirect nodes, the intermediate nodes may be one or more.
  • the Diameter client may be configured to send a Diameter message to the Diameter server, perform authentication, authorization, and accounting operations with the Diameter server, and initiate a Diameter session.
  • the Diameter intermediate node may include a relay node or a proxy node, and may be configured to forward or forward the message to assist in completing the AAA operation between the client and the server.
  • the Proxy agent can maintain its session state.
  • the Diameter server can be configured to transmit Diameter messages to and from the Diameter client, perform authentication, authorization, and accounting operations, and return the processing result to the client.
  • the device status of the client may change due to some conditions.
  • the status of the device after the client restarts is different from the state of the device before the restart. That is, if the client unexpectedly restarts during the session, the client's device state will change due to this reboot, and the session between the client and the intermediate node will be interrupted.
  • the client resends the link establishment request to the intermediate node, and the intermediate node can learn the status of the device after the client restarts through the link establishment request.
  • the relay node may restart the device by using the link keep-alive message between itself and the server. The status informs the server.
  • the link keep-alive message may include a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
  • the session protection provided by the embodiment of the present invention is The live method may further include the intermediate node determining, according to the acquired device state information, whether the device state of the client changes.
  • the intermediate node may obtain the device state information of the client by using a session message with the client, and learn, according to the information, that the client is in the first device state; when the client is restarted, The intermediate node may obtain the restarted message after the client is restarted by using a link reestablishment message or a capability exchange message with the client.
  • the device status information indicates that the client is in the second device state, and the second device state is different from the first device state, and the intermediate node may determine that the device state of the client has changed.
  • the session keep-alive method provided in this embodiment includes the following steps:
  • a Diameter node which is a client, generates a session creation request message (Request), and the message carries an Origin-State-Id AVP (Source-State-ID AVP), where the AVP indicates the current client state value, and the client requests the request.
  • the message is sent to the intermediate node Diameter agent, which is connected to the Diameter server.
  • the proxy After receiving the request message, the proxy forwards the request message to the Diameter server by using a routing policy, and the Origin-State-Id AVP carried in the request message does not change.
  • the Diameter client fails to restart, the link between the Diameter client and the Diameter agent is interrupted, and the link is re-established. After the link is successfully established, the Origin-State is carried in the capability exchange message (CER/CEA). Id AVP, the Diameter client notifies the Diameter agent of the new status value of the Diameter client. The Diameter agent successfully processed the capability exchange message with the Diameter client, but the message will not be forwarded to the Diameter server. The server has not yet known that the client restarts, and the session established before the restart becomes an invalid session. .
  • CER/CEA capability exchange message
  • the link keep-alive message DWR message between the Diameter proxy and the Diameter server can be utilized to solve the problem of the status update notification.
  • an optional Origin-Session-Host AVP may be added to the link state keep-alive message and implemented in conjunction with the original Origin-State-Id AVP in the message. The message is as follows:
  • the Origin-Session-Host is the host name that generates the source session and is an extension based on the original DWR message. After the Diameter proxy node detects that the Diameter client is restarted, the DWR message between the proxy node itself and the Diameter server carries the Origin-Session-Host and sends the DWR message to the Diameter server.
  • the Origin-Session-Host value is set to the host name of the Diameter client, and the value of the Origin-State-Id is set accordingly.
  • the source status identifier value for the Diameter client is set to the host name of the Diameter client, and the value of the Origin-State-Id is set accordingly.
  • the Diameter server After receiving the DWR, the Diameter server obtains the host name and the status identifier value of the Diameter client from the message, and can determine whether the current local invalid session resource needs to be released.
  • the session keep-alive method provided in this embodiment effectively solves the problem of session keep-alive between non-adjacent nodes on the basis of following the protocol by extending the DWR message.
  • the session keepalive function of the indirectly connected nodes is implemented without changing the current networking architecture and introducing new messages.
  • the Diameter node can quickly improve the fault capability and prevent the invalid resources from being released in time to affect the service delivery.
  • an embodiment of the present invention further provides a session keeping device, including:
  • the obtaining unit 41 is configured to acquire device status information of the client.
  • the notification unit 42 is configured to notify the server of the changed device status of the client when the device status of the client changes, so that the server releases the invalid session resource with the client.
  • the session keeping device provided by the embodiment of the present invention can obtain the device state information of the client, and know the device state of the client according to the device state information, and the notification unit 42 can change the client state of the device.
  • the changed device status notifies the server, so that the server releases the invalid session resources with the client in time, thereby effectively improving the processing capability and reliability of the node.
  • the notification unit 42 is specifically configured to notify the server end of the device status after the restart of the client by using a link keep-alive message with the server.
  • the link keep-alive message may include a link handshake message DWR message, where the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
  • the session keep-alive device may further include a determining unit, configured to notify the server end of the changed device state after the acquiring unit 41 acquires the device state information of the client. Previously, it is determined whether the device status of the client changes according to the device status information acquired by the obtaining unit 41.
  • the session keep-alive method and apparatus provided by the embodiments of the present invention have the following beneficial effects: the intermediate node can obtain the device state information of the client, learn the device state of the client according to the device state information, and change the device state of the client. In this case, the intermediate node can notify the server of the changed device state of the client, so that the server releases the invalid session resource with the client in time, thereby effectively improving the processing capability and reliability of the node.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed in the present invention are a session keep-alive method and device, which relate to the technical field of communications and are used to solve the problem in prior art that the invalid session resources between non-directly connected nodes can not be released in time with the result that the service capability is affected. The method includes: an intermediate node obtains device status information of a client; if the device status of the client changes, the intermediate node informs a server about the changed device status of the client, so that the server can release the invalid session resources of the client.

Description

一种会话保活方法及装置Session preservation method and device 技术领域Technical field
本发明涉及通讯技术领域,特别是涉及一种会话保活方法及装置。The present invention relates to the field of communications technologies, and in particular, to a session keep-alive method and apparatus.
背景技术Background technique
Diameter协议族是新一代的AAA技术,随着LTE的技术发展,Diameter协议在越来越多的网络中得到使用,越来越多的电信运营商选择Diameter作为其进行认证,授权,计费的基础协议。The Diameter protocol family is a new generation of AAA technology. With the development of LTE technology, the Diameter protocol is used in more and more networks. More and more telecom operators choose Diameter as their authentication, authorization, and accounting. Basic agreement.
在基于Diameter的***中,主要节点包括Diameter客户端,Diameter服务端,Diameter中继代理等,这些节点统称为Diameter节点。在Diameter协议发展初期,网络结构简单,通常只存在Diameter客户端和Diameter服务端两种节点。Diameter基础协议中,推荐使用Origin-State-Id(源-状态-标识)AVP(Attribute-Value-Pair,属性-值-对)来标识设备状态,这个AVP在直连的两个Diameter节点间收发用于方便接收方了解发送方的设备状态。如果发送方重启,接收方可以判断出发送方状态发生变化,则清除本地与发送方相关联的会话资源,达到会话保活的目的。In a Diameter-based system, the primary nodes include a Diameter client, a Diameter server, a Diameter relay agent, etc., which are collectively referred to as Diameter nodes. In the initial stage of the development of the Diameter protocol, the network structure is simple. Usually there are only two nodes, the Diameter client and the Diameter server. In the Diameter basic protocol, it is recommended to use the Origin-State-Id (Attribute-Value-Pair) AVP (Attribute-Value-Pair) to identify the device status. This AVP is sent and received between two directly connected Diameter nodes. It is used to facilitate the receiver to know the sender's device status. If the sender restarts, the receiver can determine that the sender's status changes, and then clear the local session resources associated with the sender to achieve the purpose of session preservation.
这种方法在网络结构简单,仅存在客户端和服务端直连的情况下是有效的,而随着Diameter协议应用越来越广泛,网络结构也越发复杂,引入了Diameter Relay/Proxy(中继/代理)节点后,客户度和服务端不再直连,传统的会话保活方式将存在很大问题。例如当客户端通过Diameter Proxy节点与服务端准直连,此时客户端向服务端发起了大量的会话(例如计费会话),这种会话一般都是有状态会话,存在会话生命期,而当会话生命期未终结时,若客户端忽然重启,由于服务端没有与客户端直连,无法感知客户端的状态,因此无法及时释放无效会话,从而极大消耗服务端的会话资源,造成其服务能力下降。This method is effective in the case of a simple network structure, and only the client and the server are directly connected. As the Diameter protocol is applied more and more widely, the network structure becomes more complicated, and a Diameter Relay/Proxy is introduced. /Proxy) After the node, the client and the server are no longer directly connected, and the traditional session keepalive mode will have a big problem. For example, when the client is directly connected to the server through the Diameter Proxy node, the client initiates a large number of sessions (such as a charging session) to the server. The session is generally a stateful session, and the session lifetime exists. When the lifetime of the session is not terminated, if the client suddenly restarts, the server cannot directly sense the status of the client because it is not directly connected to the client. Therefore, the invalid session cannot be released in time, which greatly consumes the session resources of the server and causes its service capability. decline.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种会话保活方法及装置,用以解决现有技术中非直连节点间无效会话资源无法及时释放而影响服务能力的问题。The technical problem to be solved by the present invention is to provide a method and a device for maintaining a session to solve the problem that the ineffective session resources between non-directly connected nodes cannot be released in time and affect the service capability.
一方面,本发明提供一种会话保活方法,包括:中间节点获取客户端的设备状态信息;在所述客户端的设备状态发生变化的情况下,所述中间节点将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。In one aspect, the present invention provides a session keep-alive method, including: an intermediate node acquires device state information of a client; and if the state of the device of the client changes, the intermediate node changes the device after the client changes The status informs the server to cause the server to release an invalid session resource with the client.
可选的,所述中间节点将所述客户端变化后的设备状态通知服务端包括:所述中间节点通过与所述服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。Optionally, the intermediate node notifying the server status of the changed device status of the client includes: the intermediate node restarting the client by using a link keep-alive message with the server The device status notifies the server.
可选的,所述链路保活消息包括链路握手消息DWR消息,所述客户端变化后的设备状态 信息携带在所述DWR消息的扩展的属性值对AVP中。Optionally, the link keep-alive message includes a link handshake message DWR message, and the changed device status of the client The information is carried in the extended attribute value pair AVP of the DWR message.
可选的,所述中间节点获取客户端的设备状态信息之后,所述在所述客户端的设备状态发生变化的情况下,所述中间节点将所述客户端变化后的设备状态通知服务端之前,所述方法还包括:所述中间节点根据获取的设备状态信息确定所述客户端的设备状态是否发生变化。Optionally, after the intermediate node acquires the device status information of the client, in a case that the device status of the client changes, the intermediate node notifies the server status after the changed device status of the client The method further includes: the intermediate node determining, according to the acquired device state information, whether the device state of the client changes.
可选的,所述客户端的设备状态发生变化的情况包括所述客户端重启后的设备状态与重启前的设备状态不同。Optionally, the device status of the client changes, where the device status after the restart of the client is different from the device status before the restart.
可选的,所述中间节点包括中继节点或代理节点。Optionally, the intermediate node includes a relay node or a proxy node.
另一方面,本发明还提供一种会话保活装置,包括:获取单元,设置为获取客户端的设备状态信息;通知单元,设置为在所述客户端的设备状态发生变化的情况下,将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。In another aspect, the present invention further provides a session keep-alive device, comprising: an obtaining unit, configured to acquire device state information of a client; and a notification unit, configured to: when the device state of the client changes, The device status of the client after the change is notified to the server, so that the server releases the invalid session resource with the client.
可选的,所述通知单元,具体设置为通过与所述服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。Optionally, the notification unit is specifically configured to notify the server end of the device status after the restart of the client by using a link keep-alive message with the server.
可选的,所述链路保活消息包括链路握手消息DWR消息,所述客户端变化后的设备状态信息携带在所述DWR消息的扩展的属性值对AVP中。Optionally, the link keep-alive message includes a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
可选的,所述装置还包括:确定单元,设置为在所述获取单元获取客户端的设备状态信息之后,所述通知单元将所述客户端变化后的设备状态通知服务端之前,根据所述获取单元获取的设备状态信息确定所述客户端的设备状态是否发生变化。Optionally, the device further includes: a determining unit, configured to: after the obtaining unit acquires device state information of the client, the notification unit notifies the server state after the changed device state of the client, according to the The device status information acquired by the obtaining unit determines whether the device status of the client changes.
本发明实施例提供的会话保活方法及装置,中间节点能够获取客户端的设备状态信息,根据设备状态信息了解客户端的设备状态,在客户端的设备状态发生变化的情况下,所述中间节点能够将客户端变化后的设备状态通知服务端,从而使服务端及时释放与所述客户端的无效会话资源,有效提高了节点的处理能力和可靠性。The session keep-alive method and device provided by the embodiment of the present invention, the intermediate node can obtain the device state information of the client, and learn the device state of the client according to the device state information. When the device state of the client changes, the intermediate node can The device status of the client is notified to the server, so that the server releases the invalid session resources with the client in time, which effectively improves the processing capability and reliability of the node.
附图说明DRAWINGS
图1是本发明实施例提供的会话保活方法的一种流程图;FIG. 1 is a flowchart of a session keep-alive method according to an embodiment of the present invention;
图2是本发明实施例中进行diameter会话的设备的通信关系示意图;2 is a schematic diagram of a communication relationship of a device that performs a diameter session in an embodiment of the present invention;
图3是本发明实施例提供的会话保活方法的一种详细流程图;3 is a detailed flowchart of a session keep-alive method according to an embodiment of the present invention;
图4是本发明实施例提供的会话保活装置的一种结构示意图。FIG. 4 is a schematic structural diagram of a session keep-alive device according to an embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明进行详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。 The invention will be described in detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,本发明实施例提供一种会话保活方法,包括:As shown in FIG. 1 , an embodiment of the present invention provides a session keep-alive method, including:
S11,中间节点获取客户端的设备状态信息;S11. The intermediate node acquires device status information of the client.
S12,在所述客户端的设备状态发生变化的情况下,所述中间节点将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。S12. If the status of the device of the client changes, the intermediate node notifies the server of the changed device status of the client, so that the server releases the invalid session resource with the client.
本发明实施例提供的会话保活方法,中间节点能够获取客户端的设备状态信息,根据设备状态信息了解客户端的设备状态,在客户端的设备状态发生变化的情况下,所述中间节点能够将客户端变化后的设备状态通知服务端,从而使服务端及时释放与所述客户端的无效会话资源,有效提高了节点的处理能力和可靠性。In the session keep-alive method provided by the embodiment of the present invention, the intermediate node can obtain the device state information of the client, and learn the device state of the client according to the device state information. When the device state of the client changes, the intermediate node can The changed device status notifies the server, so that the server releases the invalid session resources with the client in time, thereby effectively improving the processing capability and reliability of the node.
本发明实施例中,服务端、客户端和中间节点均可以是基于diameter协议的***中的普通节点。根据会话发起方和接收方的不同,各个节点的角色也可以不同,同一个节点在一个会话中可能是客户端,但在其他会话中也可能是中间节点或者服务端。在一个非直接节点间的会话中,中间节点可以为一个也可以为多个。In the embodiment of the present invention, the server, the client, and the intermediate node may all be common nodes in the system based on the diameter protocol. Depending on the initiator of the session and the receiver, the roles of the nodes may be different. The same node may be the client in one session, but may be the intermediate node or the server in other sessions. In a session between indirect nodes, the intermediate nodes may be one or more.
具体而言,非直连节点间的diameter会话可如图2所示。其中,Diameter客户端,可设置为向Diameter服务端发送Diameter消息,执行与Diameter服务器之间的认证,授权以及计费操作,发起Diameter会话。Diameter中间节点,可包括中继节点(Relay)或代理节点(proxy),可设置为对消息进行转发或者经过处理后转发,协助完成客户端和服务端之间的AAA操作,对于有状态会话,Proxy代理可以保持其会话状态。Diameter服务端,可设置为与Diameter客户端互相传输Diameter消息,执行认证,授权以及计费操作,将处理结果返回给客户端。Specifically, the diameter session between indirectly connected nodes can be as shown in FIG. 2. The Diameter client may be configured to send a Diameter message to the Diameter server, perform authentication, authorization, and accounting operations with the Diameter server, and initiate a Diameter session. The Diameter intermediate node may include a relay node or a proxy node, and may be configured to forward or forward the message to assist in completing the AAA operation between the client and the server. For the stateful session, The Proxy agent can maintain its session state. The Diameter server can be configured to transmit Diameter messages to and from the Diameter client, perform authentication, authorization, and accounting operations, and return the processing result to the client.
可选的,客户端的设备状态可能会因为一些情况而发生变化,例如,客户端重启后的设备状态与重启前的设备状态不同。即,如果客户端在会话进行期间意外重启,客户端的设备状态会因为这次重启而发生变化,同时客户端与中间节点之间的会话就会中断。重启后,客户端会向中间节点重新发送链路建立请求,中间节点可以通过该链路建立请求获知客户端重启后的设备状态。为了使服务端也获知客户端重启后的设备状态,可选的,在步骤S12中,中继节点可以通过自身与服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。Optionally, the device status of the client may change due to some conditions. For example, the status of the device after the client restarts is different from the state of the device before the restart. That is, if the client unexpectedly restarts during the session, the client's device state will change due to this reboot, and the session between the client and the intermediate node will be interrupted. After the restart, the client resends the link establishment request to the intermediate node, and the intermediate node can learn the status of the device after the client restarts through the link establishment request. In order to enable the server to know the device status after the client restarts, optionally, in step S12, the relay node may restart the device by using the link keep-alive message between itself and the server. The status informs the server.
具体而言,所述链路保活消息可以包括链路握手消息DWR消息,所述客户端变化后的设备状态信息携带在所述DWR消息的扩展的属性值对AVP中。Specifically, the link keep-alive message may include a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
可选地,在中间节点获取客户端的设备状态信息之后,为了确定客户端的设备状态是否发生了变化,在中间节点将客户端变化后的设备状态通知服务端之前,本发明实施例提供的会话保活方法还可包括中间节点根据获取的设备状态信息确定所述客户端的设备状态是否发生变化。Optionally, after the intermediate node acquires the device state information of the client, in order to determine whether the device state of the client has changed, before the intermediate node notifies the server of the changed device state of the client, the session protection provided by the embodiment of the present invention is The live method may further include the intermediate node determining, according to the acquired device state information, whether the device state of the client changes.
例如,会话正常的情况下,中间节点可以通过与所述客户端之间的会话消息获取所述客户端的设备状态信息,根据该信息获知客户端处于第一设备状态;当所述客户端重启后,中间节点可以通过与所述客户端之间的链路重建消息或能力交换消息获取所述客户端重启后的 设备状态信息,获知此时客户端处于第二设备状态,第二设备状态与第一设备状态不同,则中间节点可以确定客户端的设备状态发生了变化。For example, if the session is normal, the intermediate node may obtain the device state information of the client by using a session message with the client, and learn, according to the information, that the client is in the first device state; when the client is restarted, The intermediate node may obtain the restarted message after the client is restarted by using a link reestablishment message or a capability exchange message with the client. The device status information indicates that the client is in the second device state, and the second device state is different from the first device state, and the intermediate node may determine that the device state of the client has changed.
下面通过具体实施例来对本发明提供的会话保活方法进行详细说明。The session keep-alive method provided by the present invention will be described in detail below through specific embodiments.
如图3所示,本实施例提供的会话保活方法包括如下步骤:As shown in FIG. 3, the session keep-alive method provided in this embodiment includes the following steps:
S101,作为客户端的Diameter节点生成一条会话创建请求消息(Request),消息中携带Origin-State-Id AVP(源-状态-标识AVP),该AVP表明了当前客户端状态值,客户端将该请求消息发送到中间节点Diameter代理上,Diameter代理与Diameter服务端相连。S101. A Diameter node, which is a client, generates a session creation request message (Request), and the message carries an Origin-State-Id AVP (Source-State-ID AVP), where the AVP indicates the current client state value, and the client requests the request. The message is sent to the intermediate node Diameter agent, which is connected to the Diameter server.
S102,当代理接收到请求消息后,通过路由策略将该请求消息转发到Diameter服务端,该请求消息中携带的Origin-State-Id AVP不做任何变化。S102: After receiving the request message, the proxy forwards the request message to the Diameter server by using a routing policy, and the Origin-State-Id AVP carried in the request message does not change.
S103,当Diameter服务端成功处理了这条会话创建请求,为其创建一条新的会话,并缓存客户端对应的状态标识值,即Origin-State-Id AVP,然后给Diameter客户端回复成功响应,Diameter代理成功将响应消息返回Diameter客户端,此时会话创建成功。S103, when the Diameter server successfully processes the session creation request, creates a new session for it, and caches the state identifier value corresponding to the client, that is, the Origin-State-Id AVP, and then returns a successful response to the Diameter client. The Diameter agent successfully returns the response message to the Diameter client, and the session is successfully created.
S104,在会话持续阶段,Diameter客户端发生故障重启,Diameter客户端和Diameter代理之间的链路中断,并重新建链,建链成功后在能力交换消息(CER/CEA)中携带Origin-State-Id AVP,Diameter客户端向Diameter代理通知了Diameter客户端新的状态值。Diameter代理成功处理了与Diameter客户端之间的能力交换消息,但是该消息不会转发到Diameter服务端,服务端到目前为止还不知道客户端发生重启,在重启前建立的会话都成为无效会话。S104: During the session duration, the Diameter client fails to restart, the link between the Diameter client and the Diameter agent is interrupted, and the link is re-established. After the link is successfully established, the Origin-State is carried in the capability exchange message (CER/CEA). Id AVP, the Diameter client notifies the Diameter agent of the new status value of the Diameter client. The Diameter agent successfully processed the capability exchange message with the Diameter client, but the message will not be forwarded to the Diameter server. The server has not yet known that the client restarts, and the session established before the restart becomes an invalid session. .
S105,由于Diameter客户端发生故障重启,因此短时间内暂时无法提供服务,因此一段时间内没有新的会话相关请求消息发送到Diameter代理。此时可以利用Diameter代理和Diameter服务端之间的链路保活消息DWR消息来解决状态更新通知的问题。可选的,可以在链路状态保活消息中增加可选Origin-Session-Host AVP并配合消息中原有的Origin-State-Id AVP来实现。消息具体如下:S105, because the Diameter client fails to restart, the service cannot be temporarily provided for a short time, so no new session related request message is sent to the Diameter agent for a period of time. At this time, the link keep-alive message DWR message between the Diameter proxy and the Diameter server can be utilized to solve the problem of the status update notification. Optionally, an optional Origin-Session-Host AVP may be added to the link state keep-alive message and implemented in conjunction with the original Origin-State-Id AVP in the message. The message is as follows:
Figure PCTCN2015095326-appb-000001
Figure PCTCN2015095326-appb-000001
其中,Origin-Session-Host为产生源会话的主机名,是在原有DWR消息基础上的扩展。Diameter代理节点检测到Diameter客户端发生重启后,在代理节点自身与Diameter服务端之间的DWR消息中携带Origin-Session-Host,并将该DWR消息发送给Diameter服务端。其中,Origin-Session-Host值设置为Diameter客户端的主机名,其Origin-State-Id的值相应设置 为Diameter客户端的源状态标识值。The Origin-Session-Host is the host name that generates the source session and is an extension based on the original DWR message. After the Diameter proxy node detects that the Diameter client is restarted, the DWR message between the proxy node itself and the Diameter server carries the Origin-Session-Host and sends the DWR message to the Diameter server. The Origin-Session-Host value is set to the host name of the Diameter client, and the value of the Origin-State-Id is set accordingly. The source status identifier value for the Diameter client.
S106,Diameter服务端接收到DWR后从消息中获取到Diameter客户端的主机名和其状态标识值,就可以判断出当前本地是否存在无效会话资源需要释放。S106: After receiving the DWR, the Diameter server obtains the host name and the status identifier value of the Diameter client from the message, and can determine whether the current local invalid session resource needs to be released.
本实施例提供的会话保活方法,通过对DWR消息的扩展,在遵循协议的基础上高效地解决了非相邻节点之间会话保活的难题。在不更改当前组网架构,不引入新的消息的基础上实现了非直连节点间会话保活功能,可以提高Diameter节点快速处理故障能力避免无效资源未及时释放而影响提供服务。The session keep-alive method provided in this embodiment effectively solves the problem of session keep-alive between non-adjacent nodes on the basis of following the protocol by extending the DWR message. The session keepalive function of the indirectly connected nodes is implemented without changing the current networking architecture and introducing new messages. The Diameter node can quickly improve the fault capability and prevent the invalid resources from being released in time to affect the service delivery.
相应的,如图4所示,本发明的实施例还提供一种会话保活装置,包括:Correspondingly, as shown in FIG. 4, an embodiment of the present invention further provides a session keeping device, including:
获取单元41,设置为获取客户端的设备状态信息;The obtaining unit 41 is configured to acquire device status information of the client.
通知单元42,设置为在所述客户端的设备状态发生变化的情况下,将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。The notification unit 42 is configured to notify the server of the changed device status of the client when the device status of the client changes, so that the server releases the invalid session resource with the client.
本发明实施例提供的会话保活装置,获取单元41能够获取客户端的设备状态信息,根据设备状态信息了解客户端的设备状态,通知单元42能够在客户端的设备状态发生变化的情况下,将客户端变化后的设备状态通知服务端,从而使服务端及时释放与所述客户端的无效会话资源,有效提高了节点的处理能力和可靠性。The session keeping device provided by the embodiment of the present invention can obtain the device state information of the client, and know the device state of the client according to the device state information, and the notification unit 42 can change the client state of the device. The changed device status notifies the server, so that the server releases the invalid session resources with the client in time, thereby effectively improving the processing capability and reliability of the node.
可选的,通知单元42,具体可设置为通过与所述服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。Optionally, the notification unit 42 is specifically configured to notify the server end of the device status after the restart of the client by using a link keep-alive message with the server.
可选的,所述链路保活消息可以包括链路握手消息DWR消息,所述客户端变化后的设备状态信息携带在所述DWR消息的扩展的属性值对AVP中。Optionally, the link keep-alive message may include a link handshake message DWR message, where the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message.
可选地,本发明实施例提供的会话保活装置还可包括确定单元,设置为在获取单元41获取客户端的设备状态信息之后,通知单元42将所述客户端变化后的设备状态通知服务端之前,根据获取单元41获取的设备状态信息确定所述客户端的设备状态是否发生变化。Optionally, the session keep-alive device provided by the embodiment of the present invention may further include a determining unit, configured to notify the server end of the changed device state after the acquiring unit 41 acquires the device state information of the client. Previously, it is determined whether the device status of the client changes according to the device status information acquired by the obtaining unit 41.
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.
工业实用性Industrial applicability
如上所述,本发明实施例提供的一种会话保活方法及装置具有以下有益效果:中间节点能够获取客户端的设备状态信息,根据设备状态信息了解客户端的设备状态,在客户端的设备状态发生变化的情况下,所述中间节点能够将客户端变化后的设备状态通知服务端,从而使服务端及时释放与所述客户端的无效会话资源,有效提高了节点的处理能力和可靠性。 As described above, the session keep-alive method and apparatus provided by the embodiments of the present invention have the following beneficial effects: the intermediate node can obtain the device state information of the client, learn the device state of the client according to the device state information, and change the device state of the client. In this case, the intermediate node can notify the server of the changed device state of the client, so that the server releases the invalid session resource with the client in time, thereby effectively improving the processing capability and reliability of the node.

Claims (10)

  1. 一种会话保活方法,包括:A session keep-alive method, including:
    中间节点获取客户端的设备状态信息;The intermediate node obtains device status information of the client;
    在所述客户端的设备状态发生变化的情况下,所述中间节点将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。In a case that the device status of the client changes, the intermediate node notifies the server of the changed device status of the client, so that the server releases the invalid session resource with the client.
  2. 根据权利要求1所述的方法,其中,所述中间节点将所述客户端变化后的设备状态通知服务端包括:The method according to claim 1, wherein the intermediate node notifying the server of the changed device status of the client comprises:
    所述中间节点通过与所述服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。And the intermediate node notifies the server of the device status after the restart of the client by using a link keep-alive message with the server.
  3. 根据权利要求2所述的方法,其中,所述链路保活消息包括链路握手消息DWR消息,所述客户端变化后的设备状态信息携带在所述DWR消息的扩展的属性值对AVP中。The method according to claim 2, wherein the link keep-alive message comprises a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message. .
  4. 根据权利要求1所述的方法,其中,所述中间节点获取客户端的设备状态信息之后,所述在所述客户端的设备状态发生变化的情况下,所述中间节点将所述客户端变化后的设备状态通知服务端之前,所述方法还包括:The method according to claim 1, wherein, after the intermediate node acquires device state information of the client, in a case where the device state of the client changes, the intermediate node changes the client after the client Before the device status notifies the server, the method further includes:
    所述中间节点根据获取的设备状态信息确定所述客户端的设备状态是否发生变化。The intermediate node determines, according to the acquired device state information, whether the device state of the client changes.
  5. 根据权利要求1所述的方法,其中,所述客户端的设备状态发生变化的情况包括所述客户端重启后的设备状态与重启前的设备状态不同。The method according to claim 1, wherein the situation in which the state of the device of the client changes includes a state of the device after the restart of the client is different from a state of the device before the restart.
  6. 根据权利要求1至5中任一项所述的方法,其中,所述中间节点包括中继节点或代理节点。The method of any of claims 1 to 5, wherein the intermediate node comprises a relay node or a proxy node.
  7. 一种会话保活装置,包括:A session keeping device includes:
    获取单元,设置为获取客户端的设备状态信息;Obtaining a unit, configured to obtain device status information of the client;
    通知单元,设置为在所述客户端的设备状态发生变化的情况下,将所述客户端变化后的设备状态通知服务端,以使所述服务端释放与所述客户端的无效会话资源。The notification unit is configured to notify the server of the changed device state of the client when the device status of the client changes, so that the server releases the invalid session resource with the client.
  8. 根据权利要求7所述的装置,其中,所述通知单元,具体设置为通过与所述服务端之间的链路保活消息,将所述客户端重启后的设备状态通知所述服务端。The apparatus according to claim 7, wherein the notification unit is specifically configured to notify the server of the device status after the client restarts by using a link keep-alive message with the server.
  9. 根据权利要求8所述的装置,其中,所述链路保活消息包括链路握手消息DWR消息,所述客户端变化后的设备状态信息携带在所述DWR消息的扩展的属性值对AVP中。The apparatus according to claim 8, wherein the link keep-alive message comprises a link handshake message DWR message, and the changed device state information of the client is carried in an extended attribute value pair AVP of the DWR message. .
  10. 根据权利要求7所述的装置,其中,还包括:The apparatus according to claim 7, further comprising:
    确定单元,设置为在所述获取单元获取客户端的设备状态信息之后,所述通知单元将所述客户端变化后的设备状态通知服务端之前,根据所述获取单元获取的设备状态信息确定所述客户端的设备状态是否发生变化。 a determining unit, configured to determine, according to the device state information acquired by the acquiring unit, the notification unit, after the acquiring unit acquires the device state information of the client, the notification unit notifying the server device after the changed device state of the client Whether the device status of the client has changed.
PCT/CN2015/095326 2015-06-23 2015-11-23 Session keep-alive method and device WO2016206299A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510348808.3 2015-06-23
CN201510348808.3A CN106330823A (en) 2015-06-23 2015-06-23 Session live-keeping method and device

Publications (1)

Publication Number Publication Date
WO2016206299A1 true WO2016206299A1 (en) 2016-12-29

Family

ID=57584572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095326 WO2016206299A1 (en) 2015-06-23 2015-11-23 Session keep-alive method and device

Country Status (2)

Country Link
CN (1) CN106330823A (en)
WO (1) WO2016206299A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109640033B (en) * 2018-11-05 2021-03-23 视联动力信息技术股份有限公司 Information synchronization method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453449A (en) * 2007-12-04 2009-06-10 华为技术有限公司 Connection interruption processing method and apparatus based on charge transmission protocol
CN102612164A (en) * 2012-01-21 2012-07-25 华为技术有限公司 Method, device and system for releasing resource after network element restart
CN102625474A (en) * 2012-03-21 2012-08-01 大唐移动通信设备有限公司 Method and device for releasing resources
US20130265935A1 (en) * 2012-04-04 2013-10-10 Seiko Epson Corporation Wireless communication device, wireless communication system, memory medium storing method and computer program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123558B (en) * 2007-08-20 2010-12-29 中兴通讯股份有限公司 A method for device restart notice in Wimax access network
JP2012099902A (en) * 2010-10-29 2012-05-24 Hitachi Ltd Mobile communication terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453449A (en) * 2007-12-04 2009-06-10 华为技术有限公司 Connection interruption processing method and apparatus based on charge transmission protocol
CN102612164A (en) * 2012-01-21 2012-07-25 华为技术有限公司 Method, device and system for releasing resource after network element restart
CN102625474A (en) * 2012-03-21 2012-08-01 大唐移动通信设备有限公司 Method and device for releasing resources
US20130265935A1 (en) * 2012-04-04 2013-10-10 Seiko Epson Corporation Wireless communication device, wireless communication system, memory medium storing method and computer program

Also Published As

Publication number Publication date
CN106330823A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
US10931742B2 (en) State replication of virtual network function instances
CN110999257B (en) Delivery method selection for delivery of server notifications
JP7209105B2 (en) Extended UP Feature Request PFCP Association Release
WO2014012227A1 (en) Data connection management method, device and system
WO2018121284A1 (en) Method for processing routing, and network device
WO2018006306A1 (en) Network connection configuration method and apparatus
WO2018018631A1 (en) Anchor gateway switching method, apparatus and system
WO2015184921A1 (en) Heartbeat communication implementation method, registration center, server and client
WO2018099308A1 (en) Method and apparatus for supporting address changes, and storage medium
JP2016063234A (en) Communication control method for communication device, communication device, and communication control system
US9300642B2 (en) Restarting network reachability protocol sessions based on transport layer authentication
WO2019085651A1 (en) Software-defined network setting method, controller, switch, and storage medium
CN108124504B (en) TFO transmission method, proxy server and system
WO2010075727A1 (en) Processing method for abnormal data transmission and path function entity
RU2640573C1 (en) Method for correcting failure, data packet network, mobility control node and network system
WO2014019157A1 (en) Communication path processing method and apparatus
WO2016206299A1 (en) Session keep-alive method and device
US20190215665A1 (en) Method and apparatus for maintaining up session status information in an edge cloud
WO2016141653A1 (en) Sctp connection re-establishing method, device and storage medium
WO2022042499A1 (en) Tunnel keepalive method, network device, system and storage medium
US10581979B2 (en) Information transmission method and apparatus
KR102090493B1 (en) Device and method of HTTP Proxy to reduce the HTTP protocol transmission delay and the HTTP processing load in Mobile Communication Networks
CN104811426B (en) User Agent Client sends the method and User Agent Client of registration request
US10382274B2 (en) System and method for wide area zero-configuration network auto configuration
JP2017108221A (en) Packet storage device and packet storage method

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: 15896183

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: 15896183

Country of ref document: EP

Kind code of ref document: A1