WO2013078869A1 - 一种aos中保持长连接的方法、系统、aoe、aog及终端 - Google Patents
一种aos中保持长连接的方法、系统、aoe、aog及终端 Download PDFInfo
- Publication number
- WO2013078869A1 WO2013078869A1 PCT/CN2012/078890 CN2012078890W WO2013078869A1 WO 2013078869 A1 WO2013078869 A1 WO 2013078869A1 CN 2012078890 W CN2012078890 W CN 2012078890W WO 2013078869 A1 WO2013078869 A1 WO 2013078869A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- aoe
- connection
- aog
- terminal
- abnormal
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/20—Manipulation of established connections
- H04W76/25—Maintenance of established connections
Definitions
- the present invention relates to the field of mobile Internet services, and in particular, to a method, system, and system for maintaining a long connection in an AOS (Always Online System) A0E, AOG and terminal. Background technique
- AOI Always Online Infrastructure
- AOG Always Online Gateway
- P AOE Always Online Engine
- A0G is an always-on platform that runs on the mobile internet.
- A0G provides two-part access to the external terminal, accessing the intelligent terminal, accessing the application service on the other side, and providing forwarding and control of the message between the two access entities.
- A0E is a general software module running on the smart phone terminal.
- the module is installed as a program on the mobile phone terminal, and automatically runs the program in the background every time the mobile phone starts, mainly providing control, management, and message to the application on the terminal. Forwarding and other functions.
- the A0I system is called an always-on system, that is, when the terminal is powered on, A0E will establish a connection to
- connection On the A0G platform, the connection will remain the same, which is equivalent to the terminal and platform staying online through the connection. Since the terminal is always online, the application or the platform can deliver the message to the terminal through a long connection whenever and wherever there is a need to send a message. However, in the case of actual application, there are many abnormal situations. Even if the terminal is connected to the A0G platform as soon as it is turned on, in many cases, the connection may be abnormal or disconnected. For example, the wireless signal is not good, the user enters a service-free area such as an elevator or a basement, and the user makes a long-term call. Causes an abnormality or disconnection of a long connection.
- connection anomalies are detected by heartbeat messages in the connection. By sending a heartbeat message and detecting the response of the heartbeat message, it is determined by a certain strategy whether the connection is normal. However, if the heartbeat detection message interval is too long, the connection abnormality cannot be determined in time; and the heartbeat detection message interval is too short, which will cause a large network impact on the network, especially the wireless side.
- Some embodiments of the present invention provide a method, system, AOE, AOG, and terminal for maintaining a long connection in a mobile Internet always-on system, which can better achieve connection maintenance and heavy connection in a permanent online system. even.
- An embodiment of the present invention provides a method for implementing a long connection in a mobile Internet always-on system, including: determining whether the connection between the terminal and the always-on gateway AOG is abnormal according to the detection result of the terminal signal or the sending condition of the ordinary message. If abnormal, reestablish the connection between the terminal and the AOG.
- One embodiment of the present invention provides an AOE that maintains a long connection in a mobile Internet always-on system, including:
- the AOE connection abnormality determining module is configured to determine whether the connection between the AOE and the AOG is abnormal according to the detection result of the current signal of the terminal or the sending condition of the normal message; and the reconnecting module is configured to determine that the connection abnormality is determined when the AOE connection abnormality determining module determines that the connection is abnormal Re-establish the connection with the AOG.
- An embodiment of the present invention provides a terminal for maintaining a long connection in a mobile internet always-on system, including: the above AOE.
- An embodiment of the present invention provides an AOG for maintaining a long connection in a mobile Internet always-on system, including: an AOG connection exception logic processing module, configured to determine the AOG according to a transmission condition of a normal message
- the AOG sends a normal message to the AOE, it detects that the connection between the AOG and the AOE does not exist or the AOG sends a normal message to the AOE multiple times but does not receive the response of the AOE. Determining that the connection between the AOG and the AOE is abnormal; the sending module is configured to send a wake-up message to the AOE when the AOG connection abnormality logic processing module detects the connection abnormality, and notify the AOE to re-establish the AOG with the AOG the connection between.
- An embodiment of the present invention provides a system for maintaining a long connection in a mobile Internet always-on system, including: AOE, configured to determine whether the connection between the terminal and the always-on gateway AOG is abnormal according to the detection result of the terminal signal or the sending condition of the ordinary message, and if abnormal, re-establish the connection between the AOE and the AOG;
- the embodiment of the present invention provides for maintaining, detecting, and reconnecting a long connection between a terminal and an always-on platform without detecting a link through frequent heartbeat messages in an always-on system.
- FIG. 1 is a flowchart of a method for transmitting a wake-up message to an AOE according to an embodiment of the present invention
- FIG. 1 is a flowchart of an AOG sending a wake-up message to an AOE according to an embodiment of the present invention. As shown in FIG. 1, the method includes: Step S101: An AOG sends a normal message to a terminal. In a preferred embodiment, the AOG can send a normal message A to the terminal and cache the message A.
- the ordinary message here may be a service data message used by the user in the mobile internet service, such as a user pass. After QQ chat on the mobile phone, then the content of these chats will constitute a packet message, which is the ordinary message.
- Step S102 determining a response of the ordinary message.
- the AOG sends the normal message A to the terminal, if the response of the message is a connection error, indicating that the connection is broken, deleting the cached original message A, performing step S107; if the response is a normal response of the ordinary message Then, the cached original message A is deleted, and step S103 is performed; if there is no response, step S104 is performed.
- step S103 a normal process is performed. Processed according to the normal process.
- Step S104 setting a timer.
- Step S105 the timer expires.
- Step S106 determining the number of times the message is sent. In a preferred embodiment, after the time set by the timer is reached, the AOG determines the number of times the A message is sent. If it is less than n times, the A message is resent, and the number of times the A message is sent is accumulated, and step S101 is performed. Otherwise, If the response message is retransmitted n times but still no message A is returned, it is determined that the connection is abnormal, and step S107 is performed. Step S107, sending a wake-up message to the terminal.
- the AOG is disconnected, sends a wake-up message to the terminal, and records the connection status. Other ordinary messages sent to the terminal subsequently, even if there is no response or the response is a connection error, the AOG will no longer send the wake-up message to the terminal until the new connection is re-established.
- Step S108 After receiving the wake-up message, the terminal re-establishes the connection with the AOG.
- the terminal determines whether the terminal and the AOG already have a connection; if there is no connection, the terminal establishes a connection with the AOG; if the connection already exists, the terminal sends a connection detection message to the AOG.
- connection detection message does not respond, the terminal closes the existing connection and re-establishes the connection with the AOG.
- other messages may also be sent, such as message B, message C, regardless of whether the response message of these messages is returned, as long as the message A If the response message does not return n times, the connection is considered abnormal.
- 2 is a method for detecting connection and reconnection of a terminal according to an embodiment of the present invention. As shown in FIG. 2, the method is specifically as follows: Step S201: detecting a connection according to a detection result of a terminal signal or a sending condition of a normal message abnormal.
- the terminal determines whether the connection between the terminal and the AOG is abnormal according to the detection result of the terminal signal or the transmission status of the ordinary message.
- the terminal determines whether the connection is abnormal according to the detection result of the terminal signal: if the terminal AOE detects that the terminal is from the no-signal state to the signal state or detects that the terminal is powered on or detects the AOE restart, it determines that the connection is abnormal.
- the detection signal is a function supported by the terminal operating system from scratch. After detecting the signal from scratch, the operating system reports the event to the upper application, such as AOE, so that AOE knows that the signal has gone from nowhere. Have.
- the terminal determines whether the connection is abnormal according to the sending condition of the ordinary message, and is specifically at least one of the following: if the AOE detects that the connection between the AOE and the AOG does not exist when the normal message is sent to the AOG, the response of the common message is If the connection is incorrect, the connection is abnormal; if the AOE sends a normal message to the AOG multiple times but does not receive the response of the AOG, it determines that the connection is abnormal; in addition, if the AOG sends the normal message to the AOE, the A connection between the AOG and the AOE does not exist or the AOG sends a normal message to the AOE multiple times but does not receive a response from the AOE, and the AOG sends a wake-up message to the AOE, where the AOE receives When the wake-up message is awakened, it is determined that the connection is abnormal, that is, when the terminal receives the wake-up message sent by the AOG shown in FIG.
- the terminal also determines that the connection is abnormal. If the terminal detects that the connection between the AOE and the AOG is abnormal, step S202 is performed. In step S202, the AOE determines the strength of the terminal signal when reconnecting. Specifically, after detecting that the connection is abnormal, the terminal first determines the strength of the terminal signal. If the signal of the terminal is insufficient for reconnection, step S203 is performed; otherwise, step S204 is performed. In step 203, the connection request is abandoned. Step S204, the AOE initiates a connection request to the platform. The AOE initiates a connection request to the AOG platform. If the connection is successfully established, the reconnection is terminated. Otherwise, the connection is reconnected for a certain period of time.
- An embodiment of the present invention provides an AOE for maintaining a long connection in a mobile Internet always-on system, including: an AOE connection abnormality determining module, configured to determine AOE according to a detection result of a current signal of the terminal or a transmission condition of an ordinary message.
- the reconnect module is configured to re-establish a connection with the AOG when the AOE connection abnormality determining module determines that the connection is abnormal.
- the AOE connection abnormality determining module includes: a signal detecting unit configured to detect a terminal signal and determine whether the connection between the AOE and the AOG is abnormal according to the detection result; the normal message detecting unit is set to be normal The sending condition of the message determines whether the connection between the AOE and the AOG is abnormal. If the AOE sends a normal message to the AOG, it detects that the connection between the AOE and the AOG does not exist or the AOE sends the normal to the AOG multiple times.
- the signal detecting unit comprises: a current signal detecting unit configured to determine a connection abnormality between the AOE and the AOG when detecting that the terminal is from the no signal state to the signal state; the event detecting unit, setting It is determined that the connection between the AOE and the AOG is abnormal when the terminal boot event or the AOE restart event is detected.
- a current signal detecting unit configured to determine a connection abnormality between the AOE and the AOG when detecting that the terminal is from the no signal state to the signal state
- the event detecting unit setting It is determined that the connection between the AOE and the AOG is abnormal when the terminal boot event or the AOE restart event is detected.
- An embodiment of the present invention provides an AOG for maintaining a long connection in a mobile internet always-on system, including: an AOG connection abnormality logic processing module, configured to determine whether a connection between the AOG and the AOE is based on a transmission condition of a normal message Abnormally, if the AOG detects that the connection between the AOG and the AOE does not exist when the AOG sends a normal message or the AOG sends a normal message to the AOE multiple times but does not receive the response of the AOE, it determines the AOG and The connection between the AOEs is abnormal; the sending module is configured to send a wake-up short message to the AOE when the AOG connection abnormality logic processing module detects the connection abnormality, and notify the AOE to re-establish a connection with the AOG.
- an AOG connection abnormality logic processing module configured to determine whether a connection between the AOG and the AOE is based on a transmission condition of a normal message Abnormally, if the AOG detects that the connection between
- FIG. 3 is a schematic structural diagram of a system for maintaining a long connection in a mobile Internet always-on system AOS according to an embodiment of the present invention.
- the system shown includes a terminal and an AOG platform, in which the terminal runs AOE and more
- the application client, the connection terminal and the AOG platform are mobile Internet, which includes an AOI DNS (Domain Name System).
- the AOG is connected to multiple application services in addition to the terminal.
- AOE configured to determine whether the connection between the terminal and the always-on gateway AOG is abnormal according to the detection result of the terminal signal or the sending condition of the ordinary message, and if abnormal, re-establish the connection between the AOE and the AOG;
- AOG configured to determine whether the connection between the AOG and the AOE is abnormal according to the sending condition of the normal message, and if the AOG sends a normal message to the AOE, detecting that the connection between the AOG and the AOE does not exist or the AOG to the AOE If the normal message is sent multiple times but the response of the AOE is not received, then the connection between the AOG and the AOE is determined to be abnormal and a wake-up message is sent to the AOE, informing the AOE to re-establish the connection with the AOG.
- the AOG includes an AOG connection exception logic processing module and a sending module.
- the AOG connection abnormal logic processing module judges whether the current connection is abnormal by the normal message delivery condition, and in an abnormal situation, the sending module prompts the terminal to newly establish a connection to the AOG platform by sending a wake-up message to the terminal.
- the implementation logic is as follows: The AOG platform sends a normal message to the terminal, and the AOG platform judges and processes according to the following conditions: If the connection directly returns an error indicating that the connection is abnormal, the sending module initiates a wake-up message to the terminal AOE; if a message is sent after a certain time No response is received, indicating that the connection may be abnormal.
- connection In order to further clarify whether the connection is abnormal, it is necessary to retry and judge according to a certain policy, that is, the message packet is sent at a certain interval. If there is no response message for n consecutive times, it is considered that the connection is not normal at this time, the AOG platform A wake-up message is sent to the terminal AOE to let the AOE re-initiate the connection to the platform.
- the terminal includes ⁇ , ⁇ is configured to determine whether the connection between the terminal and the always-on gateway AOG is abnormal according to the detection result of the terminal signal or the sending condition of the ordinary message; if abnormal, re-establish the connection between the terminal and the AOG .
- the ⁇ connection abnormality determining module is configured to determine whether the connection between the ⁇ and the AOG is abnormal according to the detection result of the current signal of the terminal or the sending condition of the common message; and the reconnecting module is configured to determine that the connection is abnormal in the ⁇ connection abnormality determining module Re-establish the connection with the AOG. From the perspective of practical application, when the reconnection module initiates a new connection, it should judge the terminal signal, and only initiate a new connection if the terminal signal meets the requirements, otherwise wait for a period of time before reconnecting.
- the ⁇ connection abnormality determining module includes a signal detecting unit and a normal message detecting unit.
- the signal detecting unit is configured to detect the terminal signal and determine whether the connection between the AOE and the AOG is abnormal according to the detection result.
- the signal detecting unit includes a current signal detecting unit and an event detecting unit.
- the current signal detecting unit is configured to determine that the connection between the AOE and the AOG is abnormal when detecting that the terminal is from the no signal state to the signal state; the event detecting unit is configured to determine AOE and AOG when the terminal power on event or the AOE restart event is detected The connection between the two is abnormal.
- the normal message detecting unit is configured to determine whether the connection between the AOE and the AOG is abnormal according to the sending condition of the normal message, and if the AOE sends a normal message to the AOG, detecting that the connection between the AOE and the AOG does not exist or If the AOE sends a normal message to the AOG multiple times but does not receive the response of the AOG, it determines that the connection between the AOE and the AOG is abnormal. Specifically: After the AOE sends a normal message to the AOG, if it returns a direct error, indicating that the connection is definitely abnormal, the notification sending module directly reconnects; if the ordinary message is sent after a certain time, the connection may exist. abnormal.
- the message packet is sent at a certain interval. If there is no response message for n consecutive times, it is considered that the connection is not normal at this time, and the original is closed. Connect, notify the sending module to re-establish the connection.
- the normal message detecting unit is further configured to process the wake-up message sent by the AOG platform. If the AOE receives the wake-up message of the AOG, it processes according to different situations: if the current AOE does not establish a connection with the platform, the reconnect module is notified to newly initiate the connection; if the connection between the AOE and the platform exists, it indicates that it is possible to wake up.
- the embodiment of the present invention implements the abnormality judgment and reconnection processing of the connection by using terminal signal detection and exception processing for ordinary message transmission, thereby realizing the terminal and the platform without increasing the network burden. Maintain long connections and provide connectivity guarantees for long online services.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种AOS中保持长连接的方法、系统、AOE、AOG及终端,涉及移动互联网业务领域,所述方法包括:根据终端信号的检测结果或者普通消息的发送情况判断所述终端和永远在线网关AOG的连接是否异常;如果异常,则重新建立所述终端与所述AOG之间的连接。本发明通过采用终端信号检测和对普通消息发送的异常处理,来实现对连接的异常判断和重连处理,从而实现在不增加网络负担的情况下,让终端和平台保持长连接,为长在线业务提供连接保证。
Description
一种 AOS中保持长连接的方法、 系统、 AOE、 AOG及终端 技术领域 本发明涉及移动互联网业务领域, 特别涉及一种 AOS (Always Online System, 永 远在线系统) 中保持长连接的方法、 系统、 A0E、 AOG及终端。 背景技术
AOI(Always Online Infrastructure, 永远在线基础系统)是当前移动互联网中发展很 快的一个领域, 也是一个热门的研究领域。 在永远在线系统中, 包括 AOG (Always Online Gateway, 永远在线网关) 禾 P AOE (Always Online Engine, 永远在线引擎)。
A0G是一个运行在移动互联网络上的永远在线平台。 A0G对外提供两部分的接 入, 一边接入智能终端、 另一边接入应用服务, 并且提供对这两部分接入实体之间消 息的转发与控制。
A0E是一个运行在在智能手机终端上的通用软件模块,该模块作为程序安装在手 机终端上, 并在每次手机启动时自动后台运行该程序, 主要提供对终端上应用的控制、 管理、 消息转发等功能。 A0I系统称为永远在线系统, 也就是说, 终端一开机, A0E就会建立一条连接到
A0G平台, 该连接将一直保持, 这样相当于终端和平台通过该连接保持在线。 由于终 端一直在线, 应用或平台只要有下发消息的需求, 就可以随时随地通过长连接把消息 下发到终端上。 但在实际应用的情况下, 却存在很多异常的情况。 即使终端一开机就和 A0G平 台建立了连接, 但很多情况下都会导致该连接异常或断开, 例如无线信号不好, 用户 进入电梯或地下室等无服务区, 用户长时间进行通话等, 这些都会造成长连接的异常 或断开。 如果连接断开又不能及时恢复, 这种情况下终端就不是长在线了, 平台对急 迫性很高的消息也无法及时下发到终端上。 当前对这种连接异常的检测方法都是通过连接中的心跳消息检测。 通过发送心跳 消息以及检测心跳消息的回应, 通过一定策略来判断这种连接是否正常。 但是, 如果 心跳检测消息间隔过长, 则不能及时判断出连接异常; 而心跳检测消息间隔过短, 则 会对网络, 特别是无线侧, 造成很大的网络冲击。
发明内容 本发明的某些实施例提供了一种移动互联网永远在线系统中保持长连接的实现方 法、 系统、 AOE、 AOG及终端, 能更好地实现永远在线系统中长连接的连接维持和重 连。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的实现方 法, 包括: 根据终端信号的检测结果或者普通消息的发送情况判断所述终端和永远在线网关 AOG的连接是否异常; 如果异常, 则重新建立所述终端与所述 AOG之间的连接。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的 AOE, 包括:
AOE连接异常判断模块,设置为根据所述终端当前信号的检测结果或普通消息的 发送情况判断 AOE和 AOG的连接是否异常; 重连模块, 设置为在所述 AOE 连接异常判断模块判定连接异常时重新建立与 AOG之间的连接。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的终端, 包括: 以上的 AOE。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的 AOG, 包括: AOG连接异常逻辑处理模块, 设置为根据普通消息的发送情况判断所述 AOG和
AOE之间的连接是否异常, 如果 AOG向 AOE发送普通消息时检测到所述 AOG与所 述 AOE之间的连接不存在或者 AOG向 AOE多次发送普通消息但没有收到所述 AOE 的响应, 则判定所述 AOG和所述 AOE之间的连接异常; 发送模块, 设置为在所述 AOG连接异常逻辑处理模块检测到所述连接异常时向 AOE发送唤醒短信, 通知 AOE重新建立与所述 AOG之间的连接。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的系统, 包括:
AOE, 设置为根据终端信号的检测结果或者普通消息的发送情况判断所述终端和 永远在线网关 AOG的连接是否异常, 如果异常, 则重新建立所述 AOE与所述 AOG 之间的连接;
AOG,设置为根据普通消息的发送情况判断所述 AOG和 AOE之间的连接是否异 常,如果 AOG向 AOE发送普通消息时检测到所述 AOG与所述 AOE之间的连接不存 在或者 AOG向 AOE多次发送普通消息但没有收到所述 AOE的响应,则判定所述 AOG 和所述 AOE之间的连接异常并向 AOE发送唤醒短信,通知 AOE重新建立与所述 AOG 之间的连接。 综上所述, 本发明实施例提供了在永远在线系统中, 在不通过频繁的心跳消息来 检测链路情况下, 对终端和永远在线平台之间的长连接进行维持、 检测和尽快重连的 实现方法、 系统、 AOE、 AOG及终端, 与现有技术相比较, 本发明实施例的有益效果 在于以下的至少之一: 一、 从终端和平台两侧及时发现连接异常, 并由终端尽快发起 连接, 保持终端和平台之间的长在线; 二、 不需要频繁的心跳包检测, 不占用过多的 网络资源; 三、 根据终端的信号情况来决定是否重连, 不做不必要的尝试。 附图说明 图 1是本发明实施例提供的 AOG向 AOE发送唤醒短信的流程图; 图 2是本发明实施例提供的一种终端连接检测和重连处理方法的流程图; 图 3是本发明实施例提供的一种移动互联网永远在线系统 AOS中保持长连接的系 统结构示意图。 具体实施方式 以下结合附图对本发明的优选实施例进行详细说明, 应当理解, 以下所说明的优 选实施例仅用于说明和解释本发明, 并不用于限定本发明。 图 1是本发明实施例提供的 AOG向 AOE发送唤醒短信的流程图, 如图 1所示, 所述方法包括: 步骤 S101, AOG向终端发送普通消息。 在一个优选的实施方式中, AOG可向终端发送普通消息 A, 并对消息 A进行缓 存。 这里的普通消息可以是用户使用移动互联网业务中的业务数据消息, 例如用户通
过手机上 QQ聊天, 那么这些聊天的内容就会构成一个个数据包消息, 这就是普通消 息。 步骤 S 102, 判断普通消息的响应。 在一个优选的实施方式中, AOG向终端发送普通消息 A后, 如果该消息的响应 是连接错误, 说明连接已断, 删除缓存的原消息 A, 执行步骤 S107; 如果响应是普通 消息的正常响应, 则删除缓存的原消息 A, 执行步骤 S103 ; 如果没有响应, 则执行步 骤 S104。 步骤 S103, 执行正常流程。 按正常流程处理。 此处是现有技术, 不再赘述。 步骤 S104, 设置定时器。 步骤 S105, 定时器到时。 步骤 S106, 判断发送消息的次数。 在一个优选的实施方式中, 到达定时器设定的时间后, AOG判断发送 A消息的 次数,如果小于 n次,则重新发送 A消息,并累加发送 A消息的次数,执行步骤 S101 , 否则, 若重发了 n次但仍然没有消息 A的响应消息返回, 则确定该连接异常, 执行步 骤 S107。 步骤 S107, 向终端发送唤醒短信。 在一个优选的实施方式中, AOG断开连接, 发送唤醒短信给终端, 并记录连接状 态。 后续发送给终端的其他普通消息, 即使没有响应或者响应是连接错误, AOG也不 再发送唤醒短信给终端, 直到新连接重新建立。 步骤 S108, 终端接收到唤醒短信后, 重新建立与 AOG的连接。 在一个优选的实施方式中, 终端接收到唤醒消息后, 判断终端和 AOG是否已存 在连接; 如果不存在连接, 则终端建立与 AOG的连接; 如果已存在连接, 则终端向 AOG发送连接检测消息, 如果连接检测消息没有响应, 则终端关闭已存在的连接, 重 新建立与 AOG的连接。
在整个流程中, 需要注意的一点是, 在消息 A从发送到判断连接异常的期间, 可 能还发送了其他消息, 如消息 B, 消息 C, 不管这些消息的响应消息是否返回, 只要 消息 A的响应消息 n次没返回, 即认为连接异常。 图 2是本发明实施例提供的一种终端连接检测和重连处理方法, 如图 2所示, 所 述方法具体为: 步骤 S201 , 根据终端信号的检测结果或者普通消息的发送情况检测到连接异常。 具体地,终端根据终端信号的检测结果或者普通消息的发送情况判断终端和 AOG 的连接是否异常。 其中, 终端根据终端信号的检测结果判断连接是否异常具体为: 如果终端的 AOE 检测到终端从无信号状态到有信号状态或检测到终端开机或检测到 AOE重启,则判定 连接异常。 检测信号从无到有是终端操作系统支持的一个功能, 操作系统在检测到信 号从无到有后, 将通过事件的方式上报给上层应用程序, 如 AOE, 从而使 AOE知道 信号已经从无到有。 其中, 终端根据普通消息的发送情况判断连接是否异常具体为以下至少之一: 如 果 AOE向 AOG发送普通消息时检测到所述 AOE与所述 AOG之间的连接不存在即该 普通消息的响应是连接错误, 则判定连接异常; 如果所述 AOE向所述 AOG多次发送 普通消息但没有收到所述 AOG的响应, 则判定连接异常; 另外, 如果 AOG向 AOE 发送普通消息时检测到所述 AOG与所述 AOE之间的连接不存在或者所述 AOG向所 述 AOE多次发送普通消息但没有收到所述 AOE的响应,所述 AOG向所述 AOE发送 唤醒短信, 所述 AOE接收到所述唤醒短信, 则判定所述连接异常, 也就是说, 终端在 接收到图 1所示的 AOG向 AOE发送的唤醒短信时, 也判定连接异常。 终端如果检测到 AOE和 AOG之间的连接异常, 则执行步骤 S202。 步骤 S202, AOE在重连时对终端信号强弱进行判断。 具体地, 终端检测到连接异常后, 首先对终端信号的强弱进行判断, 如果终端的 信号不足以进行重连, 则执行步骤 S203 , 否则执行步骤 S204。 步骤 203,放弃本次连接请求。 步骤 S204, AOE向平台发起连接请求。
AOE向 AOG平台发起连接请求, 如果连接建立成功, 则结束本次重连, 否则以 一定时间为重连周期尝试重新连接, 一旦连接成功, 则此次重连周期结束。 如果重连 周期内感知到终端信号从无到有, 则触发新的重连周期。 如果超过重连周期, 则等待 新的上行普通消息触发重连。如果重连周期内有其他上行普通消息, 不触发新的重连。 重连周期内收到唤醒短信, 不进行重连。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的 AOE, 包括: AOE连接异常判断模块, 设置为根据所述终端当前信号的检测结果或普通消息 的发送情况判断 AOE和 AOG的连接是否异常; 重连模块, 设置为在所述 AOE连接 异常判断模块判定连接异常时重新建立与 AOG之间的连接。 在一个优选的实施方式中, 所述 AOE连接异常判断模块包括: 信号检测单元, 设 置为检测终端信号并根据检测结果判断 AOE和 AOG之间的连接是否异常; 普通消息 检测单元, 设置为根据普通消息的发送情况判断所述 AOE和 AOG之间的连接是否异 常,如果 AOE向 AOG发送普通消息时检测到所述 AOE与所述 AOG之间的连接不存 在或者 AOE向所述 AOG多次发送普通消息但没有收到所述 AOG的响应,则判定 AOE 和 AOG之间的连接异常。 在一个优选的实施方式中, 所述信号检测单元包括: 当前信号检测单元, 设置为 在检测到终端从无信号状态到有信号状态时判定 AOE和 AOG之间的连接异常; 事件 检测单元, 设置为在检测到终端开机事件或 AOE重启事件时判定 AOE和 AOG之间 的连接异常。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的终端, 包括以上的 AOE。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的 AOG, 包括: AOG连接异常逻辑处理模块, 设置为根据普通消息的发送情况判断所述 AOG 和 AOE之间的连接是否异常,如果 AOG向 AOE发送普通消息时检测到所述 AOG与 所述 AOE之间的连接不存在或者 AOG 向 AOE多次发送普通消息但没有收到所述 AOE的响应, 则判定所述 AOG和所述 AOE之间的连接异常; 发送模块, 设置为在所 述 AOG连接异常逻辑处理模块检测到所述连接异常时向 AOE发送唤醒短信, 通知 AOE重新建立与所述 AOG之间的连接。 本发明的一个实施例提供了一种移动互联网永远在线系统中保持长连接的系统, 图 3是本发明实施例提供的一种移动互联网永远在线系统 AOS中保持长连接的系统结 构示意图, 如图 3所示, 所示系统包括终端和 AOG平台, 其中终端上运行 AOE及多
个应用客户端,连接终端和 AOG平台是移动互联网,其包括 AOI DNS (Domain Name System, 域名系统), AOG除了与终端相连外, 还与多个应用服务相连。
AOE, 设置为根据终端信号的检测结果或者普通消息的发送情况判断所述终端和 永远在线网关 AOG的连接是否异常, 如果异常, 则重新建立所述 AOE与所述 AOG 之间的连接;
AOG,设置为根据普通消息的发送情况判断所述 AOG和 AOE之间的连接是否异 常,如果 AOG向 AOE发送普通消息时检测到所述 AOG与所述 AOE之间的连接不存 在或者 AOG向 AOE多次发送普通消息但没有收到所述 AOE的响应,则判定所述 AOG 和所述 AOE之间的连接异常并向 AOE发送唤醒短信,通知 AOE重新建立与所述 AOG 之间的连接。
AOG包括 AOG连接异常逻辑处理模块和发送模块。 AOG连接异常逻辑处理模块 通过普通消息的下发情况来判断当前连接是否异常, 并在异常情况下, 发送模块通过 向终端发送唤醒短信的方式促使终端尽快新建立连接到 AOG平台。 其实现逻辑为: AOG平台向终端下发普通消息, AOG平台根据以下情况进行判断和处理: 如果连接 直接返回错误, 表明连接异常, 发送模块向终端 AOE发起唤醒短信; 如果下发消息后 一定时间得不到响应,此时表明连接可能存在异常。为了进一步的明确连接是否异常, 需要按照一定的策略进行重试和判断, 即对该消息报文, 以一定间隔发送, 如果连续 n次都没有响应消息, 则认为此时连接不正常, AOG平台向终端 AOE发起唤醒短信, 让 AOE向平台重新发起连接。 终端包括 ΑΟΕ,ΑΟΕ设置为根据终端信号的检测结果或者普通消息的发送情况判 断所述终端和永远在线网关 AOG的连接是否异常; 如果异常, 则重新建立所述终端 与所述 AOG之间的连接。
ΑΟΕ包括 ΑΟΕ连接异常判断模块和重连模块。 其中, ΑΟΕ连接异常判断模块设 置为根据所述终端当前信号的检测结果或普通消息的发送情况判断 ΑΟΕ和 AOG的连 接是否异常;重连模块,设置为在所述 ΑΟΕ连接异常判断模块判定连接异常时重新建 立与 AOG之间的连接。 从实际应用的角度看, 重连模块在新发起连接时, 应当对终 端信号进行判断, 只有在终端信号满足要求的情况下, 才发起新的连接, 否则等待一 段时间后再进行重连。
ΑΟΕ连接异常判断模块包括信号检测单元和普通消息检测单元。
信号检测单元, 设置为检测终端信号并根据检测结果判断 AOE和 AOG之间的连 接是否异常。 信号检测单元包括当前信号检测单元和事件检测单元。 当前信号检测单 元设置为在检测到终端从无信号状态到有信号状态时判定 AOE和 AOG之间的连接异 常;事件检测单元,设置为在检测到终端开机事件或 AOE重启事件时判定 AOE和 AOG 之间的连接异常。 普通消息检测单元, 设置为根据普通消息的发送情况判断所述 AOE和 AOG之间 的连接是否异常,如果 AOE向 AOG发送普通消息时检测到所述 AOE与所述 AOG之 间的连接不存在或者 AOE向所述 AOG多次发送普通消息但没有收到所述 AOG的响 应, 则判定 AOE和 AOG之间的连接异常。具体地说: AOE向 AOG发送普通消息后, 如果是直接返回错误, 表明连接肯定异常, 则通知发送模块直接进行重连; 如果发送 普通消息后一定时间得不到响应, 此时表明连接可能存在异常。 为了进一步的明确连 接是否异常, 需要按照一定的策略进行重试和判断, 即对该消息报文, 以一定间隔发 送, 如果连续 n次都没有响应消息, 则认为此时连接不正常, 关闭原连接, 通知发送 模块重新建立连接。 普通消息检测单元还设置为处理 AOG平台发送过来的唤醒短信。如果 AOE接收 到 AOG的唤醒短信后, 则根据不同情况进行处理: 如果目前 AOE没有和平台建立连 接, 则通知重连模块新发起连接; 如果 AOE与平台的连接存在, 此时表明有可能在唤 醒短信的下发过程中, 新的连接已经建立起来; 或者是连接虽然存在, 但是异常的。 因此, AOE将发送一个连接检测消息, 若未在超时时间内收到检测包回应, 则关闭原 连接, 通知重连模块重新建立连接; 如果收到检测包回应, 表明当前连接正常, 则不 需要重新连接。 综上所述, 本发明实施例通过采用终端信号检测和对普通消息发送的异常处理, 来实现对连接的异常判断和重连处理, 从而实现在不增加网络负担的情况下, 让终端 和平台保持长连接, 为长在线业务提供连接保证。 尽管上文对本发明实施例进行了详细说明, 但是本发明不限于此, 本技术领域技 术人员可以根据本发明的原理进行各种修改。 因此, 凡按照本发明原理所作的修改, 都应当理解为落入本发明的保护范围。
Claims
权 利 要 求 书 、 一种移动互联网永远在线系统 AOS中保持长连接的实现方法, 包括: 根据终端信号的检测结果或者普通消息的发送情况判断所述终端和永远在 线网关 AOG的连接是否异常;
如果异常, 则重新建立所述终端与所述 AOG之间的连接。 、 根据权利要求 1所述的方法, 其中, 根据终端信号的检测结果判断连接是否异 常的步骤包括:
如果终端的永远在线引擎 AOE检测到终端从无信号状态到有信号状态或 检测到终端开机或检测到 AOE重启, 则判定所述连接异常。 、 根据权利要求 1所述的方法, 其中, 根据普通消息的发送情况判断连接是否异 常的步骤包括:
如果 AOE向 AOG发送普通消息时检测到所述 AOE与所述 AOG之间的连 接不存在或者所述 AOE向所述 AOG多次发送普通消息但没有收到所述 AOG 的响应, 则判定所述连接异常; 或者,
如果 AOG向 AOE发送普通消息时检测到所述 AOG与所述 AOE之间的连 接不存在或者所述 AOG向所述 AOE多次发送普通消息但没有收到所述 AOE 的响应, 所述 AOG向所述 AOE发送唤醒短信, 所述 AOE接收到所述唤醒短 信, 则判定所述连接异常。 、 根据权利要求 1至 3任一项所述的方法, 其中, 重新建立所述终端与所述 AOG 之间的连接的步骤包括:
所述终端对终端信号强弱进行判断, 如果信号足以进行终端与 AOG之间 的连接, 则所述终端向所述 AOG发起连接请求, 否则放弃本次连接请求。 、 一种移动互联网永远在线系统 AOS中保持长连接的 AOE, 包括:
AOE连接异常判断模块,设置为根据所述终端当前信号的检测结果或普通 消息的发送情况判断 AOE和 AOG的连接是否异常;
重连模块, 设置为在所述 AOE连接异常判断模块判定连接异常时重新建 立与 AOG之间的连接。
、 根据权利要求 5所述的 AOE, 其中, 所述 AOE连接异常判断模块包括: 信号检测单元, 设置为检测终端信号并根据检测结果判断 AOE和 AOG之 间的连接是否异常;
普通消息检测单元, 设置为根据普通消息的发送情况判断所述 AOE 和 AOG之间的连接是否异常,如果 AOE向 AOG发送普通消息时检测到所述 AOE 与所述 AOG之间的连接不存在或者 AOE向所述 AOG多次发送普通消息但没 有收到所述 AOG的响应, 则判定 AOE和 AOG之间的连接异常。 、 根据权利要求 6所述的 AOE, 其中, 所述信号检测单元包括:
当前信号检测单元, 设置为在检测到终端从无信号状态到有信号状态时判 定 AOE和 AOG之间的连接异常;
事件检测单元,设置为在检测到终端开机事件或 AOE重启事件时判定 AOE 和 AOG之间的连接异常。 、 一种移动互联网永远在线系统 AOS中保持长连接的终端,包括权利要求 5至 7 任一项所述的 AOE。
、 一种移动互联网永远在线系统 AOS中保持长连接的 AOG, 包括:
AOG连接异常逻辑处理模块, 设置为根据普通消息的发送情况判断所述 AOG禾 P AOE之间的连接是否异常, 如果 AOG向 AOE发送普通消息时检测到 所述 AOG与所述 AOE之间的连接不存在或者 AOG向 AOE多次发送普通消息 但没有收到所述 AOE的响应,则判定所述 AOG和所述 AOE之间的连接异常; 发送模块, 设置为在所述 AOG连接异常逻辑处理模块检测到所述连接异 常时向 AOE发送唤醒短信, 通知 AOE重新建立与所述 AOG之间的连接。 0、 一种移动互联网永远在线系统 AOS中保持长连接的系统, 包括:
AOE, 设置为根据终端信号的检测结果或者普通消息的发送情况判断所述 终端和永远在线网关 AOG的连接是否异常, 如果异常, 则重新建立所述 AOE 与所述 AOG之间的连接;
AOG,设置为根据普通消息的发送情况判断所述 AOG和 AOE之间的连接 是否异常,如果 AOG向 AOE发送普通消息时检测到所述 AOG与所述 AOE之 间的连接不存在或者 AOG向 AOE多次发送普通消息但没有收到所述 AOE的
响应,则判定所述 AOG和所述 AOE之间的连接异常并向 AOE发送唤醒短信, 通知 AOE重新建立与所述 AOG之间的连接。 根据权利要求 10所述的系统, 其中, 所述 AOE包括:
AOE连接异常判断模块,设置为根据所述终端当前信号的检测结果或普通 消息的发送情况判断 AOE和 AOG的连接是否异常,在 AOE向 AOG发送普通 消息时检测到所述 AOE与所述 AOG之间的连接不存在或者 AOE向所述 AOG 多次发送普通消息但没有收到所述 AOG的响应时, 则判定所述连接异常, 在 检测到终端开机事件或 AOE重启事件时则判定所述连接异常, 在检测到终端 从无信号状态到有信号状态时则判定所述连接异常;
重连模块, 设置为在所述 AOE连接异常判断模块判定所述连接异常时重 新建立与 AOG之间的连接。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110396092.6 | 2011-12-02 | ||
CN2011103960926A CN103139818A (zh) | 2011-12-02 | 2011-12-02 | 一种aos中保持长连接的方法、系统、aoe、aog及终端 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013078869A1 true WO2013078869A1 (zh) | 2013-06-06 |
Family
ID=48499003
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/078890 WO2013078869A1 (zh) | 2011-12-02 | 2012-07-19 | 一种aos中保持长连接的方法、系统、aoe、aog及终端 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103139818A (zh) |
WO (1) | WO2013078869A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115190052A (zh) * | 2022-07-12 | 2022-10-14 | 中国工商银行股份有限公司 | 一种长连接的管理方法、系统和控制单元 |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103354649B (zh) * | 2013-06-28 | 2016-12-07 | 北京创毅讯联科技股份有限公司 | 通信终端的监测方法及装置 |
CN104253739B (zh) * | 2013-06-28 | 2018-08-10 | 中国移动通信集团公司 | 一种永远在线业务的实现方法、系统和设备 |
CN103634409B (zh) * | 2013-12-12 | 2017-08-04 | 中国联合网络通信集团有限公司 | 实现移动互联网应用永远在线的方法及系统 |
CN105677451A (zh) * | 2014-11-18 | 2016-06-15 | 北京风行在线技术有限公司 | 一种用于多进程的负载均衡的方法和设备 |
CN106341301A (zh) * | 2015-07-08 | 2017-01-18 | 中兴通讯股份有限公司 | 消息推送方法及装置 |
CN106680663B (zh) * | 2016-11-18 | 2020-05-08 | 云南电网有限责任公司电力科学研究院 | 一种多分支配电网络变压器在线检测方法与系统 |
CN107508916B (zh) * | 2017-09-27 | 2021-02-26 | 苏州狗尾草智能科技有限公司 | 用于智能机器人的服务器链接管理方法 |
CN108616429B (zh) * | 2018-05-14 | 2019-12-13 | 平安科技(深圳)有限公司 | 一种推送服务的重连方法及设备 |
CN109413612A (zh) * | 2018-10-22 | 2019-03-01 | 深圳市元征科技股份有限公司 | 一种通讯连接建立方法及设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101013972A (zh) * | 2007-01-24 | 2007-08-08 | 中兴通讯股份有限公司 | 一种基于无线modem的移动数据网络接入方法 |
CN101622853A (zh) * | 2007-03-01 | 2010-01-06 | 朗讯科技公司 | 用于基于供应商在线信息对客户请求进行响应的基于网络的方法和系统 |
CN101686081A (zh) * | 2008-09-24 | 2010-03-31 | 中国移动通信集团公司 | 一种重新建立同步连接的方法、装置及系统 |
US20100260107A1 (en) * | 2009-04-08 | 2010-10-14 | Qualcomm Incorporated | Reducing time for call failure indication |
-
2011
- 2011-12-02 CN CN2011103960926A patent/CN103139818A/zh active Pending
-
2012
- 2012-07-19 WO PCT/CN2012/078890 patent/WO2013078869A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101013972A (zh) * | 2007-01-24 | 2007-08-08 | 中兴通讯股份有限公司 | 一种基于无线modem的移动数据网络接入方法 |
CN101622853A (zh) * | 2007-03-01 | 2010-01-06 | 朗讯科技公司 | 用于基于供应商在线信息对客户请求进行响应的基于网络的方法和系统 |
CN101686081A (zh) * | 2008-09-24 | 2010-03-31 | 中国移动通信集团公司 | 一种重新建立同步连接的方法、装置及系统 |
US20100260107A1 (en) * | 2009-04-08 | 2010-10-14 | Qualcomm Incorporated | Reducing time for call failure indication |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115190052A (zh) * | 2022-07-12 | 2022-10-14 | 中国工商银行股份有限公司 | 一种长连接的管理方法、系统和控制单元 |
CN115190052B (zh) * | 2022-07-12 | 2024-02-02 | 中国工商银行股份有限公司 | 一种长连接的管理方法、系统和控制单元 |
Also Published As
Publication number | Publication date |
---|---|
CN103139818A (zh) | 2013-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013078869A1 (zh) | 一种aos中保持长连接的方法、系统、aoe、aog及终端 | |
JP5869705B2 (ja) | 同期外れ特定のための方法 | |
US8446816B2 (en) | Control method for access gateway and communication system | |
CN103458436B (zh) | Ac与ap之间链路保活的检测方法及装置 | |
WO2013097452A1 (zh) | 接收数据的方法、发送数据的方法、移动终端和服务器 | |
JP4923155B2 (ja) | コンテンツの送受信の停止及び再開方法 | |
US20150071143A1 (en) | Method and apparatus for managing pdn connection | |
WO2011003292A1 (zh) | 处理配置更新失败的方法、装置和系统 | |
KR20160060091A (ko) | 페이징 방법, 네트워크 디바이스 및 통신 시스템 | |
CN100579076C (zh) | 一种邻居关系建立方法和路由器 | |
US8965372B2 (en) | Method and system to handle a signaling connection release process in a wireless communication system | |
CN102130818A (zh) | 一种接入网络接入服务器的方法和网络接入服务器 | |
WO2012003672A1 (zh) | 一种实现短消息业务的方法、系统和装置 | |
US20180227332A1 (en) | A method and computer program products for probing the status of an ip-based communication connection in order to receive an incoming communication | |
JP5416310B2 (ja) | パケットデータネットワークリリース障害の処理方法、システム及び装置 | |
US20160366571A1 (en) | Connection-Oriented Messaging and Signaling in Mobile Heath Networks | |
WO2013064067A1 (zh) | 一种网络拥塞控制的方法和系统 | |
WO2018014152A1 (zh) | 核心网异常挂断的处理方法和终端 | |
JP5472154B2 (ja) | 通信端末、通信方法、及び通信プログラム | |
US20080225843A1 (en) | Release of resources in a communication system | |
WO2012051778A1 (zh) | 多媒体消息业务中实现网元业务切换的系统及方法 | |
WO2012027888A1 (zh) | 一种抑制信令风暴的方法和系统 | |
KR101407597B1 (ko) | 망 부하 감소를 위한 푸시 서비스 제공 시스템 및 방법 | |
KR101007408B1 (ko) | 데이터 공유 기반 데이터 전송 방법 및 시스템 | |
WO2009003402A1 (fr) | Procédé, dispositif et système permettant la synchronisation d'état de terminal dans un réseau d'accès mobile sans licence |
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: 12852891 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: 12852891 Country of ref document: EP Kind code of ref document: A1 |