Movatterモバイル変換


[0]ホーム

URL:


CN104243271B - A kind of method and system that deferred information push is realized by XMPP - Google Patents

A kind of method and system that deferred information push is realized by XMPP
Download PDF

Info

Publication number
CN104243271B
CN104243271BCN201310230953.2ACN201310230953ACN104243271BCN 104243271 BCN104243271 BCN 104243271BCN 201310230953 ACN201310230953 ACN 201310230953ACN 104243271 BCN104243271 BCN 104243271B
Authority
CN
China
Prior art keywords
message
ios
offline
server
offline message
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.)
Expired - Fee Related
Application number
CN201310230953.2A
Other languages
Chinese (zh)
Other versions
CN104243271A (en
Inventor
陈庆
徐新明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE ICT Technologies Co Ltd
Original Assignee
ZTE ICT Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE ICT Technologies Co LtdfiledCriticalZTE ICT Technologies Co Ltd
Priority to CN201310230953.2ApriorityCriticalpatent/CN104243271B/en
Publication of CN104243271ApublicationCriticalpatent/CN104243271A/en
Application grantedgrantedCritical
Publication of CN104243271BpublicationCriticalpatent/CN104243271B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The invention discloses a kind of method that deferred information push is realized by XMPP, IOS message modules are set between XMPP server and APNS servers;IOS message modules receive the deferred information that XMPP server is sent, and the device token of ios device corresponding to the deferred information is obtained from APNS servers, and the deferred information comprising device token is reminded or deferred information is sent to APNS servers.The present invention also discloses a kind of system that deferred information push is realized by XMPP, using the solution of the present invention, it ensure that user can check deferred information immediately, while avoid and build the drawbacks such as the big workload that message forwarder or message server are brought, independent development, cost height, intermediate link complexity and stability difference.

Description

Method and system for realizing offline message pushing through XMPP
Technical Field
The present invention relates to an offline message transmission technology in mobile communication, and in particular, to a method and system for implementing offline message push through an Extensible Messaging and Presence Protocol (XMPP).
Background
Mobile communication refers to communication in which a mobile party in communication performs in a mobile state in a wireless manner, and this communication manner can be realized by any person in any country in the world through a communication network by means of a wired communication network, and therefore, mobile communication is a combination of wireless communication and wired communication to some extent. At present, mobile communication has progressed from analog communication to digital mobile communication, and the goal of future mobile communication is to provide fast and reliable communication service to anyone at any time and any place, so how to realize instant messaging and pushing of offline messages is receiving more and more attention, which causes the status of XMPP protocol in the field of instant messaging and pushing of offline messages to become more important.
The XMPP protocol is the most flexible and popular protocol among the four main current instant message protocols, and is widely applied to the instant message and online field probing layer, and many instant message tools implement the sending function of offline messages by using XMPP, such as Google's GTalk and many organizations based on Jabberd, and XMPP has become the leading standard protocol adopted by IM tools in fact.
Apple Push Notification Service (APNS) is a Service in which an Apple company receives information that needs to be pushed by an application server of a message sender by using a dedicated APNS server of the Apple company, and pushes the information to a designated IOS device.
Since the APNS server is different from the XMPP-core message server in processing and architecture, the XMPP server has not yet implemented the interface with the APNS server offline message, i.e. the offline messages of the two are isolated. In the prior art, there are two solutions for implementing offline message pushing between Android (Android) and IOS based on an XMPP architecture:
a first solution is to implement the communication of offline messages through a message forwarder. As shown in fig. 1, the message forwarder is connected to a message server of the XMPP service through an Android platform, and is connected to an APNS server through an IOS platform; further, the message server is connected with Android equipment, such as a mobile phone terminal of an Android system, and the APNS server is connected with IOS equipment, such as an apple mobile phone terminal; correspondingly, the method for realizing the offline message pushing comprises the following steps:
step A1, an Android device, such as a mobile phone terminal of an Android system, sends an offline message to a message repeater;
step A2, the message forwarder forwards the offline message to the APNS server through the IOS platform;
step a3, the APNS server receives the offline message and pushes the received offline message to the IOS device such as the iphone terminal.
However, this implementation has the following drawbacks: on one hand, the workload of the development of the message repeater is large, and the stability and the reliability are to be verified; on the other hand, a relatively large impact is generated for the application architecture that already has direct connection XMPP as a message server.
The second solution is to build up own message servers of both communication parties, and implement message communication in an Application (APP) layer, as shown in fig. 2. The method for realizing the offline message pushing specifically comprises the following steps:
step B1, the Android device, such as a mobile phone terminal of an Android system, synchronously sends the offline message to a message server built by the two communication parties;
step B2, the message server receives the off-line message, and carries on format conversion to the off-line message, converts it into code that IOS equipment can recognize, then forwards the off-line message after format conversion to IOS equipment such as apple cell phone terminal synchronously;
step B3, the apple mobile phone terminal processes the message after receiving the off-line message, and sends an Acknowledgement (ACK) message to the message server;
and step B4, the message server receives the ACK message and forwards the ACK message to the Android device until the message is successfully sent.
However, this implementation has the following drawbacks: on one hand, the message server has large workload, is completely developed autonomously and has very high cost; on the other hand, message servers are difficult to be compatible with mainstream message servers, so that third-party systems cannot use their message services.
Obviously, no suitable solution is available in the prior art for implementing offline message pushing between different protocol terminal devices.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and a system for implementing offline message pushing through XMPP, which can greatly reduce development workload, and can avoid the problems that stability and reliability cannot be guaranteed, and expansibility and compatibility are poor.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for realizing off-line message pushing through XMPP, an IOS message module is arranged between an XMPP server and an APNS server; the method further comprises the following steps:
the IOS message module receives an offline message sent by the XMPP server, acquires an equipment token of the IOS equipment corresponding to the offline message from the APNS server, and sends an offline message prompt or an offline message containing the equipment token to the APNS server.
In the above scheme, the method further comprises: and the APNS server pushes the offline message reminding or the offline message containing the device token to the IOS device.
In the foregoing scheme, the obtaining the device token of the IOS device corresponding to the offline message includes:
the IOS message module sends a request for obtaining the device token to an APNS server, wherein the request carries a device identifier of the IOS device corresponding to the offline message; the APNS server returns the device token of the IOS device corresponding to the offline message to an IOS message module; the IOS message module receives the device token returned by the APNS server.
In the above scheme, the method further comprises: setting a message pushing threshold value;
the IOS message module sends the offline message reminding or offline message containing the device token to the APNS server, and the method comprises the following steps: the IOS message module judges the size of an offline message sent by an XMPP server, if the size of the offline message is larger than a message pushing threshold, the IOS message module generates an offline message prompt corresponding to the offline message, and sends the offline message prompt containing an equipment token to an APNS server; and if the size of the offline message is smaller than or equal to the message pushing threshold, the IOS message module does not process the offline message and directly pushes the offline message containing the device token to the APNS server.
In the above scheme, the method further comprises: and setting the sub-resource priority for the IOS device offline.
The invention also provides a system for realizing the off-line message pushing through XMPP, which comprises: the system comprises an XMPP server, an IOS message module and an APNS server; wherein,
the XMPP server is used for forwarding the received offline message to the IOS message module when the IOS equipment is offline;
the IOS message module is used for receiving an offline message sent by the XMPP server and acquiring an equipment token of the IOS equipment corresponding to the offline message from the APNS server; sending an offline message reminder or an offline message containing the device token to the APNS server;
the APNS server is used for receiving the request for obtaining the device token sent by the IOS message module and sending the device token of the IOS device corresponding to the offline message to the IOS message module; and the IOS module is also used for receiving an offline message reminder or an offline message which is sent by the IOS message module and contains the device token, and pushing the offline message reminder or the offline message which contains the device token to the IOS device.
In the above scheme, the system further includes a terminal device, configured to send the message sent to the IOS device to the XMPP server.
In the above scheme, the system further includes an IOS device, configured to receive an offline message reminder or an offline message that is pushed by the APNS server and includes the device token.
In the foregoing scheme, the obtaining, by the IOS message module, the device token of the IOS device corresponding to the offline message from the APNS server includes:
the IOS message module sends a request for obtaining the device token to the APNS server, wherein the request carries the device identification of the IOS device corresponding to the offline message; the APNS server returns the device token of the IOS device corresponding to the offline message to an IOS message module; the IOS message module receives the device token returned by the APNS server.
In the above scheme, the IOS message module is further configured to determine a size of an offline message sent by the XMPP server, and if the size of the offline message is greater than a message pushing threshold, the IOS message module generates an offline message prompt corresponding to the offline message, and sends the offline message prompt including the device token to the APNS server; and if the size of the offline message is smaller than or equal to the message pushing threshold, the IOS message module does not process the offline message and directly pushes the offline message containing the device token to the APNS server.
The invention provides a method and a system for realizing offline message pushing through XMPP, wherein an IOS message module is arranged between an XMPP server and an APNS server and is used for receiving an offline message sent by the XMPP server and sending an offline message prompt or directly pushing the offline message to an IOS device through the APNS server; the off-line message pushing mechanism adopted by the invention can enable a user to instantly learn whether off-line messages are to be received or not, and send off-line message reminding or directly push the off-line messages to the terminal equipment of the user, thereby ensuring that the user can instantly check the off-line messages; in addition, the method and the device avoid the defects of large workload, independent development, high cost, complex intermediate links, poor stability and the like caused by building of the message repeater or the message server.
The IOS message module provided by the invention follows an XMPP protocol and works based on the suboptimal priority of an XMPP server, namely, for the XMPP server, the IOS equipment has the highest online priority and the second offline priority; thus, the resource priority function of the XMPP server can be fully utilized.
In addition, the IOS message module, which is a separately arranged functional module, is essentially a client of the XMPP server and an information source of the APNS server, when the bottleneck of message processing is positioned in the IOS message module, if the performance of the current IOS message module is to be improved or a plurality of offline messages reach the IOS message module at the same time, the message processing bottleneck can be solved by only increasing the number of the IOS message module servers, so that the invention is easy to realize subsequent expansion; when an XMPP server with better performance exists, the processing performance of the invention can be improved only by replacing the original XMPP server with the XMPP server with better performance without changing the IOS message module, so that the invention provides guarantee for subsequent compatibility; in addition, as long as the third-party system message is realized based on the XMPP protocol, the cost of integrating the IOS message module with the third-party system message is low, and the stability and the performance after integration can be ensured. Therefore, the IOS message module can ensure the follow-up expansion, compatibility and message integration with a third-party system, so that the system can be smoothly upgraded and has low cost.
Drawings
Fig. 1 is a schematic diagram illustrating an implementation principle of a first offline message pushing scheme among different system devices in the prior art;
fig. 2 is a schematic diagram illustrating an implementation principle of a second offline message pushing scheme between different system devices in the prior art;
FIG. 3 is a schematic processing flow diagram of a method for implementing offline message push by XMPP according to the present invention;
fig. 4 is a schematic diagram of a system structure for implementing offline message push by XMPP according to the present invention.
Detailed Description
The basic idea of the invention is: an IOS message module is arranged between the XMPP server and the APNS server and used for receiving the offline message sent by the XMPP server and sending an offline message prompt or directly pushing the offline message to the IOS equipment through the APNS server.
Here, the IOS message module may be provided in the message server as a functional module; or can be separately arranged outside the message server as an independent device.
For the offline message, a message pushing threshold value is preset according to the size of the message, and if the size of the offline message exceeds the message pushing threshold value, the IOS message module only sends an offline message prompt to the IOS device through the APNS server; otherwise, the IOS message module may push the offline message directly to the IOS device through the APNS server.
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 3 is a schematic processing flow diagram of a method for implementing offline message push by XMPP according to the present invention, and as shown in fig. 3, the method for implementing offline message push by XMPP according to the present invention includes the following steps:
step 101: the IOS message module receives an offline message sent by the XMPP server;
the method comprises the steps that an IOS message module is arranged between an XMPP server and an APNS server, and the IOS message module receives an offline message sent by the XMPP server when IOS equipment is in an offline state;
specifically, when a message sent to the IOS device reaches the XMPP server, if the IOS device is offline and the message becomes an offline message, the IOS message module is started to receive the offline message;
in the invention, the XMPP server sets the priority for the resources of the XMPP server, the online priority of the IOS equipment is the highest, and the offline priority of the IOS equipment is the next time; accordingly, the IOS messaging module initiates work through sub-resource priority scheduling.
Step 102: the IOS message module acquires the device token of the IOS device corresponding to the offline message from the APNS server;
here, the APNS server stores therein device information of each IOS device, including a device token.
Specifically, the obtaining of the device token of the IOS device corresponding to the offline message includes:
the IOS message module sends a request for obtaining the device token to an APNS server, wherein the request carries a device identifier of the IOS device corresponding to the offline message; the APNS server returns the device token of the IOS device corresponding to the offline message to an IOS message module; and the IOS message module receives the device token returned by the APNS server and is called by the subsequent APNS server.
Step 103: the IOS message module sends an offline message reminder or an offline message containing the device token to the APNS server;
here, the IOS message module may preset a message push threshold for determining whether to send an offline message alert to the APNS server or to directly send an offline message;
specifically, in this step, the IOS message module determines the size of the offline message sent by the XMPP server, and if the size of the offline message is greater than a message pushing threshold, the IOS message module generates an offline message prompt corresponding to the offline message, and sends the offline message prompt including the device token to the APNS server; and if the size of the offline message is smaller than or equal to the message pushing threshold, the IOS message module does not process the offline message and directly pushes the offline message containing the device token to the APNS server.
Here, the message push threshold refers to the size of the largest message that the IOS message module can push.
Step 104: and the APNS server pushes the offline message reminding or offline message containing the device token to the IOS device.
Here, the pushing may determine when to push according to the connection state of the IOS device, and if the application running on the IOS device is offline and the IOS device is still networked, the APNS server may implement to push an offline message reminder or an offline message to the IOS device in an instant manner; if the IOS equipment is not networked, the APNS server realizes pushing after IOS networking is needed.
Fig. 4 is a schematic diagram of a structure of a system for implementing offline message push by XMPP according to the present invention, as shown in fig. 4, the system includes: XMPP server 42, IOS message module 43, and APNS server 44; wherein,
an XMPP server 42, configured to forward the received offline message to the IOS message module 43 when the IOS device is offline;
an IOS message module 43, configured to receive an offline message sent by the XMPP server 42, and obtain, from the APNS server 44, a device token of the IOS device corresponding to the offline message; then, an offline message alert or offline message containing the device token is sent to the APNS server 44;
specifically, the obtaining, by the IOS message module 43, the device token of the IOS device corresponding to the offline message from the APNS server 44 includes:
the IOS message module 43 sends a request for obtaining a device token to the APNS server 44, where the request carries a device identifier of the IOS device corresponding to the offline message; the APNS server 44 returns the device token of the IOS device corresponding to the offline message to the IOS message module 43; the IOS message module 43 receives the device token returned by the APNS server 44 and is invoked by a subsequent APNS server.
Further, the IOS message module 43 may preset a message pushing threshold; correspondingly, the IOS message module 43 is further configured to determine a size of the offline message sent by the XMPP server 42, and if the size of the offline message is greater than a message pushing threshold, the IOS message module 43 generates an offline message reminder corresponding to the offline message, and sends the offline message reminder including the device token to the APNS server 44; if the size of the offline message is smaller than or equal to the message pushing threshold, the IOS message module 43 does not process the offline message, and directly pushes the offline message including the device token to the APNS server 44.
An APNS server 44, configured to receive the request for obtaining the device token sent by the IOS message module 43, and send the device token of the IOS device corresponding to the offline message to the IOS message module 43; and is further configured to receive an offline message reminder or an offline message including the device token sent by the IOS message module 43, and push the offline message reminder or the offline message including the device token to the IOS device.
The system further comprises a terminal device 41 for sending a message to the IOS device to an XMPP server 42;
here, if the IOS device is offline, the message becomes an offline message.
The system further includes an IOS device 45 for receiving an offline message reminder or offline message pushed by the APNS server 44 that contains the device token.
In the system shown in fig. 4, the XMPP server 42 sets priorities for its resources, where the online priority of the IOS device is the highest, and the offline priority of the IOS device is the next highest; accordingly, the IOS message module 43 initiates work through sub-resource priority scheduling.
Because the XMPP protocol is only a standard and does not contain a specific implementation process, the implementation process can be independently completed under each platform, i.e. the application program based on the XMPP protocol can be run under different platforms, such as a server, a personal computer, a handheld device, and even on an information acquisition and sensing device, so that the terminal device in the application can be expanded to various different platforms.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

CN201310230953.2A2013-06-092013-06-09A kind of method and system that deferred information push is realized by XMPPExpired - Fee RelatedCN104243271B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310230953.2ACN104243271B (en)2013-06-092013-06-09A kind of method and system that deferred information push is realized by XMPP

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310230953.2ACN104243271B (en)2013-06-092013-06-09A kind of method and system that deferred information push is realized by XMPP

Publications (2)

Publication NumberPublication Date
CN104243271A CN104243271A (en)2014-12-24
CN104243271Btrue CN104243271B (en)2018-04-03

Family

ID=52230665

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310230953.2AExpired - Fee RelatedCN104243271B (en)2013-06-092013-06-09A kind of method and system that deferred information push is realized by XMPP

Country Status (1)

CountryLink
CN (1)CN104243271B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9467296B2 (en)*2014-08-292016-10-11Intel CorporationVirally distributable trusted messaging
CN106330669A (en)*2015-06-302017-01-11南京爱特思信息技术有限公司iOS platform instant messaging system based on XMPP
CN104935674A (en)*2015-07-082015-09-23成都梦工厂网络信息有限公司Cloud push system
CN105450514B (en)*2015-12-312020-05-15惠州Tcl移动通信有限公司 XMPP-based message push method and system
CN106789582A (en)*2016-12-262017-05-31安徽尚果信息科技有限公司A kind of app information push methods
CN107086954A (en)*2017-05-232017-08-22北京奇虎科技有限公司 Message push method and device
CN107995095A (en)*2017-11-092018-05-04用友网络科技股份有限公司Method based on prompting message under the do-not-disturb mode of mobile terminal
CN110381100B (en)*2018-04-132022-03-29佛山市顺德区美的电热电器制造有限公司Message pushing method, server and computer readable storage medium
CN108989187A (en)*2018-07-272018-12-11深信服科技股份有限公司Mail instant alerts system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101888349A (en)*2009-05-132010-11-17上海即略网络信息科技有限公司Interworking gateway of MSN and XMPP
CN102685138A (en)*2012-05-212012-09-19华为技术有限公司Offline message pushing method and device
CN102724324A (en)*2012-06-282012-10-10用友软件股份有限公司Information pushing and integrating device and information pushing and integrating method
CN102984148A (en)*2012-11-232013-03-20华为技术有限公司Method, device and system for content access control

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101971621B1 (en)*2011-11-112019-04-24삼성전자주식회사Method and apparatus for brokering between server and device and computer readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101888349A (en)*2009-05-132010-11-17上海即略网络信息科技有限公司Interworking gateway of MSN and XMPP
CN102685138A (en)*2012-05-212012-09-19华为技术有限公司Offline message pushing method and device
CN102724324A (en)*2012-06-282012-10-10用友软件股份有限公司Information pushing and integrating device and information pushing and integrating method
CN102984148A (en)*2012-11-232013-03-20华为技术有限公司Method, device and system for content access control

Also Published As

Publication numberPublication date
CN104243271A (en)2014-12-24

Similar Documents

PublicationPublication DateTitle
CN104243271B (en)A kind of method and system that deferred information push is realized by XMPP
EP3300311B1 (en)Method and smart watch for interacting with a wechat platform
US11693109B2 (en)Framework and method for acknowledging multiple messages in UWB communication and ranging systems
CN104244197B (en)Mobile terminal, mobile instant communication method and system for mass communication
CN105704307A (en)Method and system for reminding intelligent terminal message
CN107426828A (en)Data transmission method, device and mobile terminal
CN106028266B (en)Information transmission method, device and system
CN103152716A (en) Automatic recharging method and mobile communication terminal thereof
CN110719647B (en) A random access method, terminal and network device
CN103401898A (en)Method for transmitting data between mobile terminals and mobile terminals
CN105162838A (en)Message pushing method, and method and device for receiving pushed message
CN105072149A (en)Method and device for building remote communication through proxy gateway
JP2014123363A5 (en)
CN104702678B (en)Document transmission method and device
CN104270826A (en)Information processing method and electronic equipment
TWI676375B (en) Communication device, communication program and communication method
CN105490773A (en)Method and device for transmitting multimedia data
CN115190562B (en) Method, device and terminal for determining establishment of relay PDU session
CN102256224A (en)Short message reminding method, equipment and communication system
CN108391325A (en)Manage the method, apparatus and terminal being wirelessly connected
CN104391576A (en)Remote input method and device based on wireless Ethernet
US20130316755A1 (en)Call control apparatus, ptt terminal, and ptt call system
CN111434100B (en)Apparatus, method, and computer-readable storage medium for data transceiving with IoT devices
CN105898673A (en)Information sending method and device
CN105554692B (en)A kind of data transmission method for uplink and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20180403

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp