CN102769603A - Method, system and device for data transmission - Google Patents
Method, system and device for data transmission Download PDFInfo
- Publication number
- CN102769603A CN102769603A CN2011101131919A CN201110113191A CN102769603A CN 102769603 A CN102769603 A CN 102769603A CN 2011101131919 A CN2011101131919 A CN 2011101131919A CN 201110113191 A CN201110113191 A CN 201110113191A CN 102769603 A CN102769603 A CN 102769603A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- distance
- gateway
- routing distance
- long connection
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract 34
- 230000005540 biological transmission Effects 0.000 title claims abstract 32
- 230000004083 survival effect Effects 0.000 claims abstract 23
- 238000011144 upstream manufacturing Methods 0.000 claims 4
- 235000008694 Humulus lupulus Nutrition 0.000 claims 2
- 238000001514 detection method Methods 0.000 claims 2
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域 technical field
本发明涉及通信领域,尤其涉及一种数据传输的方法、系统及设备。The present invention relates to the communication field, in particular to a data transmission method, system and equipment.
背景技术 Background technique
在目前的移动数据业务执行过程中,移动终端侧与应用服务器侧之间的数据交互有Pull方式和Push方式。In the current execution process of mobile data services, data interaction between the mobile terminal side and the application server side includes a Pull mode and a Push mode.
Pull方式是指:当安装在移动终端内的应用程序需要从相应的应用服务器中获取业务数据时,移动终端主动与服务器建立连接,对服务器进行数据访问,获取相应的业务数据。Pull方式是移动终端主动从服务器中获取数据的方式,只适用于对实时性要求较低的数据业务交互过程,这是因为,若服务器中有需要推送给移动终端的数据但移动终端没有及时与服务器连接,就会造成数据推送不及时的问题,若将Pull方式应用在实时性要求较高的数据业务交互过程,如邮件、即时通信等数据业务的交互,就会出现数据延迟。The Pull mode means that when an application program installed in a mobile terminal needs to obtain service data from a corresponding application server, the mobile terminal actively establishes a connection with the server, accesses the server for data, and obtains corresponding service data. The Pull method is a way for the mobile terminal to actively obtain data from the server. It is only applicable to the data service interaction process with low real-time requirements. This is because if the server has data that needs to be pushed to the mobile terminal The server connection will cause the problem of untimely data push. If the pull method is applied to the data service interaction process with high real-time requirements, such as the interaction of data services such as email and instant messaging, data delay will occur.
Push方式是指:由服务器主动将业务数据推送给移动终端的方式,由于Push方式可以实时向移动终端推送业务数据,因此,对于业务数据推送的实时性效果较好。Push方式的实现方案有多种,包括:短消息Push方式(SMS Push)、多媒体消息Push方式(MMS Push)、无线应用Push方式(WAP Push)、互联网Push方式(IP Push)和互联网短消息Push方式(EMN Push)。The Push method refers to a method in which the server actively pushes service data to the mobile terminal. Since the Push method can push service data to the mobile terminal in real time, it has a better real-time effect on service data push. There are many ways to implement Push, including: Short Message Push (SMS Push), Multimedia Message Push (MMS Push), Wireless Application Push (WAP Push), Internet Push (IP Push) and Internet Short Message Push Mode (EMN Push).
上述各Push方式的实现方案具体内容为:The specific content of the implementation scheme of the above Push methods is as follows:
SMS Push和MMS Push是指:服务器通过短消息或多媒体消息的方式向移动终端推送业务数据的Push方式,用户可以通过移动终端直接查看短消息或多媒体消息内的业务数据。SMS Push和MMS Push的方案中,服务器向移动终端推送的短消息或多媒体消息会受到网络质量高低的影响,在网络质量低时,短消息和多媒体消息的传输会出现时延,影响业务数据推送的实时性效果;且短消息和多媒体消息中携带的业务数据是明文形式,业务数据的安全性也存在隐患;另外,用户只能通过移动终端读取业务数据,而不能通过短消息回复等方式实现与服务器的信息交互,且只有软硬件能力支持多媒体消息的移动终端才能支持MMS Push,对移动终端的硬件能力要求较高,对移动终端有限制。SMS Push and MMS Push refer to the Push method in which the server pushes service data to the mobile terminal through a short message or multimedia message, and the user can directly view the service data in the short message or multimedia message through the mobile terminal. In the SMS Push and MMS Push solutions, the short message or multimedia message pushed by the server to the mobile terminal will be affected by the quality of the network. When the network quality is low, there will be a delay in the transmission of the short message and multimedia message, which will affect the service data push. and the business data carried in short messages and multimedia messages is in plain text, and there are hidden dangers in the security of business data; in addition, users can only read business data through mobile terminals, but cannot reply through short messages, etc. Realize information interaction with the server, and only mobile terminals with software and hardware capabilities that support multimedia messages can support MMS Push, which requires high hardware capabilities for mobile terminals and has restrictions on mobile terminals.
WAP Push是指:服务器向移动终端推送包含链接的信息,移动终端通过信息中的统一资源定位符(URL)访问并获取相应的业务数据。在WAP Push方案中,包含服务器向移动终端发送链接以及移动终端通过链接访问业务数据的两次操作(移动终端通过链接访问业务数据的操作实际上就是Pull操作),对业务数据推送的实时性有不良影响。WAP Push means: the server pushes information containing links to the mobile terminal, and the mobile terminal accesses and obtains corresponding service data through the Uniform Resource Locator (URL) in the information. In the WAP Push scheme, it includes two operations of the server sending the link to the mobile terminal and the mobile terminal accessing the service data through the link (the operation of the mobile terminal accessing the service data through the link is actually a Pull operation), which has an impact on the real-time nature of service data push. adverse effects.
EMN Push是指:当服务器需要向移动终端内处于休眠状态的邮件程序推送业务数据时,向移动终端发送专有的唤醒短消息,使邮件程序由休眠状态转换为启动状态,待邮件程序启动后,与邮件服务器建立长连接,获取业务数据。在EMN Push方案中,移动终端从邮件服务器中获取业务数据后并不断开长连接,而是由邮件服务器在一段时长内一直没有业务数据的传输时才断开,在邮件服务器等待的时长内,移动终端与邮件服务器之间并没有业务数据的传输,但移动终端与邮件服务器之间的长连接仍存在,导致移动终端的系统资源开销大。EMN Push means: when the server needs to push business data to the mail program in the dormant state in the mobile terminal, it sends a proprietary wake-up short message to the mobile terminal, so that the mail program is converted from the dormant state to the active state, and after the mail program is started , establish a long connection with the mail server to obtain business data. In the EMN Push solution, the mobile terminal does not disconnect the long-term connection after obtaining business data from the mail server, but the mail server only disconnects when there is no business data transmission for a period of time. During the waiting time of the mail server, There is no service data transmission between the mobile terminal and the mail server, but the long connection between the mobile terminal and the mail server still exists, resulting in a large system resource overhead of the mobile terminal.
IP Push是指:针对移动终端内的一个应用程序,为该应用程序提供业务数据的应用服务器与移动终端保持一个IP长连接,由于该长连接的存在,应用服务器可以实时向移动终端内的所述应用程序推送业务数据,克服了SMSPush、MMS Push和WAP Push的时延问题,以及SMS Push和MMS Push安全隐患、移动终端与服务器之间交互的问题。IP Push means: for an application program in the mobile terminal, the application server that provides business data for the application program maintains an IP persistent connection with the mobile terminal. The above-mentioned application program pushes business data, and overcomes the delay problem of SMSPush, MMS Push and WAP Push, as well as the security risks of SMS Push and MMS Push, and the problem of interaction between mobile terminals and servers.
但是,在IP Push方案中,若应用程序没有运行或应用程序不需要与应用服务器进行数据交互的情况下,移动终端与应用服务器之间的IP长连接仍持续存在,增加了移动终端的资源开销,导致移动终端耗电量大;为解决IP长连接带来的资源开销,对IP Push方案作了改动,要求IP长连接在应用程序运行时连接,在应用程序未运行时断开,这种改动又会使IP长连接频繁地连接、断开,仍会增大移动终端的系统资源开销。However, in the IP Push solution, if the application program is not running or the application program does not need to exchange data with the application server, the IP persistent connection between the mobile terminal and the application server still exists, which increases the resource overhead of the mobile terminal , leading to large power consumption of mobile terminals; in order to solve the resource overhead caused by IP persistent connections, the IP Push scheme has been changed, requiring IP persistent connections to be connected when the application is running and disconnected when the application is not running. The change will cause the IP persistent connection to be connected and disconnected frequently, which will still increase the system resource overhead of the mobile terminal.
同时,针对应用服务器而言,面向的移动终端数量很大,如果应用服务器分别与每个移动终端内对应的一个应用程序建立一条长连接,则应用服务器的资源开销也会非常大。At the same time, as far as the application server is concerned, there are a large number of mobile terminals. If the application server establishes a long connection with a corresponding application program in each mobile terminal, the resource overhead of the application server will also be very large.
上述对IP Push方案是针对移动终端内安装的一种应用程序而言的,目前的智能移动终端内大多安装了较多数量的应用程序,如果针对移动终端内的所有应用程序都执行IP Push方案,即一个移动终端内安装多个应用程序时,该移动终端需要与多个应用服务器分别建立长连接,则移动终端需要为这些长连接分配大量的系统资源,导致移动终端的系统开销过大,甚至影响移动终端的其他业务的正常运行。The above-mentioned IP Push solution is for an application program installed in the mobile terminal. Most of the current smart mobile terminals have a large number of application programs installed. If the IP Push solution is implemented for all the application programs in the mobile terminal , that is, when multiple applications are installed in a mobile terminal, the mobile terminal needs to establish persistent connections with multiple application servers, and the mobile terminal needs to allocate a large amount of system resources for these persistent connections, resulting in excessive system overhead of the mobile terminal. It even affects the normal operation of other services of the mobile terminal.
另外,如果移动终端与应用服务器之间的长连接要一直保持连接的状态,应用服务器需要向该长连接经过的核心网防火墙周期性地发送保活消息,用于通知防火墙该长连接一直有效,不得断开此长连接。In addition, if the persistent connection between the mobile terminal and the application server is to remain connected, the application server needs to periodically send a keep-alive message to the core network firewall through which the persistent connection passes, to notify the firewall that the persistent connection is always valid. This long connection must not be disconnected.
由于应用服务器发送心跳数据包的目的是对长连接的保活,维持长连接的服务状态,因此该心跳数据包的数据量比较小,但发送频率比较高。心跳数据包一般只有几十个字节,包括心跳数据包接收方的移动终端标识、与该应用服务器进行交互的移动终端内安装的应用程序标识和心跳序列号等内容。发送心跳数据包的频率根据业务的不同而有所不同,以即时通信业务为例,应用服务器向移动终端发送心跳数据包的频率可达30秒/个。Since the purpose of sending the heartbeat data packet by the application server is to keep the persistent connection alive and maintain the service state of the persistent connection, the data volume of the heartbeat data packet is relatively small, but the sending frequency is relatively high. The heartbeat data packet generally only has tens of bytes, including the mobile terminal identification of the recipient of the heartbeat data packet, the application program identification installed in the mobile terminal interacting with the application server, and the heartbeat serial number. The frequency of sending heartbeat data packets varies according to different services. Taking the instant messaging business as an example, the frequency of heartbeat data packets sent by the application server to the mobile terminal can reach 30 seconds per piece.
在心跳数据包从应用服务器到移动终端的传输过程中,需要经历internet网络、核心网以及无线通信网络,如图1所示。由于心跳数据包的数据量比较小,因此,即使数量较多的心跳数据包在internet网络和核心网中传输时,也不会对internet网络和核心网造成明显影响。但是,当心跳数据包在无线通信网络中传输时,需要为心跳数据包的传输分配信道,而信道的分配过程又需要使用大量的信令,因此,心跳数据包在无线通信网络中传输时,会占用大量的无线信道资源(使用的信令占用控制信道,传输心跳数据包占用业务信道),若心跳数据包频繁地在无线通信网络中传输,会增加网络负担,降低无线网络的性能;另外,即使给心跳数据包分配了传输信道,由于心跳数据包的数据量小,也无法充分利用信道资源,造成信道闲置,降低了无线信道的使用效率。During the transmission process of the heartbeat data packet from the application server to the mobile terminal, it needs to go through the internet network, the core network and the wireless communication network, as shown in FIG. 1 . Since the data volume of the heartbeat data packet is relatively small, even when a large number of heartbeat data packets are transmitted in the internet network and the core network, it will not cause obvious impact on the internet network and the core network. However, when the heartbeat data packet is transmitted in the wireless communication network, it is necessary to allocate a channel for the transmission of the heartbeat data packet, and the allocation process of the channel needs to use a large amount of signaling. Therefore, when the heartbeat data packet is transmitted in the wireless communication network, It will occupy a large amount of wireless channel resources (the used signaling occupies the control channel, and the transmission of heartbeat data packets occupies the business channel). If the heartbeat data packets are frequently transmitted in the wireless communication network, it will increase the network burden and reduce the performance of the wireless network; in addition , even if a transmission channel is assigned to the heartbeat data packet, the channel resources cannot be fully utilized due to the small amount of data in the heartbeat data packet, causing the channel to be idle and reducing the use efficiency of the wireless channel.
综上所述,在目前的心跳数据包的传输过程中,心跳数据包在无线通信网络中的传输还存在增加网络负担、无线信道使用效率低的问题。To sum up, in the current transmission process of the heartbeat data packet, the transmission of the heartbeat data packet in the wireless communication network still has the problems of increasing network burden and low efficiency of wireless channel usage.
发明内容 Contents of the invention
本发明实施例提供一种数据传输的方法、系统及设备,用以解决现有技术中存在的为保证移动终端和应用服务器之间数据传输实时性,导致移动终端或应用服务器的资源占用量过大的问题,以及心跳数据包在无线通信网络中的传输会增加网络负担、使无线信道使用效率低的问题。Embodiments of the present invention provide a method, system and device for data transmission, which are used to solve the problem existing in the prior art in order to ensure the real-time performance of data transmission between the mobile terminal and the application server, resulting in excessive resource occupation of the mobile terminal or application server. The big problem, and the transmission of heartbeat data packets in the wireless communication network will increase the network burden and make the use of wireless channels inefficient.
一种数据传输的方法,所述方法包括:A method for data transmission, the method comprising:
网关通过与移动终端之间建立的第一长连接接收来自移动终端的上行数据消息,所述上行数据消息中携带应用服务器的标识,所述第一长连接传输移动终端内任一应用程序生成的上行数据消息;The gateway receives the uplink data message from the mobile terminal through the first long connection established with the mobile terminal, the uplink data message carries the identification of the application server, and the first long connection transmits the message generated by any application program in the mobile terminal. Uplink data message;
网关在确定与所述应用服务器的标识对应的应用服务器之间建立了第二长连接时,通过所述第二长连接,将所述上行数据消息发送至所述应用服务器;When the gateway determines that a second long connection has been established between application servers corresponding to the identifiers of the application servers, send the uplink data message to the application server through the second long connection;
其中,针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。Wherein, for the first long connection, the set routing distance is used as the survival time of the heartbeat data packet, and the heartbeat data packet is sent to the mobile terminal, and the routing distance is greater than the distance that the heartbeat data packet passes through the core network firewall, but Less than the distance to the wireless communication network where the mobile terminal is located.
一种数据传输的方法,所述方法包括:A method for data transmission, the method comprising:
网关通过与应用服务器之间建立的第二长连接接收来自应用服务器的下行数据消息,所述下行数据消息中携带移动终端在应用服务器中注册时使用的第一标识,所述第二长连接传输应用服务器发送给任一终端的下行数据消息;The gateway receives the downlink data message from the application server through the second long connection established with the application server, the downlink data message carries the first identifier used when the mobile terminal registers in the application server, and the second long connection transmits The downlink data message sent by the application server to any terminal;
网关通过与所述第一标识对应的移动终端之间的第一长连接,将所述下行数据消息发送至所述移动终端;The gateway sends the downlink data message to the mobile terminal through the first long connection between the mobile terminal corresponding to the first identifier;
其中,针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。Wherein, for the first long connection, the set routing distance is used as the survival time of the heartbeat data packet, and the heartbeat data packet is sent to the mobile terminal, and the routing distance is greater than the distance that the heartbeat data packet passes through the core network firewall, but Less than the distance to the wireless communication network where the mobile terminal is located.
一种数据传输的系统,包括移动终端、网关、应用服务器和保活设备,其中:A data transmission system, including a mobile terminal, a gateway, an application server and a keep-alive device, wherein:
所述移动终端,用于与网关之间建立第一长连接,并通过所述第一长连接向网关发送上行数据消息,所述上行数据消息中携带应用服务器的标识,所述第一长连接传输移动终端内任一应用程序生成的上行数据消息;The mobile terminal is configured to establish a first long connection with the gateway, and send an uplink data message to the gateway through the first long connection, the uplink data message carries an application server identifier, and the first long connection Transmit uplink data messages generated by any application program in the mobile terminal;
所述网关,用于在确定与所述应用服务器的标识对应的应用服务器之间建立了第二长连接时,通过所述第二长连接,将所述上行数据消息发送至所述应用服务器;The gateway is configured to send the uplink data message to the application server through the second long connection when it is determined that a second long connection has been established between the application servers corresponding to the identifiers of the application servers;
所述应用服务器,用于通过所述第二长连接接收上行数据消息;The application server is configured to receive an uplink data message through the second persistent connection;
所述保活设备,用于针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。The keep-alive device is configured to use the set routing distance as the survival time of the heartbeat data packet for the first long connection, and send the heartbeat data packet to the mobile terminal, and the routing distance is greater than the heartbeat data packet passing through the core The distance to the network firewall, but less than the distance to the wireless communication network where the mobile terminal is located.
一种数据传输的系统,所述系统包括移动终端、网关、应用服务器和保活设备,其中:A data transmission system, the system includes a mobile terminal, a gateway, an application server and a keep-alive device, wherein:
应用服务器,用于与网关建立第二长连接,并通过所述第二长连接向网关发送下行数据消息,所述下行数据消息中携带移动终端在应用服务器中注册时使用的第一标识,所述第二长连接传输应用服务器发送给任一终端的下行数据消息;The application server is configured to establish a second long connection with the gateway, and send a downlink data message to the gateway through the second long connection, and the downlink data message carries the first identifier used when the mobile terminal registers in the application server, so The downlink data message sent by the second long connection transmission application server to any terminal;
网关,用于通过与所述第一标识对应的移动终端之间的第一长连接,将所述下行数据消息发送至所述移动终端;a gateway, configured to send the downlink data message to the mobile terminal through the first long connection between the mobile terminals corresponding to the first identifier;
移动终端,用于通过所述第一长连接接收下行数据消息;a mobile terminal, configured to receive a downlink data message through the first persistent connection;
所述保活设备,用于针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。The keep-alive device is configured to use the set routing distance as the survival time of the heartbeat data packet for the first long connection, and send the heartbeat data packet to the mobile terminal, and the routing distance is greater than the heartbeat data packet passing through the core The distance to the network firewall, but less than the distance to the wireless communication network where the mobile terminal is located.
一种网关,所述网关包括:A gateway, said gateway comprising:
第一连接模块,用于与移动终端之间建立第一长连接,与应用服务器之间建立第二长连接,所述第一长连接传输移动终端内任一应用程序生成的上行数据消息,所述第二长连接传输应用服务器发送给任一终端的下行数据消息;The first connection module is used to establish a first long connection with the mobile terminal, and a second long connection with the application server. The first long connection transmits an uplink data message generated by any application program in the mobile terminal. The downlink data message sent by the second long connection transmission application server to any terminal;
传输模块,用于在上行传输过程中,接收到移动终端通过第一长连接发送的上行数据消息时,根据该上行数据消息中携带的应用服务器的标识,将该上行数据消息通过第二长连接发送至对应的应用服务器,以及在下行传输过程中,接收到应用服务器通过第二长连接发送的下行数据消息时,根据该下行数据消息中携带的移动终端的第一标识,将该下行数据消息通过第一长连接发送至对应的移动终端。The transmission module is configured to transmit the uplink data message through the second long connection according to the identification of the application server carried in the uplink data message when receiving the uplink data message sent by the mobile terminal through the first long connection during the uplink transmission process sending to the corresponding application server, and during the downlink transmission process, when receiving the downlink data message sent by the application server through the second long connection, according to the first identification of the mobile terminal carried in the downlink data message, the downlink data message It is sent to the corresponding mobile terminal through the first persistent connection.
一种移动终端,所述移动终端包括:A mobile terminal, the mobile terminal comprising:
接口模块,用于与网关建立第一长连接,所述第一长连接传输移动终端内任一应用程序生成的上行数据消息;An interface module, configured to establish a first long connection with the gateway, and the first long connection transmits an uplink data message generated by any application program in the mobile terminal;
数据收发模块,用于通过第一长连接向网关发送上行数据消息,所述上行数据消息中携带应用服务器的标识,以及通过第一长连接接收网关推送的下行数据消息。The data transceiving module is configured to send an uplink data message to the gateway through the first long connection, the uplink data message carries the identification of the application server, and receive the downlink data message pushed by the gateway through the first long connection.
一种应用服务器,所述应用服务器包括:An application server, the application server includes:
接口模块,用于与网关建立第二长连接,所述第二长连接传输应用服务器发送给任一终端的下行数据消息;An interface module, configured to establish a second long connection with the gateway, and the second long connection transmits a downlink data message sent by the application server to any terminal;
数据收发模块,用于通过所述第二长连接接收网关发送的上行数据消息,以及通过所述第二长连接向网关发送下行数据消息,所述下行数据消息中携带移动终端在应用服务器中注册时使用的第一标识。A data transceiving module, configured to receive an uplink data message sent by the gateway through the second long connection, and send a downlink data message to the gateway through the second long connection, the downlink data message carrying the mobile terminal registered in the application server The first identifier used when .
一种保活设备,其特征在于,所述保活设备包括:A keep-alive device, characterized in that the keep-alive device comprises:
距离探测模块,用于将设定的路由距离作为心跳数据包的生存时间,所述路由距离大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离;The distance detection module is used to use the set routing distance as the survival time of the heartbeat packet, and the routing distance is greater than the distance that the heartbeat packet passes through the core network firewall, but less than the distance to the wireless communication network where the mobile terminal is located;
数据包发送模块,用于按照生存时间所述向移动终端发送该心跳数据包。The data packet sending module is configured to send the heartbeat data packet to the mobile terminal according to the time-to-live.
本发明有益效果如下:The beneficial effects of the present invention are as follows:
本发明实施例提出一种新的数据传输方案,采用永远在线机制(AlwaysOnline Infrastructure,AOI),在移动终端与应用服务器之间设置网关,移动终端与网关之间建立一条长连接,网关与各应用服务器之间分别建立一条长连接,在上行过程中,移动终端内的任一应用程序发出的上行数据消息都通过与网关之间的一条长连接进行上行传输,在下行过程中,应用服务器发送给任一移动终端的下行数据消息也通过与网关之间的一条长连接进行下行传输。因此,移动终端和应用服务器之间分别通过与网关的第一长连接和第二长连接实现数据交互的高实时性,同时移动终端只需要为与网关之间的一条长连接分配资源,应用服务器也只需要为与网关之间的一条长连接分配资源减少了对移动终端和应用服务器之间的资源占用。同时,针对第一长连接,将大于心跳数据包穿过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,一方面使心跳数据包能够穿过核心网防火墙,达到对第一长连接的保活目的,另一方面,心跳数据包并没有进入无线通信网络,不会增加无线通信网络的负担,也不会占用无线信道。The embodiment of the present invention proposes a new data transmission scheme, adopts an always-online mechanism (AlwaysOnline Infrastructure, AOI), sets a gateway between the mobile terminal and the application server, establishes a long connection between the mobile terminal and the gateway, and the gateway and each application A long connection is established between the servers. During the uplink process, any uplink data message sent by any application program in the mobile terminal is transmitted uplink through a long connection with the gateway. During the downlink process, the application server sends to The downlink data message of any mobile terminal is also downlinked through a long connection with the gateway. Therefore, the high real-time performance of data interaction is realized between the mobile terminal and the application server through the first long connection and the second long connection with the gateway respectively. At the same time, the mobile terminal only needs to allocate resources for a long connection with the gateway, and the application server It also only needs to allocate resources for a long connection with the gateway, which reduces resource occupation between the mobile terminal and the application server. Simultaneously, for the first long connection, the heartbeat data packet is sent to the mobile terminal as the survival time of the heartbeat data packet by being greater than the distance that the heartbeat data packet passes through the core network firewall, but less than the distance to the wireless communication network where the mobile terminal is located, On the one hand, the heartbeat data packet can pass through the core network firewall to achieve the purpose of keeping the first long connection alive; on the other hand, the heartbeat data packet does not enter the wireless communication network, which will not increase the burden on the wireless communication network, nor will it Occupy the wireless channel.
附图说明 Description of drawings
图1为背景技术中心跳数据包传输经过网络的示意图;FIG. 1 is a schematic diagram of heartbeat data packet transmission through the network in the background technology;
图2为本发明实施例一中进行上行数据传输的方法步骤示意图;FIG. 2 is a schematic diagram of steps of a method for uplink data transmission in Embodiment 1 of the present invention;
图3为本发明实施例一中移动终端在网关中注册并建立第一长连接的方法步骤示意图;FIG. 3 is a schematic diagram of steps in a method for registering a mobile terminal in a gateway and establishing a first persistent connection in Embodiment 1 of the present invention;
图4为本发明实施例一中针对第一长连接传输心跳数据包的方法步骤示意图;FIG. 4 is a schematic diagram of steps in a method for transmitting a heartbeat data packet for a first long connection in Embodiment 1 of the present invention;
图5为本发明实施例一中针对第一长连接传输心跳数据包的方法步骤示意图;FIG. 5 is a schematic diagram of steps in a method for transmitting a heartbeat data packet for a first long connection in Embodiment 1 of the present invention;
图6为本发明实施例三中进行下行数据传输的方法步骤示意图;FIG. 6 is a schematic diagram of method steps for downlink data transmission in Embodiment 3 of the present invention;
图7为本发明实施例四中数据传输的系统结构示意图;FIG. 7 is a schematic diagram of the system structure of data transmission in Embodiment 4 of the present invention;
图8为本发明实施例六中网关的结构示意图;FIG. 8 is a schematic structural diagram of a gateway in Embodiment 6 of the present invention;
图9为本发明实施例七中移动终端的结构示意图;FIG. 9 is a schematic structural diagram of a mobile terminal in Embodiment 7 of the present invention;
图10为本发明实施例八中应用服务器的结构示意图;FIG. 10 is a schematic structural diagram of an application server in Embodiment 8 of the present invention;
图11为本发明实施例九保活设备的结构示意图;FIG. 11 is a schematic structural diagram of a keep-alive device according to Embodiment 9 of the present invention;
图12为本发明实施例九保活设备的结构示意图;Fig. 12 is a schematic structural diagram of a keep-alive device according to Embodiment 9 of the present invention;
图13为本发明实施例网关内包括包括子系统的系统结构示意图。FIG. 13 is a schematic structural diagram of a system including subsystems in a gateway according to an embodiment of the present invention.
具体实施方式 Detailed ways
为了减少移动终端为本地安装的多种应用程序与大量的应用服务器之间建立长连接时占用的资源,同时得到IP Push方案中移动终端与应用服务器之间高实时性的数据传输,本发明实施例提出一种新的数据传输方案,采用永远在线机制(Always Online Infrastructure,AOI),在移动终端与应用服务器之间设置网关,移动终端与网关之间建立一条长连接,网关与各应用服务器之间分别建立一条长连接,在上行过程中,移动终端内的任一应用程序发出的上行数据消息都通过与网关之间的一条长连接进行上行传输,在下行过程中,应用服务器发送给任一移动终端的下行数据消息也通过与网关之间的一条长连接进行下行传输。对于移动终端侧而言,不论移动终端内安装的应用程序数量如何,移动终端只需要为与网关之间的一条长连接分配资源就能够达到对数据高实时性的接收;对于应用服务器侧而言,不论该应用服务器所服务的移动终端数量如何,应用服务器也只需要为与网关之间的一条长连接分配资源就能够实时向移动终端推送数据。也就是说,通过本发明实施例的方案,在数据传输过程中,既减少了对移动终端和应用服务器之间的资源占用,又确保了移动终端和应用服务器之间的高实时性数据传输。In order to reduce the resources occupied by the mobile terminal when establishing long-term connections between various application programs installed locally and a large number of application servers, and obtain high real-time data transmission between the mobile terminal and the application server in the IP Push scheme, the embodiment of the present invention A new data transmission scheme is proposed, using the always online mechanism (Always Online Infrastructure, AOI), a gateway is set between the mobile terminal and the application server, a long connection is established between the mobile terminal and the gateway, and between the gateway and each application server Establish a long connection respectively. During the uplink process, the uplink data message sent by any application program in the mobile terminal is transmitted uplink through a long connection with the gateway. During the downlink process, the application server sends it to any mobile terminal. The downlink data message of the terminal is also downlinked through a long connection with the gateway. For the mobile terminal side, regardless of the number of applications installed in the mobile terminal, the mobile terminal only needs to allocate resources for a long connection with the gateway to achieve high real-time data reception; for the application server side , regardless of the number of mobile terminals served by the application server, the application server only needs to allocate resources for a long connection with the gateway to push data to the mobile terminals in real time. That is to say, through the solutions of the embodiments of the present invention, during the data transmission process, resource occupation between the mobile terminal and the application server is reduced, and high real-time data transmission between the mobile terminal and the application server is ensured.
同时,在为第一长连接传输心跳数据包之前,通过对测试数据包传输过程的监控,确定能够使数据包穿过核心网防火墙但不进入移动终端所在的无线通信网络的生存时间,在每次传输心跳数据包时,按照该生存时间进行传输,一方面使心跳数据包能够穿过核心网防火墙,达到对移动终端与网关之间第一长连接的保活目的,另一方面,心跳数据包并没有进入无线通信网络,不会增加无线通信网络的负担,也不会占用无线信道。At the same time, before transmitting the heartbeat data packet for the first long connection, by monitoring the transmission process of the test data packet, determine the survival time that can make the data packet pass through the firewall of the core network but not enter the wireless communication network where the mobile terminal is located. When the heartbeat data packet is transmitted for the first time, it is transmitted according to the lifetime. On the one hand, the heartbeat data packet can pass through the core network firewall to achieve the purpose of keeping alive the first longest connection between the mobile terminal and the gateway. On the other hand, the heartbeat data packet The packets do not enter the wireless communication network, so the burden on the wireless communication network will not be increased, and the wireless channel will not be occupied.
本发明各实施例中涉及的网关是指AOI机制下的永远在线网关(AlwaysOnline Gateway,AOG),AOG可以为基于移动互联网的长连接应用提供统一的接入点,一方面,作为移动终端与网络侧之间数据传输和同步的通道,另一方面,作为应用服务器与移动终端侧之间数据传输和同步的通道。The gateway involved in each embodiment of the present invention refers to an always-on gateway (AlwaysOnline Gateway, AOG) under the AOI mechanism. AOG can provide a unified access point for mobile Internet-based persistent connection applications. On the other hand, it serves as a channel for data transmission and synchronization between the application server and the mobile terminal side.
本发明各实施例中涉及的移动终端是指AOI机制下的移动终端,即具有对安装在移动终端内的各应用程序进行有序管理以及与网关之间的长连接管理等功能。AOI机制下的移动终端可以是安装运行了具有上述功能的AOI中间件的移动终端。The mobile terminal involved in each embodiment of the present invention refers to the mobile terminal under the AOI mechanism, that is, it has functions such as orderly management of various application programs installed in the mobile terminal and long-term connection management with the gateway. The mobile terminal under the AOI mechanism may be a mobile terminal installed and running the AOI middleware with the above functions.
本发明各实施例中涉及的应用服务器是指与移动终端内安装的应用程序进行业务数据交互的网络服务器。如:移动终端内安装了即时通信应用程序,则为了保证即时通信业务的正常运行,即时通信应用程序需要与即时通信服务器之间进行有效的业务数据交互。The application server involved in each embodiment of the present invention refers to a network server that performs service data interaction with the application program installed in the mobile terminal. For example, if an instant messaging application is installed in the mobile terminal, in order to ensure the normal operation of the instant messaging service, the instant messaging application needs to perform effective service data interaction with the instant messaging server.
本发明各实施例中建立的长连接是指在一个连接上可以连续发送多个数据包,在连接保持期间,如果没有数据包发送,需要双方发链路保活包的连接方式,如针对套接字(Socket)的长连接等。The long connection established in each embodiment of the present invention refers to a connection that can continuously send multiple data packets on one connection. During the connection maintenance period, if no data packets are sent, both parties need to send link keep-alive packets. Socket (Socket) long connection, etc.
终端与网关之间的第一长连接,可以为移动终端内任一应用程序生成的上行数据消息进行上行传输,以及接收发送给该终端内任一应用程序的下行数据消息。The first long connection between the terminal and the gateway can perform uplink transmission for uplink data messages generated by any application program in the mobile terminal, and receive downlink data messages sent to any application program in the terminal.
应用服务器与网关之间的第二长连接,可以为应用服务器接收任一终端发送的上行数据消息,以及传输该应用服务器发送给任一终端的上行数据消息。The second long connection between the application server and the gateway may be that the application server receives the uplink data message sent by any terminal, and transmits the uplink data message sent by the application server to any terminal.
本发明各实施例中涉及的心跳数据包是指:对心跳数据包指定的某一条长连接进行保活的数据包。The heartbeat data packet involved in each embodiment of the present invention refers to a data packet for keeping alive a certain long connection specified by the heartbeat data packet.
本发明各实施例中涉及的核心网防火墙是指:Internet网络边界的防火墙,移动终端与网关之间的第一长连接要经过该防火墙,由防火墙对该长连接是否需要释放进行监控,若在周期时间内防火墙没有收到针对该长连接的心跳数据包,则表示该长连接没有数据需要传输并释放;若收到针对该长连接的心跳数据包,则继续维护该长连接。The core network firewall involved in each embodiment of the present invention refers to: the firewall at the Internet network boundary, the first long connection between the mobile terminal and the gateway will pass through the firewall, and the firewall will monitor whether the long connection needs to be released. If the firewall does not receive the heartbeat data packet for the long connection within the period, it means that the long connection has no data to transmit and release; if it receives the heartbeat data packet for the long connection, it will continue to maintain the long connection.
本发明各实施例中涉及的路由距离是指:数据包的路由跳数。The routing distance involved in each embodiment of the present invention refers to: the routing hop count of the data packet.
本发明各实施例中心跳数据包的生存时间是指:该心跳数据包在传输过程中的路由跳数。The survival time of the heartbeat data packet in each embodiment of the present invention refers to the routing hop count of the heartbeat data packet during transmission.
下面结合说明书附图对本发明各实施例进行详细说明。Various embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
实施例一:Embodiment one:
如图2所示,为本发明实施例一中进行上行(Mobile Original,MO)数据传输的方法步骤示意图,包括以下步骤:As shown in Figure 2, it is a schematic diagram of the method steps for performing uplink (Mobile Original, MO) data transmission in Embodiment 1 of the present invention, comprising the following steps:
步骤101:移动终端通过与网关之间建立的第一长连接,向网关发送上行数据消息。Step 101: the mobile terminal sends an uplink data message to the gateway through the first long connection established with the gateway.
所述上行数据消息中携带应用服务器的标识,表示该上行数据消息的目的接收方为该应用服务器的标识对应的应用服务器。例如,当在移动终端内安装的邮件应用程序生成发送给邮件服务器的上行数据消息后,移动终端将邮件服务器的标识携带在该上行数据消息中,并通过与网关之间的第一长连接将上行数据消息发送至网关。需要说明的是,不论移动终端内安装的何种应用程序生成的上行数据消息,移动终端都通过所述第一长连接发送至网关。The identification of the application server is carried in the uplink data message, indicating that the destination recipient of the uplink data message is the application server corresponding to the application server identification. For example, after the mail application program installed in the mobile terminal generates an uplink data message sent to the mail server, the mobile terminal carries the identification of the mail server in the uplink data message, and sends the The uplink data message is sent to the gateway. It should be noted that no matter which application program installed in the mobile terminal generates an uplink data message, the mobile terminal will send it to the gateway through the first persistent connection.
移动终端与网关之间可以共同维护一组密钥,当移动终端向网关发送上行数据消息时,可以利用该密钥对上行数据消息进行加密,同时,移动终端还可以使用安全传输层协议(Transport Layer Sec,TLS)对上行数据消息的传输过程进行加密。A group of keys can be jointly maintained between the mobile terminal and the gateway. When the mobile terminal sends an uplink data message to the gateway, the key can be used to encrypt the uplink data message. At the same time, the mobile terminal can also use the secure transport layer protocol (Transport Layer Sec, TLS) encrypts the transmission process of uplink data messages.
步骤102:网关根据接收到所述应用服务器的标识确定对应的应用服务器。Step 102: The gateway determines the corresponding application server according to the received identifier of the application server.
网关可以根据与移动终端共同维护的密钥对接收到的上行数据消息进行解密。The gateway can decrypt the received uplink data message according to the key maintained together with the mobile terminal.
步骤103:网关在确定与所述应用服务器之间建立了第二长连接时,通过所述第二长连接,将上行数据消息发送至所述应用服务器。Step 103: When the gateway determines that a second long connection has been established with the application server, the gateway sends an uplink data message to the application server through the second long connection.
由于网关可能与多台应用服务器之间分别建立了第二长连接,则网关在向某一应用服务器发送上行数据消息时,首先查看与该应用服务器之间是否有可用的第二长连接,在存在可用的第二长连接时,通过该第二长连接向应用服务器发送上行数据消息。Since the gateway may have established a second long connection with multiple application servers, when the gateway sends an uplink data message to a certain application server, it first checks whether there is a second long connection available with the application server. When there is an available second long connection, an uplink data message is sent to the application server through the second long connection.
网关在向应用服务器发送上行数据消息时,也可以对上行数据消息进行加密,由应用服务器对接收到的上行数据消息进行解密。When the gateway sends the uplink data message to the application server, it can also encrypt the uplink data message, and the application server decrypts the received uplink data message.
除此以外,由于通过对上行数据消息中的数据内容进行压缩可以减少上行数据消息所占用的传输资源,降低在无线网络上传输的数据量,节省网络带宽并降低网络延迟,因此,上行数据消息中在通过第一长连接进行传输时,以及通过第二长连接进行传输时,可以根据数据内容的资源不同(音频数据、视频数据、文本数据等),采用合理的压缩算法进行压缩后传输,接收到压缩后的上行数据消息的设备(如网关、应用服务器)可以进行解压操作。In addition, since the transmission resources occupied by the uplink data message can be reduced by compressing the data content in the uplink data message, the amount of data transmitted on the wireless network can be reduced, the network bandwidth can be saved, and the network delay can be reduced. Therefore, the uplink data message When transmitting through the first long connection, and when transmitting through the second long connection, according to the different resources of the data content (audio data, video data, text data, etc.), a reasonable compression algorithm can be used to compress and transmit, Devices (such as gateways and application servers) that receive the compressed uplink data messages can perform decompression operations.
另外,由于网关面向的移动终端数量众多,当多个移动终端同时向网关发送上行数据消息,或同一移动终端为不同的应用程序发送多个上行数据消息时,若网关的能力不足以同时处理所有的上行数据消息,则需要对这些上行数据消息进行排序后依次处理。在本实施例的方案中,网关进行排序的方式包括但不限于以下两种:In addition, due to the large number of mobile terminals targeted by the gateway, when multiple mobile terminals send uplink data messages to the gateway at the same time, or the same mobile terminal sends multiple uplink data messages for different applications, if the gateway is not capable of processing all uplink data messages, these uplink data messages need to be sorted and processed sequentially. In the solution of this embodiment, the ways for the gateway to sort include but are not limited to the following two:
第一种排序方式:网关按照业务的优先级高低进行排序。由于每个上行数据消息中都携带了应用服务器的标识,可以确定该上行数据消息所对应的业务,因此,网关可以按照业务优先级的高低进行排序,优先处理业务优先级高的上行数据消息。例如:对于实时性要求高的业务对应的优先级也较高,对于实时性要求低的业务对应的优先级也较低。The first sorting method: the gateway sorts according to the priority of the business. Since each uplink data message carries the identifier of the application server, the service corresponding to the uplink data message can be determined. Therefore, the gateway can sort the uplink data messages according to the service priority, and process the uplink data messages with high service priority first. For example, services with high real-time requirements have higher priorities, and services with low real-time requirements have lower priorities.
第二种排序方式:网关按照移动终端的优先级高低进行排序。网关可以根据移动终端当前所处的无线网络环境来设定移动终端的优先级高低。所处无线网络环境较好的移动终端对应的优先级较高,对于所处无线网络环境较差的移动终端,为了避免发送上行数据消息使得无线网络环境更差,可以对应的优先级较低。The second sorting method: the gateway sorts the mobile terminals according to their priority. The gateway can set the priority of the mobile terminal according to the current wireless network environment of the mobile terminal. A mobile terminal in a better wireless network environment corresponds to a higher priority. For a mobile terminal in a poor wireless network environment, in order to avoid sending an uplink data message to make the wireless network environment worse, the corresponding priority may be lower.
通过以上步骤101~步骤103描述的技术方案,网关成为移动终端与应用服务器之间实时传输过程的中介,使移动终端不需要面向网络侧的大量应用服务器,而只需要面向一台网关进行上行传输,同时也使应用服务器不需要面对大量的移动终端,只需要面对一台网关接收上行数据消息,可以有效减少移动终端和应用服务器为长连接分配的资源开销,同时,根据移动终端与网关之间的第一长连接、网关与应用服务器之间的第二长连接的网络架构,可以实现移动终端与应用服务器之间实时的业务数据传输,有效提高数据传输的实时性。Through the technical solutions described in steps 101 to 103 above, the gateway becomes the intermediary of the real-time transmission process between the mobile terminal and the application server, so that the mobile terminal does not need to face a large number of application servers on the network side, but only needs to face a gateway for uplink transmission , and at the same time, the application server does not need to face a large number of mobile terminals, but only needs to face a gateway to receive uplink data messages, which can effectively reduce the resource overhead allocated by the mobile terminal and the application server for long connections. At the same time, according to the mobile terminal and the gateway The network architecture of the first long connection between the gateway and the second long connection between the gateway and the application server can realize real-time business data transmission between the mobile terminal and the application server, and effectively improve the real-time performance of data transmission.
下面对上述步骤101~步骤103的具体实现方式进行详细说明。The specific implementation manner of the above steps 101 to 103 will be described in detail below.
在本实施例一的上行传输过程执行之前,移动终端需要对本地安装的各应用程序进行管理,因此,在步骤101之前还具有移动终端内部管理过程,具体包括:Before the uplink transmission process of the first embodiment is performed, the mobile terminal needs to manage the locally installed application programs, therefore, before step 101, there is also an internal management process of the mobile terminal, which specifically includes:
首先,移动终端记录在本地安装的应用程序的标识,并实时采集各应用程序的状态信息,包括应用程序处于运行状态、休眠状态或退出状态的信息。Firstly, the mobile terminal records the identifiers of the locally installed application programs, and collects the state information of each application program in real time, including the information that the application programs are in the running state, dormant state or exit state.
然后,移动终端还记录各应用程序对应的应用服务器的标识,用于在上行传输过程中确定上行数据消息目的接收方。Then, the mobile terminal also records the identification of the application server corresponding to each application program, which is used to determine the destination receiver of the uplink data message during the uplink transmission process.
最后,当移动终端对本地安装的应用程序的各项信息记录完成后,将实时监测是否有应用程序需要进行上行的数据交互,在有任一应用程序生成上行数据消息后,移动终端将该应用程序对应的应用服务器的标识携带在生成的上行数据消息中,然后执行步骤101。Finally, after the mobile terminal completes the information recording of the locally installed applications, it will monitor in real time whether any application needs to perform uplink data interaction. After any application generates an uplink data message, the mobile terminal will send the application The identification of the application server corresponding to the program is carried in the generated uplink data message, and then step 101 is executed.
通过上述移动终端对本地安装的应用程序的管理,可以为本地各应用程序的运行进行有效管理,避免出现应用程序运行混乱,甚至进程冲突的问题。Through the above-mentioned management of locally installed application programs by the mobile terminal, the operation of local application programs can be effectively managed, and the problems of application program operation confusion and even process conflicts can be avoided.
具体地,在移动终端本地,移动终端内有一个AOI中间件,用于各应用程序进行有序管理以及与网关之间的长连接管理等功能,移动终端本地安装的应用程序在运行状态时可以通过Socket长连接的方式直接连接到AOI中间件中,向AOI中间件提供待传输的上行数据消息,要求AOI中间件通过第一长连接进行实时传输。Specifically, in the local mobile terminal, there is an AOI middleware in the mobile terminal, which is used for orderly management of various applications and long-term connection management with the gateway. Directly connect to the AOI middleware through the Socket long connection, provide the uplink data message to be transmitted to the AOI middleware, and require the AOI middleware to transmit in real time through the first long connection.
当移动终端完成对本地应用程序的管理后,可以在步骤101之前,在网关中注册并连接第一长连接。移动终端在网关中注册并建立第一长连接的具体过程如图3所示,包括如下步骤:After the mobile terminal completes the management of the local application program, it can register in the gateway and connect to the first persistent connection before step 101 . The specific process of the mobile terminal registering in the gateway and establishing the first long connection is shown in Figure 3, including the following steps:
步骤201:移动终端向域名系统(Domain Name System,DNS)发起网关查询请求,其中携带移动终端的第一标识和第二标识。Step 201: The mobile terminal initiates a gateway query request to Domain Name System (DNS), which carries the first identification and the second identification of the mobile terminal.
移动终端的第一标识和第二标识都是能够唯一表示移动终端的标识,所不同的是,移动终端的第一标识是移动终端在应用服务器中注册时使用的标识,第二标识是移动终端注册在网关中的标识。Both the first identifier and the second identifier of the mobile terminal are identifiers that can uniquely represent the mobile terminal, the difference is that the first identifier of the mobile terminal is the identifier used when the mobile terminal registers in the application server, and the second identifier is the The ID registered with the gateway.
例如,若所述移动终端为手机,则所述第一标识为手机号码,第二标识为国际移动用户识别码(IMSI)。此时,移动终端以短消息方式向DNS发起网关查询请求时,在短消息中携带IMSI,则DNS可以从短消息中携带的信息获取移动终端的第二标识(IMSI),通过通过短消息的源端信息确定移动终端的第一标识(手机号码)。For example, if the mobile terminal is a mobile phone, the first identifier is a mobile phone number, and the second identifier is an International Mobile Subscriber Identity (IMSI). At this time, when the mobile terminal initiates a gateway query request to the DNS in the form of a short message, the short message carries the IMSI, and the DNS can obtain the second identification (IMSI) of the mobile terminal from the information carried in the short message, and pass the short message The source information determines the first identifier (mobile phone number) of the mobile terminal.
步骤202:DNS存储所述移动终端的第一标识和第二标识。Step 202: DNS stores the first identifier and the second identifier of the mobile terminal.
步骤203:DNS向移动终端返回该移动终端归属网关的路由信息。Step 203: the DNS returns the routing information of the home gateway of the mobile terminal to the mobile terminal.
在本实施例的方案中,一个网络系统中可以部署多台网关,每台网关为一定区域内的移动终端提供服务。例如,在全国每省部署一台网关,为省内移动终端提供场连接服务。可以通过人工方式在DNS内部存储各网关的路由信息以及各网关服务的覆盖范围,当DNS接收到一个移动终端发起的网关查询请求时,根据该移动终端的标识(第一标识和第二标识)确定该移动终端的归属地,进而查询各网关服务的覆盖范围,为移动终端选择归属的网关。In the solution of this embodiment, multiple gateways can be deployed in one network system, and each gateway provides services for mobile terminals in a certain area. For example, deploy a gateway in each province of the country to provide field connection services for mobile terminals in the province. The routing information of each gateway and the coverage of each gateway service can be manually stored in the DNS. When the DNS receives a gateway query request initiated by a mobile terminal, according to the identification of the mobile terminal (the first identification and the second identification) The attribution of the mobile terminal is determined, and then the coverage of each gateway service is inquired, and the attribution gateway is selected for the mobile terminal.
DNS向移动终端返回的归属网关的路由信息包括但不限于网关的IP地址。The routing information of the home gateway returned by the DNS to the mobile terminal includes but not limited to the IP address of the gateway.
步骤204:移动终端根据接收到的归属网关的路由信息,向归属网关发起注册请求,并在该注册请求中携带第二标识。Step 204: The mobile terminal initiates a registration request to the home gateway according to the received routing information of the home gateway, and carries the second identifier in the registration request.
在该注册请求中还可以同时携带移动终端内安装的应用程序的标识。The registration request may also carry the identification of the application program installed in the mobile terminal.
步骤205:网关为移动终端注册。Step 205: the gateway registers the mobile terminal.
网关在本地存储移动终端的注册信息(包括移动终端的注册时间、第二标识等)以及移动终端管理的应用程序的标识,完成对移动终端的注册,并向移动终端返回注册成功消息。The gateway locally stores the registration information of the mobile terminal (including the registration time of the mobile terminal, the second identification, etc.) and the identification of the application program managed by the mobile terminal, completes the registration of the mobile terminal, and returns a registration success message to the mobile terminal.
在本步骤中,当移动终端在网关中注册后,网关需要对注册移动终端进行管理,包括以下两方面的管理:In this step, after the mobile terminal is registered in the gateway, the gateway needs to manage the registered mobile terminal, including the following two aspects of management:
第一方面:对移动终端信息的管理,如对移动终端的第二标识、版本号、操作系统、厂家、型号、屏幕大小等硬件信息的管理。The first aspect: the management of mobile terminal information, such as the management of hardware information such as the second identification, version number, operating system, manufacturer, model, and screen size of the mobile terminal.
第二方面:对移动终端业务的管理,如对移动终端所支持的业务种类、业务名称等信息的管理。The second aspect: the management of mobile terminal services, such as the management of information such as service types and service names supported by the mobile terminal.
步骤206:移动终端建立与网关之间的第一长连接。Step 206: the mobile terminal establishes a first long connection with the gateway.
此后,当移动终端内有任一应用程序发起上行数据消息时,移动终端通过该第一长连接将上行数据消息发送至归属的网关。Thereafter, when any application in the mobile terminal initiates an uplink data message, the mobile terminal sends the uplink data message to the home gateway through the first persistent connection.
网关在接收到来自移动终端的上行数据消息后,要执行步骤103将该上行数据消息发送给应用服务器。但由于应用服务器并行为大量的移动终端提供业务,因此,移动终端在上行数据消息中携带第二标识,希望应用服务器能够获知发送该上行数据消息的移动终端。但移动终端在应用服务器中注册时使用的是第一标识,而在网关中注册时使用的是第二标识,因此,如果网关直接将第二标识携带在上行数据消息中发给应用服务器,则应用服务器可能无法识别,为了克服这一问题,本实施的步骤103在运行时,网关根据移动终端的第二标识,从DNS中查询处该移动终端的第一标识,并将该移动终端的第一标识携带在上行数据消息中发送给应用服务器,使应用服务器根据上行数据消息的第一标识能够获取该上行数据消息的发送移动终端。After the gateway receives the uplink data message from the mobile terminal, it will execute step 103 to send the uplink data message to the application server. However, since the application server provides services for a large number of mobile terminals in parallel, the mobile terminal carries the second identifier in the uplink data message, and it is hoped that the application server can know the mobile terminal sending the uplink data message. However, the mobile terminal uses the first identifier when registering in the application server, and uses the second identifier when registering in the gateway. Therefore, if the gateway directly carries the second identifier in the uplink data message and sends it to the application server, then The application server may not be able to identify it. In order to overcome this problem, when step 103 of this implementation is running, the gateway queries the first identifier of the mobile terminal from DNS according to the second identifier of the mobile terminal, and sends the second identifier of the mobile terminal to An identifier is carried in the uplink data message and sent to the application server, so that the application server can obtain the sending mobile terminal of the uplink data message according to the first identifier of the uplink data message.
考虑到在网络系统中部署了多台网关,移动终端向其归属的网关发送的上行数据消息可以根据移动终端和归属网关之间的第一长连接传输,但该上行数据消息传输的目的端的应用服务器不一定与移动终端归属的网关建立了第二长连接,因此,需要在网关与各应用服务器之间建立第二长连接时,在DNS中存储网关和分别与该网关建立第二长连接的应用服务器的第一对应关系,以便于查询应用服务器所归属的网关。Considering that multiple gateways are deployed in the network system, the uplink data message sent by the mobile terminal to its home gateway can be transmitted according to the first long connection between the mobile terminal and the home gateway, but the application of the destination end of the uplink data message transmission The server does not necessarily establish a second long connection with the gateway to which the mobile terminal belongs. Therefore, when the second long connection needs to be established between the gateway and each application server, the gateway and the information of the second long connection respectively established with the gateway are stored in the DNS. The first corresponding relationship of the application server is used to query the gateway to which the application server belongs.
应用在本实施例的步骤103中,网关向应用服务器发送上行传输消息的过程存在以下两种情况:In step 103 of this embodiment, the gateway sends an uplink transmission message to the application server in the following two situations:
第一种情况:网关通过对长连接端口的查询,确定与上行数据消息中的应用服务器的标识对应的应用服务器建立了第二长连接,即上行数据消息的源端(移动终端)和目的端(应用服务器)都与同一网关建立长连接,该上行数据消息可以直接传输。The first case: the gateway determines that the application server corresponding to the application server identifier in the uplink data message has established a second long connection by querying the long connection port, that is, the source end (mobile terminal) and the destination end of the uplink data message (Application servers) all establish persistent connections with the same gateway, and the uplink data message can be directly transmitted.
第二种情况:网关确定没有与上行数据消息中的应用服务器的标识对应的应用服务器建立了第二长连接,即该网关不是该应用服务器归属的网关,则网关查询DNS,找到该应用服务器所归属的其他网关(为了与接收移动终端发送的上行数据消息的网关进行区分,这里将应用服务器归属的网关称之为其他网关),并将所述上行数据消息发送给所述其他网关后,由于所述其他网关是目的端应用服务器归属网关,与该应用服务器之间有第二长连接,因此,所述其他网关将上行数据消息通过第二长连接发送给应用服务器。The second case: the gateway determines that there is no application server corresponding to the identification of the application server in the uplink data message to establish the second long connection, that is, the gateway is not the gateway to which the application server belongs, then the gateway queries DNS to find the application server Other gateways belonged to (in order to distinguish from gateways receiving uplink data messages sent by mobile terminals, the gateways to which the application server belongs are referred to as other gateways here), and after sending the uplink data messages to the other gateways, due to The other gateway is the home gateway of the destination application server and has a second long connection with the application server. Therefore, the other gateway sends the uplink data message to the application server through the second long connection.
另外,在步骤103执行之后,网关还可以记录本次上行数据传输过程的日志信息,并产生话单。这里产生的话单并不同于常规的话单,这是因为:在移动终端的上行传输过程中,可以使用本发明实施例一的方案,也可以使用现有的其他方案,为了减少对目前常规的话单生成方式的改动,在本实施例一的方案中,由网关产生的话单对采用本实施例一方案的CP、SP的流量进行结算,与常规话单配合使用,确定在每次上行传输过程中产生的费用。In addition, after step 103 is executed, the gateway can also record the log information of this uplink data transmission process, and generate a bill. The bills generated here are different from the conventional bills, because: in the uplink transmission process of the mobile terminal, the scheme of Embodiment 1 of the present invention can be used, and other existing schemes can also be used. The change of generation mode, in the scheme of this embodiment one, the bill that adopts the flow of CP, SP of this embodiment one scheme is settled by the bill generated by the gateway, and it is used in conjunction with the conventional bill, and it is determined that in each uplink transmission process Costs incurred.
在本实施例一的方案中,为了能够使移动终端与网关之间的第一长连接实时保活(即在周期时长内不断地有针对该第一长连接的心跳数据包穿过核心网防火墙),同时不增加无线通信网络的资源开销,因此将心跳数据包的生存时间设定为大于经过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离,一方面使心跳数据包能够穿过核心网防火墙,达到对移动终端与网关之间第一长连接的保活目的,另一方面,心跳数据包并没有进入无线通信网络,不会增加无线通信网络的负担,也不会占用无线信道。In the solution of the first embodiment, in order to keep the first long connection between the mobile terminal and the gateway alive in real time (that is, heartbeat data packets for the first long connection continue to pass through the core network firewall within a period of time) ), while not increasing the resource overhead of the wireless communication network, so the lifetime of the heartbeat data packet is set to be greater than the distance passing through the core network firewall, but less than the distance to the wireless communication network where the mobile terminal is located. On the one hand, the heartbeat data packet It can pass through the firewall of the core network to achieve the purpose of keeping alive the first longest connection between the mobile terminal and the gateway. On the other hand, the heartbeat data packet does not enter the wireless communication network, which will not increase the burden on the wireless communication network, nor will it Occupy the wireless channel.
本实施例一中,针对第一长连接传输心跳数据包的方法步骤示意图如图4所示,所述方法包括以下步骤:In the first embodiment, a schematic diagram of the steps of the method for transmitting the heartbeat data packet for the first long connection is shown in FIG. 4, and the method includes the following steps:
步骤301:针对第一长连接,探测第一长连接一端的移动终端的相关信息。Step 301: For the first long connection, detect relevant information of the mobile terminal at one end of the first long connection.
在本步骤中,首先确定针对哪条长连接传输心跳数据包,进而确定接收心跳数据包的移动终端。具体地,可以通过移动互联网内的业务服务器与终端建立传输控制协议(Transmission Control Protocol,TCP)数据连接,获知该移动终端的相关信息,如移动终端进行网络连接时的五元组信息,包括源IP地址,源端口,目的IP地址,目的端口,和传输层协议号。其中,源端口是该移动终端的端口号,也可以通过用户数据包协议(User Datagram Protocol,UDP)的方式获取移动终端的相关信息。In this step, it is first determined for which long connection to transmit the heartbeat data packet, and then the mobile terminal receiving the heartbeat data packet is determined. Specifically, it is possible to establish a Transmission Control Protocol (Transmission Control Protocol, TCP) data connection with the terminal through the service server in the mobile Internet, and obtain relevant information about the mobile terminal, such as the quintuple information when the mobile terminal connects to the network, including the source IP address, source port, destination IP address, destination port, and transport layer protocol number. Wherein, the source port is the port number of the mobile terminal, and the relevant information of the mobile terminal can also be obtained by means of User Datagram Protocol (UDP).
步骤302:确定心跳数据包在经过核心网防火墙之后,且到达移动终端所在的无线通信网络之前的一跳路由时的路由距离。Step 302: Determine the routing distance of the heartbeat data packet after passing through the core network firewall and arriving at the one-hop route before the wireless communication network where the mobile terminal is located.
步骤303:按照核心网防火墙的周期要求,将确定的路由距离组为生存时间发送心跳数据包。Step 303: According to the periodic requirement of the core network firewall, send the heartbeat data packet with the determined routing distance group as the time-to-live.
在上述步骤301~步骤303的方案中,计算出合理的路由距离,即心跳数据包的路由跳数,将该路由跳数作为心跳数据包中的IP数据包的TTL字段存储的生存时间,使心跳数据包在路由传输过程中既能够穿过核心网防火墙进入运营商提供的核心网达到对第一长连接保活的目的,又终止于进入移动终端所在的无线通信网络之前的一跳路由器,避免了心跳数据包对无线通信网络造成的负担。In the scheme of above-mentioned steps 301~step 303, calculate reasonable routing distance, i.e. the routing hop count of the heartbeat data packet, use this routing hop count as the TTL field storage time of the IP data packet in the heartbeat data packet, make The heartbeat data packet can not only pass through the core network firewall to enter the core network provided by the operator to keep the first long connection alive, but also terminate at the one-hop router before entering the wireless communication network where the mobile terminal is located. The burden caused by the heartbeat data packet on the wireless communication network is avoided.
上述步骤301~步骤303的具体实现过程如图5所示,包括以下步骤:The specific implementation process of the above steps 301 to 303 is shown in Figure 5, including the following steps:
步骤401:向移动终端发送的测试数据包,确定该测试数据包路由至移动终端时产生的第一路由距离。Step 401: Send a test data packet to the mobile terminal, and determine a first routing distance generated when the test data packet is routed to the mobile terminal.
本发明的目的是让心跳数据包既能穿过核心网防火墙又不会进入无线通信网络,因此,首先需要确定若心跳数据包进入无线通信网络到达移动终端时的第一路由距离,进而才能根据该第一路由距离确定合适的第二路由距离,以达到本发明目的。The purpose of the present invention is to allow the heartbeat data packet to pass through the core network firewall and will not enter the wireless communication network. Therefore, it is first necessary to determine the first routing distance when the heartbeat data packet enters the wireless communication network and arrives at the mobile terminal. The first routing distance determines an appropriate second routing distance to achieve the purpose of the present invention.
步骤402:根据所述第一路由距离,确定测试数据包在经过核心网防火墙之后,且到达移动终端所在的无线通信网络之前的一跳路由时,产生的第二路由距离。Step 402: According to the first routing distance, determine the second routing distance generated when the test data packet passes through the core network firewall and arrives at the one-hop routing before the wireless communication network where the mobile terminal is located.
由于第一路由距离是能够达到移动终端的路由距离,而第二路由距离未到达移动终端,所以第二路由距离小于第一路由距离,但第二路由距离必须大于经过防火墙的距离,因此,第二路由距离的最取上限为第一路由距离的路由跳数减1,取值下限为经过所述核心网防火墙时产生的路由跳数。较优的,可以将第一路由距离的路由跳数减1后作为第二路由距离。Because the first routing distance is the routing distance that can reach the mobile terminal, and the second routing distance does not reach the mobile terminal, so the second routing distance is smaller than the first routing distance, but the second routing distance must be greater than the distance through the firewall, therefore, the second routing distance The maximum upper limit of the second route distance is the route hop count minus 1 of the first route distance, and the lower limit is the route hop count generated when passing through the core network firewall. Preferably, the routing hop count of the first routing distance may be reduced by 1 as the second routing distance.
步骤403:将所述第二路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包。Step 403: Using the second routing distance as the lifetime of the heartbeat data packet, send the heartbeat data packet to the mobile terminal.
本实施例二的方案中包括但不限于逐渐增大路由距离来确定第一路由距离、逐渐减小路由距离来确定第一路由距离和二分法方式来确定第一路由距离,下面分别加以说明:The scheme of the second embodiment includes but is not limited to gradually increasing the routing distance to determine the first routing distance, gradually reducing the routing distance to determine the first routing distance and dichotomous method to determine the first routing distance, which will be explained respectively below:
1、通过逐渐增大路由距离来确定第一路由距离:1. Determine the first routing distance by gradually increasing the routing distance:
本方式进一步包括TCP方式和UDP方式,具体说明如下:This mode further includes TCP mode and UDP mode, and the specific description is as follows:
(1)、TCP方式:(1), TCP mode:
第一步:将所述测试数据包的TCP头部序号值设置为所述移动终端识别为错误的值。Step 1: Set the TCP header sequence number value of the test data packet to a value recognized as an error by the mobile terminal.
TCP协议规定了数据包中需要携带为该数据包分配的序号值,数据包接收方在接收到该数据包后,根据其中携带的序号值可以确定该数据包的相关信息(如数据包的来源、发送数据包的目的)。The TCP protocol stipulates that the data packet needs to carry the serial number value allocated for the data packet. After receiving the data packet, the receiver of the data packet can determine the relevant information of the data packet (such as the source of the data packet) according to the serial number value carried in it. , the purpose of sending the data packet).
在本步骤中,发送给移动终端的测试数据包中携带一个错误的序列号,而不携带实际为该数据包分配的序列号。若测试数据包到达移动终端,则移动终端会将测试数据包中携带的序列号识别为错误的序列号,进而认为该测试数据包为非法数据包,则移动终端将会返回复位(RST)的TCP消息,通知测试数据包的发送方此测试数据包有误。若测试数据包没有到达移动终端时生存时间就已达到,则由于移动终端在规定时长内没有接收到测试数据包,将会返回控制报文协议(Internet Control Message Protocol,ICMP)消息,其中携带的错误类型是超时。测试数据包的发送方根据返回的是RST消息还是错误类型是超时的ICMP消息来确定该测试数据包是否到达移动终端。In this step, the test data packet sent to the mobile terminal carries a wrong sequence number instead of the sequence number actually assigned to the data packet. If the test data packet arrives at the mobile terminal, then the mobile terminal will recognize the serial number carried in the test data packet as a wrong serial number, and then think that the test data packet is an illegal data packet, then the mobile terminal will return a reset (RST) A TCP message to notify the sender of the test data packet that the test data packet is wrong. If the time-to-live is reached when the test data packet does not arrive at the mobile terminal, the mobile terminal will return a Control Message Protocol (Internet Control Message Protocol, ICMP) message because the mobile terminal has not received the test data packet within the specified time length, and the The error type is timeout. The sender of the test data packet determines whether the test data packet reaches the mobile terminal according to whether the returned RST message or the ICMP message whose error type is timed out.
第二步:预先设定第三路由距离。Step 2: Preset the distance of the third route.
本步骤中的第三路由距离在初始时可以设置为1跳。The third routing distance in this step may be initially set to 1 hop.
第三步:逐渐增大预先设定的第三路由距离,针对每次增大后得到的路由距离执行以下操作:Step 3: Gradually increase the preset third routing distance, and perform the following operations for the routing distance obtained after each increase:
将本次得到的路由距离作为测试数据包的生存时间,向移动终端发送该测试数据包;Using the routing distance obtained this time as the survival time of the test data packet, sending the test data packet to the mobile terminal;
若返回RST的TCP消息,则将本次得到的路由距离作为第一路由距离;If the TCP message of RST is returned, the routing distance obtained this time is used as the first routing distance;
若返回的控制报文协议ICMP消息携带的错误类型是超时,则继续增大路由距离。If the error type carried in the returned ICMP message is timeout, continue to increase the routing distance.
在第三步的方案中,若本次使用的第三路由距离的路由跳数过小,不足以使测试数据包达到移动终端,则移动终端由于在规定时长内没有收到测试数据包而在返回ICMP消息中携带的错误类型是超时,表示此时第三路由距离小于路由至移动终端时所需的路由距离,因此,需增大第三路由距离,并将增大后的第三路由距离继续作为测试数据包的生存时间来发送测试数据包。当在上次使用的第三路由距离的情况下ICMP携带的错误类型是超时,但本次使用的第三路由距离的情况下接收到RST消息,表示当前使用的第三路由距离恰好能够使测试数据包路由至移动终端,只不过由于移动终端识别测试数据包的序列号有误所以返回RST消息,此时,当前使用的第三路由距离等于测试数据包路由至移动终端时所需的路由距离,则将当前的第三路由距离作为第一路由距离。In the solution of the third step, if the routing hops of the third routing distance used this time are too small to allow the test data packet to reach the mobile terminal, the mobile terminal will stop at the mobile terminal due to not receiving the test data packet within the specified time. The error type carried in the returned ICMP message is timeout, which means that the third routing distance is less than the routing distance required for routing to the mobile terminal at this time. Therefore, the third routing distance needs to be increased, and the increased third routing distance Continue to send test packets as the time-to-live of the test packets. When the error type carried by ICMP is timeout in the case of the third route distance used last time, but the RST message is received in the case of the third route distance used this time, it means that the third route distance currently used can just make the test The data packet is routed to the mobile terminal, but the mobile terminal returns an RST message because the sequence number of the test data packet identified by the mobile terminal is incorrect. At this time, the third routing distance currently used is equal to the required routing distance when the test data packet is routed to the mobile terminal , the current third routing distance is used as the first routing distance.
(2)、UDP方式:(2), UDP mode:
第一步:将所述测试数据包中携带的目的端口号设置为移动终端不能正确接收该测试数据包的用户数据包UDP端口号。Step 1: Set the destination port number carried in the test data packet as the UDP port number of the user data packet that the mobile terminal cannot correctly receive the test data packet.
本实施例中可以将测试数据包的UDP头内的4字节目的端口号设计为诸如随机高段端口号,如使用随机的任何大于32768的高段端口,使得移动终端无法正确接收测试数据包,但只要测试数据包的生存时间能够使测试数据包达到目的端口,所经历的路由距离与达到移动终端的路由距离相同,因此,利用无法接收测试数据包的端口来代替移动终端的端口也可以计算出路由至移动终端时产生的第一路由距离。In this embodiment, the 4-byte destination port number in the UDP header of the test packet can be designed as a random high-segment port number, such as using any random high-segment port greater than 32768, so that the mobile terminal cannot correctly receive the test data packet. , but as long as the survival time of the test data packet can make the test data packet reach the destination port, the route distance experienced is the same as the route distance to the mobile terminal. Therefore, it is also possible to replace the port of the mobile terminal with a port that cannot receive the test data packet Calculate the first routing distance generated when routing to the mobile terminal.
第二步:预先设定第四路由距离。Step 2: Preset the fourth routing distance.
本步骤中的第三路由距离在初始时可以设置为1跳。The third routing distance in this step may be initially set to 1 hop.
第三步:逐渐增大第四路由距离,针对每次增大后得到的路由距离循环执行以下操作:Step 3: Gradually increase the fourth routing distance, and perform the following operations cyclically for the routing distance obtained after each increase:
将本次得到的路由距离作为测试数据包的生存时间,向移动终端发送该测试数据包,并对返回的ICMP消息进行检测;Using the routing distance obtained this time as the survival time of the test packet, sending the test packet to the mobile terminal, and detecting the returned ICMP message;
若返回的ICMP消息中携带的错误类型是端口不可达,则将本次得到的路由距离作为第一路由距离;If the error type carried in the returned ICMP message is that the port is unreachable, the routing distance obtained this time is used as the first routing distance;
若返回的ICMP消息中携带的错误类型是超时,则继续增大路由距离,直至接收到返回的ICMP消息中携带的错误类型是端口不可达。If the error type carried in the returned ICMP message is timeout, then continue to increase the routing distance until the error type carried in the returned ICMP message is received as port unreachable.
在第三步的方案中,若本次使用的第三路由距离的路由跳数过小,不足以使测试数据包达到目的端口号对应的端口,则测试数据包最后达到的路由器返回的ICMP消息中携带的错误类型是超时,表示此时第四路由距离小于路由至移动终端时所需的路由距离,因此,需增大第四路由距离,并将增大后的第四路由距离继续作为测试数据包的生存时间来发送测试数据包。当在上次使用的第四路由距离的情况下ICMP携带的错误类型是超时,但本次使用的第四路由距离的情况下ICMP携带的错误类型是端口不可达,表示当前使用的第四路由距离恰好能够使测试数据包路由至目的端口,只不过由于目的端口不能正确接收该测试数据包所以返回端口不可达的错误类型,此时,当前使用的第四路由距离等于测试数据包路由至移动终端时所需的路由距离,则将当前的第四路由距离作为第一路由距离。In the solution of the third step, if the routing hops of the third routing distance used this time are too small to make the test data packet reach the port corresponding to the destination port number, the ICMP message returned by the router where the test data packet finally reaches The error type carried in is timeout, which means that the fourth routing distance is less than the routing distance required for routing to the mobile terminal at this time. Therefore, the fourth routing distance needs to be increased, and the increased fourth routing distance will continue to be used as a test Packet lifetime to send test packets. When the error type carried by ICMP is timeout in the case of the fourth route distance used last time, but the error type carried by ICMP in the case of the fourth route distance used this time is port unreachable, indicating that the fourth route currently used The distance is just enough to route the test data packet to the destination port, but because the destination port cannot correctly receive the test data packet, it returns the error type that the port is unreachable. At this time, the fourth routing distance currently used is equal to the test data packet routed to the mobile For the required routing distance at the terminal, the current fourth routing distance is used as the first routing distance.
2、通过逐渐减小路由距离来确定第一路由距离:2. Determine the first routing distance by gradually reducing the routing distance:
本方式进一步包括TCP方式和UDP方式,具体说明如下:This mode further includes TCP mode and UDP mode, and the specific description is as follows:
(1)、TCP方式:(1), TCP mode:
第一步:通过已确定五元组信息的TCP连接,即发送心跳数据包所要保活的长连接。Step 1: Through the TCP connection that has determined the quintuple information, that is, the long connection to be kept alive by sending the heartbeat data packet.
第二步:预先设定第五路由距离。Step 2: Preset the fifth routing distance.
本步骤中的第五路由距离在初始时可以设置较大,确保第一次发送的测试数据包能够被移动终端正确接收,如在初始时设置第五路由距离为64跳。The fifth routing distance in this step can be initially set larger to ensure that the test data packet sent for the first time can be correctly received by the mobile terminal, such as setting the fifth routing distance to 64 hops initially.
第三步:将本次得到的路由距离作为测试数据包的生存时间,通过已确定五元组信息的TCP连接向移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;Step 3: use the routing distance obtained this time as the survival time of the test packet, send the test packet to the mobile terminal through the TCP connection that has determined the quintuple information, and judge whether to receive the test response message returned;
若是,则继续减小路由距离;If so, continue to reduce the routing distance;
否则,将本次得到的路由距离加1作为第一路由距离。Otherwise, add 1 to the routing distance obtained this time as the first routing distance.
本方式是通过TCP连接向移动终端发送测试数据包的方式,在第三步的方案中,测试数据包中的生存时间在不断减少,若本次使用的第五路由距离比较大,能够使移动终端正确接收到测试数据包,则移动终端将会返回测试回应消息,表示第五路由距离还需要继续减少。当上次使用的第五路由距离能够使测试数据包到达移动终端(即上次发送测试数据包后接收到测试回应消息),但本次使用的第五路由距离不能够使测试数据包到达移动终端(本次发送测试数据包后没有接收到测试回应消息),则表示本次使用的第五路由距离只能达到无线通信网络外的最后一跳,上次使用的第五路由距离是路由至移动终端时产生的路由距离,因此,将上次使用的第五路由距离作为第一路由距离。若每次减少路由距离是1跳,则可以将本次使用的第五路由距离加1跳作为第一路由距离。This method is to send test data packets to the mobile terminal through a TCP connection. In the third step of the scheme, the survival time in the test data packets is continuously decreasing. If the distance of the fifth route used this time is relatively large, it can make the mobile terminal If the terminal correctly receives the test data packet, the mobile terminal will return a test response message, indicating that the distance of the fifth route needs to be further reduced. When the fifth routing distance used last time can make the test data packet reach the mobile terminal (that is, the test response message is received after sending the test data packet last time), but the fifth routing distance used this time cannot make the test data packet reach the mobile terminal The terminal (which did not receive a test response message after sending the test data packet this time), indicates that the fifth routing distance used this time can only reach the last hop outside the wireless communication network, and the fifth routing distance used last time is the route to The routing distance generated when the terminal is moved, therefore, the fifth routing distance used last time is used as the first routing distance. If the routing distance is reduced by 1 hop each time, the fifth routing distance used this time plus 1 hop may be used as the first routing distance.
(2)、UDP方式:(2), UDP mode:
第一步:根据移动终端的IP地址和UDP端口确定接收测试数据包的移动终端。Step 1: Determine the mobile terminal receiving the test data packet according to the IP address and UDP port of the mobile terminal.
在本方式中,通过移动终端的IP地址和UDP端口号来唯一确定一个移动终端,这里确定的移动终端即为需要接收测试数据包的移动终端。In this mode, a mobile terminal is uniquely determined through the IP address and UDP port number of the mobile terminal, and the mobile terminal determined here is the mobile terminal that needs to receive the test data packet.
测试数据包如果到达移动终端,移动终端能够正确接收测试数据包并返回测试回应消息;测试数据包如果没有到达移动终端,即在到达移动终端之前测试数据包的TTL之前变为1或0,移动终端在规定时长内没有接收到测试数据包,则不返回的测试回应消息,即向移动终端发送的测试数据包超时。If the test data packet arrives at the mobile terminal, the mobile terminal can correctly receive the test data packet and return a test response message; if the test data packet does not arrive at the mobile terminal, that is, it becomes 1 or 0 before the TTL of the test data packet before arriving at the mobile terminal, the mobile terminal If the terminal does not receive the test data packet within the specified time period, no test response message is returned, that is, the test data packet sent to the mobile terminal times out.
第二步:预先设定第六路由距离。Step 2: Preset the sixth routing distance.
本步骤中的第六路由距离在初始时可以设置较大,确保第一次发送的测试数据包能够被移动终端正确接收,如在初始时设置第六路由距离为64跳。The sixth routing distance in this step can be set relatively large initially to ensure that the test data packet sent for the first time can be correctly received by the mobile terminal, such as setting the sixth routing distance to 64 hops initially.
第三步:逐渐减小预先设定的第六路由距离,针对每次减小后得到的路由距离执行以下操作:Step 3: Gradually reduce the preset sixth routing distance, and perform the following operations for the routing distance obtained after each reduction:
将本次得到的路由距离作为测试数据包的生存时间,向第一步确定的移动终端发送该测试数据包,并判断是否接收到移动终端返回的测试回应消息;Using the routing distance obtained this time as the survival time of the test packet, send the test packet to the mobile terminal determined in the first step, and judge whether to receive the test response message returned by the mobile terminal;
若是,则继续减小路由距离;If so, continue to reduce the routing distance;
否则,将本次得到的路由距离加1作为第一路由距离。Otherwise, add 1 to the routing distance obtained this time as the first routing distance.
3、二分法方式:3. Dichotomy method:
二分法方式也包括TCP方式和UDP方式,具体说明如下:The dichotomy method also includes the TCP method and the UDP method, and the details are as follows:
(1)、TCP方式:(1), TCP mode:
第一步:通过已确定五元组信息的TCP连接,即发送心跳数据包所要保活的长连接。Step 1: Through the TCP connection that has determined the quintuple information, that is, the long connection to be kept alive by sending the heartbeat data packet.
第二步:预先设定上限路由距离和下限路由距离,在初始时,所述上限路由距离大于下限路由距离。Step 2: Predefine an upper limit routing distance and a lower limit routing distance. Initially, the upper limit routing distance is greater than the lower limit routing distance.
第三步:在每次上限路由距离或下限路由距离发生更新时,判断上限路由距离是否不小于下限路由距离,若是,则执行以下操作,直至上限路由距离小于下限路由距离:Step 3: When the upper limit routing distance or the lower limit routing distance is updated, determine whether the upper limit routing distance is not less than the lower limit routing distance. If so, perform the following operations until the upper limit routing distance is smaller than the lower limit routing distance:
将本次得到上限路由距离和下限路由距离的平均值取整,得到第七路由距离,并将本次得到的第七路由距离作为测试数据包的生存时间,通过第一步确定的TCP连接向移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;The average value of the upper limit routing distance and the lower limit routing distance obtained this time is rounded to obtain the seventh routing distance, and the seventh routing distance obtained this time is used as the survival time of the test data packet, and the TCP connection determined in the first step is sent to The mobile terminal sends the test data packet, and judges whether a returned test response message is received;
若是,则将本次得到的第七路由距离的路由跳数减1后作为更新后的上限路由距离;If so, then subtract 1 from the routing hop count of the seventh routing distance obtained this time as the updated upper routing distance;
否则,将本次得到的第七路由距离的路由跳数减1后作为更新后的下限路由距离。Otherwise, subtract 1 from the routing hop count of the seventh routing distance obtained this time as the updated lower limit routing distance.
例如,在第N次发送测试数据包时,TTL_max=64,TTL_min=0,TTL_max大于TTL_min,第七路由距离的路由跳数为[(TTL_max+TTL_min)/2]=32,以32跳作为生存时间发送测试数据包N。For example, when sending a test packet for the Nth time, TTL_max=64, TTL_min=0, TTL_max is greater than TTL_min, the number of routing hops of the seventh routing distance is [(TTL_max+TTL_min)/2]=32, and 32 hops are used as the survival Time to send test packet N.
针对测试数据包N,若返回测试回应消息,表示32跳时移动终端能够正确接收测试数据包,则将当前的第七路由距离32-1=31作为更新后的TTL_max,即TTL_max=31,TTL_min=0。此时,TTL_max仍大于TTL_min,可以重新计算得到第七路由距离的路由跳数为[(TTL_max+TTL_min)/2]=15,以15跳作为生存时间发送测试数据包N+1,以此类推。For the test data packet N, if the test response message is returned, indicating that the mobile terminal can correctly receive the test data packet at 32 hops, the current seventh routing distance 32-1=31 is used as the updated TTL_max, that is, TTL_max=31, TTL_min =0. At this time, TTL_max is still greater than TTL_min, and the number of routing hops that can be recalculated to obtain the seventh routing distance is [(TTL_max+TTL_min)/2]=15, and the test packet N+1 is sent with 15 hops as the survival time, and so on .
针对测试数据包N,若没有返回测试回应消息,表示32跳时移动终端已经不能够正确接收测试数据包,则将当前的第七路由距离32-1=31作为更新后的TTL_min,即TTL_max=64,TTL_min=31。此时,TTL_max仍大于TTL_min,可以重新计算得到第七路由距离的路由跳数为[(TTL_max+TTL_min)/2]=47,以47跳作为生存时间发送测试数据包N+1,以此类推。For the test data packet N, if no test response message is returned, it means that the mobile terminal cannot correctly receive the test data packet at 32 hops, then the current seventh routing distance 32-1=31 is used as the updated TTL_min, that is, TTL_max= 64, TTL_min=31. At this time, TTL_max is still greater than TTL_min, and the number of routing hops that can be recalculated to obtain the seventh routing distance is [(TTL_max+TTL_min)/2]=47, and the test packet N+1 is sent with 47 hops as the survival time, and so on .
第四步:确定在上限路由距离小于下限路由距离时得到的第七路由距离。Step 4: Determine the seventh routing distance obtained when the upper routing distance is smaller than the lower routing distance.
第五步:在以第四步得到的第七路由距离为测试数据包的生存时间时,若接收到测试超时消息,则将该第七路由距离的路由跳数加1后作为第一路由距离;若接收到测试正确消息,则将该第七路由距离的路由跳数作为第一路由距离。Step 5: When the seventh routing distance obtained in the fourth step is used as the survival time of the test packet, if a test timeout message is received, add 1 to the routing hop count of the seventh routing distance as the first routing distance ; If the test is correct message is received, the routing hop count of the seventh routing distance is used as the first routing distance.
(2)、UDP方式:(2), UDP mode:
第一步:根据移动终端的IP地址和UDP端口确定接收测试数据包的移动终端。Step 1: Determine the mobile terminal receiving the test data packet according to the IP address and UDP port of the mobile terminal.
第二步:预先设定上限路由距离和下限路由距离,在初始时,所述上限路由距离大于下限路由距离。Step 2: Predefine an upper limit routing distance and a lower limit routing distance. Initially, the upper limit routing distance is greater than the lower limit routing distance.
第三步:在每次上限路由距离或下限路由距离发生更新时,判断上限路由距离是否不小于下限路由距离,若是,则执行以下操作,直至上限路由距离小于下限路由距离:Step 3: When the upper limit routing distance or the lower limit routing distance is updated, determine whether the upper limit routing distance is not less than the lower limit routing distance. If so, perform the following operations until the upper limit routing distance is smaller than the lower limit routing distance:
将本次得到上限路由距离和下限路由距离的平均值取整,得到第八路由距离,并将本次得到的第八路由距离作为测试数据包的生存时间,向第一步确定的移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;Round the average value of the upper limit routing distance and the lower limit routing distance obtained this time to obtain the eighth routing distance, and use the eighth routing distance obtained this time as the survival time of the test data packet, and send it to the mobile terminal determined in the first step The test packet, and determine whether a returned test response message is received;
若是,则将本次得到的第八路由距离的路由跳数减1后作为更新后的上限路由距离;If so, then subtract 1 from the route hop count of the eighth route distance obtained this time as the updated upper limit route distance;
否则,将本次得到的第八路由距离的路由跳数减1后作为更新后的下限路由距离。Otherwise, subtract 1 from the routing hop count of the eighth routing distance obtained this time as the updated lower limit routing distance.
例如,在第N次发送测试数据包时,TTL_max=64,TTL_min=0,TTL_max大于TTL_min,第八路由距离的路由跳数为[(TTL_max+TTL_min)/2]=32,以32跳作为生存时间发送测试数据包N。For example, when sending a test packet for the Nth time, TTL_max=64, TTL_min=0, TTL_max is greater than TTL_min, the number of routing hops of the eighth routing distance is [(TTL_max+TTL_min)/2]=32, and 32 hops are used as the survival Time to send test packet N.
针对测试数据包N,若返回测试回应消息,表示32跳时移动终端能够正确接收测试数据包,则将当前的第八路由距离32-1=31作为更新后的TTL_max,即TTL_max=31,TTL_min=0。此时,TTL_max仍大于TTL_min,可以重新计算得到第八路由距离的路由跳数为[(TTL_max+TTL_min)/2]=15,以15跳作为生存时间发送测试数据包N+1,以此类推。For the test data packet N, if the test response message is returned, indicating that the mobile terminal can correctly receive the test data packet at 32 hops, the current eighth routing distance 32-1=31 is used as the updated TTL_max, that is, TTL_max=31, TTL_min =0. At this time, TTL_max is still greater than TTL_min, and the number of route hops that can be recalculated to obtain the eighth route distance is [(TTL_max+TTL_min)/2]=15, and the test packet N+1 is sent with 15 hops as the survival time, and so on .
针对测试数据包N,若没有返回测试回应消息,表示32跳时移动终端已经不能够正确接收测试数据包,则将当前的第八路由距离32-1=31作为更新后的TTL_min,即TTL_max=64,TTL_min=31。此时,TTL_max仍大于TTL_min,可以重新计算得到第八路由距离的路由跳数为[(TTL_max+TTL_min)/2]=47,以47跳作为生存时间发送测试数据包N+1,以此类推。For the test data packet N, if no test response message is returned, it means that the mobile terminal cannot correctly receive the test data packet at 32 hops, then the current eighth routing distance 32-1=31 is used as the updated TTL_min, that is, TTL_max= 64, TTL_min=31. At this time, TTL_max is still greater than TTL_min, and the number of routing hops that can be recalculated to obtain the eighth routing distance is [(TTL_max+TTL_min)/2]=47, and the test packet N+1 is sent with 47 hops as the survival time, and so on .
第四步:确定在上限路由距离小于下限路由距离时得到的第八路由距离。Step 4: Determine the eighth routing distance obtained when the upper routing distance is smaller than the lower routing distance.
第五步:在以第四步得到的第八路由距离为测试数据包的生存时间时,若接收到测试超时消息,则将该第八路由距离的路由跳数加1后作为第一路由距离;若接收到测试正确消息,则将该第八路由距离的路由跳数作为第一路由距离。Step 5: When the eighth routing distance obtained in the fourth step is used as the survival time of the test packet, if a test timeout message is received, add 1 to the routing hop count of the eighth routing distance as the first routing distance ; If the test is correct message is received, the routing hop count of the eighth routing distance is used as the first routing distance.
需要说明的是,在上述各种方式下,由于测试数据包在传输过程中的网络传输质量等原因可能造成测试数据包的丢包,使移动终端无法正确接收到测试数据包,因此,当本次发送测试数据包后确定移动终端没有接收到测试数据包时,可以以本次相同的路由距离执行重传操作,在重传次数达到门限值时移动终端还没有接收到测试数据包,则利用本次使用的路由距离来确定第一路由距离。It should be noted that, in the above-mentioned various methods, due to reasons such as the network transmission quality of the test data packet during transmission, the test data packet may be lost, so that the mobile terminal cannot receive the test data packet correctly. Therefore, when this When it is determined that the mobile terminal has not received the test data packet after sending the test data packet for the first time, the retransmission operation can be performed with the same routing distance this time. When the number of retransmissions reaches the threshold value, the mobile terminal has not received the test data packet, then The first routing distance is determined by using the routing distance used this time.
另外,为了保证第一路由距离恰好是路由至移动终端时产生的路由距离,在上述任一方式下,每次增大或减小的路由距离为1跳。In addition, in order to ensure that the first routing distance is exactly the routing distance generated when routing to the mobile terminal, in any of the above methods, the routing distance is increased or decreased by 1 hop each time.
实施例二:Embodiment two:
本发明实施例一的方案,可以在移动终端和应用服务器之间通过与网关的第一长连接和第二长连接进行控制信令和数据的传输,特殊地,若待传输数据的数据量非常大(如邮件中携带的大数量的附件),将大量数据与控制信令和少量的数据同时通过一条长连接进行传输时,可能会影响控制信令的正确传输,因此,本实施例二在实施例一的基础上,为大数据量的数据建立临时的长连接进行数据透传。The solution of Embodiment 1 of the present invention can transmit control signaling and data between the mobile terminal and the application server through the first long connection and the second long connection with the gateway. In particular, if the amount of data to be transmitted is very large Large (such as a large number of attachments carried in the mail), when a large amount of data and control signaling and a small amount of data are transmitted through a long connection at the same time, it may affect the correct transmission of the control signaling. On the basis of Embodiment 1, a temporary long connection is established for data with a large amount of data to transparently transmit data.
本实施例二的方案如下:The scheme of present embodiment two is as follows:
第一步:移动终端与归属网关之间建立第一长连接,应用服务器与归属网关之间建立第二长连接。Step 1: A first long connection is established between the mobile terminal and the home gateway, and a second long connection is established between the application server and the home gateway.
第二步:移动终端通过第一长连接上行传输上行数据消息,网关将该上行数据消息通过第二长连接发送给应用服务器。Step 2: The mobile terminal transmits the uplink data message uplink through the first long connection, and the gateway sends the uplink data message to the application server through the second long connection.
本实施例二的方案中,移动终端向应用服务器上行传输上行数据消息的方式与实施例一相同。In the solution of the second embodiment, the manner in which the mobile terminal uplinks the uplink data message to the application server is the same as that in the first embodiment.
第三步:移动终端向网关发送代理请求,所述代理请求中携带应用服务器的标识和待传输数据的数据量。Step 3: The mobile terminal sends a proxy request to the gateway, and the proxy request carries the identification of the application server and the amount of data to be transmitted.
在本实施例的方案中,网关具有支持来自移动终端的代理(Proxy)请求的能力。In the solution of this embodiment, the gateway has the ability to support a proxy (Proxy) request from a mobile terminal.
第四步:网关判断所述数据量是否达到门限值,若是,则执行第五步;否则,要求移动终端将待传输数据通过第一长连接进行传输。Step 4: The gateway judges whether the amount of data reaches a threshold, and if so, executes Step 5; otherwise, requires the mobile terminal to transmit the data to be transmitted through the first long connection.
第五步:网关根据代理请求中携带的应用服务器的标识,判断是否已与对应的应用服务器建立第二长连接:Step 5: The gateway judges whether the second long connection has been established with the corresponding application server according to the application server identification carried in the proxy request:
若是,网关分别与所述移动终端和对应的应用服务器之间建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与应用服务器之间的临时长连接透传至应用服务器,并在传输结束后释放与应用服务器之间的临时长连接。If so, the gateway respectively establishes a temporary long connection with the mobile terminal and the corresponding application server, receives the data to be transmitted from the mobile terminal through the temporary long connection with the mobile terminal, and releases the data to be transmitted with the mobile terminal after the transmission is completed. A temporary long connection between terminals, and transparently transmitting the data to be transmitted to the application server through the temporary long connection with the application server, and releasing the temporary long connection with the application server after the transmission is completed.
否则,网关从DNS中查询与所述对应的应用服务器建立第二长连接的其他网关,并分别与所述移动终端和所述其他网关建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与所述其他网关之间的临时长连接透传至其他网关,并在传输结束后释放与所述其他网关之间的临时长连接。Otherwise, the gateway queries DNS for other gateways that have established a second long connection with the corresponding application server, and establishes temporary long connections with the mobile terminal and the other gateways respectively, and through the temporary long connection with the mobile terminal receiving the data to be transmitted from the mobile terminal, releasing the temporary long connection with the mobile terminal after the transmission, and transparently transmitting the data to be transmitted through the temporary long connection with the other gateways to other gateways, and release the temporary long connection with the other gateways after the transmission ends.
通过本发明实施例二的方案,移动终端、网关和应用服务器之间针对大数据量的数据单独建立临时长连接,网关将移动终端发送的大数据量的数据透传给应用服务器或其他网关,不对数据进行AOP层的协议封装和控制,此时,网关相当于移动终端和应用服务器之间的透明代理,避免了大数据量的传输对其他控制信令的传输造成影响,同时,临时连接在传输结束后将会被释放,最大程度地节约移动终端和应用服务器的资源。另外,由于Proxy形式的临时长连接没有心跳检测,在一些特殊情况下(如移动终端断电),网关将接收不到断链报文,此时,网关将一直维护与移动终端之间的临时长连接,造成网关的资源浪费。因此,网关可周期性地对与移动终端之间的临时长连接进行此能够检测,查询是否有数据传输,如果在一段连续的时间内没有临时长连接没有数据传输,则释放该临时长连接。网关与应用服务器之间的临时长连接的释放过程与移动终端相似。Through the solution of the second embodiment of the present invention, the mobile terminal, the gateway and the application server separately establish a temporary long connection for data with a large amount of data, and the gateway transparently transmits the data with a large amount of data sent by the mobile terminal to the application server or other gateways, The data is not encapsulated and controlled by the AOP layer protocol. At this time, the gateway is equivalent to a transparent proxy between the mobile terminal and the application server, which avoids the impact of large data transmission on the transmission of other control signaling. At the same time, the temporary connection is in the It will be released after the transmission is over, saving the resources of the mobile terminal and the application server to the greatest extent. In addition, since there is no heartbeat detection for the temporary long connection in the form of Proxy, in some special cases (such as the power failure of the mobile terminal), the gateway will not receive the broken link message. At this time, the gateway will always maintain the temporary connection with the mobile terminal. Long connections cause a waste of gateway resources. Therefore, the gateway can periodically detect the temporary long connection with the mobile terminal, query whether there is data transmission, and release the temporary long connection if there is no temporary long connection and no data transmission within a continuous period of time. The release process of the temporary long connection between the gateway and the application server is similar to that of the mobile terminal.
实施例三:Embodiment three:
本发明实施例三还提供一种下行数据传输的方法,如图6所示,所述方法包括以下步骤:Embodiment 3 of the present invention also provides a method for downlink data transmission, as shown in FIG. 6, the method includes the following steps:
步骤601:应用服务器通过与网关之间建立的第二长连接向网关发送下行数据消息。Step 601: the application server sends a downlink data message to the gateway through the second long connection established with the gateway.
在本实施例的方案中,每个应用服务器与归属的网关之间建立了一条第二长连接,当应用服务器需要向所服务的任意移动终端推送下行数据消息时,通过该第二长连接将下行数据消息发送至网关。In the solution of this embodiment, a second long connection is established between each application server and the home gateway. When the application server needs to push a downlink data message to any mobile terminal it serves, the second long connection will Downlink data messages are sent to the gateway.
在所述下行数据消息中携带了移动终端的标识,根据实施例一和实施例二的描述,本发明所涉及的移动终端的标识包括了移动终端在应用服务器中注册时使用的第一标识以及移动终端在网关中注册时使用的第二标识,因此,应用服务器存储的移动终端标识是移动终端的第一标识(如手机号码),则应用服务器将移动终端的第一标识携带在下行数据消息,用于指示网关向相应的移动终端发送该下行数据消息。The identification of the mobile terminal is carried in the downlink data message. According to the description of the first and second embodiments, the identification of the mobile terminal involved in the present invention includes the first identification used when the mobile terminal registers in the application server and The second identifier used when the mobile terminal is registered in the gateway. Therefore, the mobile terminal identifier stored by the application server is the first identifier of the mobile terminal (such as a mobile phone number), and the application server will carry the first identifier of the mobile terminal in the downlink data message , used to instruct the gateway to send the downlink data message to the corresponding mobile terminal.
进一步地,由于本步骤是应用服务器主动向移动终端推送下行数据消息的过程,此时,移动终端可能与网关建立第一长连接,可以实时接收下行数据消息,也可能没有与网关建立第一长连接,不能实时接收下行数据消息;同时,移动终端内需要接收该下行数据消息的应用程序可能出于运行、休眠或退出这三种状态,因此,即使移动终端接收到该下行数据消息,处于休眠或退出状态的应用程序也不能及时接收并处理下行数据消息。因此,应用服务器在发送给网关的下行数据消息中设置一个标志位,若标志位置为1,表示该下行数据消息的实时性高,应用服务器希望该下行数据消息及时被相应的应用程序接收,若该应用程序处于休眠或退出状态,则要求移动终端唤醒该应用程序;若标志位置为0,表示该下行数据消息的实时性低,若该应用程序处于休眠或退出状态,则移动终端可以等待相应的应用程序运行后再发送给该应用程序。Further, since this step is a process in which the application server actively pushes the downlink data message to the mobile terminal, at this time, the mobile terminal may establish a first long-term connection with the gateway, and may receive the downlink data message in real time, or may not establish the first long-term connection with the gateway. connection, the downlink data message cannot be received in real time; at the same time, the application program that needs to receive the downlink data message in the mobile terminal may be in the three states of running, dormant or exited, so even if the mobile terminal receives the downlink data message, it is in dormancy Or the application program in the exit state cannot receive and process the downlink data message in time. Therefore, the application server sets a flag bit in the downlink data message sent to the gateway. If the flag bit is 1, it means that the real-time performance of the downlink data message is high, and the application server hopes that the downlink data message will be received by the corresponding application in time. If the application program is in the dormant or exit state, the mobile terminal is required to wake up the application program; if the flag position is 0, it means that the real-time performance of the downlink data message is low. If the application program is in the dormancy or exit state, the mobile terminal can wait for the corresponding is sent to the application after it runs.
步骤602:网关根据下行数据消息中携带的移动终端的第一标识确定对应的移动终端。Step 602: The gateway determines the corresponding mobile terminal according to the first identifier of the mobile terminal carried in the downlink data message.
与实施例一相似的,本实施例中的移动终端也在网关中注册,DNS中存储移动终端的第一标识和第二标识,同时还存储了网关和分别与该网关建立第二长连接的应用服务器的第一对应关系,以及第二标识与该移动终端归属网关标识之间的第二对应关系。DNS可以向用户以及网关提供友好的图形界面以支持对存储的信息进行增加、删除、修改和查询操作,并且存储的信息及时生效可以使用。Similar to Embodiment 1, the mobile terminal in this embodiment is also registered in the gateway, and the first identifier and the second identifier of the mobile terminal are stored in the DNS, and the gateway and the second long-term connection respectively established with the gateway are also stored in the DNS. The first corresponding relationship of the application server, and the second corresponding relationship between the second identification and the identification of the home gateway of the mobile terminal. DNS can provide users and gateways with a friendly graphical interface to support adding, deleting, modifying and querying stored information, and the stored information will take effect and be available in a timely manner.
网关根据接收到的移动终端的第一标识,从DNS中查询出对应的第二标识,网关根据该第二标识确定对应的移动终端。The gateway searches the DNS for the corresponding second identifier according to the received first identifier of the mobile terminal, and the gateway determines the corresponding mobile terminal according to the second identifier.
步骤603:网关通过与所述移动终端之间的第一长连接,将所述下行数据消息发送至所述移动终端。Step 603: The gateway sends the downlink data message to the mobile terminal through the first long connection with the mobile terminal.
与实施例一类似的,下行数据消息源端的应用服务器和目的端的移动终端可能归属相同的网关,也可能归属不同的网关。Similar to Embodiment 1, the application server at the source end of the downlink data message and the mobile terminal at the destination end may belong to the same gateway, or may belong to different gateways.
1、若应用服务器和移动终端归属相同的网关,则本步骤的具体实现方式为:1. If the application server and the mobile terminal belong to the same gateway, the specific implementation of this step is as follows:
网关检测是否已与所述移动终端建立第一长连接;The gateway detects whether a first long connection has been established with the mobile terminal;
若是,则通过已建立的第一长连接将所述下行数据消息发送至所述移动终端。If yes, then send the downlink data message to the mobile terminal through the established first long connection.
否则,通知移动终端建立与网关的第一长连接,在第一长连接建立后,将所述下行数据消息发送至所述移动终端。Otherwise, notify the mobile terminal to establish the first long connection with the gateway, and send the downlink data message to the mobile terminal after the first long connection is established.
需要说明的是,当网关检测到没有与移动终端建立第一长连接时,网关可以采用短消息通知的方式,要求移动终端与网关建立第一长连接,以保证下行数据消息的及时推送。It should be noted that when the gateway detects that the first long-term connection has not been established with the mobile terminal, the gateway may use a short message notification method to request the mobile terminal to establish the first long-term connection with the gateway, so as to ensure timely push of downlink data messages.
2、若应用服务器和移动终端归属不相同的网关,则本步骤的具体实现方式为:2. If the application server and the mobile terminal belong to different gateways, the specific implementation of this step is as follows:
由于接收下行数据消息的网关不是移动终端归属的网关,因此,该移动终端与网关之间没有建立第一长连接。网关确定没有与目的端的移动终端建立第一长连接,且从DNS中查询该移动终端的第二标识,发现该移动终端不是在本地注册的移动终端,则网关根据DNS中存储的第二对应关系,查询出目的端移动终端归属的其他网关(为了将与接收应用服务器发送的下行数据消息的网关和移动终端归属网关进行区分,将移动终端归属网关称之为其他网关),并将所述下行数据消息发送至所述其他网关后,由所述其他网关发送至所述移动终端。Since the gateway receiving the downlink data message is not the gateway to which the mobile terminal belongs, the first long connection is not established between the mobile terminal and the gateway. The gateway determines that the first long connection has not been established with the mobile terminal at the destination, and queries the second identification of the mobile terminal from the DNS, and finds that the mobile terminal is not a locally registered mobile terminal, then the gateway, according to the second correspondence stored in the DNS , query other gateways to which the destination mobile terminal belongs (in order to distinguish from the gateway that receives the downlink data message sent by the application server and the gateway to which the mobile terminal belongs, the gateway to which the mobile terminal belongs is referred to as other gateways), and the downlink After the data message is sent to the other gateways, it is sent to the mobile terminal by the other gateways.
另外,在步骤603的执行过程中,若网关接收到多个应用服务器发送的下行数据消息,或一个应用服务器发送的多条下行数据消息,网关可以按照实时例一的方式按照业务的优先级或移动终端的优先级进行排序后顺序发送。In addition, during the execution of step 603, if the gateway receives downlink data messages sent by multiple application servers, or multiple downlink data messages sent by one application server, the gateway can follow the service priority or The priorities of the mobile terminals are sorted and sent sequentially.
步骤604:移动终端接收到所述下行数据消息后,根据下行数据消息中携带的应用服务器标识,确定接收该下行数据消息的应用程序。Step 604: After receiving the downlink data message, the mobile terminal determines the application receiving the downlink data message according to the application server identifier carried in the downlink data message.
在本实施例的方案中,移动终端按照实时例一的方式对安装在本地的应用程序进行管理,记录在本地安装的应用程序的标识,以及各应用程序对应的应用服务器的标识。In the solution of this embodiment, the mobile terminal manages the locally installed application programs according to the real-time example 1, and records the identifiers of the locally installed application programs and the identifiers of the application servers corresponding to each application program.
步骤605:移动终端查询该应用程序是否处于运行状态,若是,则通知该应用程序获取所述下行数据消息;否则,唤醒或启动该应用程序,通知唤醒后或启动后的应用程序获取所述下行数据消息。Step 605: The mobile terminal inquires whether the application program is running, and if so, notifies the application program to obtain the downlink data message; otherwise, wakes up or starts the application program, and notifies the wake-up or started application program to obtain the downlink data message data message.
若应用服务器将推送的下行数据消息的标志位置1,表示要求唤醒移动终端的应用程序,则在网关确定作为目的端的移动终端后,通过以下两种方式唤醒移动终端内的应用程序:If the application server sets the flag position of the pushed downlink data message to 1, indicating that it is required to wake up the application program of the mobile terminal, then after the gateway determines the mobile terminal as the destination, it wakes up the application program in the mobile terminal in the following two ways:
第一种方式:移动终端与网关已建立第一长连接时,网关通过所述第一长连接向移动终端发送唤醒数据包,即IP Push唤醒方式,要求移动终端唤醒需要接收该下行数据消息的应用程序。The first way: when the mobile terminal and the gateway have established the first long connection, the gateway sends a wake-up data packet to the mobile terminal through the first long connection, that is, the IP Push wake-up mode, requiring the mobile terminal to wake up the mobile terminal that needs to receive the downlink data message application.
第二种方式:移动终端与网关之间没有建立第一长连接,网关采用短消息通知的方式,要求移动终端与网关建立第一长连接后,再通过所述第一长连接向移动终端发送唤醒数据包,即短消息唤醒方式。The second method: the first long connection is not established between the mobile terminal and the gateway, and the gateway uses a short message notification method to require the mobile terminal to establish the first long connection with the gateway, and then send a message to the mobile terminal through the first long connection. Wake-up packet, that is, short message wake-up method.
在移动终端本地,移动终端内有一个AOI中间件,用于各应用程序进行有序管理以及与网关之间的长连接管理等功能,移动终端本地安装的应用程序在运行状态时可以通过Socket长连接的方式直接连接到AOI中间件中,获取由网关通过第一长连接推送的下行数据消息;若安装的应用程序没有在运行状态,则移动终端唤醒或启动该应用程序后,应用程序再通过Socket长连接的方式连接到AOI中间件,进而获取由网关通过第一长连接推送的下行数据消息。On the local side of the mobile terminal, there is an AOI middleware in the mobile terminal, which is used for orderly management of various applications and long-term connection management with the gateway. The connection method is directly connected to the AOI middleware to obtain the downlink data message pushed by the gateway through the first long connection; if the installed application program is not running, after the mobile terminal wakes up or starts the application program, the application program passes through Connect to the AOI middleware in the way of Socket long connection, and then obtain the downlink data message pushed by the gateway through the first long connection.
与实施例二类似地,本实施例三的方案也可以在应用服务器待传输数据的数据量非常大时采用Proxy传输方式,通过额外建立应用服务器与网关、网关与移动终端之间的临时长连接来透传大数据量的数据。Similar to Embodiment 2, the solution of Embodiment 3 can also adopt the Proxy transmission method when the amount of data to be transmitted by the application server is very large, by additionally establishing temporary long connections between the application server and the gateway, and between the gateway and the mobile terminal To transparently transmit a large amount of data.
同时,本实施例三的方案也可以按照实时例一的方式对下行数据消息进行加密和压缩后传输,以及由网关生成采用本实施例三方式进行下行传输的话单。At the same time, the solution of the third embodiment can also encrypt and compress the downlink data message for transmission according to the method of the real-time example 1, and the gateway can generate a bill for downlink transmission using the method of the third embodiment.
在本实施例三的方案中,同样为了能够使移动终端与网关之间的第一长连接实时保活,同时不增加无线通信网络的资源开销,因此将心跳数据包的生存时间设定为大于经过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离,一方面使心跳数据包能够穿过核心网防火墙,达到对移动终端与网关之间的第一长连接的保活目的,另一方面,心跳数据包并没有进入无线通信网络,不会增加无线通信网络的负担,也不会占用无线信道。In the solution of the third embodiment, also in order to keep the first long connection between the mobile terminal and the gateway alive in real time without increasing the resource overhead of the wireless communication network, the lifetime of the heartbeat data packet is set to be greater than The distance through the core network firewall is less than the distance to the wireless communication network where the mobile terminal is located. On the one hand, the heartbeat data packet can pass through the core network firewall to achieve the purpose of keeping alive the first long connection between the mobile terminal and the gateway. , on the other hand, the heartbeat data packet does not enter the wireless communication network, will not increase the burden on the wireless communication network, and will not occupy the wireless channel.
本实施例三中针对第一长连接传输心跳数据包的方法与实施例一的方法相同。The method for transmitting the heartbeat data packet for the first long connection in the third embodiment is the same as the method in the first embodiment.
与实施例一类似的,通过以上步骤601~步骤605描述的技术方案,网关成为应用服务器与移动终端之间实时传输过程的中介,应用服务器不需要分别与大量的移动终端建立长连接,只需要与一台网关建立一条第二长连接就可以向服务的任意移动终端实时推送下行数据消息,移动终端也只需要与一台网关建立一条第一长连接就可以实时接收应用服务器推送的下行数据消息,在保证数据传输高实时性的情况下,可以有效减少移动终端和应用服务器为长连接分配的资源开销。Similar to Embodiment 1, through the technical solutions described in steps 601 to 605 above, the gateway becomes the intermediary of the real-time transmission process between the application server and the mobile terminal, and the application server does not need to establish long connections with a large number of mobile terminals respectively, only Establishing a second long connection with a gateway can push downlink data messages to any mobile terminal served in real time, and mobile terminals only need to establish a first long connection with a gateway to receive real-time downlink data messages pushed by the application server , in the case of ensuring high real-time data transmission, it can effectively reduce the resource overhead allocated by the mobile terminal and the application server for the long connection.
实施例四:Embodiment four:
本发明实施例四还提供一种与实施例一和实施例二属于同一发明构思下的数据传输的系统,应用于上行传输过程中,如图7所示,包括移动终端11、网关12、应用服务器13和保活设备14,其中所述移动终端11用于与网关12之间建立第一长连接,并通过所述第一长连接向网关12发送上行数据消息,所述上行数据消息中携带应用服务器的标识;所述网关12用于在确定与所述应用服务器的标识对应的应用服务器13之间建立了第二长连接时,通过所述第二长连接,将所述上行数据消息发送至所述应用服务器13;所述应用服务器13用于通过所述第二长连接接收上行数据消息;所述保活设备14用于针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于心跳数据包经过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。所述保活设备14可以是网关12中的一个保活子系统,也可以是独立于网关12但能够与网关交互的设备。Embodiment 4 of the present invention also provides a data transmission system under the same inventive concept as Embodiment 1 and Embodiment 2, which is applied in the uplink transmission process, as shown in FIG. 7 , including a mobile terminal 11, a gateway 12, an application The server 13 and the keep-alive device 14, wherein the mobile terminal 11 is used to establish a first long connection with the gateway 12, and send an uplink data message to the gateway 12 through the first long connection, and the uplink data message carries The identification of the application server; the gateway 12 is configured to send the uplink data message through the second long connection when it is determined that a second long connection has been established between the application servers 13 corresponding to the application server identification To the application server 13; the application server 13 is used to receive the uplink data message through the second long connection; the keep-alive device 14 is used to use the set routing distance as the heartbeat for the first long connection The survival time of the data packet is to send the heartbeat data packet to the mobile terminal, and the routing distance is greater than the distance of the heartbeat data packet passing through the core network firewall, but less than the distance to the wireless communication network where the mobile terminal is located. The keep-
所述应用服务器13可以是互联网中的应用服务器,也可以是企业内部的应用服务器。The application server 13 may be an application server on the Internet, or an application server within an enterprise.
系统还包括域名系统15,用于接收移动终端11发起的网关查询请求,所述网关查询请求中携带移动终端在应用服务器中注册时使用的第一标识以及移动终端的第二标识,以及,向移动终端11返回该移动终端归属网关的路由信息,并存储移动终端的第一标识和第二标识;所述移动终端11还用于根据所述路由信息向网关发送包含第二标识的注册请求,并在注册后,与网关之间建立第一长连接;所述网关12还用于为移动终端注册。The system also includes a
从图8可以看出,网关与DNS之间通过接口相连,使网关可以实时从DNS中查询信息。It can be seen from Figure 8 that the gateway is connected to the DNS through an interface, so that the gateway can query information from the DNS in real time.
所述域名系统15还用于存储网关和分别与该网关建立第二长连接的应用服务器的第一对应关系。The
所述网关12具体用于根据上行数据消息中携带的应用服务器的标识,判断是否与对应的应用服务器建立第二长连接,若是,则将所述上行数据消息通过所述第二长连接发送至应用服务器,否则,从所述DNS中查询与所述对应的应用服务器建立第二长连接的其他网关,并将所述上行数据消息发送给所述其他网关后,由所述其他网关发送至所述对应的应用服务器。The gateway 12 is specifically configured to determine whether to establish a second long connection with the corresponding application server according to the identification of the application server carried in the uplink data message, and if so, send the uplink data message through the second long connection to The application server, otherwise, queries other gateways that have established a second long connection with the corresponding application server from the DNS, and after sending the uplink data message to the other gateways, the other gateways send the message to the other gateways. corresponding application server.
由于在本实施例中,网关需要进行路由管理,查询其他网关进行数据消息的发送,因此,网关与其他网关之间存在接口进行数据消息的传输。In this embodiment, the gateway needs to perform route management and query other gateways to send data messages, therefore, there is an interface between the gateway and other gateways to transmit data messages.
所述移动终端11还用于向网关发送代理请求,所述代理请求中携带应用服务器的标识和待传输数据的数据量;所述网关12还用于在确定所述数据量达到门限值时,根据代理请求中携带的应用服务器的标识,判断是否已与对应的应用服务器建立第二长连接,若是,则分别与所述移动终端和对应的应用服务器之间建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与应用服务器之间的临时长连接透传至应用服务器,并在传输结束后释放与应用服务器之间的临时长连接;否则,从DNS中查询与所述对应的应用服务器建立第二长连接的其他网关,并分别与所述移动终端和所述其他网关建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与所述其他网关之间的临时长连接透传至其他网关,并在传输结束后释放与所述其他网关之间的临时长连接。The mobile terminal 11 is also used to send a proxy request to the gateway, the proxy request carrying the identification of the application server and the data volume of the data to be transmitted; the gateway 12 is also used to determine that the data volume reaches a threshold According to the identification of the application server carried in the proxy request, it is judged whether a second long connection has been established with the corresponding application server, and if so, a temporary long connection is established between the mobile terminal and the corresponding application server respectively, and the connection with the mobile The temporary long connection between the terminals receives the data to be transmitted from the mobile terminal, releases the temporary long connection with the mobile terminal after the transmission, and passes the data to be transmitted through the temporary connection with the application server Transparently transmit the long connection to the application server, and release the temporary long connection with the application server after the transmission; otherwise, query the DNS for other gateways that have established the second long connection with the corresponding application server, and communicate with the corresponding application server respectively The mobile terminal establishes a temporary long connection with the other gateway, receives the data to be transmitted from the mobile terminal through the temporary long connection with the mobile terminal, and releases the temporary long connection with the mobile terminal after the transmission ends, And, transparently transmit the data to be transmitted to other gateways through the temporary long connections with the other gateways, and release the temporary long connections with the other gateways after the transmission ends.
所述移动终端11还用于记录在本地安装的应用程序的标识,以及各应用程序对应的应用服务器的标识,在接收到任一应用程序生成的上行数据消息后,确定对应的应用服务器的标识,并将所述应用服务器的标识携带在所述上行数据消息中。The mobile terminal 11 is also used to record the identifiers of the locally installed applications and the identifiers of the application servers corresponding to each application, and determine the identifier of the corresponding application server after receiving an uplink data message generated by any application , and carry the identifier of the application server in the uplink data message.
另外,根据本发明实施例一和实施例二的描述,网关还要通过短消息方式通知移动终端建立第一长连接、生成话单以及对移动终端进行管理,因此,本实施例系统中还可以进一步包括短消息网关(ISMG)、计费系统(BOSS)和网管。In addition, according to the description of Embodiment 1 and Embodiment 2 of the present invention, the gateway also needs to notify the mobile terminal to establish the first long connection, generate a bill, and manage the mobile terminal through a short message. Therefore, the system of this embodiment can also It further includes Short Message Gateway (ISMG), Billing System (BOSS) and network management.
实施例五:Embodiment five:
本发明实施例五还提供一种与实施例三属于同一发明构思下的数据传输的系统,其结构与实施例四的结构相同,应用在下行传输过程中,包括:移动终端11、网关12、应用服务器13和保活设备14,其中:应用服务器13用于与网关12建立第二长连接,并通过所述第二长连接向网关发送下行数据消息,所述下行数据消息中携带移动终端在应用服务器中注册时使用的第一标识;网关12用于通过与所述第一标识对应的移动终端11之间的第一长连接,将所述下行数据消息发送至所述移动终端11;移动终端11用于通过所述第一长连接接收下行数据消息;所述保活设备14用于针对所述第一长连接,将设定的路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包,所述路由距离大于经过核心网防火墙的距离,但小于到达移动终端所在的无线通信网络的距离。Embodiment 5 of the present invention also provides a data transmission system under the same inventive concept as Embodiment 3. Its structure is the same as that of Embodiment 4, and it is applied in the downlink transmission process, including: mobile terminal 11, gateway 12, The application server 13 and the keep-
所述网关12具体用于检测是否已与所述移动终端建立第一长连接,若是,则通过已建立的第一长连接将所述下行数据消息发送至所述移动终端;否则,通知移动终端建立与网关的第一长连接,在第一长连接建立后,将所述下行数据消息发送至所述移动终端11。The gateway 12 is specifically used to detect whether a first long connection has been established with the mobile terminal, and if so, send the downlink data message to the mobile terminal through the established first long connection; otherwise, notify the mobile terminal A first long connection with the gateway is established, and the downlink data message is sent to the mobile terminal 11 after the first long connection is established.
还包括域名系统15,用于存储移动终端的第一标识和第二标识,以及第二标识与该移动终端归属网关标识之间的第二对应关系;所述网关12具体用于根据下行数据消息中携带的第一标识,从DNS中查询该移动终端的第二标识,并根据查询出的第二标识判断所述移动终端是否是在本地注册的移动终端,若是,则通过第一长连接将所述下行数据消息发送至所述移动终端;否则,根据所述第二对应关系,从DNS中查询该移动终端归属的其他网关,并将所述下行数据消息发送至所述其他网关后,由所述其他网关发送至所述移动终端。It also includes a
所述应用服务器13还用于向网关12发送代理请求,所述代理请求中携带移动终端的第一标识和待传输数据的数据量;所述网关12还用于在确定所述数据量达到门限值时,根据代理请求中携带的第一标识,通过查询DNS确定对应的第二标识,并根据确定的第二标识判断对应的移动终端是否是在本地注册的移动终端,若是,则网关分别与所述对应的移动终端和发送代理请求的应用服务器之间建立临时长连接,通过与应用服务器之间的临时长连接接收来自应用服务器的所述待传输数据,并在传输结束后释放与应用服务器之间的临时长连接,以及将所述待传输数据通过与移动终端之间的临时长连接透传至移动终端,并在传输结束后释放与移动终端之间的临时长连接;否则,网关从DNS中查询所述对应的移动终端归属的其他网关,并分别与发送代理请求的应用服务器和所述其他网关之间建立临时长连接,通过与应用服务器之间的临时长连接接收来自应用服务器的待传输数据,并在传输结束后释放与应用服务器之间的临时长连接,以及将所述待传输数据通过与所述其他网关之间的临时长连接透传至其他网关,并在传输结束后释放与所述其他网关之间的临时长连接。The application server 13 is also used to send a proxy request to the gateway 12, the proxy request carries the first identification of the mobile terminal and the data volume of the data to be transmitted; the gateway 12 is also used to determine that the data volume reaches the threshold When the limit value is reached, according to the first identifier carried in the proxy request, the corresponding second identifier is determined by querying DNS, and according to the determined second identifier, it is judged whether the corresponding mobile terminal is a locally registered mobile terminal, and if so, the gateway respectively Establish a temporary long connection with the corresponding mobile terminal and the application server sending the proxy request, receive the data to be transmitted from the application server through the temporary long connection with the application server, and release the data with the application server after the transmission is completed. The temporary long connection between the servers, and transparently transmit the data to be transmitted to the mobile terminal through the temporary long connection with the mobile terminal, and release the temporary long connection with the mobile terminal after the transmission; otherwise, the gateway Query the other gateways to which the corresponding mobile terminal belongs from DNS, and establish temporary long connections with the application server sending the proxy request and the other gateways, and receive data from the application server through the temporary long connection with the application server. data to be transmitted, release the temporary long connection with the application server after the transmission, and transparently transmit the data to be transmitted to other gateways through the temporary long connection with the other gateways, and release the temporary long connection with the application server after the transmission ends Then release the temporary long connection with the other gateways.
所述移动终端11还用于记录在本地安装的应用程序的标识,以及各应用程序对应的应用服务器的标识,在接收到下行数据消息时,根据下行数据消息中携带的应用服务器标识,确定接收该下行数据消息的应用程序,并查询该应用程序是否处于运行状态,若是,则通知该应用程序获取所述下行数据消息;否则,唤醒或启动该应用程序,通知唤醒后或启动后的应用程序获取所述下行数据消息。The mobile terminal 11 is also used to record the identifiers of the locally installed applications and the identifiers of the application servers corresponding to each application, and when receiving the downlink data message, determine the received The application program of the downlink data message, and inquire whether the application program is in a running state, if so, notify the application program to obtain the downlink data message; otherwise, wake up or start the application program, and notify the application program after waking up or starting Obtain the downlink data message.
实施例六:Embodiment six:
本发明实施例六还提供一种与实施例一至实施例五属于同一发明构思下的网关,如图8所示,包括在线子系统、Proxy子系统、鉴权子系统和支撑子系统,下面分别加以说明。Embodiment 6 of the present invention also provides a gateway under the same inventive concept as Embodiment 1 to Embodiment 5, as shown in FIG. 8 , including an online subsystem, a Proxy subsystem, an authentication subsystem, and a support subsystem. The following are respectively To illustrate.
1、在线子系统遵循AOP(永远在线协议),接纳并维护与移动终端和应用服务器之间的长连接,同时提供对移动终端的长连接通知功能,要求与移动终端之间的长连接实时存在,将长连接方式与IP Push方式相配合,为移动终端和应用服务器之间提供及时、稳定、高效的数据传输服务。1. The online subsystem follows the AOP (Always On Protocol), accepts and maintains the long connection with the mobile terminal and the application server, and provides the notification function of the long connection to the mobile terminal at the same time, requiring the long connection between the mobile terminal to exist in real time , combining the long connection method with the IP Push method to provide timely, stable and efficient data transmission services between the mobile terminal and the application server.
在线子系统中包括第一连接模块和传输模块,其中,第一连接模块用于与移动终端之间建立第一长连接,与应用服务器之间建立第二长连接;传输模块用于在上行传输过程中,接收到移动终端通过第一长连接发送的上行数据消息时,根据该上行数据消息中携带的应用服务器的标识,将该上行数据消息通过第二长连接发送至对应的应用服务器,以及在下行传输过程中,接收到应用服务器通过第二长连接发送的下行数据消息时,根据该下行数据消息中携带的移动终端的第一标识,将该下行数据消息通过第一长连接发送至对应的移动终端。The online subsystem includes a first connection module and a transmission module, wherein the first connection module is used to establish a first long connection with the mobile terminal, and a second long connection with the application server; the transmission module is used for uplink transmission During the process, when receiving the uplink data message sent by the mobile terminal through the first long connection, according to the identification of the application server carried in the uplink data message, the uplink data message is sent to the corresponding application server through the second long connection, and During the downlink transmission process, when receiving the downlink data message sent by the application server through the second long connection, according to the first identification of the mobile terminal carried in the downlink data message, the downlink data message is sent to the corresponding mobile terminal.
在线子系统还包括:The online subsystem also includes:
路由管理模块,用于在上行传输过程中,判断是否与上行数据消息中携带的应用服务器的标识对应的应用服务器建立第二长连接,在没有建立第二长连接时,从DNS中查询与所述对应的应用服务器建立第二长连接的其他网关,在下行传输过程中,判断所述移动终端是否是在本地注册的移动终端,在所述移动终端不是在本地注册的移动终端时,从DNS中查询该移动终端归属的其他网关;进而所述传输模块,还用于并将所述上行数据消息或下行数据消息发送给所述其他网关。The routing management module is used to determine whether to establish a second long connection with the application server corresponding to the application server identifier carried in the uplink data message during the uplink transmission, and to query from the DNS when the second long connection is not established. The corresponding application server establishes other gateways of the second long connection. During the downlink transmission process, it is judged whether the mobile terminal is a locally registered mobile terminal. When the mobile terminal is not a locally registered mobile terminal, the DNS Query other gateways to which the mobile terminal belongs; and the transmission module is further configured to send the uplink data message or downlink data message to the other gateways.
注册模块,用于完成对移动终端的注册操作,并记录已注册移动终端的第二标识。The registration module is used to complete the registration operation of the mobile terminal, and record the second identification of the registered mobile terminal.
VPN接入模块,用于通过第一长连接和第二长连接对上行数据消息和下行数据消息进行传输时,通过虚拟专用网络(VPN)的方式,对上行数据消息和下行数据消息进行安全管理,如采用隧道技术、加解密技术、密钥管理技术和身份认证技术来提高传输的上行数据消息和下行数据消息安全性。The VPN access module is used to perform security management on the uplink data message and the downlink data message through a virtual private network (VPN) when the uplink data message and the downlink data message are transmitted through the first long connection and the second long connection , such as adopting tunnel technology, encryption and decryption technology, key management technology and identity authentication technology to improve the security of transmitted uplink data messages and downlink data messages.
SMS Push模块,用于通过短消息方式唤醒移动终端内的应用程序。The SMS Push module is used to wake up the application program in the mobile terminal by means of a short message.
IP Push模块,用于通过IP Push方式唤醒移动终端内的应用程序。The IP Push module is used to wake up the application program in the mobile terminal through the IP Push mode.
2、Proxy子系统提供移动终端与应用服务器之间的大数据量数据的传输代理。2. The Proxy subsystem provides a transmission agent for large amount of data between the mobile terminal and the application server.
Proxy子系统包括代理模块和第二连接模块。The Proxy subsystem includes a proxy module and a second connection module.
代理模块用于在上行传输过程中,接收来自移动终端的代理请求,所述代理请求中携带应用服务器的标识和待传输数据的数据量,并在确定所述数据量达到门限值时,根据代理请求中携带的应用服务器的标识,判断是否已与对应的应用服务器建立第二长连接;在下行传输过程中,接收来自应用服务器的代理请求,所述代理请求中携带移动终端的第一标识和待传输数据的数据量,并在确定所述数据量达到门限值时,根据代理请求中携带的第一标识,判断对应的移动终端是否是在本地注册的移动终端。The proxy module is used to receive a proxy request from the mobile terminal during the uplink transmission process, the proxy request carries the identification of the application server and the data volume of the data to be transmitted, and when it is determined that the data volume reaches the threshold value, according to The identification of the application server carried in the proxy request, and judging whether the second long connection has been established with the corresponding application server; during the downlink transmission process, receiving the proxy request from the application server, the proxy request carrying the first identification of the mobile terminal and the amount of data to be transmitted, and when it is determined that the amount of data reaches the threshold value, judge whether the corresponding mobile terminal is a locally registered mobile terminal according to the first identifier carried in the proxy request.
第二连接模块用于在上行传输过程中,若网关已与对应的应用服务器建立第二长连接,则分别与所述移动终端和对应的应用服务器之间建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与应用服务器之间的临时长连接透传至应用服务器,并在传输结束后释放与应用服务器之间的临时长连接;否则,从DNS中查询与所述对应的应用服务器建立第二长连接的其他网关,并分别与所述移动终端和所述其他网关建立临时长连接,通过与移动终端之间的临时长连接接收来自移动终端的所述待传输数据,并在传输结束后释放与移动终端之间的临时长连接,以及,将所述待传输数据通过与所述其他网关之间的临时长连接透传至其他网关,并在传输结束后释放与所述其他网关之间的临时长连接。在下行传输过程中,若所述对应的移动终端是在本地注册的移动终端,则分别与所述对应的移动终端和发送代理请求的应用服务器之间建立临时长连接,通过与应用服务器之间的临时长连接接收来自应用服务器的所述待传输数据,并在传输结束后释放与应用服务器之间的临时长连接,以及将所述待传输数据通过与移动终端之间的临时长连接透传至移动终端,并在传输结束后释放与移动终端之间的临时长连接;否则,从DNS中查询所述对应的移动终端归属的其他网关,并分别与发送代理请求的应用服务器和所述其他网关之间建立临时长连接,通过与应用服务器之间的临时长连接接收来自应用服务器的待传输数据,并在传输结束后释放与应用服务器之间的临时长连接,以及将所述待传输数据通过与所述其他网关之间的临时长连接透传至其他网关,并在传输结束后释放与所述其他网关之间的临时长连接。The second connection module is used to establish a temporary long connection with the mobile terminal and the corresponding application server respectively if the gateway has established a second long connection with the corresponding application server during the uplink transmission, and through the connection with the mobile terminal Receive the data to be transmitted from the mobile terminal through the temporary long connection, and release the temporary long connection with the mobile terminal after the transmission, and pass the data to be transmitted through the temporary long connection with the application server Transparently transmit to the application server, and release the temporary long connection with the application server after the transmission is over; otherwise, query from the DNS for other gateways that have established the second long connection with the corresponding application server, and communicate with the mobile The terminal establishes a temporary long connection with the other gateway, receives the data to be transmitted from the mobile terminal through the temporary long connection with the mobile terminal, and releases the temporary long connection with the mobile terminal after the transmission ends, and, The data to be transmitted is transparently transmitted to other gateways through the temporary long connection with the other gateway, and the temporary long connection with the other gateway is released after the transmission is completed. In the downlink transmission process, if the corresponding mobile terminal is a locally registered mobile terminal, a temporary long connection is established between the corresponding mobile terminal and the application server sending the proxy request, through The temporary long connection receives the data to be transmitted from the application server, releases the temporary long connection with the application server after the transmission, and transparently transmits the data to be transmitted through the temporary long connection with the mobile terminal to the mobile terminal, and release the temporary long connection with the mobile terminal after the transmission is over; otherwise, query the other gateways to which the corresponding mobile terminal belongs from DNS, and communicate with the application server that sent the proxy request and the other gateways respectively Establish a temporary long connection between the gateways, receive the data to be transmitted from the application server through the temporary long connection with the application server, and release the temporary long connection with the application server after the transmission, and transfer the data to be transmitted Transparently transmit to other gateways through the temporary long connections with the other gateways, and release the temporary long connections with the other gateways after the transmission ends.
3、鉴权子系统负责对注册的移动终端和应用服务器进行鉴权,只有鉴权通过的移动终端才允许注册以及建立第一长连接,以及,鉴权通过的应用服务器才允许建立第二长连接。3. The authentication subsystem is responsible for authenticating the registered mobile terminal and the application server. Only the mobile terminal that passes the authentication is allowed to register and establish the first long connection, and the application server that passes the authentication is allowed to establish the second long connection. connect.
鉴权子系统包括:The authentication subsystem includes:
用户管理模块,用于记录归属于该网关的移动终端以及应用服务器的信息。The user management module is used to record the information of the mobile terminal and the application server belonging to the gateway.
业务管理模块,用于记录归属于该网关的移动终端支持的业务以及应用服务器支持的业务。The service management module is used to record the services supported by the mobile terminal belonging to the gateway and the services supported by the application server.
安全管理模块,用于记录安全信息,包括采用隧道技术、加解密技术、密钥管理技术和身份认证技术中使用的加密信息。The security management module is used to record security information, including encrypted information used in tunneling technology, encryption and decryption technology, key management technology and identity authentication technology.
鉴权模块,用于利用用户管理模块、业务管理模块、安全管理模块中的信息,对建立第一长连接和第二长连接的移动终端和应用服务器进行鉴权。The authentication module is used to use the information in the user management module, the service management module and the security management module to authenticate the mobile terminal and the application server that establish the first persistent connection and the second persistent connection.
4、支撑子系统负责对传输的数据消息进行统计分析,对上下行传输过程进行监控,以及对移动终端内用于对安装的应用程序进行管理的中间件的升级。4. The supporting subsystem is responsible for statistical analysis of the transmitted data messages, monitoring the uplink and downlink transmission process, and upgrading the middleware used to manage the installed application programs in the mobile terminal.
支撑子系统包括:Support subsystems include:
统计分析模块,用于对通过第一长连接、第二长连接传输的数据消息以及通过临时长连接传输的数据进行统计分析。The statistical analysis module is used for performing statistical analysis on the data messages transmitted through the first long connection and the second long connection and the data transmitted through the temporary long connection.
监控模块,用于对通过第一长连接、第二长连接的传输过程以及通过临时长连接的传输过程进行监控,在出现异常时报警。The monitoring module is used to monitor the transmission process through the first long connection, the second long connection and the transmission process through the temporary long connection, and give an alarm when an abnormality occurs.
计费模块,用于对通过第一长连接、第二长连接的传输过程以及通过临时长连接的传输过程生成话单进行计费。The billing module is used for charging bills generated through the transmission process of the first long connection, the second long connection and the transmission process of the temporary long connection.
升级模块,用于实时检测移动终端内的中间件是否需要升级,在需要升级时,向移动终端发送该中间件的升级信息。The upgrade module is used to detect in real time whether the middleware in the mobile terminal needs to be upgraded, and when it needs to be upgraded, send the upgrade information of the middleware to the mobile terminal.
日志模块,用于记录网关各项操作所产生的日志信息。The log module is used to record the log information generated by various operations of the gateway.
辅助模块,用于对网关与外界各设备的接口进行辅助管理。The auxiliary module is used for auxiliary management of the interface between the gateway and various external devices.
实施例七:Embodiment seven:
本发明实施例七还提供一种与实施例一至实施例五属于同一发明构思下的移动终端,如图9所示,包括接口模块、核心模块和支撑模块,接口模块、核心模块和支撑模块可以是移动终端内集成的模块,也可以是移动终端内安装的AOI中间件的集成模块。Embodiment 7 of the present invention also provides a mobile terminal under the same inventive concept as Embodiment 1 to Embodiment 5, as shown in FIG. 9 , including an interface module, a core module, and a support module. It is a module integrated in the mobile terminal, and may also be an integrated module of the AOI middleware installed in the mobile terminal.
下面分别对接口模块、核心模块和支撑模块加以说明:The following describes the interface module, core module and support module respectively:
1、接口模块主要负责与外部的网关之间建立第一长连接、对移动终端内安装的应用程序与中间件之间的长连接,以及与网关之间的临时长连接。1. The interface module is mainly responsible for establishing the first long connection with the external gateway, the long connection between the application program installed in the mobile terminal and the middleware, and the temporary long connection with the gateway.
2、核心模块提供AOI中间件的核心功能,是实现本发明目的的主要模块。2. The core module provides the core function of the AOI middleware, and is the main module for realizing the object of the present invention.
核心模块包括:Core modules include:
数据收发模块,用于在上行传输过程中,通过第一长连接向网关发送上行数据消息,所述上行数据消息中携带应用服务器的标识,以及在下行传输过程中,通过第一长连接接收网关推送的下行数据消息。A data transceiver module, configured to send an uplink data message to the gateway through the first long connection during the uplink transmission process, the uplink data message carries the identification of the application server, and receive the gateway through the first long connection during the downlink transmission process Pushed downlink data message.
代理请求模块,用于在利用Proxy功能传输时,向网关发送代理请求,所述代理请求中携带应用服务器的标识和待传输数据的数据量;The proxy request module is used to send a proxy request to the gateway when using the Proxy function for transmission, and the proxy request carries the identification of the application server and the data volume of the data to be transmitted;
IP代理模块,用于在利用Proxy功能传输时,通过临时长连接向网关发送待传输数据,以及通过所述临时长连接接收网关推送的待传输数据。The IP proxy module is configured to send the data to be transmitted to the gateway through the temporary long connection when using the Proxy function for transmission, and receive the data to be transmitted pushed by the gateway through the temporary long connection.
注册模块,用于从DNS中获取归属网关的路由信息,并根据该路由信息向网关进行注册。The registration module is used to obtain the routing information of the home gateway from the DNS, and register with the gateway according to the routing information.
管理模块,用于记录在本地安装的应用程序的标识,以及各应用程序对应的应用服务器的标识,并在接收到任一应用程序生成的上行数据消息后,确定对应的应用服务器的标识,并将所述应用服务器的标识携带在所述上行数据消息中。The management module is configured to record the identifiers of the locally installed applications and the identifiers of the application servers corresponding to each application, and determine the identifier of the corresponding application server after receiving an uplink data message generated by any application, and The identifier of the application server is carried in the uplink data message.
唤醒模块,用于在接收到下行数据消息时,根据下行数据消息中携带的应用服务器标识,确定接收该下行数据消息的应用程序,并查询该应用程序是否处于运行状态,若是,则通知该应用程序获取所述下行数据消息;否则,唤醒或启动该应用程序,通知唤醒后或启动后的应用程序获取所述下行数据消息。The wake-up module is used to determine the application program receiving the downlink data message according to the application server identifier carried in the downlink data message when receiving the downlink data message, and inquire whether the application program is in a running state, and if so, notify the application program The program obtains the downlink data message; otherwise, wakes up or starts the application program, and notifies the wake-up or started application program to obtain the downlink data message.
压缩/解压模块,用于对发送的上行数据消息进行压缩,以及对接收到的下行数据消息进行解压。The compression/decompression module is used to compress the sent uplink data message and decompress the received downlink data message.
3、支撑模块包括:3. The supporting modules include:
日志模块,用于记录移动终端的各项操作产生的日志信息。The log module is used to record log information generated by various operations of the mobile terminal.
配置模块,用于对移动终端各项操作所需参数进行配置,如移动终端向DNS的路由配置。The configuration module is used to configure the parameters required for various operations of the mobile terminal, such as the routing configuration from the mobile terminal to DNS.
升级模块,用于在接收到网关发送的针对中间件的升级信息时,对中间件进行升级。The upgrade module is configured to upgrade the middleware when receiving the upgrade information for the middleware sent by the gateway.
实施例八:Embodiment eight:
本发明实施例八还提供一种与实施例一至实施例五属于同一发明构思下的应用服务器,如图10所示,包括接口模块和数据收发模块,所述接口模块用于与网关建立第二长连接;数据收发模块用于通过所述第二长连接接收网关发送的上行数据消息,以及通过所述第二长连接向网关发送下行数据消息,所述下行数据消息中携带移动终端在应用服务器中注册时使用的第一标识。Embodiment 8 of the present invention also provides an application server under the same inventive concept as Embodiment 1 to Embodiment 5. As shown in FIG. 10 , it includes an interface module and a data sending and receiving module. Long connection: the data transceiver module is used to receive the uplink data message sent by the gateway through the second long connection, and send the downlink data message to the gateway through the second long connection, and the downlink data message carries the mobile terminal in the application server The first identifier used when registering in .
所述接口模块还用于与网关之间建立临时长连接,数据收发模块还用于通过临时长连接收发待传输数据。The interface module is also used to establish a temporary long connection with the gateway, and the data sending and receiving module is also used to send and receive data to be transmitted through the temporary long connection.
实施例九:Embodiment nine:
本发明实施例九还提供一种与实施例一至实施例五属于同一发明构思下的保活设备,如图11所示,包括数据采集模块、距离探测模块和数据包发送模块,其中:Embodiment 9 of the present invention also provides a keep-alive device under the same inventive concept as Embodiment 1 to Embodiment 5, as shown in FIG. 11 , including a data collection module, a distance detection module and a data packet sending module, wherein:
数据采集模块在数据通道为基于TCP的模式时用于实时捕获长连接两端的移动终端和应用服务器之间的通信数据包,建立和维护移动终端的五元组,提取当前移动终端TCP连接的顺序信息(seq)、响应信息(ack);在数据通道为基于UDP的模式时,用于实时获取终端设备的IP和UDP端口信息。The data acquisition module is used to capture the communication data packets between the mobile terminal and the application server at both ends of the long connection in real time when the data channel is in the TCP-based mode, establish and maintain the quintuple of the mobile terminal, and extract the sequence of the current mobile terminal TCP connection Information (seq), response information (ack); when the data channel is UDP-based, it is used to obtain the IP and UDP port information of the terminal device in real time.
距离探测模块用于探测心跳数据包所需的路由距离。The distance detection module is used to detect the routing distance required by the heartbeat packet.
数据包发送模块用于将所述路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包。The data packet sending module is used for sending the heartbeat data packet to the mobile terminal using the routing distance as the survival time of the heartbeat data packet.
具体地,如图12所示,距离探测模块包括第一路由确定模块和第二路由确定模块,其中:第一路由确定模块用于向移动终端发送的测试数据包,确定该测试数据包路由至移动终端时产生的第一路由距离;第二路由确定模块用于根据所述第一路由距离,确定测试数据包在经过核心网防火墙之后,且到达移动终端所在的无线通信网络之前的一跳路由时,产生的第二路由距离;因此,数据包发送模块用于将所述第二路由距离作为心跳数据包的生存时间,向移动终端发送该心跳数据包。Specifically, as shown in Figure 12, the distance detection module includes a first route determination module and a second route determination module, wherein: the first route determination module is used to send a test data packet to the mobile terminal, and determine that the test data packet is routed to The first routing distance generated when moving the terminal; the second routing determination module is used to determine the one-hop route of the test data packet after passing through the core network firewall and before arriving at the wireless communication network where the mobile terminal is located according to the first routing distance , the generated second routing distance; therefore, the data packet sending module is configured to use the second routing distance as the lifetime of the heartbeat data packet, and send the heartbeat data packet to the mobile terminal.
与实施例二的方案相似的,第一路由确定模块也可以通过逐渐增大路由距离来确定第一路由距离、逐渐减小路由距离来确定第一路由距离和二分法方式来确定第一路由距离,下面分别加以说明:Similar to the solution in Embodiment 2, the first routing determination module can also determine the first routing distance by gradually increasing the routing distance, gradually reducing the routing distance to determine the first routing distance and the dichotomy method to determine the first routing distance , which are explained below:
1、通过逐渐增大路由距离来确定第一路由距离:1. Determine the first routing distance by gradually increasing the routing distance:
(1)、TCP方式:(1), TCP mode:
所述第一路由确定模块,具体用于将所述测试数据包的序号值设置为所述移动终端识别为错误的序列号,并逐渐增大预先设定的第三路由距离,针对每次增大后得到的路由距离执行以下操作:The first route determination module is specifically configured to set the sequence number value of the test data packet as the sequence number identified as an error by the mobile terminal, and gradually increase the preset third route distance, for each increase The route distance obtained after large performs the following operations:
将本次得到的路由距离作为测试数据包的生存时间,向移动终端发送该测试数据包;Using the routing distance obtained this time as the survival time of the test data packet, sending the test data packet to the mobile terminal;
若返回复位RST消息,则将本次得到的路由距离作为第一路由距离;If the reset RST message is returned, the routing distance obtained this time is used as the first routing distance;
若返回的控制报文协议ICMP消息携带的错误类型是超时,则继续增大路由距离。If the error type carried in the returned ICMP message is timeout, continue to increase the routing distance.
(2)、UDP方式:(2), UDP mode:
所述第一路由确定模块,具体用于将所述测试数据包中携带的目的端口号设置为移动终端不能正确接收该测试数据包的用户数据包UDP端口号,以及,逐渐增大预先设定的第四路由距离,针对每次增大后得到的路由距离执行以下操作:The first route determination module is specifically configured to set the destination port number carried in the test data packet as the UDP port number of the user data packet that the mobile terminal cannot correctly receive the test data packet, and gradually increase the preset For the fourth routing distance of , the following operations are performed for the routing distance obtained after each increase:
将本次得到的路由距离作为测试数据包的生存时间,向移动终端发送该测试数据包,并检测接收到的控制报文协议ICMP消息;Using the routing distance obtained this time as the survival time of the test packet, sending the test packet to the mobile terminal, and detecting the received Control Message Protocol ICMP message;
若所述ICMP消息携带的错误类型是端口不可达,则将本次得到的路由距离作为第一路由距离;If the error type carried by the ICMP message is that the port is unreachable, the routing distance obtained this time is used as the first routing distance;
若所述ICMP消息携带的错误类型是超时,则继续增大路由距离。If the error type carried in the ICMP message is timeout, continue to increase the routing distance.
2、通过逐渐减小路由距离来确定第一路由距离:2. Determine the first routing distance by gradually reducing the routing distance:
(1)、TCP方式:(1), TCP mode:
所述第一路由确定模块具体用于逐渐减小预先设定的第五路由距离,针对每次减小后得到的路由距离执行以下操作:The first routing determination module is specifically configured to gradually reduce the preset fifth routing distance, and perform the following operations on the routing distance obtained after each reduction:
将本次得到的路由距离作为测试数据包的生存时间,通过已确定五元组信息的TCP连接向移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;The routing distance obtained this time is used as the survival time of the test packet, and the test packet is sent to the mobile terminal through the TCP connection that has determined the quintuple information, and judges whether to receive the test response message returned;
若是,则继续减小路由距离;If so, continue to reduce the routing distance;
否则,将本次得到的路由距离加1作为第一路由距离。Otherwise, add 1 to the routing distance obtained this time as the first routing distance.
(2)、UDP方式:(2), UDP mode:
所述第一路由确定模块具体用于逐渐减小预先设定的第六路由距离,针对每次减小后得到的路由距离执行以下操作:The first routing determination module is specifically configured to gradually reduce the preset sixth routing distance, and perform the following operations on the routing distance obtained after each reduction:
将本次得到的路由距离作为测试数据包的生存时间,根据所述移动终端的IP地址和UDP端口,向所述移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;Using the routing distance obtained this time as the survival time of the test packet, according to the IP address and the UDP port of the mobile terminal, send the test packet to the mobile terminal, and judge whether to receive the test response message returned;
若是,则继续减小路由距离;If so, continue to reduce the routing distance;
否则,将本次得到的路由距离加1作为第一路由距离。Otherwise, add 1 to the routing distance obtained this time as the first routing distance.
3、二分法方式:3. Dichotomy method:
(1)、TCP方式:(1), TCP mode:
所述第一路由确定模块,具体用于预先设定上限路由距离和下限路由距离,在每次上限路由距离或下限路由距离发生更新时,判断上限路由距离是否不小于下限路由距离,若是,则执行以下操作,直至上限路由距离小于下限路由距离:The first route determination module is specifically used to pre-set the upper limit routing distance and the lower limit routing distance. When the upper limit routing distance or the lower limit routing distance is updated each time, it is judged whether the upper limit routing distance is not less than the lower limit routing distance. If so, then Perform the following operations until the upper limit routing distance is smaller than the lower limit routing distance:
将本次得到上限路由距离和下限路由距离的平均值取整,得到第七路由距离,并将本次得到的第七路由距离作为测试数据包的生存时间,通过已确定五元组信息的TCP连接向移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;The average value of the upper limit routing distance and the lower limit routing distance obtained this time is rounded to obtain the seventh routing distance, and the seventh routing distance obtained this time is used as the survival time of the test data packet. Connect to send the test data packet to the mobile terminal, and judge whether to receive the returned test response message;
若是,则将本次得到的第七路由距离的路由跳数减1后作为更新后的上限路由距离;If so, then subtract 1 from the routing hop count of the seventh routing distance obtained this time as the updated upper routing distance;
否则,将本次得到的第七路由距离的路由跳数减1后作为更新后的下限路由距离;Otherwise, subtract 1 from the routing hop count of the seventh routing distance obtained this time as the updated lower limit routing distance;
确定在上限路由距离小于下限路由距离时得到的第七路由距离,在以该第七路由距离为测试数据包的生存时间时,若接收到测试超时消息,则将该第七路由距离的路由跳数加1后作为第一路由距离;若接收到测试正确消息,则将该第七路由距离的路由跳数作为第一路由距离。Determine the seventh routing distance obtained when the upper limit routing distance is less than the lower routing distance, when the seventh routing distance is the life time of the test packet, if a test timeout message is received, the routing jump of the seventh routing distance The number plus 1 is used as the first routing distance; if a correct test message is received, the routing hop count of the seventh routing distance is used as the first routing distance.
(2)、UDP方式:(2), UDP mode:
所述第一路由确定模块,具体用于预先设定上限路由距离和下限路由距离,在每次上限路由距离或下限路由距离发生更新时,判断上限路由距离是否不小于下限路由距离,若是,则执行以下操作,直至上限路由距离小于下限路由距离:The first route determination module is specifically used to pre-set the upper limit routing distance and the lower limit routing distance. When the upper limit routing distance or the lower limit routing distance is updated each time, it is judged whether the upper limit routing distance is not less than the lower limit routing distance. If so, then Perform the following operations until the upper limit routing distance is smaller than the lower limit routing distance:
将本次得到上限路由距离和下限路由距离的平均值取整,得到第八路由距离,并将本次得到的第八路由距离作为测试数据包的生存时间,根据所述移动终端的IP地址和UDP端口,向所述移动终端发送该测试数据包,并判断是否接收到返回的测试回应消息;The average value of the upper limit routing distance and the lower limit routing distance obtained this time is rounded to obtain the eighth routing distance, and the eighth routing distance obtained this time is used as the survival time of the test packet, according to the IP address of the mobile terminal and UDP port, send this test packet to described mobile terminal, and judge whether to receive the test response message that returns;
若是,则将本次得到的第八路由距离的路由跳数减1后作为更新后的上限路由距离;If so, then subtract 1 from the route hop count of the eighth route distance obtained this time as the updated upper limit route distance;
否则,将本次得到的第八路由距离的路由跳数减1后作为更新后的下限路由距离;Otherwise, subtract 1 from the routing hop count of the eighth routing distance obtained this time as the updated lower limit routing distance;
确定在上限路由距离小于下限路由距离时得到的第八路由距离,在以该第八路由距离为测试数据包的生存时间时,若接收到测试超时消息,则将该第八路由距离的路由跳数加1后作为第一路由距离;若接收到测试正确消息,则将该第八路由距离的路由跳数作为第一路由距离。Determine the eighth route distance obtained when the upper limit route distance is less than the lower limit route distance, when the eighth route distance is the life time of the test packet, if a test timeout message is received, the route jump of the eighth route distance The number plus 1 is used as the first routing distance; if the test correct message is received, the routing hop count of the eighth routing distance is used as the first routing distance.
所述第二路由确定模块,具体用于将第一路由距离的路由跳数减1后作为所述第二路由距离的最大值,以及将经过所述核心网防火墙时产生的路由跳数作为所述第二路由距离的最小值,将不大于所述最大值且不小于所述最小值的路由跳数作为第二路由距离。The second route determination module is specifically configured to subtract 1 from the routing hop count of the first routing distance as the maximum value of the second routing distance, and use the routing hop count generated when passing through the core network firewall as the The minimum value of the second routing distance, using the routing hops not greater than the maximum value and not less than the minimum value as the second routing distance.
本实施例九中的保活设备可以是第一长连接一端的网关内保活子系统,如图13所示,网关与移动终端之间建立第一长连接,网关在通信短消息方式唤醒终端内的应用程序时,网关还与移动通信网络中的ISMG、SMS相连,通过IP Push方式唤醒终端内的应用程序时,网关还与移动通信网络中的GGSN相连。网关中的保活子系统对终端和网关之间的第一长连接进行保活。The keep-alive device in the ninth embodiment may be the keep-alive subsystem in the gateway at the end of the first long connection, as shown in Figure 13, the first long connection is established between the gateway and the mobile terminal, and the gateway wakes up the terminal in the communication short message mode When the application program in the terminal is connected, the gateway is also connected to ISMG and SMS in the mobile communication network, and when the application program in the terminal is awakened by IP Push, the gateway is also connected to the GGSN in the mobile communication network. The keep-alive subsystem in the gateway keeps alive the first longest connection between the terminal and the gateway.
保活设备也可以是独立于网关的设备,为该网关与移动终端之间的第一长连接进行保活。The keep-alive device may also be a device independent of the gateway, and performs keep-alive for the first long connection between the gateway and the mobile terminal.
通过本发明实施例提供的方法、系统及设备,相较于现有技术中的IP Push方案,在确保移动终端与应用服务器之间的数据传输高实时性的基础上,有效减少长连接的数量,对移动终端和应用服务器的资源占用都较少。同时,本发明实施例移动终端AOI架构为应用服务提供商、网络运营商和用户提供了良好的数据通道,为移动业务的统一管理和统一控制提供了平台。同时,针对第一长连接的心跳数据包在路由传输过程中既能够穿过核心网防火墙进入运营商提供的核心网达到对长连接保活的目的,又终止于进入移动终端所在的无线通信网络之前的一跳路由器,避免了心跳数据包对无线通信网络造成的负担。Through the method, system and equipment provided by the embodiments of the present invention, compared with the IP Push solution in the prior art, the number of long connections can be effectively reduced on the basis of ensuring high real-time data transmission between the mobile terminal and the application server , less resource occupation for mobile terminals and application servers. At the same time, the AOI architecture of the mobile terminal in the embodiment of the present invention provides a good data channel for application service providers, network operators and users, and provides a platform for unified management and control of mobile services. At the same time, the heartbeat data packet for the first long connection can not only pass through the core network firewall to enter the core network provided by the operator to keep the long connection alive, but also terminate at the wireless communication network where the mobile terminal is located. The previous one-hop router avoids the burden of heartbeat packets on the wireless communication network.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (33)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110113191.9A CN102769603B (en) | 2011-05-03 | 2011-05-03 | The method of a kind of data transmission, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110113191.9A CN102769603B (en) | 2011-05-03 | 2011-05-03 | The method of a kind of data transmission, system and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102769603A true CN102769603A (en) | 2012-11-07 |
CN102769603B CN102769603B (en) | 2016-06-22 |
Family
ID=47096853
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110113191.9A Active CN102769603B (en) | 2011-05-03 | 2011-05-03 | The method of a kind of data transmission, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102769603B (en) |
Cited By (30)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103297934A (en) * | 2013-03-04 | 2013-09-11 | 东莞宇龙通信科技有限公司 | Information push method and system and mobile terminals |
CN103731933A (en) * | 2014-01-10 | 2014-04-16 | 北京百度网讯科技有限公司 | Wireless connection construction method and system and mobile terminal |
CN103916936A (en) * | 2013-01-04 | 2014-07-09 | 中国移动通信集团公司 | Method and system for realizing data long connection, mobile terminal and server |
CN103916832A (en) * | 2013-01-05 | 2014-07-09 | 成都国腾电子技术股份有限公司 | Method and device for Beidou Bluetooth user terminal to visit mobile communication network |
CN104009938A (en) * | 2014-06-17 | 2014-08-27 | 合一网络技术(北京)有限公司 | Method and system for long connections based on router level |
CN104253739A (en) * | 2013-06-28 | 2014-12-31 | 中国移动通信集团公司 | Implementing method, system and device of always online services |
CN104303488A (en) * | 2013-05-10 | 2015-01-21 | 华为技术有限公司 | User plane event processing method, PCRF entity, and AF entity |
CN104468547A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Long connection establishing method, device and system |
CN105491173A (en) * | 2014-09-18 | 2016-04-13 | 中国电信股份有限公司 | DNS analysis method, server and network system |
CN107249181A (en) * | 2017-05-19 | 2017-10-13 | 珠海市魅族科技有限公司 | Contact number acquisition methods, contact number acquisition device, terminal and non-volatile memory medium |
CN107911390A (en) * | 2017-12-14 | 2018-04-13 | 浪潮软件股份有限公司 | Handle method, proxy server, application server and the system of service request |
CN108400946A (en) * | 2013-06-11 | 2018-08-14 | 杭州硕文软件有限公司 | A kind of method, apparatus, system and computer readable storage medium for reducing Internet traffic |
CN108769202A (en) * | 2018-05-30 | 2018-11-06 | 维沃移动通信有限公司 | A message push method and its server and terminal equipment |
CN108965413A (en) * | 2018-07-03 | 2018-12-07 | 北京小米移动软件有限公司 | Information interacting method, device and storage medium |
CN109639841A (en) * | 2019-02-25 | 2019-04-16 | 北京云中融信网络科技有限公司 | Network connection system and method |
CN109831528A (en) * | 2019-03-13 | 2019-05-31 | 南京钛佳汽车科技有限公司 | A kind of data transmission method realizing automobile gateway and interconnecting |
CN110011910A (en) * | 2019-04-08 | 2019-07-12 | 陈鹏 | A kind of gateway communication system and gateway communication method for supporting multi-protocols equipment to access |
CN110225106A (en) * | 2019-06-04 | 2019-09-10 | 惠州Tcl移动通信有限公司 | A kind of data transmission method, device and storage medium |
US10462245B2 (en) | 2013-12-09 | 2019-10-29 | Tencent Technology (Shenzhen) Company Limited | Method, terminal, and system for pushing information |
CN110493095A (en) * | 2019-07-26 | 2019-11-22 | 广州至真信息科技有限公司 | A kind of processing method of vpn service, device, server and storage medium |
CN110661673A (en) * | 2018-06-28 | 2020-01-07 | 网宿科技股份有限公司 | Method and device for heartbeat detection |
CN110943886A (en) * | 2019-11-29 | 2020-03-31 | 新华三技术有限公司 | Performance data transmission method and device |
CN111092911A (en) * | 2019-12-31 | 2020-05-01 | 成都科来软件有限公司 | Network agent realizing method for enhancing safety |
WO2020119195A1 (en) * | 2018-12-13 | 2020-06-18 | 电信科学技术研究院有限公司 | Data transmission method and device |
CN111355916A (en) * | 2020-02-17 | 2020-06-30 | 视联动力信息技术股份有限公司 | Method, device, device and storage medium for establishing video network communication connection |
CN111866060A (en) * | 2020-05-26 | 2020-10-30 | 普联国际有限公司 | TLS connection method for communication device, communication device and communication system |
CN112187899A (en) * | 2020-09-18 | 2021-01-05 | 北京金山云网络技术有限公司 | Cloud hosting communication method, device and system, computer equipment and storage medium |
CN113280680A (en) * | 2021-06-24 | 2021-08-20 | 北京盈想东方科技股份有限公司 | Novel networking mode of precision target drone system |
CN113676487A (en) * | 2021-08-31 | 2021-11-19 | 中国电信股份有限公司 | Port connection control method, management method, device and storage medium |
WO2022036650A1 (en) * | 2020-08-20 | 2022-02-24 | 深圳市沃特沃德股份有限公司 | Method for establishing ip data persistent connection, and 5g gateway device and computer device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101374116A (en) * | 2007-08-23 | 2009-02-25 | 华为技术有限公司 | Method and apparatus for implementing on-line business |
WO2009082296A1 (en) * | 2007-12-20 | 2009-07-02 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and arrangement to maintain a tcp connection |
CN101959220A (en) * | 2009-07-15 | 2011-01-26 | 中兴通讯股份有限公司 | Management method and management system of centralized mobile agent server |
CN102761864A (en) * | 2011-04-29 | 2012-10-31 | 中国移动通信集团公司 | Data transmission method, system and device |
-
2011
- 2011-05-03 CN CN201110113191.9A patent/CN102769603B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101374116A (en) * | 2007-08-23 | 2009-02-25 | 华为技术有限公司 | Method and apparatus for implementing on-line business |
WO2009082296A1 (en) * | 2007-12-20 | 2009-07-02 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and arrangement to maintain a tcp connection |
CN101959220A (en) * | 2009-07-15 | 2011-01-26 | 中兴通讯股份有限公司 | Management method and management system of centralized mobile agent server |
CN102761864A (en) * | 2011-04-29 | 2012-10-31 | 中国移动通信集团公司 | Data transmission method, system and device |
Cited By (46)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103916936B (en) * | 2013-01-04 | 2017-06-23 | 中国移动通信集团公司 | Realize method, system and mobile terminal, the server of data connection long |
CN103916936A (en) * | 2013-01-04 | 2014-07-09 | 中国移动通信集团公司 | Method and system for realizing data long connection, mobile terminal and server |
CN103916832B (en) * | 2013-01-05 | 2018-05-01 | 成都新橙北斗智联有限公司 | The method and apparatus of Big Dipper bluetooth users terminal access mobile communications network |
CN103916832A (en) * | 2013-01-05 | 2014-07-09 | 成都国腾电子技术股份有限公司 | Method and device for Beidou Bluetooth user terminal to visit mobile communication network |
CN103297934A (en) * | 2013-03-04 | 2013-09-11 | 东莞宇龙通信科技有限公司 | Information push method and system and mobile terminals |
CN104303488A (en) * | 2013-05-10 | 2015-01-21 | 华为技术有限公司 | User plane event processing method, PCRF entity, and AF entity |
CN108400946B (en) * | 2013-06-11 | 2019-09-17 | 杭州硕文软件有限公司 | It is a kind of for reducing the method, apparatus, system and medium of Internet traffic |
CN108400946A (en) * | 2013-06-11 | 2018-08-14 | 杭州硕文软件有限公司 | A kind of method, apparatus, system and computer readable storage medium for reducing Internet traffic |
CN104253739B (en) * | 2013-06-28 | 2018-08-10 | 中国移动通信集团公司 | A kind of implementation method, system and the equipment of always online business |
CN104253739A (en) * | 2013-06-28 | 2014-12-31 | 中国移动通信集团公司 | Implementing method, system and device of always online services |
US10462245B2 (en) | 2013-12-09 | 2019-10-29 | Tencent Technology (Shenzhen) Company Limited | Method, terminal, and system for pushing information |
CN103731933A (en) * | 2014-01-10 | 2014-04-16 | 北京百度网讯科技有限公司 | Wireless connection construction method and system and mobile terminal |
CN104009938B (en) * | 2014-06-17 | 2016-08-17 | 合一网络技术(北京)有限公司 | The long method and system connected based on route aspect |
CN104009938A (en) * | 2014-06-17 | 2014-08-27 | 合一网络技术(北京)有限公司 | Method and system for long connections based on router level |
CN105491173A (en) * | 2014-09-18 | 2016-04-13 | 中国电信股份有限公司 | DNS analysis method, server and network system |
CN105491173B (en) * | 2014-09-18 | 2019-12-06 | 中国电信股份有限公司 | DNS analysis method, server and network system |
CN104468547A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Long connection establishing method, device and system |
CN107249181A (en) * | 2017-05-19 | 2017-10-13 | 珠海市魅族科技有限公司 | Contact number acquisition methods, contact number acquisition device, terminal and non-volatile memory medium |
CN107911390A (en) * | 2017-12-14 | 2018-04-13 | 浪潮软件股份有限公司 | Handle method, proxy server, application server and the system of service request |
CN108769202A (en) * | 2018-05-30 | 2018-11-06 | 维沃移动通信有限公司 | A message push method and its server and terminal equipment |
CN110661673B (en) * | 2018-06-28 | 2021-02-26 | 网宿科技股份有限公司 | Method and device for heartbeat detection |
CN110661673A (en) * | 2018-06-28 | 2020-01-07 | 网宿科技股份有限公司 | Method and device for heartbeat detection |
CN108965413B (en) * | 2018-07-03 | 2021-08-03 | 北京小米移动软件有限公司 | Information interaction method and device and storage medium |
CN108965413A (en) * | 2018-07-03 | 2018-12-07 | 北京小米移动软件有限公司 | Information interacting method, device and storage medium |
US11832293B2 (en) | 2018-12-13 | 2023-11-28 | Datang Mobile Communications Equipment Co., Ltd. | Data transmission method and device |
WO2020119195A1 (en) * | 2018-12-13 | 2020-06-18 | 电信科学技术研究院有限公司 | Data transmission method and device |
CN111327392A (en) * | 2018-12-13 | 2020-06-23 | 电信科学技术研究院有限公司 | Data transmission method and device |
CN111327392B (en) * | 2018-12-13 | 2021-06-01 | 电信科学技术研究院有限公司 | Data transmission method and device |
CN109639841A (en) * | 2019-02-25 | 2019-04-16 | 北京云中融信网络科技有限公司 | Network connection system and method |
CN109831528A (en) * | 2019-03-13 | 2019-05-31 | 南京钛佳汽车科技有限公司 | A kind of data transmission method realizing automobile gateway and interconnecting |
CN110011910B (en) * | 2019-04-08 | 2022-01-18 | 陈鹏 | Gateway communication system and gateway communication method supporting multi-protocol device access |
CN110011910A (en) * | 2019-04-08 | 2019-07-12 | 陈鹏 | A kind of gateway communication system and gateway communication method for supporting multi-protocols equipment to access |
CN110225106A (en) * | 2019-06-04 | 2019-09-10 | 惠州Tcl移动通信有限公司 | A kind of data transmission method, device and storage medium |
CN110225106B (en) * | 2019-06-04 | 2022-06-10 | 惠州Tcl移动通信有限公司 | Data transmission method, device and storage medium |
CN110493095A (en) * | 2019-07-26 | 2019-11-22 | 广州至真信息科技有限公司 | A kind of processing method of vpn service, device, server and storage medium |
CN110943886B (en) * | 2019-11-29 | 2021-11-02 | 新华三技术有限公司 | Performance data transmission method and device |
CN110943886A (en) * | 2019-11-29 | 2020-03-31 | 新华三技术有限公司 | Performance data transmission method and device |
CN111092911A (en) * | 2019-12-31 | 2020-05-01 | 成都科来软件有限公司 | Network agent realizing method for enhancing safety |
CN111355916B (en) * | 2020-02-17 | 2022-07-22 | 视联动力信息技术股份有限公司 | Method, device, device and storage medium for establishing video networking communication connection |
CN111355916A (en) * | 2020-02-17 | 2020-06-30 | 视联动力信息技术股份有限公司 | Method, device, device and storage medium for establishing video network communication connection |
CN111866060A (en) * | 2020-05-26 | 2020-10-30 | 普联国际有限公司 | TLS connection method for communication device, communication device and communication system |
WO2022036650A1 (en) * | 2020-08-20 | 2022-02-24 | 深圳市沃特沃德股份有限公司 | Method for establishing ip data persistent connection, and 5g gateway device and computer device |
CN112187899B (en) * | 2020-09-18 | 2022-05-06 | 北京金山云网络技术有限公司 | Cloud hosting communication method, device and system, computer equipment and storage medium |
CN112187899A (en) * | 2020-09-18 | 2021-01-05 | 北京金山云网络技术有限公司 | Cloud hosting communication method, device and system, computer equipment and storage medium |
CN113280680A (en) * | 2021-06-24 | 2021-08-20 | 北京盈想东方科技股份有限公司 | Novel networking mode of precision target drone system |
CN113676487A (en) * | 2021-08-31 | 2021-11-19 | 中国电信股份有限公司 | Port connection control method, management method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102769603B (en) | 2016-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102769603B (en) | The method of a kind of data transmission, system and equipment | |
CN102761864B (en) | Data transmission method, system and device | |
US9253015B2 (en) | Transparent proxy architecture for multi-path data connections | |
JP5950244B2 (en) | Apparatus and method for efficiently transmitting a device trigger message | |
US6947483B2 (en) | Method, apparatus, and system for managing data compression in a wireless network | |
US8996626B2 (en) | Terminal and intermediate node in content oriented networking environment and communication method of terminal and intermediate node | |
US8184575B2 (en) | Packet communication network and subscriber-associated-information delivery controller | |
US20070147299A1 (en) | Wireless transmission device | |
CN107667545B (en) | A communication method, system, network, communication device and computer readable medium | |
CN103237039A (en) | Message forwarding method and message forwarding device | |
US10863323B1 (en) | Techniques for correlating delivery receipt messages in a communications network | |
CN103974339B (en) | A kind of method and apparatus of data buffer storage | |
CN101547214A (en) | Method and network side equipment for pushing inside data of enterprise | |
CN119299165A (en) | A method, device, storage medium and electronic device for forwarding data across network segments | |
GB2401011A (en) | A client terminal and a server are each provided with a message queue to facilitate session independent transfer of messages | |
CN102769883A (en) | Method and device for transmitting heartbeat data packets in TCP-based always-on service | |
US7623666B2 (en) | Automatic setting of security in communication network system | |
EP2396937A1 (en) | Method and system for aggregating communications | |
CN102769884A (en) | Method and device for transmitting heartbeat data packets in UDP-based always-on service | |
JP6971118B2 (en) | Devices, methods and programs for sending and receiving data to and from IoT devices | |
CN112463204B (en) | Pile service program gray level release method without perception of direct-connection charging pile | |
WO2021255633A1 (en) | Method and corresponding telecommunication network for secure data transmissions based on graph database | |
US20250024373A1 (en) | Early acknowledgement for data transmitted from wireless device | |
CN112738817B (en) | Method and network device for keeping alive service connection of mobile device | |
Castiglione et al. | An efficient protocol for reliable data communication on dataless devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |